]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120128
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.539 .
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   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-lib-prefix       override library-prefix
724   --with-termlib          generate separate terminfo library
725   --with-ticlib           generate separate tic library
726   --with-gpm              use Alessandro Rubini's GPM library
727   --without-dlsym         do not use dlsym() to load GPM dynamically
728   --with-sysmouse         use sysmouse (FreeBSD console)
729   --enable-rpath          use rpath option when generating shared libraries
730   --disable-relink        relink shared libraries during install
731   --with-shlib-version=X  Specify rel or abi version for shared libs
732   --disable-rpath-hack    don't add rpath options for additional libraries
733 Fine-Tuning Your Configuration:
734   --disable-overwrite     leave out the link to -lcurses
735   --disable-database      do not use terminfo, only fallbacks/termcap
736   --with-database=XXX     specify terminfo source to install
737   --with-hashed-db        specify hashed-database library
738   --with-fallbacks=XXX    specify list of fallback terminal descriptions
739   --without-xterm-new     specify if xterm terminfo should be old version
740   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
741   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
742   --disable-big-core      assume machine has little memory
743   --disable-big-strings   assume compiler has only standard-size strings
744   --enable-termcap        compile in termcap fallback support
745   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
746   --enable-getcap         fast termcap load, no xrefs to terminfo
747   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
748   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
749   --disable-root-environ  restrict environment when running as root
750   --enable-symlinks       make tic use symbolic links not hard links
751   --enable-broken_linker  compile with broken-linker support code
752   --enable-bsdpad         recognize BSD-style prefix padding
753   --enable-widec          compile with wide-char/UTF-8 code
754   --disable-lp64          allow chtype to be long (ignore _LP64)
755   --disable-largefile     omit support for large files
756   --disable-tparm-varargs compile tparm() without varargs interface
757   --disable-tic-depends   link tic library without explicit dependency on ncurses library
758   --with-bool=TYPE        override fallback type of bool variable
759   --with-caps=alt         compile with alternate Caps file
760   --with-chtype=TYPE      override type of chtype
761   --with-ospeed=TYPE      override type of ospeed variable
762   --with-mmask-t=TYPE     override type of mmask_t
763   --with-ccharw-max=XXX   override size CCHARW_MAX
764   --with-rcs-ids          compile-in RCS identifiers
765 Options to Specify How Manpages are Installed:
766   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
767                           optionally formatted/catonly, e.g., gzip,formatted
768   --with-manpage-renames  specify manpage-renaming
769   --with-manpage-aliases  specify manpage-aliases using .so
770   --with-manpage-symlinks specify manpage-aliases using symlinks
771   --with-manpage-tbl      specify manpage processing with tbl
772 Extensions:
773   --disable-ext-funcs     disable function-extensions
774   --enable-sp-funcs       enable experimental SCREEN-extensions
775   --enable-term-driver    enable experimental terminal-driver
776   --enable-const          compile with extra/non-standard const
777   --enable-ext-colors     compile for 256-color support
778   --enable-ext-mouse      compile for extended mouse-encoding
779   --enable-no-padding     compile with $NCURSES_NO_PADDING code
780   --enable-signed-char    compile using signed Boolean's in term.h
781   --enable-sigwinch       compile with SIGWINCH handler
782   --enable-tcap-names     compile with user-definable terminal capabilities
783 Development Code:
784   --without-develop       disable development options
785   --enable-hard-tabs      compile with hard-tabs code
786   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
787 Experimental Code:
788   --disable-assumed-color do not assume anything about default-colors
789   --disable-hashmap       compile without hashmap scrolling-optimization
790   --enable-colorfgbg      compile-in experimental $COLORFGBG code
791   --enable-interop        compile-in experimental interop bindings
792   --with-pthread          use POSIX thread library
793   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
794   --enable-weak-symbols   enable weak-symbols for pthreads
795   --enable-reentrant      compile with experimental reentrant code
796   --with-wrap-prefix=XXX  override prefix used for public variables
797   --enable-safe-sprintf   compile with experimental safe-sprintf code
798   --disable-scroll-hints  compile without scroll-hints code
799   --enable-wgetch-events  compile with experimental wgetch-events code
800 Testing/development Options:
801   --enable-echo           build: display "compiling" commands (default)
802   --enable-warnings       build: turn on GCC compiler warnings
803   --enable-assertions     test: turn on generation of assertion code
804   --with-dmalloc          test: use Gray Watson's dmalloc library
805   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
806   --with-valgrind         test: use valgrind
807   --disable-leaks         test: free permanent memory, analyze leaks
808   --enable-expanded       test: generate functions for certain macros
809   --disable-macros        test: use functions rather than macros
810   --with-trace            test: add trace() function to all models of ncurses
811 Ada95 Binding Options:
812   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
813   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
814   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
815   --with-ada-sharedlib=XX build Ada95 shared-library
816
817 Some influential environment variables:
818   CC          C compiler command
819   CFLAGS      C compiler flags
820   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
821               nonstandard directory <lib dir>
822   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
823               headers in a nonstandard directory <include dir>
824   CPP         C preprocessor
825   CXX         C++ compiler command
826   CXXFLAGS    C++ compiler flags
827   CXXCPP      C++ preprocessor
828
829 Use these variables to override the choices made by `configure' or to help
830 it to find libraries and programs with nonstandard names/locations.
831
832 EOF
833 fi
834
835 if test "$ac_init_help" = "recursive"; then
836   # If there are subdirs, report their specific --help.
837   ac_popdir=`pwd`
838   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
839     cd $ac_subdir
840     # A "../" for each directory in /$ac_subdir.
841     ac_dots=`echo $ac_subdir |
842              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
843
844     case $srcdir in
845     .) # No --srcdir option.  We are building in place.
846       ac_sub_srcdir=$srcdir ;;
847     [\\/]* | ?:[\\/]* ) # Absolute path.
848       ac_sub_srcdir=$srcdir/$ac_subdir ;;
849     *) # Relative path.
850       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
851     esac
852
853     # Check for guested configure; otherwise get Cygnus style configure.
854     if test -f $ac_sub_srcdir/configure.gnu; then
855       echo
856       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
857     elif test -f $ac_sub_srcdir/configure; then
858       echo
859       $SHELL $ac_sub_srcdir/configure  --help=recursive
860     elif test -f $ac_sub_srcdir/configure.ac ||
861            test -f $ac_sub_srcdir/configure.in; then
862       echo
863       $ac_configure --help
864     else
865       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
866     fi
867     cd $ac_popdir
868   done
869 fi
870
871 test -n "$ac_init_help" && exit 0
872 if $ac_init_version; then
873   cat <<\EOF
874
875 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
876 Free Software Foundation, Inc.
877 This configure script is free software; the Free Software Foundation
878 gives unlimited permission to copy, distribute and modify it.
879 EOF
880   exit 0
881 fi
882 exec 5>config.log
883 cat >&5 <<EOF
884 This file contains any messages produced by compilers while
885 running configure, to aid debugging if configure makes a mistake.
886
887 It was created by $as_me, which was
888 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
889
890   $ $0 $@
891
892 EOF
893 {
894 cat <<_ASUNAME
895 ## ---------- ##
896 ## Platform.  ##
897 ## ---------- ##
898
899 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
900 uname -m = `(uname -m) 2>/dev/null || echo unknown`
901 uname -r = `(uname -r) 2>/dev/null || echo unknown`
902 uname -s = `(uname -s) 2>/dev/null || echo unknown`
903 uname -v = `(uname -v) 2>/dev/null || echo unknown`
904
905 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
906 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
907
908 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
909 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
910 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
911 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
912 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
913 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
914 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
915
916 PATH = $PATH
917
918 _ASUNAME
919 } >&5
920
921 cat >&5 <<EOF
922 ## ------------ ##
923 ## Core tests.  ##
924 ## ------------ ##
925
926 EOF
927
928 # Keep a trace of the command line.
929 # Strip out --no-create and --no-recursion so they do not pile up.
930 # Also quote any args containing shell meta-characters.
931 ac_configure_args=
932 ac_sep=
933 for ac_arg
934 do
935   case $ac_arg in
936   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
937   | --no-cr | --no-c) ;;
938   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
939   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
940   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
941     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
942     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
943     ac_sep=" " ;;
944   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
945      ac_sep=" " ;;
946   esac
947   # Get rid of the leading space.
948 done
949
950 # When interrupted or exit'd, cleanup temporary files, and complete
951 # config.log.  We remove comments because anyway the quotes in there
952 # would cause problems or look ugly.
953 trap 'exit_status=$?
954   # Save into config.log some information that might help in debugging.
955   echo >&5
956   echo "## ----------------- ##" >&5
957   echo "## Cache variables.  ##" >&5
958   echo "## ----------------- ##" >&5
959   echo >&5
960   # The following way of writing the cache mishandles newlines in values,
961 {
962   (set) 2>&1 |
963     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
964     *ac_space=\ *)
965       sed -n \
966         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
967           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
968       ;;
969     *)
970       sed -n \
971         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
972       ;;
973     esac;
974 } >&5
975   sed "/^$/d" confdefs.h >conftest.log
976   if test -s conftest.log; then
977     echo >&5
978     echo "## ------------ ##" >&5
979     echo "## confdefs.h.  ##" >&5
980     echo "## ------------ ##" >&5
981     echo >&5
982     cat conftest.log >&5
983   fi
984   (echo; echo) >&5
985   test "$ac_signal" != 0 &&
986     echo "$as_me: caught signal $ac_signal" >&5
987   echo "$as_me: exit $exit_status" >&5
988   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
989     exit $exit_status
990      ' 0
991 for ac_signal in 1 2 13 15; do
992   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
993 done
994 ac_signal=0
995
996 # confdefs.h avoids OS command line length limits that DEFS can exceed.
997 rm -rf conftest* confdefs.h
998 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
999 echo >confdefs.h
1000
1001 # Let the site file select an alternate cache file if it wants to.
1002 # Prefer explicitly selected file to automatically selected ones.
1003 if test -z "$CONFIG_SITE"; then
1004   if test "x$prefix" != xNONE; then
1005     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1006   else
1007     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1008   fi
1009 fi
1010 for ac_site_file in $CONFIG_SITE; do
1011   if test -r "$ac_site_file"; then
1012     { echo "$as_me:1012: loading site script $ac_site_file" >&5
1013 echo "$as_me: loading site script $ac_site_file" >&6;}
1014     cat "$ac_site_file" >&5
1015     . "$ac_site_file"
1016   fi
1017 done
1018
1019 if test -r "$cache_file"; then
1020   # Some versions of bash will fail to source /dev/null (special
1021   # files actually), so we avoid doing that.
1022   if test -f "$cache_file"; then
1023     { echo "$as_me:1023: loading cache $cache_file" >&5
1024 echo "$as_me: loading cache $cache_file" >&6;}
1025     case $cache_file in
1026       [\\/]* | ?:[\\/]* ) . $cache_file;;
1027       *)                      . ./$cache_file;;
1028     esac
1029   fi
1030 else
1031   { echo "$as_me:1031: creating cache $cache_file" >&5
1032 echo "$as_me: creating cache $cache_file" >&6;}
1033   >$cache_file
1034 fi
1035
1036 # Check that the precious variables saved in the cache have kept the same
1037 # value.
1038 ac_cache_corrupted=false
1039 for ac_var in `(set) 2>&1 |
1040                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1041   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1042   eval ac_new_set=\$ac_env_${ac_var}_set
1043   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1044   eval ac_new_val="\$ac_env_${ac_var}_value"
1045   case $ac_old_set,$ac_new_set in
1046     set,)
1047       { echo "$as_me:1047: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1048 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1049       ac_cache_corrupted=: ;;
1050     ,set)
1051       { echo "$as_me:1051: error: \`$ac_var' was not set in the previous run" >&5
1052 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1053       ac_cache_corrupted=: ;;
1054     ,);;
1055     *)
1056       if test "x$ac_old_val" != "x$ac_new_val"; then
1057         { echo "$as_me:1057: error: \`$ac_var' has changed since the previous run:" >&5
1058 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1059         { echo "$as_me:1059:   former value:  $ac_old_val" >&5
1060 echo "$as_me:   former value:  $ac_old_val" >&2;}
1061         { echo "$as_me:1061:   current value: $ac_new_val" >&5
1062 echo "$as_me:   current value: $ac_new_val" >&2;}
1063         ac_cache_corrupted=:
1064       fi;;
1065   esac
1066   # Pass precious variables to config.status.  It doesn't matter if
1067   # we pass some twice (in addition to the command line arguments).
1068   if test "$ac_new_set" = set; then
1069     case $ac_new_val in
1070     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1071       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1072       ac_configure_args="$ac_configure_args '$ac_arg'"
1073       ;;
1074     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1075        ;;
1076     esac
1077   fi
1078 done
1079 if $ac_cache_corrupted; then
1080   { echo "$as_me:1080: error: changes in the environment can compromise the build" >&5
1081 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1082   { { echo "$as_me:1082: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1083 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1084    { (exit 1); exit 1; }; }
1085 fi
1086
1087 ac_ext=c
1088 ac_cpp='$CPP $CPPFLAGS'
1089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1092 ac_main_return=return
1093
1094 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1095   *c*,-n*) ECHO_N= ECHO_C='
1096 ' ECHO_T='      ' ;;
1097   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1098   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1099 esac
1100 echo "#! $SHELL" >conftest.sh
1101 echo  "exit 0"   >>conftest.sh
1102 chmod +x conftest.sh
1103 if { (echo "$as_me:1103: PATH=\".;.\"; conftest.sh") >&5
1104   (PATH=".;."; conftest.sh) 2>&5
1105   ac_status=$?
1106   echo "$as_me:1106: \$? = $ac_status" >&5
1107   (exit $ac_status); }; then
1108   ac_path_separator=';'
1109 else
1110   ac_path_separator=:
1111 fi
1112 PATH_SEPARATOR="$ac_path_separator"
1113 rm -f conftest.sh
1114
1115 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1116
1117 top_builddir=`pwd`
1118
1119 echo "$as_me:1119: checking for egrep" >&5
1120 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1121 if test "${ac_cv_prog_egrep+set}" = set; then
1122   echo $ECHO_N "(cached) $ECHO_C" >&6
1123 else
1124   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1125     then ac_cv_prog_egrep='grep -E'
1126     else ac_cv_prog_egrep='egrep'
1127     fi
1128 fi
1129 echo "$as_me:1129: result: $ac_cv_prog_egrep" >&5
1130 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1131  EGREP=$ac_cv_prog_egrep
1132
1133 test -z "$EGREP" && { { echo "$as_me:1133: error: No egrep program found" >&5
1134 echo "$as_me: error: No egrep program found" >&2;}
1135    { (exit 1); exit 1; }; }
1136
1137 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1139 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1140 cf_cv_abi_version=${NCURSES_MAJOR}
1141 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1142 cf_cv_timestamp=`date`
1143 echo "$as_me:1143: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1144 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1145
1146 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1147
1148 # Check whether --with-rel-version or --without-rel-version was given.
1149 if test "${with_rel_version+set}" = set; then
1150   withval="$with_rel_version"
1151   { echo "$as_me:1151: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1152 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1153  cf_cv_rel_version=$withval
1154 fi;
1155
1156  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1157  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1158
1159 if test -n "$NCURSES_MAJOR" ; then
1160   case $NCURSES_MAJOR in #(vi
1161   [0-9]*) #(vi
1162         ;;
1163   *)
1164         { { echo "$as_me:1164: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1165 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1166    { (exit 1); exit 1; }; }
1167         ;;
1168   esac
1169 else
1170   { { echo "$as_me:1170: error: Release major-version value is empty" >&5
1171 echo "$as_me: error: Release major-version value is empty" >&2;}
1172    { (exit 1); exit 1; }; }
1173 fi
1174
1175 if test -n "$NCURSES_MINOR" ; then
1176   case $NCURSES_MINOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1181 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release minor-version value is empty" >&5
1187 echo "$as_me: error: Release minor-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1192
1193 # Check whether --with-abi-version or --without-abi-version was given.
1194 if test "${with_abi_version+set}" = set; then
1195   withval="$with_abi_version"
1196   { echo "$as_me:1196: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1197 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1198  cf_cv_abi_version=$withval
1199 fi;
1200
1201 if test -n "$cf_cv_abi_version" ; then
1202   case $cf_cv_abi_version in #(vi
1203   [0-9]*) #(vi
1204         ;;
1205   *)
1206         { { echo "$as_me:1206: error: ABI version is not a number: $cf_cv_abi_version" >&5
1207 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1208    { (exit 1); exit 1; }; }
1209         ;;
1210   esac
1211 else
1212   { { echo "$as_me:1212: error: ABI version value is empty" >&5
1213 echo "$as_me: error: ABI version value is empty" >&2;}
1214    { (exit 1); exit 1; }; }
1215 fi
1216
1217 ac_aux_dir=
1218 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1219   if test -f $ac_dir/install-sh; then
1220     ac_aux_dir=$ac_dir
1221     ac_install_sh="$ac_aux_dir/install-sh -c"
1222     break
1223   elif test -f $ac_dir/install.sh; then
1224     ac_aux_dir=$ac_dir
1225     ac_install_sh="$ac_aux_dir/install.sh -c"
1226     break
1227   elif test -f $ac_dir/shtool; then
1228     ac_aux_dir=$ac_dir
1229     ac_install_sh="$ac_aux_dir/shtool install -c"
1230     break
1231   fi
1232 done
1233 if test -z "$ac_aux_dir"; then
1234   { { echo "$as_me:1234: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1235 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1236    { (exit 1); exit 1; }; }
1237 fi
1238 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1239 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1240 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1241
1242 # Make sure we can run config.sub.
1243 $ac_config_sub sun4 >/dev/null 2>&1 ||
1244   { { echo "$as_me:1244: error: cannot run $ac_config_sub" >&5
1245 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1246    { (exit 1); exit 1; }; }
1247
1248 echo "$as_me:1248: checking build system type" >&5
1249 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1250 if test "${ac_cv_build+set}" = set; then
1251   echo $ECHO_N "(cached) $ECHO_C" >&6
1252 else
1253   ac_cv_build_alias=$build_alias
1254 test -z "$ac_cv_build_alias" &&
1255   ac_cv_build_alias=`$ac_config_guess`
1256 test -z "$ac_cv_build_alias" &&
1257   { { echo "$as_me:1257: error: cannot guess build type; you must specify one" >&5
1258 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1259    { (exit 1); exit 1; }; }
1260 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1261   { { echo "$as_me:1261: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1262 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1263    { (exit 1); exit 1; }; }
1264
1265 fi
1266 echo "$as_me:1266: result: $ac_cv_build" >&5
1267 echo "${ECHO_T}$ac_cv_build" >&6
1268 build=$ac_cv_build
1269 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1270 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1271 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1272
1273 echo "$as_me:1273: checking host system type" >&5
1274 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1275 if test "${ac_cv_host+set}" = set; then
1276   echo $ECHO_N "(cached) $ECHO_C" >&6
1277 else
1278   ac_cv_host_alias=$host_alias
1279 test -z "$ac_cv_host_alias" &&
1280   ac_cv_host_alias=$ac_cv_build_alias
1281 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1282   { { echo "$as_me:1282: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1283 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1284    { (exit 1); exit 1; }; }
1285
1286 fi
1287 echo "$as_me:1287: result: $ac_cv_host" >&5
1288 echo "${ECHO_T}$ac_cv_host" >&6
1289 host=$ac_cv_host
1290 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1291 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1292 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1293
1294 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1295         echo "$as_me:1295: checking target system type" >&5
1296 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1297 if test "${ac_cv_target+set}" = set; then
1298   echo $ECHO_N "(cached) $ECHO_C" >&6
1299 else
1300   ac_cv_target_alias=$target_alias
1301 test "x$ac_cv_target_alias" = "x" &&
1302   ac_cv_target_alias=$ac_cv_host_alias
1303 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1304   { { echo "$as_me:1304: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1305 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1306    { (exit 1); exit 1; }; }
1307
1308 fi
1309 echo "$as_me:1309: result: $ac_cv_target" >&5
1310 echo "${ECHO_T}$ac_cv_target" >&6
1311 target=$ac_cv_target
1312 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1313 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1314 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1315
1316 # The aliases save the names the user supplied, while $host etc.
1317 # will get canonicalized.
1318 test -n "$target_alias" &&
1319   test "$program_prefix$program_suffix$program_transform_name" = \
1320     NONENONEs,x,x, &&
1321   program_prefix=${target_alias}-
1322         system_name="$host_os"
1323 else
1324         system_name="`(uname -s -r) 2>/dev/null`"
1325         if test -z "$system_name" ; then
1326                 system_name="`(hostname) 2>/dev/null`"
1327         fi
1328 fi
1329 test -n "$system_name" && cat >>confdefs.h <<EOF
1330 #define SYSTEM_NAME "$system_name"
1331 EOF
1332
1333 if test "${cf_cv_system_name+set}" = set; then
1334   echo $ECHO_N "(cached) $ECHO_C" >&6
1335 else
1336   cf_cv_system_name="$system_name"
1337 fi
1338
1339 test -z "$system_name" && system_name="$cf_cv_system_name"
1340 test -n "$cf_cv_system_name" && echo "$as_me:1340: result: Configuring for $cf_cv_system_name" >&5
1341 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1342
1343 if test ".$system_name" != ".$cf_cv_system_name" ; then
1344         echo "$as_me:1344: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1345 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1346         { { echo "$as_me:1346: error: \"Please remove config.cache and try again.\"" >&5
1347 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1348    { (exit 1); exit 1; }; }
1349 fi
1350
1351 # Check whether --with-system-type or --without-system-type was given.
1352 if test "${with_system_type+set}" = set; then
1353   withval="$with_system_type"
1354   { echo "$as_me:1354: WARNING: overriding system type to $withval" >&5
1355 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1356  cf_cv_system_name=$withval
1357 fi;
1358
1359 ###     Save the given $CFLAGS to allow user-override.
1360 cf_user_CFLAGS="$CFLAGS"
1361
1362 ###     Default install-location
1363
1364 echo "$as_me:1364: checking for prefix" >&5
1365 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1366 if test "x$prefix" = "xNONE" ; then
1367         case "$cf_cv_system_name" in
1368                 # non-vendor systems don't have a conflict
1369         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1370                 prefix=/usr
1371                 ;;
1372         *)      prefix=$ac_default_prefix
1373                 ;;
1374         esac
1375 fi
1376 echo "$as_me:1376: result: $prefix" >&5
1377 echo "${ECHO_T}$prefix" >&6
1378
1379 if test "x$prefix" = "xNONE" ; then
1380 echo "$as_me:1380: checking for default include-directory" >&5
1381 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1382 test -n "$verbose" && echo 1>&6
1383 for cf_symbol in \
1384         $includedir \
1385         $includedir/ncurses \
1386         $prefix/include \
1387         $prefix/include/ncurses \
1388         /usr/local/include \
1389         /usr/local/include/ncurses \
1390         /usr/include \
1391         /usr/include/ncurses
1392 do
1393         cf_dir=`eval echo $cf_symbol`
1394         if test -f $cf_dir/curses.h ; then
1395         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1396                 includedir="$cf_symbol"
1397                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1398                 break
1399         fi
1400         fi
1401         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1402 done
1403 echo "$as_me:1403: result: $includedir" >&5
1404 echo "${ECHO_T}$includedir" >&6
1405 fi
1406
1407 ###     Checks for programs.
1408 ac_ext=c
1409 ac_cpp='$CPP $CPPFLAGS'
1410 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1411 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1412 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1413 ac_main_return=return
1414 if test -n "$ac_tool_prefix"; then
1415   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1416 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1417 echo "$as_me:1417: checking for $ac_word" >&5
1418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1419 if test "${ac_cv_prog_CC+set}" = set; then
1420   echo $ECHO_N "(cached) $ECHO_C" >&6
1421 else
1422   if test -n "$CC"; then
1423   ac_cv_prog_CC="$CC" # Let the user override the test.
1424 else
1425   ac_save_IFS=$IFS; IFS=$ac_path_separator
1426 ac_dummy="$PATH"
1427 for ac_dir in $ac_dummy; do
1428   IFS=$ac_save_IFS
1429   test -z "$ac_dir" && ac_dir=.
1430   $as_executable_p "$ac_dir/$ac_word" || continue
1431 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1432 echo "$as_me:1432: found $ac_dir/$ac_word" >&5
1433 break
1434 done
1435
1436 fi
1437 fi
1438 CC=$ac_cv_prog_CC
1439 if test -n "$CC"; then
1440   echo "$as_me:1440: result: $CC" >&5
1441 echo "${ECHO_T}$CC" >&6
1442 else
1443   echo "$as_me:1443: result: no" >&5
1444 echo "${ECHO_T}no" >&6
1445 fi
1446
1447 fi
1448 if test -z "$ac_cv_prog_CC"; then
1449   ac_ct_CC=$CC
1450   # Extract the first word of "gcc", so it can be a program name with args.
1451 set dummy gcc; ac_word=$2
1452 echo "$as_me:1452: checking for $ac_word" >&5
1453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1454 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1455   echo $ECHO_N "(cached) $ECHO_C" >&6
1456 else
1457   if test -n "$ac_ct_CC"; then
1458   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1459 else
1460   ac_save_IFS=$IFS; IFS=$ac_path_separator
1461 ac_dummy="$PATH"
1462 for ac_dir in $ac_dummy; do
1463   IFS=$ac_save_IFS
1464   test -z "$ac_dir" && ac_dir=.
1465   $as_executable_p "$ac_dir/$ac_word" || continue
1466 ac_cv_prog_ac_ct_CC="gcc"
1467 echo "$as_me:1467: found $ac_dir/$ac_word" >&5
1468 break
1469 done
1470
1471 fi
1472 fi
1473 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1474 if test -n "$ac_ct_CC"; then
1475   echo "$as_me:1475: result: $ac_ct_CC" >&5
1476 echo "${ECHO_T}$ac_ct_CC" >&6
1477 else
1478   echo "$as_me:1478: result: no" >&5
1479 echo "${ECHO_T}no" >&6
1480 fi
1481
1482   CC=$ac_ct_CC
1483 else
1484   CC="$ac_cv_prog_CC"
1485 fi
1486
1487 if test -z "$CC"; then
1488   if test -n "$ac_tool_prefix"; then
1489   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1490 set dummy ${ac_tool_prefix}cc; ac_word=$2
1491 echo "$as_me:1491: checking for $ac_word" >&5
1492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1493 if test "${ac_cv_prog_CC+set}" = set; then
1494   echo $ECHO_N "(cached) $ECHO_C" >&6
1495 else
1496   if test -n "$CC"; then
1497   ac_cv_prog_CC="$CC" # Let the user override the test.
1498 else
1499   ac_save_IFS=$IFS; IFS=$ac_path_separator
1500 ac_dummy="$PATH"
1501 for ac_dir in $ac_dummy; do
1502   IFS=$ac_save_IFS
1503   test -z "$ac_dir" && ac_dir=.
1504   $as_executable_p "$ac_dir/$ac_word" || continue
1505 ac_cv_prog_CC="${ac_tool_prefix}cc"
1506 echo "$as_me:1506: found $ac_dir/$ac_word" >&5
1507 break
1508 done
1509
1510 fi
1511 fi
1512 CC=$ac_cv_prog_CC
1513 if test -n "$CC"; then
1514   echo "$as_me:1514: result: $CC" >&5
1515 echo "${ECHO_T}$CC" >&6
1516 else
1517   echo "$as_me:1517: result: no" >&5
1518 echo "${ECHO_T}no" >&6
1519 fi
1520
1521 fi
1522 if test -z "$ac_cv_prog_CC"; then
1523   ac_ct_CC=$CC
1524   # Extract the first word of "cc", so it can be a program name with args.
1525 set dummy cc; ac_word=$2
1526 echo "$as_me:1526: checking for $ac_word" >&5
1527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1528 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1529   echo $ECHO_N "(cached) $ECHO_C" >&6
1530 else
1531   if test -n "$ac_ct_CC"; then
1532   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1533 else
1534   ac_save_IFS=$IFS; IFS=$ac_path_separator
1535 ac_dummy="$PATH"
1536 for ac_dir in $ac_dummy; do
1537   IFS=$ac_save_IFS
1538   test -z "$ac_dir" && ac_dir=.
1539   $as_executable_p "$ac_dir/$ac_word" || continue
1540 ac_cv_prog_ac_ct_CC="cc"
1541 echo "$as_me:1541: found $ac_dir/$ac_word" >&5
1542 break
1543 done
1544
1545 fi
1546 fi
1547 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1548 if test -n "$ac_ct_CC"; then
1549   echo "$as_me:1549: result: $ac_ct_CC" >&5
1550 echo "${ECHO_T}$ac_ct_CC" >&6
1551 else
1552   echo "$as_me:1552: result: no" >&5
1553 echo "${ECHO_T}no" >&6
1554 fi
1555
1556   CC=$ac_ct_CC
1557 else
1558   CC="$ac_cv_prog_CC"
1559 fi
1560
1561 fi
1562 if test -z "$CC"; then
1563   # Extract the first word of "cc", so it can be a program name with args.
1564 set dummy cc; ac_word=$2
1565 echo "$as_me:1565: checking for $ac_word" >&5
1566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1567 if test "${ac_cv_prog_CC+set}" = set; then
1568   echo $ECHO_N "(cached) $ECHO_C" >&6
1569 else
1570   if test -n "$CC"; then
1571   ac_cv_prog_CC="$CC" # Let the user override the test.
1572 else
1573   ac_prog_rejected=no
1574   ac_save_IFS=$IFS; IFS=$ac_path_separator
1575 ac_dummy="$PATH"
1576 for ac_dir in $ac_dummy; do
1577   IFS=$ac_save_IFS
1578   test -z "$ac_dir" && ac_dir=.
1579   $as_executable_p "$ac_dir/$ac_word" || continue
1580 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1581   ac_prog_rejected=yes
1582   continue
1583 fi
1584 ac_cv_prog_CC="cc"
1585 echo "$as_me:1585: found $ac_dir/$ac_word" >&5
1586 break
1587 done
1588
1589 if test $ac_prog_rejected = yes; then
1590   # We found a bogon in the path, so make sure we never use it.
1591   set dummy $ac_cv_prog_CC
1592   shift
1593   if test $# != 0; then
1594     # We chose a different compiler from the bogus one.
1595     # However, it has the same basename, so the bogon will be chosen
1596     # first if we set CC to just the basename; use the full file name.
1597     shift
1598     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1599     shift
1600     ac_cv_prog_CC="$@"
1601   fi
1602 fi
1603 fi
1604 fi
1605 CC=$ac_cv_prog_CC
1606 if test -n "$CC"; then
1607   echo "$as_me:1607: result: $CC" >&5
1608 echo "${ECHO_T}$CC" >&6
1609 else
1610   echo "$as_me:1610: result: no" >&5
1611 echo "${ECHO_T}no" >&6
1612 fi
1613
1614 fi
1615 if test -z "$CC"; then
1616   if test -n "$ac_tool_prefix"; then
1617   for ac_prog in cl
1618   do
1619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621 echo "$as_me:1621: checking for $ac_word" >&5
1622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623 if test "${ac_cv_prog_CC+set}" = set; then
1624   echo $ECHO_N "(cached) $ECHO_C" >&6
1625 else
1626   if test -n "$CC"; then
1627   ac_cv_prog_CC="$CC" # Let the user override the test.
1628 else
1629   ac_save_IFS=$IFS; IFS=$ac_path_separator
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632   IFS=$ac_save_IFS
1633   test -z "$ac_dir" && ac_dir=.
1634   $as_executable_p "$ac_dir/$ac_word" || continue
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637 break
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:1644: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:1647: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651     test -n "$CC" && break
1652   done
1653 fi
1654 if test -z "$CC"; then
1655   ac_ct_CC=$CC
1656   for ac_prog in cl
1657 do
1658   # Extract the first word of "$ac_prog", so it can be a program name with args.
1659 set dummy $ac_prog; ac_word=$2
1660 echo "$as_me:1660: checking for $ac_word" >&5
1661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663   echo $ECHO_N "(cached) $ECHO_C" >&6
1664 else
1665   if test -n "$ac_ct_CC"; then
1666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667 else
1668   ac_save_IFS=$IFS; IFS=$ac_path_separator
1669 ac_dummy="$PATH"
1670 for ac_dir in $ac_dummy; do
1671   IFS=$ac_save_IFS
1672   test -z "$ac_dir" && ac_dir=.
1673   $as_executable_p "$ac_dir/$ac_word" || continue
1674 ac_cv_prog_ac_ct_CC="$ac_prog"
1675 echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676 break
1677 done
1678
1679 fi
1680 fi
1681 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682 if test -n "$ac_ct_CC"; then
1683   echo "$as_me:1683: result: $ac_ct_CC" >&5
1684 echo "${ECHO_T}$ac_ct_CC" >&6
1685 else
1686   echo "$as_me:1686: result: no" >&5
1687 echo "${ECHO_T}no" >&6
1688 fi
1689
1690   test -n "$ac_ct_CC" && break
1691 done
1692
1693   CC=$ac_ct_CC
1694 fi
1695
1696 fi
1697
1698 test -z "$CC" && { { echo "$as_me:1698: error: no acceptable cc found in \$PATH" >&5
1699 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1700    { (exit 1); exit 1; }; }
1701
1702 # Provide some information about the compiler.
1703 echo "$as_me:1703:" \
1704      "checking for C compiler version" >&5
1705 ac_compiler=`set X $ac_compile; echo $2`
1706 { (eval echo "$as_me:1706: \"$ac_compiler --version </dev/null >&5\"") >&5
1707   (eval $ac_compiler --version </dev/null >&5) 2>&5
1708   ac_status=$?
1709   echo "$as_me:1709: \$? = $ac_status" >&5
1710   (exit $ac_status); }
1711 { (eval echo "$as_me:1711: \"$ac_compiler -v </dev/null >&5\"") >&5
1712   (eval $ac_compiler -v </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716 { (eval echo "$as_me:1716: \"$ac_compiler -V </dev/null >&5\"") >&5
1717   (eval $ac_compiler -V </dev/null >&5) 2>&5
1718   ac_status=$?
1719   echo "$as_me:1719: \$? = $ac_status" >&5
1720   (exit $ac_status); }
1721
1722 cat >conftest.$ac_ext <<_ACEOF
1723 #line 1723 "configure"
1724 #include "confdefs.h"
1725
1726 int
1727 main ()
1728 {
1729
1730   ;
1731   return 0;
1732 }
1733 _ACEOF
1734 ac_clean_files_save=$ac_clean_files
1735 ac_clean_files="$ac_clean_files a.out a.exe"
1736 # Try to create an executable without -o first, disregard a.out.
1737 # It will help us diagnose broken compilers, and finding out an intuition
1738 # of exeext.
1739 echo "$as_me:1739: checking for C compiler default output" >&5
1740 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1741 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1742 if { (eval echo "$as_me:1742: \"$ac_link_default\"") >&5
1743   (eval $ac_link_default) 2>&5
1744   ac_status=$?
1745   echo "$as_me:1745: \$? = $ac_status" >&5
1746   (exit $ac_status); }; then
1747   # Find the output, starting from the most likely.  This scheme is
1748 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1749 # resort.
1750 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1751                 ls a.out conftest 2>/dev/null;
1752                 ls a.* conftest.* 2>/dev/null`; do
1753   case $ac_file in
1754     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1755     a.out ) # We found the default executable, but exeext='' is most
1756             # certainly right.
1757             break;;
1758     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1759           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1760           export ac_cv_exeext
1761           break;;
1762     * ) break;;
1763   esac
1764 done
1765 else
1766   echo "$as_me: failed program was:" >&5
1767 cat conftest.$ac_ext >&5
1768 { { echo "$as_me:1768: error: C compiler cannot create executables" >&5
1769 echo "$as_me: error: C compiler cannot create executables" >&2;}
1770    { (exit 77); exit 77; }; }
1771 fi
1772
1773 ac_exeext=$ac_cv_exeext
1774 echo "$as_me:1774: result: $ac_file" >&5
1775 echo "${ECHO_T}$ac_file" >&6
1776
1777 # Check the compiler produces executables we can run.  If not, either
1778 # the compiler is broken, or we cross compile.
1779 echo "$as_me:1779: checking whether the C compiler works" >&5
1780 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1781 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1782 # If not cross compiling, check that we can run a simple program.
1783 if test "$cross_compiling" != yes; then
1784   if { ac_try='./$ac_file'
1785   { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1786   (eval $ac_try) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; }; then
1790     cross_compiling=no
1791   else
1792     if test "$cross_compiling" = maybe; then
1793         cross_compiling=yes
1794     else
1795         { { echo "$as_me:1795: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&5
1797 echo "$as_me: error: cannot run C compiled programs.
1798 If you meant to cross compile, use \`--host'." >&2;}
1799    { (exit 1); exit 1; }; }
1800     fi
1801   fi
1802 fi
1803 echo "$as_me:1803: result: yes" >&5
1804 echo "${ECHO_T}yes" >&6
1805
1806 rm -f a.out a.exe conftest$ac_cv_exeext
1807 ac_clean_files=$ac_clean_files_save
1808 # Check the compiler produces executables we can run.  If not, either
1809 # the compiler is broken, or we cross compile.
1810 echo "$as_me:1810: checking whether we are cross compiling" >&5
1811 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1812 echo "$as_me:1812: result: $cross_compiling" >&5
1813 echo "${ECHO_T}$cross_compiling" >&6
1814
1815 echo "$as_me:1815: checking for executable suffix" >&5
1816 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1817 if { (eval echo "$as_me:1817: \"$ac_link\"") >&5
1818   (eval $ac_link) 2>&5
1819   ac_status=$?
1820   echo "$as_me:1820: \$? = $ac_status" >&5
1821   (exit $ac_status); }; then
1822   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1823 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1824 # work properly (i.e., refer to `conftest.exe'), while it won't with
1825 # `rm'.
1826 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1827   case $ac_file in
1828     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1829     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1830           export ac_cv_exeext
1831           break;;
1832     * ) break;;
1833   esac
1834 done
1835 else
1836   { { echo "$as_me:1836: error: cannot compute EXEEXT: cannot compile and link" >&5
1837 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1838    { (exit 1); exit 1; }; }
1839 fi
1840
1841 rm -f conftest$ac_cv_exeext
1842 echo "$as_me:1842: result: $ac_cv_exeext" >&5
1843 echo "${ECHO_T}$ac_cv_exeext" >&6
1844
1845 rm -f conftest.$ac_ext
1846 EXEEXT=$ac_cv_exeext
1847 ac_exeext=$EXEEXT
1848 echo "$as_me:1848: checking for object suffix" >&5
1849 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1850 if test "${ac_cv_objext+set}" = set; then
1851   echo $ECHO_N "(cached) $ECHO_C" >&6
1852 else
1853   cat >conftest.$ac_ext <<_ACEOF
1854 #line 1854 "configure"
1855 #include "confdefs.h"
1856
1857 int
1858 main ()
1859 {
1860
1861   ;
1862   return 0;
1863 }
1864 _ACEOF
1865 rm -f conftest.o conftest.obj
1866 if { (eval echo "$as_me:1866: \"$ac_compile\"") >&5
1867   (eval $ac_compile) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit $ac_status); }; then
1871   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1872   case $ac_file in
1873     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1874     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1875        break;;
1876   esac
1877 done
1878 else
1879   echo "$as_me: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 { { echo "$as_me:1881: error: cannot compute OBJEXT: cannot compile" >&5
1882 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1883    { (exit 1); exit 1; }; }
1884 fi
1885
1886 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1887 fi
1888 echo "$as_me:1888: result: $ac_cv_objext" >&5
1889 echo "${ECHO_T}$ac_cv_objext" >&6
1890 OBJEXT=$ac_cv_objext
1891 ac_objext=$OBJEXT
1892 echo "$as_me:1892: checking whether we are using the GNU C compiler" >&5
1893 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1894 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1895   echo $ECHO_N "(cached) $ECHO_C" >&6
1896 else
1897   cat >conftest.$ac_ext <<_ACEOF
1898 #line 1898 "configure"
1899 #include "confdefs.h"
1900
1901 int
1902 main ()
1903 {
1904 #ifndef __GNUC__
1905        choke me
1906 #endif
1907
1908   ;
1909   return 0;
1910 }
1911 _ACEOF
1912 rm -f conftest.$ac_objext
1913 if { (eval echo "$as_me:1913: \"$ac_compile\"") >&5
1914   (eval $ac_compile) 2>&5
1915   ac_status=$?
1916   echo "$as_me:1916: \$? = $ac_status" >&5
1917   (exit $ac_status); } &&
1918          { ac_try='test -s conftest.$ac_objext'
1919   { (eval echo "$as_me:1919: \"$ac_try\"") >&5
1920   (eval $ac_try) 2>&5
1921   ac_status=$?
1922   echo "$as_me:1922: \$? = $ac_status" >&5
1923   (exit $ac_status); }; }; then
1924   ac_compiler_gnu=yes
1925 else
1926   echo "$as_me: failed program was:" >&5
1927 cat conftest.$ac_ext >&5
1928 ac_compiler_gnu=no
1929 fi
1930 rm -f conftest.$ac_objext conftest.$ac_ext
1931 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1932
1933 fi
1934 echo "$as_me:1934: result: $ac_cv_c_compiler_gnu" >&5
1935 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1936 GCC=`test $ac_compiler_gnu = yes && echo yes`
1937 ac_test_CFLAGS=${CFLAGS+set}
1938 ac_save_CFLAGS=$CFLAGS
1939 CFLAGS="-g"
1940 echo "$as_me:1940: checking whether $CC accepts -g" >&5
1941 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1942 if test "${ac_cv_prog_cc_g+set}" = set; then
1943   echo $ECHO_N "(cached) $ECHO_C" >&6
1944 else
1945   cat >conftest.$ac_ext <<_ACEOF
1946 #line 1946 "configure"
1947 #include "confdefs.h"
1948
1949 int
1950 main ()
1951 {
1952
1953   ;
1954   return 0;
1955 }
1956 _ACEOF
1957 rm -f conftest.$ac_objext
1958 if { (eval echo "$as_me:1958: \"$ac_compile\"") >&5
1959   (eval $ac_compile) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } &&
1963          { ac_try='test -s conftest.$ac_objext'
1964   { (eval echo "$as_me:1964: \"$ac_try\"") >&5
1965   (eval $ac_try) 2>&5
1966   ac_status=$?
1967   echo "$as_me:1967: \$? = $ac_status" >&5
1968   (exit $ac_status); }; }; then
1969   ac_cv_prog_cc_g=yes
1970 else
1971   echo "$as_me: failed program was:" >&5
1972 cat conftest.$ac_ext >&5
1973 ac_cv_prog_cc_g=no
1974 fi
1975 rm -f conftest.$ac_objext conftest.$ac_ext
1976 fi
1977 echo "$as_me:1977: result: $ac_cv_prog_cc_g" >&5
1978 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1979 if test "$ac_test_CFLAGS" = set; then
1980   CFLAGS=$ac_save_CFLAGS
1981 elif test $ac_cv_prog_cc_g = yes; then
1982   if test "$GCC" = yes; then
1983     CFLAGS="-g -O2"
1984   else
1985     CFLAGS="-g"
1986   fi
1987 else
1988   if test "$GCC" = yes; then
1989     CFLAGS="-O2"
1990   else
1991     CFLAGS=
1992   fi
1993 fi
1994 # Some people use a C++ compiler to compile C.  Since we use `exit',
1995 # in C++ we need to declare it.  In case someone uses the same compiler
1996 # for both compiling C and C++ we need to have the C++ compiler decide
1997 # the declaration of exit, since it's the most demanding environment.
1998 cat >conftest.$ac_ext <<_ACEOF
1999 #ifndef __cplusplus
2000   choke me
2001 #endif
2002 _ACEOF
2003 rm -f conftest.$ac_objext
2004 if { (eval echo "$as_me:2004: \"$ac_compile\"") >&5
2005   (eval $ac_compile) 2>&5
2006   ac_status=$?
2007   echo "$as_me:2007: \$? = $ac_status" >&5
2008   (exit $ac_status); } &&
2009          { ac_try='test -s conftest.$ac_objext'
2010   { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2011   (eval $ac_try) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); }; }; then
2015   for ac_declaration in \
2016    ''\
2017    '#include <stdlib.h>' \
2018    'extern "C" void std::exit (int) throw (); using std::exit;' \
2019    'extern "C" void std::exit (int); using std::exit;' \
2020    'extern "C" void exit (int) throw ();' \
2021    'extern "C" void exit (int);' \
2022    'void exit (int);'
2023 do
2024   cat >conftest.$ac_ext <<_ACEOF
2025 #line 2025 "configure"
2026 #include "confdefs.h"
2027 #include <stdlib.h>
2028 $ac_declaration
2029 int
2030 main ()
2031 {
2032 exit (42);
2033   ;
2034   return 0;
2035 }
2036 _ACEOF
2037 rm -f conftest.$ac_objext
2038 if { (eval echo "$as_me:2038: \"$ac_compile\"") >&5
2039   (eval $ac_compile) 2>&5
2040   ac_status=$?
2041   echo "$as_me:2041: \$? = $ac_status" >&5
2042   (exit $ac_status); } &&
2043          { ac_try='test -s conftest.$ac_objext'
2044   { (eval echo "$as_me:2044: \"$ac_try\"") >&5
2045   (eval $ac_try) 2>&5
2046   ac_status=$?
2047   echo "$as_me:2047: \$? = $ac_status" >&5
2048   (exit $ac_status); }; }; then
2049   :
2050 else
2051   echo "$as_me: failed program was:" >&5
2052 cat conftest.$ac_ext >&5
2053 continue
2054 fi
2055 rm -f conftest.$ac_objext conftest.$ac_ext
2056   cat >conftest.$ac_ext <<_ACEOF
2057 #line 2057 "configure"
2058 #include "confdefs.h"
2059 $ac_declaration
2060 int
2061 main ()
2062 {
2063 exit (42);
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 rm -f conftest.$ac_objext
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070   (eval $ac_compile) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit $ac_status); } &&
2074          { ac_try='test -s conftest.$ac_objext'
2075   { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:2078: \$? = $ac_status" >&5
2079   (exit $ac_status); }; }; then
2080   break
2081 else
2082   echo "$as_me: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 fi
2085 rm -f conftest.$ac_objext conftest.$ac_ext
2086 done
2087 rm -rf conftest*
2088 if test -n "$ac_declaration"; then
2089   echo '#ifdef __cplusplus' >>confdefs.h
2090   echo $ac_declaration      >>confdefs.h
2091   echo '#endif'             >>confdefs.h
2092 fi
2093
2094 else
2095   echo "$as_me: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097 fi
2098 rm -f conftest.$ac_objext conftest.$ac_ext
2099 ac_ext=c
2100 ac_cpp='$CPP $CPPFLAGS'
2101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2104 ac_main_return=return
2105
2106 GCC_VERSION=none
2107 if test "$GCC" = yes ; then
2108         echo "$as_me:2108: checking version of $CC" >&5
2109 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2110         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2111         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2112         echo "$as_me:2112: result: $GCC_VERSION" >&5
2113 echo "${ECHO_T}$GCC_VERSION" >&6
2114 fi
2115
2116 ac_ext=c
2117 ac_cpp='$CPP $CPPFLAGS'
2118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2121 ac_main_return=return
2122 echo "$as_me:2122: checking how to run the C preprocessor" >&5
2123 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2124 # On Suns, sometimes $CPP names a directory.
2125 if test -n "$CPP" && test -d "$CPP"; then
2126   CPP=
2127 fi
2128 if test -z "$CPP"; then
2129   if test "${ac_cv_prog_CPP+set}" = set; then
2130   echo $ECHO_N "(cached) $ECHO_C" >&6
2131 else
2132       # Double quotes because CPP needs to be expanded
2133     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2134     do
2135       ac_preproc_ok=false
2136 for ac_c_preproc_warn_flag in '' yes
2137 do
2138   # Use a header file that comes with gcc, so configuring glibc
2139   # with a fresh cross-compiler works.
2140   # On the NeXT, cc -E runs the code through the compiler's parser,
2141   # not just through cpp. "Syntax error" is here to catch this case.
2142   cat >conftest.$ac_ext <<_ACEOF
2143 #line 2143 "configure"
2144 #include "confdefs.h"
2145 #include <assert.h>
2146                      Syntax error
2147 _ACEOF
2148 if { (eval echo "$as_me:2148: \"$ac_cpp conftest.$ac_ext\"") >&5
2149   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2150   ac_status=$?
2151   egrep -v '^ *\+' conftest.er1 >conftest.err
2152   rm -f conftest.er1
2153   cat conftest.err >&5
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } >/dev/null; then
2156   if test -s conftest.err; then
2157     ac_cpp_err=$ac_c_preproc_warn_flag
2158   else
2159     ac_cpp_err=
2160   fi
2161 else
2162   ac_cpp_err=yes
2163 fi
2164 if test -z "$ac_cpp_err"; then
2165   :
2166 else
2167   echo "$as_me: failed program was:" >&5
2168   cat conftest.$ac_ext >&5
2169   # Broken: fails on valid input.
2170 continue
2171 fi
2172 rm -f conftest.err conftest.$ac_ext
2173
2174   # OK, works on sane cases.  Now check whether non-existent headers
2175   # can be detected and how.
2176   cat >conftest.$ac_ext <<_ACEOF
2177 #line 2177 "configure"
2178 #include "confdefs.h"
2179 #include <ac_nonexistent.h>
2180 _ACEOF
2181 if { (eval echo "$as_me:2181: \"$ac_cpp conftest.$ac_ext\"") >&5
2182   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2183   ac_status=$?
2184   egrep -v '^ *\+' conftest.er1 >conftest.err
2185   rm -f conftest.er1
2186   cat conftest.err >&5
2187   echo "$as_me:2187: \$? = $ac_status" >&5
2188   (exit $ac_status); } >/dev/null; then
2189   if test -s conftest.err; then
2190     ac_cpp_err=$ac_c_preproc_warn_flag
2191   else
2192     ac_cpp_err=
2193   fi
2194 else
2195   ac_cpp_err=yes
2196 fi
2197 if test -z "$ac_cpp_err"; then
2198   # Broken: success on invalid input.
2199 continue
2200 else
2201   echo "$as_me: failed program was:" >&5
2202   cat conftest.$ac_ext >&5
2203   # Passes both tests.
2204 ac_preproc_ok=:
2205 break
2206 fi
2207 rm -f conftest.err conftest.$ac_ext
2208
2209 done
2210 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2211 rm -f conftest.err conftest.$ac_ext
2212 if $ac_preproc_ok; then
2213   break
2214 fi
2215
2216     done
2217     ac_cv_prog_CPP=$CPP
2218
2219 fi
2220   CPP=$ac_cv_prog_CPP
2221 else
2222   ac_cv_prog_CPP=$CPP
2223 fi
2224 echo "$as_me:2224: result: $CPP" >&5
2225 echo "${ECHO_T}$CPP" >&6
2226 ac_preproc_ok=false
2227 for ac_c_preproc_warn_flag in '' yes
2228 do
2229   # Use a header file that comes with gcc, so configuring glibc
2230   # with a fresh cross-compiler works.
2231   # On the NeXT, cc -E runs the code through the compiler's parser,
2232   # not just through cpp. "Syntax error" is here to catch this case.
2233   cat >conftest.$ac_ext <<_ACEOF
2234 #line 2234 "configure"
2235 #include "confdefs.h"
2236 #include <assert.h>
2237                      Syntax error
2238 _ACEOF
2239 if { (eval echo "$as_me:2239: \"$ac_cpp conftest.$ac_ext\"") >&5
2240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2241   ac_status=$?
2242   egrep -v '^ *\+' conftest.er1 >conftest.err
2243   rm -f conftest.er1
2244   cat conftest.err >&5
2245   echo "$as_me:2245: \$? = $ac_status" >&5
2246   (exit $ac_status); } >/dev/null; then
2247   if test -s conftest.err; then
2248     ac_cpp_err=$ac_c_preproc_warn_flag
2249   else
2250     ac_cpp_err=
2251   fi
2252 else
2253   ac_cpp_err=yes
2254 fi
2255 if test -z "$ac_cpp_err"; then
2256   :
2257 else
2258   echo "$as_me: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   # Broken: fails on valid input.
2261 continue
2262 fi
2263 rm -f conftest.err conftest.$ac_ext
2264
2265   # OK, works on sane cases.  Now check whether non-existent headers
2266   # can be detected and how.
2267   cat >conftest.$ac_ext <<_ACEOF
2268 #line 2268 "configure"
2269 #include "confdefs.h"
2270 #include <ac_nonexistent.h>
2271 _ACEOF
2272 if { (eval echo "$as_me:2272: \"$ac_cpp conftest.$ac_ext\"") >&5
2273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2274   ac_status=$?
2275   egrep -v '^ *\+' conftest.er1 >conftest.err
2276   rm -f conftest.er1
2277   cat conftest.err >&5
2278   echo "$as_me:2278: \$? = $ac_status" >&5
2279   (exit $ac_status); } >/dev/null; then
2280   if test -s conftest.err; then
2281     ac_cpp_err=$ac_c_preproc_warn_flag
2282   else
2283     ac_cpp_err=
2284   fi
2285 else
2286   ac_cpp_err=yes
2287 fi
2288 if test -z "$ac_cpp_err"; then
2289   # Broken: success on invalid input.
2290 continue
2291 else
2292   echo "$as_me: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   # Passes both tests.
2295 ac_preproc_ok=:
2296 break
2297 fi
2298 rm -f conftest.err conftest.$ac_ext
2299
2300 done
2301 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2302 rm -f conftest.err conftest.$ac_ext
2303 if $ac_preproc_ok; then
2304   :
2305 else
2306   { { echo "$as_me:2306: error: C preprocessor \"$CPP\" fails sanity check" >&5
2307 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2308    { (exit 1); exit 1; }; }
2309 fi
2310
2311 ac_ext=c
2312 ac_cpp='$CPP $CPPFLAGS'
2313 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2314 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2316 ac_main_return=return
2317
2318 if test $ac_cv_c_compiler_gnu = yes; then
2319     echo "$as_me:2319: checking whether $CC needs -traditional" >&5
2320 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2321 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2322   echo $ECHO_N "(cached) $ECHO_C" >&6
2323 else
2324     ac_pattern="Autoconf.*'x'"
2325   cat >conftest.$ac_ext <<_ACEOF
2326 #line 2326 "configure"
2327 #include "confdefs.h"
2328 #include <sgtty.h>
2329 int Autoconf = TIOCGETP;
2330 _ACEOF
2331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2332   egrep "$ac_pattern" >/dev/null 2>&1; then
2333   ac_cv_prog_gcc_traditional=yes
2334 else
2335   ac_cv_prog_gcc_traditional=no
2336 fi
2337 rm -rf conftest*
2338
2339   if test $ac_cv_prog_gcc_traditional = no; then
2340     cat >conftest.$ac_ext <<_ACEOF
2341 #line 2341 "configure"
2342 #include "confdefs.h"
2343 #include <termio.h>
2344 int Autoconf = TCGETA;
2345 _ACEOF
2346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2347   egrep "$ac_pattern" >/dev/null 2>&1; then
2348   ac_cv_prog_gcc_traditional=yes
2349 fi
2350 rm -rf conftest*
2351
2352   fi
2353 fi
2354 echo "$as_me:2354: result: $ac_cv_prog_gcc_traditional" >&5
2355 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2356   if test $ac_cv_prog_gcc_traditional = yes; then
2357     CC="$CC -traditional"
2358   fi
2359 fi
2360
2361 echo "$as_me:2361: checking whether $CC understands -c and -o together" >&5
2362 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2363 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2364   echo $ECHO_N "(cached) $ECHO_C" >&6
2365 else
2366
2367 cat > conftest.$ac_ext <<CF_EOF
2368 #include <stdio.h>
2369 int main()
2370 {
2371         ${cf_cv_main_return:-return}(0);
2372 }
2373 CF_EOF
2374 # We do the test twice because some compilers refuse to overwrite an
2375 # existing .o file with -o, though they will create one.
2376 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2377 if { (eval echo "$as_me:2377: \"$ac_try\"") >&5
2378   (eval $ac_try) 2>&5
2379   ac_status=$?
2380   echo "$as_me:2380: \$? = $ac_status" >&5
2381   (exit $ac_status); } &&
2382   test -f conftest2.$ac_objext && { (eval echo "$as_me:2382: \"$ac_try\"") >&5
2383   (eval $ac_try) 2>&5
2384   ac_status=$?
2385   echo "$as_me:2385: \$? = $ac_status" >&5
2386   (exit $ac_status); };
2387 then
2388   eval cf_cv_prog_CC_c_o=yes
2389 else
2390   eval cf_cv_prog_CC_c_o=no
2391 fi
2392 rm -rf conftest*
2393
2394 fi
2395 if test $cf_cv_prog_CC_c_o = yes; then
2396   echo "$as_me:2396: result: yes" >&5
2397 echo "${ECHO_T}yes" >&6
2398 else
2399   echo "$as_me:2399: result: no" >&5
2400 echo "${ECHO_T}no" >&6
2401 fi
2402
2403 echo "$as_me:2403: checking for POSIXized ISC" >&5
2404 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2405 if test -d /etc/conf/kconfig.d &&
2406    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2407 then
2408   echo "$as_me:2408: result: yes" >&5
2409 echo "${ECHO_T}yes" >&6
2410   ISC=yes # If later tests want to check for ISC.
2411
2412 cat >>confdefs.h <<\EOF
2413 #define _POSIX_SOURCE 1
2414 EOF
2415
2416   if test "$GCC" = yes; then
2417     CC="$CC -posix"
2418   else
2419     CC="$CC -Xp"
2420   fi
2421 else
2422   echo "$as_me:2422: result: no" >&5
2423 echo "${ECHO_T}no" >&6
2424   ISC=
2425 fi
2426
2427 # This should have been defined by AC_PROG_CC
2428 : ${CC:=cc}
2429
2430 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2431 # into CC.  This will not help with broken scripts that wrap the compiler with
2432 # options, but eliminates a more common category of user confusion.
2433 echo "$as_me:2433: checking \$CC variable" >&5
2434 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2435 case "$CC" in #(vi
2436 *[\ \   ]-[IUD]*)
2437         echo "$as_me:2437: result: broken" >&5
2438 echo "${ECHO_T}broken" >&6
2439         { echo "$as_me:2439: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2440 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2441         # humor him...
2442         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2443         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2444
2445 cf_fix_cppflags=no
2446 cf_new_cflags=
2447 cf_new_cppflags=
2448 cf_new_extra_cppflags=
2449
2450 for cf_add_cflags in $cf_flags
2451 do
2452 case $cf_fix_cppflags in
2453 no)
2454         case $cf_add_cflags in #(vi
2455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2456                 case $cf_add_cflags in
2457                 -D*)
2458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2459
2460                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2461                                 && test -z "${cf_tst_cflags}" \
2462                                 && cf_fix_cppflags=yes
2463
2464                         if test $cf_fix_cppflags = yes ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         elif test "${cf_tst_cflags}" = "\"'" ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         fi
2471                         ;;
2472                 esac
2473                 case "$CPPFLAGS" in
2474                 *$cf_add_cflags) #(vi
2475                         ;;
2476                 *) #(vi
2477                         case $cf_add_cflags in #(vi
2478                         -D*)
2479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2480
2481 CPPFLAGS=`echo "$CPPFLAGS" | \
2482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2484
2485                                 ;;
2486                         esac
2487                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2488                         ;;
2489                 esac
2490                 ;;
2491         *)
2492                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2493                 ;;
2494         esac
2495         ;;
2496 yes)
2497         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2498
2499         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2500
2501         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2502                 && test -z "${cf_tst_cflags}" \
2503                 && cf_fix_cppflags=no
2504         ;;
2505 esac
2506 done
2507
2508 if test -n "$cf_new_cflags" ; then
2509
2510         CFLAGS="$CFLAGS $cf_new_cflags"
2511 fi
2512
2513 if test -n "$cf_new_cppflags" ; then
2514
2515         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2516 fi
2517
2518 if test -n "$cf_new_extra_cppflags" ; then
2519
2520         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2521 fi
2522
2523         ;;
2524 *)
2525         echo "$as_me:2525: result: ok" >&5
2526 echo "${ECHO_T}ok" >&6
2527         ;;
2528 esac
2529
2530 echo "$as_me:2530: checking for ${CC:-cc} option to accept ANSI C" >&5
2531 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2532 if test "${cf_cv_ansi_cc+set}" = set; then
2533   echo $ECHO_N "(cached) $ECHO_C" >&6
2534 else
2535
2536 cf_cv_ansi_cc=no
2537 cf_save_CFLAGS="$CFLAGS"
2538 cf_save_CPPFLAGS="$CPPFLAGS"
2539 # Don't try gcc -ansi; that turns off useful extensions and
2540 # breaks some systems' header files.
2541 # AIX                   -qlanglvl=ansi
2542 # Ultrix and OSF/1      -std1
2543 # HP-UX                 -Aa -D_HPUX_SOURCE
2544 # SVR4                  -Xc
2545 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2546 for cf_arg in "-DCC_HAS_PROTOS" \
2547         "" \
2548         -qlanglvl=ansi \
2549         -std1 \
2550         -Ae \
2551         "-Aa -D_HPUX_SOURCE" \
2552         -Xc
2553 do
2554
2555 cf_fix_cppflags=no
2556 cf_new_cflags=
2557 cf_new_cppflags=
2558 cf_new_extra_cppflags=
2559
2560 for cf_add_cflags in $cf_arg
2561 do
2562 case $cf_fix_cppflags in
2563 no)
2564         case $cf_add_cflags in #(vi
2565         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2566                 case $cf_add_cflags in
2567                 -D*)
2568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2571                                 && test -z "${cf_tst_cflags}" \
2572                                 && cf_fix_cppflags=yes
2573
2574                         if test $cf_fix_cppflags = yes ; then
2575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576                                 continue
2577                         elif test "${cf_tst_cflags}" = "\"'" ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         fi
2581                         ;;
2582                 esac
2583                 case "$CPPFLAGS" in
2584                 *$cf_add_cflags) #(vi
2585                         ;;
2586                 *) #(vi
2587                         case $cf_add_cflags in #(vi
2588                         -D*)
2589                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2590
2591 CPPFLAGS=`echo "$CPPFLAGS" | \
2592         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2593                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2594
2595                                 ;;
2596                         esac
2597                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2598                         ;;
2599                 esac
2600                 ;;
2601         *)
2602                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2603                 ;;
2604         esac
2605         ;;
2606 yes)
2607         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2608
2609         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2610
2611         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2612                 && test -z "${cf_tst_cflags}" \
2613                 && cf_fix_cppflags=no
2614         ;;
2615 esac
2616 done
2617
2618 if test -n "$cf_new_cflags" ; then
2619
2620         CFLAGS="$CFLAGS $cf_new_cflags"
2621 fi
2622
2623 if test -n "$cf_new_cppflags" ; then
2624
2625         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2626 fi
2627
2628 if test -n "$cf_new_extra_cppflags" ; then
2629
2630         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2631 fi
2632
2633         cat >conftest.$ac_ext <<_ACEOF
2634 #line 2634 "configure"
2635 #include "confdefs.h"
2636
2637 #ifndef CC_HAS_PROTOS
2638 #if !defined(__STDC__) || (__STDC__ != 1)
2639 choke me
2640 #endif
2641 #endif
2642
2643 int
2644 main ()
2645 {
2646
2647         int test (int i, double x);
2648         struct s1 {int (*f) (int a);};
2649         struct s2 {int (*f) (double a);};
2650   ;
2651   return 0;
2652 }
2653 _ACEOF
2654 rm -f conftest.$ac_objext
2655 if { (eval echo "$as_me:2655: \"$ac_compile\"") >&5
2656   (eval $ac_compile) 2>&5
2657   ac_status=$?
2658   echo "$as_me:2658: \$? = $ac_status" >&5
2659   (exit $ac_status); } &&
2660          { ac_try='test -s conftest.$ac_objext'
2661   { (eval echo "$as_me:2661: \"$ac_try\"") >&5
2662   (eval $ac_try) 2>&5
2663   ac_status=$?
2664   echo "$as_me:2664: \$? = $ac_status" >&5
2665   (exit $ac_status); }; }; then
2666   cf_cv_ansi_cc="$cf_arg"; break
2667 else
2668   echo "$as_me: failed program was:" >&5
2669 cat conftest.$ac_ext >&5
2670 fi
2671 rm -f conftest.$ac_objext conftest.$ac_ext
2672 done
2673 CFLAGS="$cf_save_CFLAGS"
2674 CPPFLAGS="$cf_save_CPPFLAGS"
2675
2676 fi
2677 echo "$as_me:2677: result: $cf_cv_ansi_cc" >&5
2678 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2679
2680 if test "$cf_cv_ansi_cc" != "no"; then
2681 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2682
2683 cf_fix_cppflags=no
2684 cf_new_cflags=
2685 cf_new_cppflags=
2686 cf_new_extra_cppflags=
2687
2688 for cf_add_cflags in $cf_cv_ansi_cc
2689 do
2690 case $cf_fix_cppflags in
2691 no)
2692         case $cf_add_cflags in #(vi
2693         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2694                 case $cf_add_cflags in
2695                 -D*)
2696                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2697
2698                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2699                                 && test -z "${cf_tst_cflags}" \
2700                                 && cf_fix_cppflags=yes
2701
2702                         if test $cf_fix_cppflags = yes ; then
2703                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2707                                 continue
2708                         fi
2709                         ;;
2710                 esac
2711                 case "$CPPFLAGS" in
2712                 *$cf_add_cflags) #(vi
2713                         ;;
2714                 *) #(vi
2715                         case $cf_add_cflags in #(vi
2716                         -D*)
2717                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2718
2719 CPPFLAGS=`echo "$CPPFLAGS" | \
2720         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2721                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2722
2723                                 ;;
2724                         esac
2725                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2726                         ;;
2727                 esac
2728                 ;;
2729         *)
2730                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2731                 ;;
2732         esac
2733         ;;
2734 yes)
2735         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2736
2737         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2738
2739         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2740                 && test -z "${cf_tst_cflags}" \
2741                 && cf_fix_cppflags=no
2742         ;;
2743 esac
2744 done
2745
2746 if test -n "$cf_new_cflags" ; then
2747
2748         CFLAGS="$CFLAGS $cf_new_cflags"
2749 fi
2750
2751 if test -n "$cf_new_cppflags" ; then
2752
2753         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2754 fi
2755
2756 if test -n "$cf_new_extra_cppflags" ; then
2757
2758         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2759 fi
2760
2761 else
2762         cat >>confdefs.h <<\EOF
2763 #define CC_HAS_PROTOS 1
2764 EOF
2765
2766 fi
2767 fi
2768
2769 if test "$cf_cv_ansi_cc" = "no"; then
2770         { { echo "$as_me:2770: error: Your compiler does not appear to recognize prototypes.
2771 You have the following choices:
2772         a. adjust your compiler options
2773         b. get an up-to-date compiler
2774         c. use a wrapper such as unproto" >&5
2775 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2776 You have the following choices:
2777         a. adjust your compiler options
2778         b. get an up-to-date compiler
2779         c. use a wrapper such as unproto" >&2;}
2780    { (exit 1); exit 1; }; }
2781 fi
2782
2783 case $cf_cv_system_name in
2784 os2*)
2785     CFLAGS="$CFLAGS -Zmt"
2786     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2787     CXXFLAGS="$CXXFLAGS -Zmt"
2788     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2789     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2790     ac_cv_exeext=.exe
2791     ;;
2792 esac
2793
2794 PROG_EXT="$EXEEXT"
2795
2796 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2797 #define PROG_EXT "$PROG_EXT"
2798 EOF
2799
2800 if test "$cross_compiling" = yes ; then
2801   LDCONFIG=:
2802 else
2803 case "$cf_cv_system_name" in #(vi
2804 dragonfly*|mirbsd*|freebsd*) #(vi
2805   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2806   ;;
2807 *) LDPATH=$PATH:/sbin:/usr/sbin
2808   # Extract the first word of "ldconfig", so it can be a program name with args.
2809 set dummy ldconfig; ac_word=$2
2810 echo "$as_me:2810: checking for $ac_word" >&5
2811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2812 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2813   echo $ECHO_N "(cached) $ECHO_C" >&6
2814 else
2815   case $LDCONFIG in
2816   [\\/]* | ?:[\\/]*)
2817   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2818   ;;
2819   *)
2820   ac_save_IFS=$IFS; IFS=$ac_path_separator
2821 ac_dummy="$LDPATH"
2822 for ac_dir in $ac_dummy; do
2823   IFS=$ac_save_IFS
2824   test -z "$ac_dir" && ac_dir=.
2825   if $as_executable_p "$ac_dir/$ac_word"; then
2826    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2827    echo "$as_me:2827: found $ac_dir/$ac_word" >&5
2828    break
2829 fi
2830 done
2831
2832   ;;
2833 esac
2834 fi
2835 LDCONFIG=$ac_cv_path_LDCONFIG
2836
2837 if test -n "$LDCONFIG"; then
2838   echo "$as_me:2838: result: $LDCONFIG" >&5
2839 echo "${ECHO_T}$LDCONFIG" >&6
2840 else
2841   echo "$as_me:2841: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2843 fi
2844
2845   ;;
2846 esac
2847 fi
2848
2849 echo "$as_me:2849: checking if you want to ensure bool is consistent with C++" >&5
2850 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2851
2852 # Check whether --with-cxx or --without-cxx was given.
2853 if test "${with_cxx+set}" = set; then
2854   withval="$with_cxx"
2855   cf_with_cxx=$withval
2856 else
2857   cf_with_cxx=yes
2858 fi;
2859 echo "$as_me:2859: result: $cf_with_cxx" >&5
2860 echo "${ECHO_T}$cf_with_cxx" >&6
2861 if test "X$cf_with_cxx" = Xno ; then
2862         CXX=""
2863         GXX=""
2864 else
2865         # with autoconf 2.13, we can change the error to a warning:
2866                 ac_ext=cc
2867 ac_cpp='$CXXCPP $CPPFLAGS'
2868 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2871 ac_main_return=return
2872 if test -n "$ac_tool_prefix"; then
2873   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2874   do
2875     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2876 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2877 echo "$as_me:2877: checking for $ac_word" >&5
2878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2879 if test "${ac_cv_prog_CXX+set}" = set; then
2880   echo $ECHO_N "(cached) $ECHO_C" >&6
2881 else
2882   if test -n "$CXX"; then
2883   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2884 else
2885   ac_save_IFS=$IFS; IFS=$ac_path_separator
2886 ac_dummy="$PATH"
2887 for ac_dir in $ac_dummy; do
2888   IFS=$ac_save_IFS
2889   test -z "$ac_dir" && ac_dir=.
2890   $as_executable_p "$ac_dir/$ac_word" || continue
2891 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2892 echo "$as_me:2892: found $ac_dir/$ac_word" >&5
2893 break
2894 done
2895
2896 fi
2897 fi
2898 CXX=$ac_cv_prog_CXX
2899 if test -n "$CXX"; then
2900   echo "$as_me:2900: result: $CXX" >&5
2901 echo "${ECHO_T}$CXX" >&6
2902 else
2903   echo "$as_me:2903: result: no" >&5
2904 echo "${ECHO_T}no" >&6
2905 fi
2906
2907     test -n "$CXX" && break
2908   done
2909 fi
2910 if test -z "$CXX"; then
2911   ac_ct_CXX=$CXX
2912   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2913 do
2914   # Extract the first word of "$ac_prog", so it can be a program name with args.
2915 set dummy $ac_prog; ac_word=$2
2916 echo "$as_me:2916: checking for $ac_word" >&5
2917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2918 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2919   echo $ECHO_N "(cached) $ECHO_C" >&6
2920 else
2921   if test -n "$ac_ct_CXX"; then
2922   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2923 else
2924   ac_save_IFS=$IFS; IFS=$ac_path_separator
2925 ac_dummy="$PATH"
2926 for ac_dir in $ac_dummy; do
2927   IFS=$ac_save_IFS
2928   test -z "$ac_dir" && ac_dir=.
2929   $as_executable_p "$ac_dir/$ac_word" || continue
2930 ac_cv_prog_ac_ct_CXX="$ac_prog"
2931 echo "$as_me:2931: found $ac_dir/$ac_word" >&5
2932 break
2933 done
2934
2935 fi
2936 fi
2937 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2938 if test -n "$ac_ct_CXX"; then
2939   echo "$as_me:2939: result: $ac_ct_CXX" >&5
2940 echo "${ECHO_T}$ac_ct_CXX" >&6
2941 else
2942   echo "$as_me:2942: result: no" >&5
2943 echo "${ECHO_T}no" >&6
2944 fi
2945
2946   test -n "$ac_ct_CXX" && break
2947 done
2948 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2949
2950   CXX=$ac_ct_CXX
2951 fi
2952
2953 # Provide some information about the compiler.
2954 echo "$as_me:2954:" \
2955      "checking for C++ compiler version" >&5
2956 ac_compiler=`set X $ac_compile; echo $2`
2957 { (eval echo "$as_me:2957: \"$ac_compiler --version </dev/null >&5\"") >&5
2958   (eval $ac_compiler --version </dev/null >&5) 2>&5
2959   ac_status=$?
2960   echo "$as_me:2960: \$? = $ac_status" >&5
2961   (exit $ac_status); }
2962 { (eval echo "$as_me:2962: \"$ac_compiler -v </dev/null >&5\"") >&5
2963   (eval $ac_compiler -v </dev/null >&5) 2>&5
2964   ac_status=$?
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit $ac_status); }
2967 { (eval echo "$as_me:2967: \"$ac_compiler -V </dev/null >&5\"") >&5
2968   (eval $ac_compiler -V </dev/null >&5) 2>&5
2969   ac_status=$?
2970   echo "$as_me:2970: \$? = $ac_status" >&5
2971   (exit $ac_status); }
2972
2973 echo "$as_me:2973: checking whether we are using the GNU C++ compiler" >&5
2974 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2975 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2976   echo $ECHO_N "(cached) $ECHO_C" >&6
2977 else
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981
2982 int
2983 main ()
2984 {
2985 #ifndef __GNUC__
2986        choke me
2987 #endif
2988
2989   ;
2990   return 0;
2991 }
2992 _ACEOF
2993 rm -f conftest.$ac_objext
2994 if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
2995   (eval $ac_compile) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); } &&
2999          { ac_try='test -s conftest.$ac_objext'
3000   { (eval echo "$as_me:3000: \"$ac_try\"") >&5
3001   (eval $ac_try) 2>&5
3002   ac_status=$?
3003   echo "$as_me:3003: \$? = $ac_status" >&5
3004   (exit $ac_status); }; }; then
3005   ac_compiler_gnu=yes
3006 else
3007   echo "$as_me: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 ac_compiler_gnu=no
3010 fi
3011 rm -f conftest.$ac_objext conftest.$ac_ext
3012 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3013
3014 fi
3015 echo "$as_me:3015: result: $ac_cv_cxx_compiler_gnu" >&5
3016 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3017 GXX=`test $ac_compiler_gnu = yes && echo yes`
3018 ac_test_CXXFLAGS=${CXXFLAGS+set}
3019 ac_save_CXXFLAGS=$CXXFLAGS
3020 CXXFLAGS="-g"
3021 echo "$as_me:3021: checking whether $CXX accepts -g" >&5
3022 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3023 if test "${ac_cv_prog_cxx_g+set}" = set; then
3024   echo $ECHO_N "(cached) $ECHO_C" >&6
3025 else
3026   cat >conftest.$ac_ext <<_ACEOF
3027 #line 3027 "configure"
3028 #include "confdefs.h"
3029
3030 int
3031 main ()
3032 {
3033
3034   ;
3035   return 0;
3036 }
3037 _ACEOF
3038 rm -f conftest.$ac_objext
3039 if { (eval echo "$as_me:3039: \"$ac_compile\"") >&5
3040   (eval $ac_compile) 2>&5
3041   ac_status=$?
3042   echo "$as_me:3042: \$? = $ac_status" >&5
3043   (exit $ac_status); } &&
3044          { ac_try='test -s conftest.$ac_objext'
3045   { (eval echo "$as_me:3045: \"$ac_try\"") >&5
3046   (eval $ac_try) 2>&5
3047   ac_status=$?
3048   echo "$as_me:3048: \$? = $ac_status" >&5
3049   (exit $ac_status); }; }; then
3050   ac_cv_prog_cxx_g=yes
3051 else
3052   echo "$as_me: failed program was:" >&5
3053 cat conftest.$ac_ext >&5
3054 ac_cv_prog_cxx_g=no
3055 fi
3056 rm -f conftest.$ac_objext conftest.$ac_ext
3057 fi
3058 echo "$as_me:3058: result: $ac_cv_prog_cxx_g" >&5
3059 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3060 if test "$ac_test_CXXFLAGS" = set; then
3061   CXXFLAGS=$ac_save_CXXFLAGS
3062 elif test $ac_cv_prog_cxx_g = yes; then
3063   if test "$GXX" = yes; then
3064     CXXFLAGS="-g -O2"
3065   else
3066     CXXFLAGS="-g"
3067   fi
3068 else
3069   if test "$GXX" = yes; then
3070     CXXFLAGS="-O2"
3071   else
3072     CXXFLAGS=
3073   fi
3074 fi
3075 for ac_declaration in \
3076    ''\
3077    '#include <stdlib.h>' \
3078    'extern "C" void std::exit (int) throw (); using std::exit;' \
3079    'extern "C" void std::exit (int); using std::exit;' \
3080    'extern "C" void exit (int) throw ();' \
3081    'extern "C" void exit (int);' \
3082    'void exit (int);'
3083 do
3084   cat >conftest.$ac_ext <<_ACEOF
3085 #line 3085 "configure"
3086 #include "confdefs.h"
3087 #include <stdlib.h>
3088 $ac_declaration
3089 int
3090 main ()
3091 {
3092 exit (42);
3093   ;
3094   return 0;
3095 }
3096 _ACEOF
3097 rm -f conftest.$ac_objext
3098 if { (eval echo "$as_me:3098: \"$ac_compile\"") >&5
3099   (eval $ac_compile) 2>&5
3100   ac_status=$?
3101   echo "$as_me:3101: \$? = $ac_status" >&5
3102   (exit $ac_status); } &&
3103          { ac_try='test -s conftest.$ac_objext'
3104   { (eval echo "$as_me:3104: \"$ac_try\"") >&5
3105   (eval $ac_try) 2>&5
3106   ac_status=$?
3107   echo "$as_me:3107: \$? = $ac_status" >&5
3108   (exit $ac_status); }; }; then
3109   :
3110 else
3111   echo "$as_me: failed program was:" >&5
3112 cat conftest.$ac_ext >&5
3113 continue
3114 fi
3115 rm -f conftest.$ac_objext conftest.$ac_ext
3116   cat >conftest.$ac_ext <<_ACEOF
3117 #line 3117 "configure"
3118 #include "confdefs.h"
3119 $ac_declaration
3120 int
3121 main ()
3122 {
3123 exit (42);
3124   ;
3125   return 0;
3126 }
3127 _ACEOF
3128 rm -f conftest.$ac_objext
3129 if { (eval echo "$as_me:3129: \"$ac_compile\"") >&5
3130   (eval $ac_compile) 2>&5
3131   ac_status=$?
3132   echo "$as_me:3132: \$? = $ac_status" >&5
3133   (exit $ac_status); } &&
3134          { ac_try='test -s conftest.$ac_objext'
3135   { (eval echo "$as_me:3135: \"$ac_try\"") >&5
3136   (eval $ac_try) 2>&5
3137   ac_status=$?
3138   echo "$as_me:3138: \$? = $ac_status" >&5
3139   (exit $ac_status); }; }; then
3140   break
3141 else
3142   echo "$as_me: failed program was:" >&5
3143 cat conftest.$ac_ext >&5
3144 fi
3145 rm -f conftest.$ac_objext conftest.$ac_ext
3146 done
3147 rm -rf conftest*
3148 if test -n "$ac_declaration"; then
3149   echo '#ifdef __cplusplus' >>confdefs.h
3150   echo $ac_declaration      >>confdefs.h
3151   echo '#endif'             >>confdefs.h
3152 fi
3153
3154 ac_ext=c
3155 ac_cpp='$CPP $CPPFLAGS'
3156 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3157 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3158 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3159 ac_main_return=return
3160
3161                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3162         if test "$CXX" = "g++" ; then
3163                 # Extract the first word of "g++", so it can be a program name with args.
3164 set dummy g++; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_path_CXX+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   case $CXX in
3171   [\\/]* | ?:[\\/]*)
3172   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3173   ;;
3174   *)
3175   ac_save_IFS=$IFS; IFS=$ac_path_separator
3176 ac_dummy="$PATH"
3177 for ac_dir in $ac_dummy; do
3178   IFS=$ac_save_IFS
3179   test -z "$ac_dir" && ac_dir=.
3180   if $as_executable_p "$ac_dir/$ac_word"; then
3181    ac_cv_path_CXX="$ac_dir/$ac_word"
3182    echo "$as_me:3182: found $ac_dir/$ac_word" >&5
3183    break
3184 fi
3185 done
3186
3187   ;;
3188 esac
3189 fi
3190 CXX=$ac_cv_path_CXX
3191
3192 if test -n "$CXX"; then
3193   echo "$as_me:3193: result: $CXX" >&5
3194 echo "${ECHO_T}$CXX" >&6
3195 else
3196   echo "$as_me:3196: result: no" >&5
3197 echo "${ECHO_T}no" >&6
3198 fi
3199
3200         fi
3201         if test "$CXX" = "g++" ; then
3202                 { echo "$as_me:3202: WARNING: ignoring hardcoded g++" >&5
3203 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3204                 cf_with_cxx=no; CXX=""; GXX="";
3205         fi
3206 fi
3207
3208 GXX_VERSION=none
3209 if test "$GXX" = yes; then
3210         echo "$as_me:3210: checking version of g++" >&5
3211 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3212         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3213         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3214         echo "$as_me:3214: result: $GXX_VERSION" >&5
3215 echo "${ECHO_T}$GXX_VERSION" >&6
3216 fi
3217
3218 case $GXX_VERSION in
3219 1*|2.[0-6]*)
3220         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3221         # cf_cxx_library=no
3222         { echo "$as_me:3222: WARNING: templates do not work" >&5
3223 echo "$as_me: WARNING: templates do not work" >&2;}
3224         ;;
3225 esac
3226
3227 echo "$as_me:3227: checking if you want to build C++ binding and demo" >&5
3228 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3229
3230 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3231 if test "${with_cxx_binding+set}" = set; then
3232   withval="$with_cxx_binding"
3233   cf_with_cxx_binding=$withval
3234 else
3235   cf_with_cxx_binding=$cf_with_cxx
3236 fi;
3237 echo "$as_me:3237: result: $cf_with_cxx_binding" >&5
3238 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3239
3240 echo "$as_me:3240: checking if you want to build with Ada95" >&5
3241 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3242
3243 # Check whether --with-ada or --without-ada was given.
3244 if test "${with_ada+set}" = set; then
3245   withval="$with_ada"
3246   cf_with_ada=$withval
3247 else
3248   cf_with_ada=yes
3249 fi;
3250 echo "$as_me:3250: result: $cf_with_ada" >&5
3251 echo "${ECHO_T}$cf_with_ada" >&6
3252
3253 echo "$as_me:3253: checking if you want to install manpages" >&5
3254 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3255
3256 # Check whether --with-manpages or --without-manpages was given.
3257 if test "${with_manpages+set}" = set; then
3258   withval="$with_manpages"
3259   cf_with_manpages=$withval
3260 else
3261   cf_with_manpages=yes
3262 fi;
3263 echo "$as_me:3263: result: $cf_with_manpages" >&5
3264 echo "${ECHO_T}$cf_with_manpages" >&6
3265
3266 echo "$as_me:3266: checking if you want to build programs such as tic" >&5
3267 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3268
3269 # Check whether --with-progs or --without-progs was given.
3270 if test "${with_progs+set}" = set; then
3271   withval="$with_progs"
3272   cf_with_progs=$withval
3273 else
3274   cf_with_progs=yes
3275 fi;
3276 echo "$as_me:3276: result: $cf_with_progs" >&5
3277 echo "${ECHO_T}$cf_with_progs" >&6
3278
3279 echo "$as_me:3279: checking if you want to build test-programs" >&5
3280 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3281
3282 # Check whether --with-tests or --without-tests was given.
3283 if test "${with_tests+set}" = set; then
3284   withval="$with_tests"
3285   cf_with_tests=$withval
3286 else
3287   cf_with_tests=yes
3288 fi;
3289 echo "$as_me:3289: result: $cf_with_tests" >&5
3290 echo "${ECHO_T}$cf_with_tests" >&6
3291
3292 echo "$as_me:3292: checking if you wish to install curses.h" >&5
3293 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3294
3295 # Check whether --with-curses-h or --without-curses-h was given.
3296 if test "${with_curses_h+set}" = set; then
3297   withval="$with_curses_h"
3298   with_curses_h=$withval
3299 else
3300   with_curses_h=yes
3301 fi;
3302 echo "$as_me:3302: result: $with_curses_h" >&5
3303 echo "${ECHO_T}$with_curses_h" >&6
3304
3305 modules_to_build="ncurses"
3306 if test "X$cf_with_progs" != Xno ; then
3307 modules_to_build="$modules_to_build progs tack"
3308 fi
3309 modules_to_build="$modules_to_build panel menu form"
3310
3311 test "$program_prefix" != NONE &&
3312   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3313 # Use a double $ so make ignores it.
3314 test "$program_suffix" != NONE &&
3315   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3316 # Double any \ or $.  echo might interpret backslashes.
3317 # By default was `s,x,x', remove it if useless.
3318 cat <<\_ACEOF >conftest.sed
3319 s/[\\$]/&&/g;s/;s,x,x,$//
3320 _ACEOF
3321 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3322 rm conftest.sed
3323
3324 for ac_prog in mawk gawk nawk awk
3325 do
3326   # Extract the first word of "$ac_prog", so it can be a program name with args.
3327 set dummy $ac_prog; ac_word=$2
3328 echo "$as_me:3328: checking for $ac_word" >&5
3329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3330 if test "${ac_cv_prog_AWK+set}" = set; then
3331   echo $ECHO_N "(cached) $ECHO_C" >&6
3332 else
3333   if test -n "$AWK"; then
3334   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3335 else
3336   ac_save_IFS=$IFS; IFS=$ac_path_separator
3337 ac_dummy="$PATH"
3338 for ac_dir in $ac_dummy; do
3339   IFS=$ac_save_IFS
3340   test -z "$ac_dir" && ac_dir=.
3341   $as_executable_p "$ac_dir/$ac_word" || continue
3342 ac_cv_prog_AWK="$ac_prog"
3343 echo "$as_me:3343: found $ac_dir/$ac_word" >&5
3344 break
3345 done
3346
3347 fi
3348 fi
3349 AWK=$ac_cv_prog_AWK
3350 if test -n "$AWK"; then
3351   echo "$as_me:3351: result: $AWK" >&5
3352 echo "${ECHO_T}$AWK" >&6
3353 else
3354   echo "$as_me:3354: result: no" >&5
3355 echo "${ECHO_T}no" >&6
3356 fi
3357
3358   test -n "$AWK" && break
3359 done
3360
3361 test -z "$AWK" && { { echo "$as_me:3361: error: No awk program found" >&5
3362 echo "$as_me: error: No awk program found" >&2;}
3363    { (exit 1); exit 1; }; }
3364
3365 echo "$as_me:3365: checking for egrep" >&5
3366 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3367 if test "${ac_cv_prog_egrep+set}" = set; then
3368   echo $ECHO_N "(cached) $ECHO_C" >&6
3369 else
3370   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3371     then ac_cv_prog_egrep='grep -E'
3372     else ac_cv_prog_egrep='egrep'
3373     fi
3374 fi
3375 echo "$as_me:3375: result: $ac_cv_prog_egrep" >&5
3376 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3377  EGREP=$ac_cv_prog_egrep
3378
3379 test -z "$EGREP" && { { echo "$as_me:3379: error: No egrep program found" >&5
3380 echo "$as_me: error: No egrep program found" >&2;}
3381    { (exit 1); exit 1; }; }
3382
3383 # Find a good install program.  We prefer a C program (faster),
3384 # so one script is as good as another.  But avoid the broken or
3385 # incompatible versions:
3386 # SysV /etc/install, /usr/sbin/install
3387 # SunOS /usr/etc/install
3388 # IRIX /sbin/install
3389 # AIX /bin/install
3390 # AmigaOS /C/install, which installs bootblocks on floppy discs
3391 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3392 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3393 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3394 # ./install, which can be erroneously created by make from ./install.sh.
3395 echo "$as_me:3395: checking for a BSD compatible install" >&5
3396 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3397 if test -z "$INSTALL"; then
3398 if test "${ac_cv_path_install+set}" = set; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401     ac_save_IFS=$IFS; IFS=$ac_path_separator
3402   for ac_dir in $PATH; do
3403     IFS=$ac_save_IFS
3404     # Account for people who put trailing slashes in PATH elements.
3405     case $ac_dir/ in
3406     / | ./ | .// | /cC/* \
3407     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3408     | /usr/ucb/* ) ;;
3409     *)
3410       # OSF1 and SCO ODT 3.0 have their own names for install.
3411       # Don't use installbsd from OSF since it installs stuff as root
3412       # by default.
3413       for ac_prog in ginstall scoinst install; do
3414         if $as_executable_p "$ac_dir/$ac_prog"; then
3415           if test $ac_prog = install &&
3416             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3417             # AIX install.  It has an incompatible calling convention.
3418             :
3419           elif test $ac_prog = install &&
3420             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3421             # program-specific install script used by HP pwplus--don't use.
3422             :
3423           else
3424             ac_cv_path_install="$ac_dir/$ac_prog -c"
3425             break 2
3426           fi
3427         fi
3428       done
3429       ;;
3430     esac
3431   done
3432
3433 fi
3434   if test "${ac_cv_path_install+set}" = set; then
3435     INSTALL=$ac_cv_path_install
3436   else
3437     # As a last resort, use the slow shell script.  We don't cache a
3438     # path for INSTALL within a source directory, because that will
3439     # break other packages using the cache if that directory is
3440     # removed, or if the path is relative.
3441     INSTALL=$ac_install_sh
3442   fi
3443 fi
3444 echo "$as_me:3444: result: $INSTALL" >&5
3445 echo "${ECHO_T}$INSTALL" >&6
3446
3447 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3448 # It thinks the first close brace ends the variable substitution.
3449 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3450
3451 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3452
3453 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3454
3455 case $INSTALL in
3456 /*)
3457   ;;
3458 *)
3459   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3460   test -z "$cf_dir" && cf_dir=.
3461   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3462   ;;
3463 esac
3464
3465 for ac_prog in tdlint lint alint splint lclint
3466 do
3467   # Extract the first word of "$ac_prog", so it can be a program name with args.
3468 set dummy $ac_prog; ac_word=$2
3469 echo "$as_me:3469: checking for $ac_word" >&5
3470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3471 if test "${ac_cv_prog_LINT+set}" = set; then
3472   echo $ECHO_N "(cached) $ECHO_C" >&6
3473 else
3474   if test -n "$LINT"; then
3475   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3476 else
3477   ac_save_IFS=$IFS; IFS=$ac_path_separator
3478 ac_dummy="$PATH"
3479 for ac_dir in $ac_dummy; do
3480   IFS=$ac_save_IFS
3481   test -z "$ac_dir" && ac_dir=.
3482   $as_executable_p "$ac_dir/$ac_word" || continue
3483 ac_cv_prog_LINT="$ac_prog"
3484 echo "$as_me:3484: found $ac_dir/$ac_word" >&5
3485 break
3486 done
3487
3488 fi
3489 fi
3490 LINT=$ac_cv_prog_LINT
3491 if test -n "$LINT"; then
3492   echo "$as_me:3492: result: $LINT" >&5
3493 echo "${ECHO_T}$LINT" >&6
3494 else
3495   echo "$as_me:3495: result: no" >&5
3496 echo "${ECHO_T}no" >&6
3497 fi
3498
3499   test -n "$LINT" && break
3500 done
3501
3502 echo "$as_me:3502: checking whether ln -s works" >&5
3503 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3504 LN_S=$as_ln_s
3505 if test "$LN_S" = "ln -s"; then
3506   echo "$as_me:3506: result: yes" >&5
3507 echo "${ECHO_T}yes" >&6
3508 else
3509   echo "$as_me:3509: result: no, using $LN_S" >&5
3510 echo "${ECHO_T}no, using $LN_S" >&6
3511 fi
3512
3513 echo "$as_me:3513: checking if $LN_S -f options work" >&5
3514 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3515
3516 rm -f conf$$.src conf$$dst
3517 echo >conf$$.dst
3518 echo first >conf$$.src
3519 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3520         cf_prog_ln_sf=yes
3521 else
3522         cf_prog_ln_sf=no
3523 fi
3524 rm -f conf$$.dst conf$$src
3525 echo "$as_me:3525: result: $cf_prog_ln_sf" >&5
3526 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3527
3528 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3529
3530 echo "$as_me:3530: checking for long file names" >&5
3531 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3532 if test "${ac_cv_sys_long_file_names+set}" = set; then
3533   echo $ECHO_N "(cached) $ECHO_C" >&6
3534 else
3535   ac_cv_sys_long_file_names=yes
3536 # Test for long file names in all the places we know might matter:
3537 #      .                the current directory, where building will happen
3538 #      $prefix/lib      where we will be installing things
3539 #      $exec_prefix/lib likewise
3540 # eval it to expand exec_prefix.
3541 #      $TMPDIR          if set, where it might want to write temporary files
3542 # if $TMPDIR is not set:
3543 #      /tmp             where it might want to write temporary files
3544 #      /var/tmp         likewise
3545 #      /usr/tmp         likewise
3546 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3547   ac_tmpdirs=$TMPDIR
3548 else
3549   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3550 fi
3551 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3552   test -d $ac_dir || continue
3553   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3554   ac_xdir=$ac_dir/cf$$
3555   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3556   ac_tf1=$ac_xdir/conftest9012345
3557   ac_tf2=$ac_xdir/conftest9012346
3558   (echo 1 >$ac_tf1) 2>/dev/null
3559   (echo 2 >$ac_tf2) 2>/dev/null
3560   ac_val=`cat $ac_tf1 2>/dev/null`
3561   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3562     ac_cv_sys_long_file_names=no
3563     rm -rf $ac_xdir 2>/dev/null
3564     break
3565   fi
3566   rm -rf $ac_xdir 2>/dev/null
3567 done
3568 fi
3569 echo "$as_me:3569: result: $ac_cv_sys_long_file_names" >&5
3570 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3571 if test $ac_cv_sys_long_file_names = yes; then
3572
3573 cat >>confdefs.h <<\EOF
3574 #define HAVE_LONG_FILE_NAMES 1
3575 EOF
3576
3577 fi
3578
3579 # if we find pkg-config, check if we should install the ".pc" files.
3580
3581 echo "$as_me:3581: checking if you want to use pkg-config" >&5
3582 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3583
3584 # Check whether --with-pkg-config or --without-pkg-config was given.
3585 if test "${with_pkg_config+set}" = set; then
3586   withval="$with_pkg_config"
3587   cf_pkg_config=$withval
3588 else
3589   cf_pkg_config=yes
3590 fi;
3591 echo "$as_me:3591: result: $cf_pkg_config" >&5
3592 echo "${ECHO_T}$cf_pkg_config" >&6
3593
3594 case $cf_pkg_config in #(vi
3595 no) #(vi
3596         PKG_CONFIG=none
3597         ;;
3598 yes) #(vi
3599
3600 if test -n "$ac_tool_prefix"; then
3601   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3602 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3603 echo "$as_me:3603: checking for $ac_word" >&5
3604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3605 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3606   echo $ECHO_N "(cached) $ECHO_C" >&6
3607 else
3608   case $PKG_CONFIG in
3609   [\\/]* | ?:[\\/]*)
3610   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3611   ;;
3612   *)
3613   ac_save_IFS=$IFS; IFS=$ac_path_separator
3614 ac_dummy="$PATH"
3615 for ac_dir in $ac_dummy; do
3616   IFS=$ac_save_IFS
3617   test -z "$ac_dir" && ac_dir=.
3618   if $as_executable_p "$ac_dir/$ac_word"; then
3619    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3620    echo "$as_me:3620: found $ac_dir/$ac_word" >&5
3621    break
3622 fi
3623 done
3624
3625   ;;
3626 esac
3627 fi
3628 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3629
3630 if test -n "$PKG_CONFIG"; then
3631   echo "$as_me:3631: result: $PKG_CONFIG" >&5
3632 echo "${ECHO_T}$PKG_CONFIG" >&6
3633 else
3634   echo "$as_me:3634: result: no" >&5
3635 echo "${ECHO_T}no" >&6
3636 fi
3637
3638 fi
3639 if test -z "$ac_cv_path_PKG_CONFIG"; then
3640   ac_pt_PKG_CONFIG=$PKG_CONFIG
3641   # Extract the first word of "pkg-config", so it can be a program name with args.
3642 set dummy pkg-config; ac_word=$2
3643 echo "$as_me:3643: checking for $ac_word" >&5
3644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3646   echo $ECHO_N "(cached) $ECHO_C" >&6
3647 else
3648   case $ac_pt_PKG_CONFIG in
3649   [\\/]* | ?:[\\/]*)
3650   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3651   ;;
3652   *)
3653   ac_save_IFS=$IFS; IFS=$ac_path_separator
3654 ac_dummy="$PATH"
3655 for ac_dir in $ac_dummy; do
3656   IFS=$ac_save_IFS
3657   test -z "$ac_dir" && ac_dir=.
3658   if $as_executable_p "$ac_dir/$ac_word"; then
3659    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3660    echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3661    break
3662 fi
3663 done
3664
3665   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3666   ;;
3667 esac
3668 fi
3669 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3670
3671 if test -n "$ac_pt_PKG_CONFIG"; then
3672   echo "$as_me:3672: result: $ac_pt_PKG_CONFIG" >&5
3673 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3674 else
3675   echo "$as_me:3675: result: no" >&5
3676 echo "${ECHO_T}no" >&6
3677 fi
3678
3679   PKG_CONFIG=$ac_pt_PKG_CONFIG
3680 else
3681   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3682 fi
3683
3684         ;;
3685 *)
3686         PKG_CONFIG=$withval
3687         ;;
3688 esac
3689
3690 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3691 if test "$PKG_CONFIG" != none ; then
3692
3693 if test "x$prefix" != xNONE; then
3694   cf_path_syntax="$prefix"
3695 else
3696   cf_path_syntax="$ac_default_prefix"
3697 fi
3698
3699 case ".$PKG_CONFIG" in #(vi
3700 .\$\(*\)*|.\'*\'*) #(vi
3701   ;;
3702 ..|./*|.\\*) #(vi
3703   ;;
3704 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3705   ;;
3706 .\${*prefix}*) #(vi
3707   eval PKG_CONFIG="$PKG_CONFIG"
3708   case ".$PKG_CONFIG" in #(vi
3709   .NONE/*)
3710     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3711     ;;
3712   esac
3713   ;; #(vi
3714 .no|.NONE/*)
3715   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3716   ;;
3717 *)
3718   { { echo "$as_me:3718: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3719 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3720    { (exit 1); exit 1; }; }
3721   ;;
3722 esac
3723
3724 fi
3725
3726 if test "$PKG_CONFIG" != none ; then
3727         echo "$as_me:3727: checking for $PKG_CONFIG library directory" >&5
3728 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3729
3730 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3731 if test "${with_pkg_config_libdir+set}" = set; then
3732   withval="$with_pkg_config_libdir"
3733   PKG_CONFIG_LIBDIR=$withval
3734 else
3735   PKG_CONFIG_LIBDIR=yes
3736 fi;
3737
3738         case x$PKG_CONFIG_LIBDIR in #(vi
3739         x/*) #(vi
3740                 ;;
3741         xyes) #(vi
3742                 # look for the library directory using the same prefix as the executable
3743                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3744                 case x`(arch) 2>/dev/null` in #(vi
3745                 *64) #(vi
3746                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3747                         do
3748                                 if test -d $cf_config/pkgconfig
3749                                 then
3750                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3751                                         break
3752                                 fi
3753                         done
3754                         ;;
3755                 *)
3756                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3757                         ;;
3758                 esac
3759                 ;;
3760         *)
3761                 ;;
3762         esac
3763
3764         echo "$as_me:3764: result: $PKG_CONFIG_LIBDIR" >&5
3765 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3766 fi
3767
3768 if test "$PKG_CONFIG" != none ; then
3769         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3770                 echo "$as_me:3770: checking if we should install .pc files for $PKG_CONFIG" >&5
3771 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3772
3773 # Check whether --enable-pc-files or --disable-pc-files was given.
3774 if test "${enable_pc_files+set}" = set; then
3775   enableval="$enable_pc_files"
3776   enable_pc_files=$enableval
3777 else
3778   enable_pc_files=no
3779 fi;
3780                 echo "$as_me:3780: result: $enable_pc_files" >&5
3781 echo "${ECHO_T}$enable_pc_files" >&6
3782         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3783                 enable_pc_files=no
3784                 { echo "$as_me:3784: WARNING: did not find $PKG_CONFIG library" >&5
3785 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3786         fi
3787 else
3788         enable_pc_files=no
3789 fi
3790
3791 echo "$as_me:3791: checking if we should assume mixed-case filenames" >&5
3792 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3793
3794 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3795 if test "${enable_mixed_case+set}" = set; then
3796   enableval="$enable_mixed_case"
3797   enable_mixedcase=$enableval
3798 else
3799   enable_mixedcase=auto
3800 fi;
3801 echo "$as_me:3801: result: $enable_mixedcase" >&5
3802 echo "${ECHO_T}$enable_mixedcase" >&6
3803 if test "$enable_mixedcase" = "auto" ; then
3804
3805 echo "$as_me:3805: checking if filesystem supports mixed-case filenames" >&5
3806 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3807 if test "${cf_cv_mixedcase+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810
3811 if test "$cross_compiling" = yes ; then
3812         case $target_alias in #(vi
3813         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3814                 cf_cv_mixedcase=no
3815                 ;;
3816         *)
3817                 cf_cv_mixedcase=yes
3818                 ;;
3819         esac
3820 else
3821         rm -f conftest CONFTEST
3822         echo test >conftest
3823         if test -f CONFTEST ; then
3824                 cf_cv_mixedcase=no
3825         else
3826                 cf_cv_mixedcase=yes
3827         fi
3828         rm -f conftest CONFTEST
3829 fi
3830
3831 fi
3832 echo "$as_me:3832: result: $cf_cv_mixedcase" >&5
3833 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3834 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3835 #define MIXEDCASE_FILENAMES 1
3836 EOF
3837
3838 else
3839     cf_cv_mixedcase=$enable_mixedcase
3840     if test "$enable_mixedcase" = "yes" ; then
3841         cat >>confdefs.h <<\EOF
3842 #define MIXEDCASE_FILENAMES 1
3843 EOF
3844
3845     fi
3846 fi
3847
3848 # do this after mixed-case option (tags/TAGS is not as important as tic).
3849 echo "$as_me:3849: checking whether ${MAKE-make} sets \${MAKE}" >&5
3850 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3851 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3852 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   cat >conftest.make <<\EOF
3856 all:
3857         @echo 'ac_maketemp="${MAKE}"'
3858 EOF
3859 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3860 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3861 if test -n "$ac_maketemp"; then
3862   eval ac_cv_prog_make_${ac_make}_set=yes
3863 else
3864   eval ac_cv_prog_make_${ac_make}_set=no
3865 fi
3866 rm -f conftest.make
3867 fi
3868 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3869   echo "$as_me:3869: result: yes" >&5
3870 echo "${ECHO_T}yes" >&6
3871   SET_MAKE=
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875   SET_MAKE="MAKE=${MAKE-make}"
3876 fi
3877
3878 for ac_prog in exctags ctags
3879 do
3880   # Extract the first word of "$ac_prog", so it can be a program name with args.
3881 set dummy $ac_prog; ac_word=$2
3882 echo "$as_me:3882: checking for $ac_word" >&5
3883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3884 if test "${ac_cv_prog_CTAGS+set}" = set; then
3885   echo $ECHO_N "(cached) $ECHO_C" >&6
3886 else
3887   if test -n "$CTAGS"; then
3888   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3889 else
3890   ac_save_IFS=$IFS; IFS=$ac_path_separator
3891 ac_dummy="$PATH"
3892 for ac_dir in $ac_dummy; do
3893   IFS=$ac_save_IFS
3894   test -z "$ac_dir" && ac_dir=.
3895   $as_executable_p "$ac_dir/$ac_word" || continue
3896 ac_cv_prog_CTAGS="$ac_prog"
3897 echo "$as_me:3897: found $ac_dir/$ac_word" >&5
3898 break
3899 done
3900
3901 fi
3902 fi
3903 CTAGS=$ac_cv_prog_CTAGS
3904 if test -n "$CTAGS"; then
3905   echo "$as_me:3905: result: $CTAGS" >&5
3906 echo "${ECHO_T}$CTAGS" >&6
3907 else
3908   echo "$as_me:3908: result: no" >&5
3909 echo "${ECHO_T}no" >&6
3910 fi
3911
3912   test -n "$CTAGS" && break
3913 done
3914
3915 for ac_prog in exetags etags
3916 do
3917   # Extract the first word of "$ac_prog", so it can be a program name with args.
3918 set dummy $ac_prog; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_ETAGS+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$ETAGS"; then
3925   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_ETAGS="$ac_prog"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938 fi
3939 fi
3940 ETAGS=$ac_cv_prog_ETAGS
3941 if test -n "$ETAGS"; then
3942   echo "$as_me:3942: result: $ETAGS" >&5
3943 echo "${ECHO_T}$ETAGS" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   test -n "$ETAGS" && break
3950 done
3951
3952 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3953 set dummy ${CTAGS:-ctags}; ac_word=$2
3954 echo "$as_me:3954: checking for $ac_word" >&5
3955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3956 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3957   echo $ECHO_N "(cached) $ECHO_C" >&6
3958 else
3959   if test -n "$MAKE_LOWER_TAGS"; then
3960   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3961 else
3962   ac_save_IFS=$IFS; IFS=$ac_path_separator
3963 ac_dummy="$PATH"
3964 for ac_dir in $ac_dummy; do
3965   IFS=$ac_save_IFS
3966   test -z "$ac_dir" && ac_dir=.
3967   $as_executable_p "$ac_dir/$ac_word" || continue
3968 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3969 echo "$as_me:3969: found $ac_dir/$ac_word" >&5
3970 break
3971 done
3972
3973   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3974 fi
3975 fi
3976 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3977 if test -n "$MAKE_LOWER_TAGS"; then
3978   echo "$as_me:3978: result: $MAKE_LOWER_TAGS" >&5
3979 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3980 else
3981   echo "$as_me:3981: result: no" >&5
3982 echo "${ECHO_T}no" >&6
3983 fi
3984
3985 if test "$cf_cv_mixedcase" = yes ; then
3986         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3987 set dummy ${ETAGS:-etags}; ac_word=$2
3988 echo "$as_me:3988: checking for $ac_word" >&5
3989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3990 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3991   echo $ECHO_N "(cached) $ECHO_C" >&6
3992 else
3993   if test -n "$MAKE_UPPER_TAGS"; then
3994   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3995 else
3996   ac_save_IFS=$IFS; IFS=$ac_path_separator
3997 ac_dummy="$PATH"
3998 for ac_dir in $ac_dummy; do
3999   IFS=$ac_save_IFS
4000   test -z "$ac_dir" && ac_dir=.
4001   $as_executable_p "$ac_dir/$ac_word" || continue
4002 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4003 echo "$as_me:4003: found $ac_dir/$ac_word" >&5
4004 break
4005 done
4006
4007   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4008 fi
4009 fi
4010 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4011 if test -n "$MAKE_UPPER_TAGS"; then
4012   echo "$as_me:4012: result: $MAKE_UPPER_TAGS" >&5
4013 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4014 else
4015   echo "$as_me:4015: result: no" >&5
4016 echo "${ECHO_T}no" >&6
4017 fi
4018
4019 else
4020         MAKE_UPPER_TAGS=no
4021 fi
4022
4023 if test "$MAKE_UPPER_TAGS" = yes ; then
4024         MAKE_UPPER_TAGS=
4025 else
4026         MAKE_UPPER_TAGS="#"
4027 fi
4028
4029 if test "$MAKE_LOWER_TAGS" = yes ; then
4030         MAKE_LOWER_TAGS=
4031 else
4032         MAKE_LOWER_TAGS="#"
4033 fi
4034
4035 echo "$as_me:4035: checking for makeflags variable" >&5
4036 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4037 if test "${cf_cv_makeflags+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040
4041         cf_cv_makeflags=''
4042         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4043         do
4044                 cat >cf_makeflags.tmp <<CF_EOF
4045 SHELL = /bin/sh
4046 all :
4047         @ echo '.$cf_option'
4048 CF_EOF
4049                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4050                 case "$cf_result" in
4051                 .*k)
4052                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4053                         case "$cf_result" in
4054                         .*CC=*) cf_cv_makeflags=
4055                                 ;;
4056                         *)      cf_cv_makeflags=$cf_option
4057                                 ;;
4058                         esac
4059                         break
4060                         ;;
4061                 .-)     ;;
4062                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4063                         ;;
4064                 esac
4065         done
4066         rm -f cf_makeflags.tmp
4067
4068 fi
4069 echo "$as_me:4069: result: $cf_cv_makeflags" >&5
4070 echo "${ECHO_T}$cf_cv_makeflags" >&6
4071
4072 if test -n "$ac_tool_prefix"; then
4073   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4074 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_prog_RANLIB+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   if test -n "$RANLIB"; then
4081   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4082 else
4083   ac_save_IFS=$IFS; IFS=$ac_path_separator
4084 ac_dummy="$PATH"
4085 for ac_dir in $ac_dummy; do
4086   IFS=$ac_save_IFS
4087   test -z "$ac_dir" && ac_dir=.
4088   $as_executable_p "$ac_dir/$ac_word" || continue
4089 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4090 echo "$as_me:4090: found $ac_dir/$ac_word" >&5
4091 break
4092 done
4093
4094 fi
4095 fi
4096 RANLIB=$ac_cv_prog_RANLIB
4097 if test -n "$RANLIB"; then
4098   echo "$as_me:4098: result: $RANLIB" >&5
4099 echo "${ECHO_T}$RANLIB" >&6
4100 else
4101   echo "$as_me:4101: result: no" >&5
4102 echo "${ECHO_T}no" >&6
4103 fi
4104
4105 fi
4106 if test -z "$ac_cv_prog_RANLIB"; then
4107   ac_ct_RANLIB=$RANLIB
4108   # Extract the first word of "ranlib", so it can be a program name with args.
4109 set dummy ranlib; ac_word=$2
4110 echo "$as_me:4110: checking for $ac_word" >&5
4111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4112 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115   if test -n "$ac_ct_RANLIB"; then
4116   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117 else
4118   ac_save_IFS=$IFS; IFS=$ac_path_separator
4119 ac_dummy="$PATH"
4120 for ac_dir in $ac_dummy; do
4121   IFS=$ac_save_IFS
4122   test -z "$ac_dir" && ac_dir=.
4123   $as_executable_p "$ac_dir/$ac_word" || continue
4124 ac_cv_prog_ac_ct_RANLIB="ranlib"
4125 echo "$as_me:4125: found $ac_dir/$ac_word" >&5
4126 break
4127 done
4128
4129   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4130 fi
4131 fi
4132 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4133 if test -n "$ac_ct_RANLIB"; then
4134   echo "$as_me:4134: result: $ac_ct_RANLIB" >&5
4135 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   RANLIB=$ac_ct_RANLIB
4142 else
4143   RANLIB="$ac_cv_prog_RANLIB"
4144 fi
4145
4146 if test -n "$ac_tool_prefix"; then
4147   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4148 set dummy ${ac_tool_prefix}ld; ac_word=$2
4149 echo "$as_me:4149: checking for $ac_word" >&5
4150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4151 if test "${ac_cv_prog_LD+set}" = set; then
4152   echo $ECHO_N "(cached) $ECHO_C" >&6
4153 else
4154   if test -n "$LD"; then
4155   ac_cv_prog_LD="$LD" # Let the user override the test.
4156 else
4157   ac_save_IFS=$IFS; IFS=$ac_path_separator
4158 ac_dummy="$PATH"
4159 for ac_dir in $ac_dummy; do
4160   IFS=$ac_save_IFS
4161   test -z "$ac_dir" && ac_dir=.
4162   $as_executable_p "$ac_dir/$ac_word" || continue
4163 ac_cv_prog_LD="${ac_tool_prefix}ld"
4164 echo "$as_me:4164: found $ac_dir/$ac_word" >&5
4165 break
4166 done
4167
4168 fi
4169 fi
4170 LD=$ac_cv_prog_LD
4171 if test -n "$LD"; then
4172   echo "$as_me:4172: result: $LD" >&5
4173 echo "${ECHO_T}$LD" >&6
4174 else
4175   echo "$as_me:4175: result: no" >&5
4176 echo "${ECHO_T}no" >&6
4177 fi
4178
4179 fi
4180 if test -z "$ac_cv_prog_LD"; then
4181   ac_ct_LD=$LD
4182   # Extract the first word of "ld", so it can be a program name with args.
4183 set dummy ld; ac_word=$2
4184 echo "$as_me:4184: checking for $ac_word" >&5
4185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4186 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4187   echo $ECHO_N "(cached) $ECHO_C" >&6
4188 else
4189   if test -n "$ac_ct_LD"; then
4190   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4191 else
4192   ac_save_IFS=$IFS; IFS=$ac_path_separator
4193 ac_dummy="$PATH"
4194 for ac_dir in $ac_dummy; do
4195   IFS=$ac_save_IFS
4196   test -z "$ac_dir" && ac_dir=.
4197   $as_executable_p "$ac_dir/$ac_word" || continue
4198 ac_cv_prog_ac_ct_LD="ld"
4199 echo "$as_me:4199: found $ac_dir/$ac_word" >&5
4200 break
4201 done
4202
4203   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4204 fi
4205 fi
4206 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4207 if test -n "$ac_ct_LD"; then
4208   echo "$as_me:4208: result: $ac_ct_LD" >&5
4209 echo "${ECHO_T}$ac_ct_LD" >&6
4210 else
4211   echo "$as_me:4211: result: no" >&5
4212 echo "${ECHO_T}no" >&6
4213 fi
4214
4215   LD=$ac_ct_LD
4216 else
4217   LD="$ac_cv_prog_LD"
4218 fi
4219
4220 if test -n "$ac_tool_prefix"; then
4221   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4222 set dummy ${ac_tool_prefix}ar; ac_word=$2
4223 echo "$as_me:4223: checking for $ac_word" >&5
4224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4225 if test "${ac_cv_prog_AR+set}" = set; then
4226   echo $ECHO_N "(cached) $ECHO_C" >&6
4227 else
4228   if test -n "$AR"; then
4229   ac_cv_prog_AR="$AR" # Let the user override the test.
4230 else
4231   ac_save_IFS=$IFS; IFS=$ac_path_separator
4232 ac_dummy="$PATH"
4233 for ac_dir in $ac_dummy; do
4234   IFS=$ac_save_IFS
4235   test -z "$ac_dir" && ac_dir=.
4236   $as_executable_p "$ac_dir/$ac_word" || continue
4237 ac_cv_prog_AR="${ac_tool_prefix}ar"
4238 echo "$as_me:4238: found $ac_dir/$ac_word" >&5
4239 break
4240 done
4241
4242 fi
4243 fi
4244 AR=$ac_cv_prog_AR
4245 if test -n "$AR"; then
4246   echo "$as_me:4246: result: $AR" >&5
4247 echo "${ECHO_T}$AR" >&6
4248 else
4249   echo "$as_me:4249: result: no" >&5
4250 echo "${ECHO_T}no" >&6
4251 fi
4252
4253 fi
4254 if test -z "$ac_cv_prog_AR"; then
4255   ac_ct_AR=$AR
4256   # Extract the first word of "ar", so it can be a program name with args.
4257 set dummy ar; ac_word=$2
4258 echo "$as_me:4258: checking for $ac_word" >&5
4259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4260 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4261   echo $ECHO_N "(cached) $ECHO_C" >&6
4262 else
4263   if test -n "$ac_ct_AR"; then
4264   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4265 else
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   $as_executable_p "$ac_dir/$ac_word" || continue
4272 ac_cv_prog_ac_ct_AR="ar"
4273 echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274 break
4275 done
4276
4277   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4278 fi
4279 fi
4280 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4281 if test -n "$ac_ct_AR"; then
4282   echo "$as_me:4282: result: $ac_ct_AR" >&5
4283 echo "${ECHO_T}$ac_ct_AR" >&6
4284 else
4285   echo "$as_me:4285: result: no" >&5
4286 echo "${ECHO_T}no" >&6
4287 fi
4288
4289   AR=$ac_ct_AR
4290 else
4291   AR="$ac_cv_prog_AR"
4292 fi
4293
4294 if test -n "$ac_tool_prefix"; then
4295   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4296 set dummy ${ac_tool_prefix}ar; ac_word=$2
4297 echo "$as_me:4297: checking for $ac_word" >&5
4298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4299 if test "${ac_cv_prog_AR+set}" = set; then
4300   echo $ECHO_N "(cached) $ECHO_C" >&6
4301 else
4302   if test -n "$AR"; then
4303   ac_cv_prog_AR="$AR" # Let the user override the test.
4304 else
4305   ac_save_IFS=$IFS; IFS=$ac_path_separator
4306 ac_dummy="$PATH"
4307 for ac_dir in $ac_dummy; do
4308   IFS=$ac_save_IFS
4309   test -z "$ac_dir" && ac_dir=.
4310   $as_executable_p "$ac_dir/$ac_word" || continue
4311 ac_cv_prog_AR="${ac_tool_prefix}ar"
4312 echo "$as_me:4312: found $ac_dir/$ac_word" >&5
4313 break
4314 done
4315
4316 fi
4317 fi
4318 AR=$ac_cv_prog_AR
4319 if test -n "$AR"; then
4320   echo "$as_me:4320: result: $AR" >&5
4321 echo "${ECHO_T}$AR" >&6
4322 else
4323   echo "$as_me:4323: result: no" >&5
4324 echo "${ECHO_T}no" >&6
4325 fi
4326
4327 fi
4328 if test -z "$ac_cv_prog_AR"; then
4329   ac_ct_AR=$AR
4330   # Extract the first word of "ar", so it can be a program name with args.
4331 set dummy ar; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   if test -n "$ac_ct_AR"; then
4338   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4339 else
4340   ac_save_IFS=$IFS; IFS=$ac_path_separator
4341 ac_dummy="$PATH"
4342 for ac_dir in $ac_dummy; do
4343   IFS=$ac_save_IFS
4344   test -z "$ac_dir" && ac_dir=.
4345   $as_executable_p "$ac_dir/$ac_word" || continue
4346 ac_cv_prog_ac_ct_AR="ar"
4347 echo "$as_me:4347: found $ac_dir/$ac_word" >&5
4348 break
4349 done
4350
4351   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4352 fi
4353 fi
4354 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4355 if test -n "$ac_ct_AR"; then
4356   echo "$as_me:4356: result: $ac_ct_AR" >&5
4357 echo "${ECHO_T}$ac_ct_AR" >&6
4358 else
4359   echo "$as_me:4359: result: no" >&5
4360 echo "${ECHO_T}no" >&6
4361 fi
4362
4363   AR=$ac_ct_AR
4364 else
4365   AR="$ac_cv_prog_AR"
4366 fi
4367
4368 echo "$as_me:4368: checking for options to update archives" >&5
4369 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4370 if test "${cf_cv_ar_flags+set}" = set; then
4371   echo $ECHO_N "(cached) $ECHO_C" >&6
4372 else
4373
4374         cf_cv_ar_flags=unknown
4375         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4376         do
4377
4378                 # check if $ARFLAGS already contains this choice
4379                 if test "x$ARFLAGS" != "x" ; then
4380                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4381                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4382                                 cf_cv_ar_flags=
4383                                 break
4384                         fi
4385                 fi
4386
4387                 rm -f conftest.$ac_cv_objext
4388                 rm -f conftest.a
4389
4390                 cat >conftest.$ac_ext <<EOF
4391 #line 4391 "configure"
4392 int     testdata[3] = { 123, 456, 789 };
4393 EOF
4394                 if { (eval echo "$as_me:4394: \"$ac_compile\"") >&5
4395   (eval $ac_compile) 2>&5
4396   ac_status=$?
4397   echo "$as_me:4397: \$? = $ac_status" >&5
4398   (exit $ac_status); } ; then
4399                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4400                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4401                         if test -f conftest.a ; then
4402                                 cf_cv_ar_flags=$cf_ar_flags
4403                                 break
4404                         fi
4405                 else
4406                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4407
4408 echo "${as_me:-configure}:4408: testing cannot compile test-program ..." 1>&5
4409
4410                         break
4411                 fi
4412         done
4413         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4414
4415 fi
4416 echo "$as_me:4416: result: $cf_cv_ar_flags" >&5
4417 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4418
4419 if test -n "$ARFLAGS" ; then
4420         if test -n "$cf_cv_ar_flags" ; then
4421                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4422         fi
4423 else
4424         ARFLAGS=$cf_cv_ar_flags
4425 fi
4426
4427 echo "$as_me:4427: checking if you have specified an install-prefix" >&5
4428 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4429
4430 # Check whether --with-install-prefix or --without-install-prefix was given.
4431 if test "${with_install_prefix+set}" = set; then
4432   withval="$with_install_prefix"
4433   case "$withval" in #(vi
4434         yes|no) #(vi
4435                 ;;
4436         *)      DESTDIR="$withval"
4437                 ;;
4438         esac
4439 fi;
4440 echo "$as_me:4440: result: $DESTDIR" >&5
4441 echo "${ECHO_T}$DESTDIR" >&6
4442
4443 ###############################################################################
4444
4445 # If we're cross-compiling, allow the user to override the tools and their
4446 # options.  The configure script is oriented toward identifying the host
4447 # compiler, etc., but we need a build compiler to generate parts of the source.
4448
4449 if test "$cross_compiling" = yes ; then
4450
4451         # defaults that we might want to override
4452         : ${BUILD_CFLAGS:=''}
4453         : ${BUILD_CPPFLAGS:=''}
4454         : ${BUILD_LDFLAGS:=''}
4455         : ${BUILD_LIBS:=''}
4456         : ${BUILD_EXEEXT:='$x'}
4457         : ${BUILD_OBJEXT:='o'}
4458
4459 # Check whether --with-build-cc or --without-build-cc was given.
4460 if test "${with_build_cc+set}" = set; then
4461   withval="$with_build_cc"
4462   BUILD_CC="$withval"
4463 else
4464   for ac_prog in gcc cc cl
4465 do
4466   # Extract the first word of "$ac_prog", so it can be a program name with args.
4467 set dummy $ac_prog; ac_word=$2
4468 echo "$as_me:4468: checking for $ac_word" >&5
4469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4470 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   if test -n "$BUILD_CC"; then
4474   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4475 else
4476   ac_save_IFS=$IFS; IFS=$ac_path_separator
4477 ac_dummy="$PATH"
4478 for ac_dir in $ac_dummy; do
4479   IFS=$ac_save_IFS
4480   test -z "$ac_dir" && ac_dir=.
4481   $as_executable_p "$ac_dir/$ac_word" || continue
4482 ac_cv_prog_BUILD_CC="$ac_prog"
4483 echo "$as_me:4483: found $ac_dir/$ac_word" >&5
4484 break
4485 done
4486
4487 fi
4488 fi
4489 BUILD_CC=$ac_cv_prog_BUILD_CC
4490 if test -n "$BUILD_CC"; then
4491   echo "$as_me:4491: result: $BUILD_CC" >&5
4492 echo "${ECHO_T}$BUILD_CC" >&6
4493 else
4494   echo "$as_me:4494: result: no" >&5
4495 echo "${ECHO_T}no" >&6
4496 fi
4497
4498   test -n "$BUILD_CC" && break
4499 done
4500
4501 fi;
4502         echo "$as_me:4502: checking for native build C compiler" >&5
4503 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4504         echo "$as_me:4504: result: $BUILD_CC" >&5
4505 echo "${ECHO_T}$BUILD_CC" >&6
4506
4507         echo "$as_me:4507: checking for native build C preprocessor" >&5
4508 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4509
4510 # Check whether --with-build-cpp or --without-build-cpp was given.
4511 if test "${with_build_cpp+set}" = set; then
4512   withval="$with_build_cpp"
4513   BUILD_CPP="$withval"
4514 else
4515   BUILD_CPP='${BUILD_CC} -E'
4516 fi;
4517         echo "$as_me:4517: result: $BUILD_CPP" >&5
4518 echo "${ECHO_T}$BUILD_CPP" >&6
4519
4520         echo "$as_me:4520: checking for native build C flags" >&5
4521 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4522
4523 # Check whether --with-build-cflags or --without-build-cflags was given.
4524 if test "${with_build_cflags+set}" = set; then
4525   withval="$with_build_cflags"
4526   BUILD_CFLAGS="$withval"
4527 fi;
4528         echo "$as_me:4528: result: $BUILD_CFLAGS" >&5
4529 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4530
4531         echo "$as_me:4531: checking for native build C preprocessor-flags" >&5
4532 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4533
4534 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4535 if test "${with_build_cppflags+set}" = set; then
4536   withval="$with_build_cppflags"
4537   BUILD_CPPFLAGS="$withval"
4538 fi;
4539         echo "$as_me:4539: result: $BUILD_CPPFLAGS" >&5
4540 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4541
4542         echo "$as_me:4542: checking for native build linker-flags" >&5
4543 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4544
4545 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4546 if test "${with_build_ldflags+set}" = set; then
4547   withval="$with_build_ldflags"
4548   BUILD_LDFLAGS="$withval"
4549 fi;
4550         echo "$as_me:4550: result: $BUILD_LDFLAGS" >&5
4551 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4552
4553         echo "$as_me:4553: checking for native build linker-libraries" >&5
4554 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4555
4556 # Check whether --with-build-libs or --without-build-libs was given.
4557 if test "${with_build_libs+set}" = set; then
4558   withval="$with_build_libs"
4559   BUILD_LIBS="$withval"
4560 fi;
4561         echo "$as_me:4561: result: $BUILD_LIBS" >&5
4562 echo "${ECHO_T}$BUILD_LIBS" >&6
4563
4564         # this assumes we're on Unix.
4565         BUILD_EXEEXT=
4566         BUILD_OBJEXT=o
4567
4568         : ${BUILD_CC:='${CC}'}
4569
4570         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4571                 { { echo "$as_me:4571: error: Cross-build requires two compilers.
4572 Use --with-build-cc to specify the native compiler." >&5
4573 echo "$as_me: error: Cross-build requires two compilers.
4574 Use --with-build-cc to specify the native compiler." >&2;}
4575    { (exit 1); exit 1; }; }
4576         fi
4577
4578 else
4579         : ${BUILD_CC:='${CC}'}
4580         : ${BUILD_CPP:='${CPP}'}
4581         : ${BUILD_CFLAGS:='${CFLAGS}'}
4582         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4583         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4584         : ${BUILD_LIBS:='${LIBS}'}
4585         : ${BUILD_EXEEXT:='$x'}
4586         : ${BUILD_OBJEXT:='o'}
4587 fi
4588
4589 ###############################################################################
4590
4591 ### Options to allow the user to specify the set of libraries which are used.
4592 ### Use "--without-normal --with-shared" to allow the default model to be
4593 ### shared, for example.
4594 cf_list_models=""
4595
4596 echo "$as_me:4596: checking if libtool -version-number should be used" >&5
4597 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4598
4599 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4600 if test "${enable_libtool_version+set}" = set; then
4601   enableval="$enable_libtool_version"
4602   test "$enableval" != no && enableval=yes
4603   if test "$enableval" != "yes" ; then
4604     cf_libtool_version=no
4605   else
4606     cf_libtool_version=yes
4607   fi
4608 else
4609   enableval=yes
4610   cf_libtool_version=yes
4611
4612 fi;
4613 echo "$as_me:4613: result: $cf_libtool_version" >&5
4614 echo "${ECHO_T}$cf_libtool_version" >&6
4615
4616 if test "$cf_libtool_version" = yes ; then
4617         LIBTOOL_VERSION="-version-number"
4618 else
4619         LIBTOOL_VERSION="-version-info"
4620 fi
4621
4622 LIBTOOL=
4623
4624 # common library maintenance symbols that are convenient for libtool scripts:
4625 LIB_CREATE='${AR} -cr'
4626 LIB_OBJECT='${OBJECTS}'
4627 LIB_SUFFIX=.a
4628 LIB_PREP="$RANLIB"
4629
4630 # symbols used to prop libtool up to enable it to determine what it should be
4631 # doing:
4632 LIB_CLEAN=
4633 LIB_COMPILE=
4634 LIB_LINK='${CC}'
4635 LIB_INSTALL=
4636 LIB_UNINSTALL=
4637
4638 echo "$as_me:4638: checking if you want to build libraries with libtool" >&5
4639 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4640
4641 # Check whether --with-libtool or --without-libtool was given.
4642 if test "${with_libtool+set}" = set; then
4643   withval="$with_libtool"
4644   with_libtool=$withval
4645 else
4646   with_libtool=no
4647 fi;
4648 echo "$as_me:4648: result: $with_libtool" >&5
4649 echo "${ECHO_T}$with_libtool" >&6
4650 if test "$with_libtool" != "no"; then
4651
4652         if test "$with_libtool" != "yes" ; then
4653
4654 if test "x$prefix" != xNONE; then
4655   cf_path_syntax="$prefix"
4656 else
4657   cf_path_syntax="$ac_default_prefix"
4658 fi
4659
4660 case ".$with_libtool" in #(vi
4661 .\$\(*\)*|.\'*\'*) #(vi
4662   ;;
4663 ..|./*|.\\*) #(vi
4664   ;;
4665 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4666   ;;
4667 .\${*prefix}*) #(vi
4668   eval with_libtool="$with_libtool"
4669   case ".$with_libtool" in #(vi
4670   .NONE/*)
4671     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4672     ;;
4673   esac
4674   ;; #(vi
4675 .no|.NONE/*)
4676   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4677   ;;
4678 *)
4679   { { echo "$as_me:4679: error: expected a pathname, not \"$with_libtool\"" >&5
4680 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4681    { (exit 1); exit 1; }; }
4682   ;;
4683 esac
4684
4685                 LIBTOOL=$with_libtool
4686         else
4687                 # Extract the first word of "libtool", so it can be a program name with args.
4688 set dummy libtool; ac_word=$2
4689 echo "$as_me:4689: checking for $ac_word" >&5
4690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4691 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   case $LIBTOOL in
4695   [\\/]* | ?:[\\/]*)
4696   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4697   ;;
4698   *)
4699   ac_save_IFS=$IFS; IFS=$ac_path_separator
4700 ac_dummy="$PATH"
4701 for ac_dir in $ac_dummy; do
4702   IFS=$ac_save_IFS
4703   test -z "$ac_dir" && ac_dir=.
4704   if $as_executable_p "$ac_dir/$ac_word"; then
4705    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4706    echo "$as_me:4706: found $ac_dir/$ac_word" >&5
4707    break
4708 fi
4709 done
4710
4711   ;;
4712 esac
4713 fi
4714 LIBTOOL=$ac_cv_path_LIBTOOL
4715
4716 if test -n "$LIBTOOL"; then
4717   echo "$as_me:4717: result: $LIBTOOL" >&5
4718 echo "${ECHO_T}$LIBTOOL" >&6
4719 else
4720   echo "$as_me:4720: result: no" >&5
4721 echo "${ECHO_T}no" >&6
4722 fi
4723
4724         fi
4725         if test -z "$LIBTOOL" ; then
4726                 { { echo "$as_me:4726: error: Cannot find libtool" >&5
4727 echo "$as_me: error: Cannot find libtool" >&2;}
4728    { (exit 1); exit 1; }; }
4729         fi
4730         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4731         LIB_OBJECT='${OBJECTS:.o=.lo}'
4732         LIB_SUFFIX=.la
4733         LIB_CLEAN='${LIBTOOL} --mode=clean'
4734         LIB_COMPILE='${LIBTOOL} --mode=compile'
4735         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4736         LIB_INSTALL='${LIBTOOL} --mode=install'
4737         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4738         LIB_PREP=:
4739
4740         # Show the version of libtool
4741         echo "$as_me:4741: checking version of libtool" >&5
4742 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4743
4744         # Save the version in a cache variable - this is not entirely a good
4745         # thing, but the version string from libtool is very ugly, and for
4746         # bug reports it might be useful to have the original string. "("
4747         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.].*//'`
4748         echo "$as_me:4748: result: $cf_cv_libtool_version" >&5
4749 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4750         if test -z "$cf_cv_libtool_version" ; then
4751                 { { echo "$as_me:4751: error: This is not GNU libtool" >&5
4752 echo "$as_me: error: This is not GNU libtool" >&2;}
4753    { (exit 1); exit 1; }; }
4754         fi
4755
4756         # special hack to add -no-undefined (which libtool should do for itself)
4757         LT_UNDEF=
4758         case "$cf_cv_system_name" in #(vi
4759         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4760                 LT_UNDEF=-no-undefined
4761                 ;;
4762         esac
4763
4764         # special hack to add --tag option for C++ compiler
4765         case $cf_cv_libtool_version in #(vi
4766         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4767                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4768                 LIBTOOL="$LIBTOOL --tag=CC"
4769                 ;;
4770         *)
4771                 LIBTOOL_CXX="$LIBTOOL"
4772                 ;;
4773         esac
4774 else
4775         LIBTOOL=""
4776         LIBTOOL_CXX=""
4777 fi
4778
4779 test -z "$LIBTOOL" && ECHO_LT=
4780
4781 if test "$with_libtool" != "no" ; then
4782
4783 cf_list_models="$cf_list_models libtool"
4784
4785 else
4786
4787 echo "$as_me:4787: checking if you want to build shared libraries" >&5
4788 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4789
4790 # Check whether --with-shared or --without-shared was given.
4791 if test "${with_shared+set}" = set; then
4792   withval="$with_shared"
4793   with_shared=$withval
4794 else
4795   with_shared=no
4796 fi;
4797 echo "$as_me:4797: result: $with_shared" >&5
4798 echo "${ECHO_T}$with_shared" >&6
4799 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4800
4801 echo "$as_me:4801: checking if you want to build static libraries" >&5
4802 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4803
4804 # Check whether --with-normal or --without-normal was given.
4805 if test "${with_normal+set}" = set; then
4806   withval="$with_normal"
4807   with_normal=$withval
4808 else
4809   with_normal=yes
4810 fi;
4811 echo "$as_me:4811: result: $with_normal" >&5
4812 echo "${ECHO_T}$with_normal" >&6
4813 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4814
4815 echo "$as_me:4815: checking if you want to build debug libraries" >&5
4816 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4817
4818 # Check whether --with-debug or --without-debug was given.
4819 if test "${with_debug+set}" = set; then
4820   withval="$with_debug"
4821   with_debug=$withval
4822 else
4823   with_debug=yes
4824 fi;
4825 echo "$as_me:4825: result: $with_debug" >&5
4826 echo "${ECHO_T}$with_debug" >&6
4827 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4828
4829 echo "$as_me:4829: checking if you want to build profiling libraries" >&5
4830 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4831
4832 # Check whether --with-profile or --without-profile was given.
4833 if test "${with_profile+set}" = set; then
4834   withval="$with_profile"
4835   with_profile=$withval
4836 else
4837   with_profile=no
4838 fi;
4839 echo "$as_me:4839: result: $with_profile" >&5
4840 echo "${ECHO_T}$with_profile" >&6
4841 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4842
4843 fi
4844
4845 ###############################################################################
4846
4847 echo "$as_me:4847: checking for specified models" >&5
4848 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4849 test -z "$cf_list_models" && cf_list_models=normal
4850 test "$with_libtool" != "no" && cf_list_models=libtool
4851 echo "$as_me:4851: result: $cf_list_models" >&5
4852 echo "${ECHO_T}$cf_list_models" >&6
4853
4854 ### Use the first model as the default, and save its suffix for use in building
4855 ### up test-applications.
4856 echo "$as_me:4856: checking for default model" >&5
4857 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4858 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4859 echo "$as_me:4859: result: $DFT_LWR_MODEL" >&5
4860 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4861
4862 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4863
4864 TICS_NAME=tic
4865
4866 TINFO_NAME=tinfo
4867
4868 LIB_NAME=ncurses
4869
4870 LIB_DIR=../lib
4871 LIB_2ND=../../lib
4872
4873 echo "$as_me:4873: checking if you want to have a library-prefix" >&5
4874 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4875
4876 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4877 if test "${with_lib_prefix+set}" = set; then
4878   withval="$with_lib_prefix"
4879   with_lib_prefix=$withval
4880 else
4881   with_lib_prefix=auto
4882 fi;
4883 echo "$as_me:4883: result: $with_lib_prefix" >&5
4884 echo "${ECHO_T}$with_lib_prefix" >&6
4885
4886 if test $with_lib_prefix = auto
4887 then
4888
4889         case $cf_cv_system_name in #(vi
4890         OS/2*|os2*) #(vi
4891         LIB_PREFIX=''
4892         ;;
4893         *)      LIB_PREFIX='lib'
4894         ;;
4895         esac
4896 cf_prefix=$LIB_PREFIX
4897
4898 elif test $with_lib_prefix = no
4899 then
4900         LIB_PREFIX=
4901 else
4902         LIB_PREFIX=$with_lib_prefix
4903 fi
4904
4905 LIB_SUFFIX=
4906
4907 ###############################################################################
4908
4909 echo "$as_me:4909: checking if you want to build a separate terminfo library" >&5
4910 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4911
4912 # Check whether --with-termlib or --without-termlib was given.
4913 if test "${with_termlib+set}" = set; then
4914   withval="$with_termlib"
4915   with_termlib=$withval
4916 else
4917   with_termlib=no
4918 fi;
4919 echo "$as_me:4919: result: $with_termlib" >&5
4920 echo "${ECHO_T}$with_termlib" >&6
4921
4922 echo "$as_me:4922: checking if you want to build a separate tic library" >&5
4923 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4924
4925 # Check whether --with-ticlib or --without-ticlib was given.
4926 if test "${with_ticlib+set}" = set; then
4927   withval="$with_ticlib"
4928   with_ticlib=$withval
4929 else
4930   with_ticlib=no
4931 fi;
4932 echo "$as_me:4932: result: $with_ticlib" >&5
4933 echo "${ECHO_T}$with_ticlib" >&6
4934
4935 ### Checks for special libraries, must be done up-front.
4936 SHLIB_LIST=""
4937
4938 echo "$as_me:4938: checking if you want to link with the GPM mouse library" >&5
4939 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4940
4941 # Check whether --with-gpm or --without-gpm was given.
4942 if test "${with_gpm+set}" = set; then
4943   withval="$with_gpm"
4944   with_gpm=$withval
4945 else
4946   with_gpm=maybe
4947 fi;
4948 echo "$as_me:4948: result: $with_gpm" >&5
4949 echo "${ECHO_T}$with_gpm" >&6
4950
4951 if test "$with_gpm" != no ; then
4952         echo "$as_me:4952: checking for gpm.h" >&5
4953 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4954 if test "${ac_cv_header_gpm_h+set}" = set; then
4955   echo $ECHO_N "(cached) $ECHO_C" >&6
4956 else
4957   cat >conftest.$ac_ext <<_ACEOF
4958 #line 4958 "configure"
4959 #include "confdefs.h"
4960 #include <gpm.h>
4961 _ACEOF
4962 if { (eval echo "$as_me:4962: \"$ac_cpp conftest.$ac_ext\"") >&5
4963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4964   ac_status=$?
4965   egrep -v '^ *\+' conftest.er1 >conftest.err
4966   rm -f conftest.er1
4967   cat conftest.err >&5
4968   echo "$as_me:4968: \$? = $ac_status" >&5
4969   (exit $ac_status); } >/dev/null; then
4970   if test -s conftest.err; then
4971     ac_cpp_err=$ac_c_preproc_warn_flag
4972   else
4973     ac_cpp_err=
4974   fi
4975 else
4976   ac_cpp_err=yes
4977 fi
4978 if test -z "$ac_cpp_err"; then
4979   ac_cv_header_gpm_h=yes
4980 else
4981   echo "$as_me: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   ac_cv_header_gpm_h=no
4984 fi
4985 rm -f conftest.err conftest.$ac_ext
4986 fi
4987 echo "$as_me:4987: result: $ac_cv_header_gpm_h" >&5
4988 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4989 if test $ac_cv_header_gpm_h = yes; then
4990
4991                 cat >>confdefs.h <<\EOF
4992 #define HAVE_GPM_H 1
4993 EOF
4994
4995                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4996                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4997
4998 echo "${as_me:-configure}:4998: testing assuming we really have GPM library ..." 1>&5
4999
5000                         cat >>confdefs.h <<\EOF
5001 #define HAVE_LIBGPM 1
5002 EOF
5003
5004                 else
5005                         echo "$as_me:5005: checking for Gpm_Open in -lgpm" >&5
5006 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5007 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5008   echo $ECHO_N "(cached) $ECHO_C" >&6
5009 else
5010   ac_check_lib_save_LIBS=$LIBS
5011 LIBS="-lgpm  $LIBS"
5012 cat >conftest.$ac_ext <<_ACEOF
5013 #line 5013 "configure"
5014 #include "confdefs.h"
5015
5016 /* Override any gcc2 internal prototype to avoid an error.  */
5017 #ifdef __cplusplus
5018 extern "C"
5019 #endif
5020 /* We use char because int might match the return type of a gcc2
5021    builtin and then its argument prototype would still apply.  */
5022 char Gpm_Open ();
5023 int
5024 main ()
5025 {
5026 Gpm_Open ();
5027   ;
5028   return 0;
5029 }
5030 _ACEOF
5031 rm -f conftest.$ac_objext conftest$ac_exeext
5032 if { (eval echo "$as_me:5032: \"$ac_link\"") >&5
5033   (eval $ac_link) 2>&5
5034   ac_status=$?
5035   echo "$as_me:5035: \$? = $ac_status" >&5
5036   (exit $ac_status); } &&
5037          { ac_try='test -s conftest$ac_exeext'
5038   { (eval echo "$as_me:5038: \"$ac_try\"") >&5
5039   (eval $ac_try) 2>&5
5040   ac_status=$?
5041   echo "$as_me:5041: \$? = $ac_status" >&5
5042   (exit $ac_status); }; }; then
5043   ac_cv_lib_gpm_Gpm_Open=yes
5044 else
5045   echo "$as_me: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5047 ac_cv_lib_gpm_Gpm_Open=no
5048 fi
5049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5050 LIBS=$ac_check_lib_save_LIBS
5051 fi
5052 echo "$as_me:5052: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5053 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5054 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5055   :
5056 else
5057
5058                                 { { echo "$as_me:5058: error: Cannot link with GPM library" >&5
5059 echo "$as_me: error: Cannot link with GPM library" >&2;}
5060    { (exit 1); exit 1; }; }
5061                 fi
5062                 with_gpm=yes
5063
5064 fi
5065
5066 else
5067
5068                 test "$with_gpm" != maybe && { echo "$as_me:5068: WARNING: Cannot find GPM header" >&5
5069 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5070                 with_gpm=no
5071
5072 fi
5073
5074 fi
5075
5076 if test "$with_gpm" != no ; then
5077         echo "$as_me:5077: checking if you want to load GPM dynamically" >&5
5078 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5079
5080 # Check whether --with-dlsym or --without-dlsym was given.
5081 if test "${with_dlsym+set}" = set; then
5082   withval="$with_dlsym"
5083   with_dlsym=$withval
5084 else
5085   with_dlsym=yes
5086 fi;
5087         echo "$as_me:5087: result: $with_dlsym" >&5
5088 echo "${ECHO_T}$with_dlsym" >&6
5089         if test "$with_dlsym" = yes ; then
5090
5091 cf_have_dlsym=no
5092 echo "$as_me:5092: checking for dlsym" >&5
5093 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5094 if test "${ac_cv_func_dlsym+set}" = set; then
5095   echo $ECHO_N "(cached) $ECHO_C" >&6
5096 else
5097   cat >conftest.$ac_ext <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char dlsym (); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 #ifdef __cplusplus
5105 extern "C"
5106 #endif
5107 /* We use char because int might match the return type of a gcc2
5108    builtin and then its argument prototype would still apply.  */
5109 char dlsym ();
5110 char (*f) ();
5111
5112 int
5113 main ()
5114 {
5115 /* The GNU C library defines this for functions which it implements
5116     to always fail with ENOSYS.  Some functions are actually named
5117     something starting with __ and the normal name is an alias.  */
5118 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5119 choke me
5120 #else
5121 f = dlsym;
5122 #endif
5123
5124   ;
5125   return 0;
5126 }
5127 _ACEOF
5128 rm -f conftest.$ac_objext conftest$ac_exeext
5129 if { (eval echo "$as_me:5129: \"$ac_link\"") >&5
5130   (eval $ac_link) 2>&5
5131   ac_status=$?
5132   echo "$as_me:5132: \$? = $ac_status" >&5
5133   (exit $ac_status); } &&
5134          { ac_try='test -s conftest$ac_exeext'
5135   { (eval echo "$as_me:5135: \"$ac_try\"") >&5
5136   (eval $ac_try) 2>&5
5137   ac_status=$?
5138   echo "$as_me:5138: \$? = $ac_status" >&5
5139   (exit $ac_status); }; }; then
5140   ac_cv_func_dlsym=yes
5141 else
5142   echo "$as_me: failed program was:" >&5
5143 cat conftest.$ac_ext >&5
5144 ac_cv_func_dlsym=no
5145 fi
5146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5147 fi
5148 echo "$as_me:5148: result: $ac_cv_func_dlsym" >&5
5149 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5150 if test $ac_cv_func_dlsym = yes; then
5151   cf_have_dlsym=yes
5152 else
5153
5154 cf_have_libdl=no
5155 echo "$as_me:5155: checking for dlsym in -ldl" >&5
5156 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5157 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5158   echo $ECHO_N "(cached) $ECHO_C" >&6
5159 else
5160   ac_check_lib_save_LIBS=$LIBS
5161 LIBS="-ldl  $LIBS"
5162 cat >conftest.$ac_ext <<_ACEOF
5163 #line 5163 "configure"
5164 #include "confdefs.h"
5165
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 #ifdef __cplusplus
5168 extern "C"
5169 #endif
5170 /* We use char because int might match the return type of a gcc2
5171    builtin and then its argument prototype would still apply.  */
5172 char dlsym ();
5173 int
5174 main ()
5175 {
5176 dlsym ();
5177   ;
5178   return 0;
5179 }
5180 _ACEOF
5181 rm -f conftest.$ac_objext conftest$ac_exeext
5182 if { (eval echo "$as_me:5182: \"$ac_link\"") >&5
5183   (eval $ac_link) 2>&5
5184   ac_status=$?
5185   echo "$as_me:5185: \$? = $ac_status" >&5
5186   (exit $ac_status); } &&
5187          { ac_try='test -s conftest$ac_exeext'
5188   { (eval echo "$as_me:5188: \"$ac_try\"") >&5
5189   (eval $ac_try) 2>&5
5190   ac_status=$?
5191   echo "$as_me:5191: \$? = $ac_status" >&5
5192   (exit $ac_status); }; }; then
5193   ac_cv_lib_dl_dlsym=yes
5194 else
5195   echo "$as_me: failed program was:" >&5
5196 cat conftest.$ac_ext >&5
5197 ac_cv_lib_dl_dlsym=no
5198 fi
5199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5200 LIBS=$ac_check_lib_save_LIBS
5201 fi
5202 echo "$as_me:5202: result: $ac_cv_lib_dl_dlsym" >&5
5203 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5204 if test $ac_cv_lib_dl_dlsym = yes; then
5205
5206         cf_have_dlsym=yes
5207         cf_have_libdl=yes
5208 fi
5209
5210 fi
5211
5212 if test "$cf_have_dlsym" = yes ; then
5213         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5214
5215         echo "$as_me:5215: checking whether able to link to dl*() functions" >&5
5216 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5217         cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <dlfcn.h>
5221 int
5222 main ()
5223 {
5224
5225                 void *obj;
5226                 if ((obj = dlopen("filename", 0)) != 0) {
5227                         if (dlsym(obj, "symbolname") == 0) {
5228                         dlclose(obj);
5229                         }
5230                 }
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 rm -f conftest.$ac_objext conftest$ac_exeext
5236 if { (eval echo "$as_me:5236: \"$ac_link\"") >&5
5237   (eval $ac_link) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } &&
5241          { ac_try='test -s conftest$ac_exeext'
5242   { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5243   (eval $ac_try) 2>&5
5244   ac_status=$?
5245   echo "$as_me:5245: \$? = $ac_status" >&5
5246   (exit $ac_status); }; }; then
5247
5248                 cat >>confdefs.h <<\EOF
5249 #define HAVE_LIBDL 1
5250 EOF
5251
5252 else
5253   echo "$as_me: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255
5256                 { { echo "$as_me:5256: error: Cannot link test program for libdl" >&5
5257 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5258    { (exit 1); exit 1; }; }
5259 fi
5260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5261         echo "$as_me:5261: result: ok" >&5
5262 echo "${ECHO_T}ok" >&6
5263 else
5264         { { echo "$as_me:5264: error: Cannot find dlsym function" >&5
5265 echo "$as_me: error: Cannot find dlsym function" >&2;}
5266    { (exit 1); exit 1; }; }
5267 fi
5268
5269                 if test "$with_gpm" != yes ; then
5270                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5271
5272 echo "${as_me:-configure}:5272: testing assuming soname for gpm is $with_gpm ..." 1>&5
5273
5274                         cf_cv_gpm_soname="$with_gpm"
5275                 else
5276
5277 echo "$as_me:5277: checking for soname of gpm library" >&5
5278 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5279 if test "${cf_cv_gpm_soname+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282
5283 cf_cv_gpm_soname=unknown
5284 if test "$cross_compiling" != yes ; then
5285 cat >conftest.$ac_ext <<CF_EOF
5286 #include <gpm.h>
5287 int main()
5288 {
5289 if (Gpm_Open(0,0)) Gpm_Close();
5290         ${cf_cv_main_return:-return}(0);
5291 }
5292 CF_EOF
5293 cf_save_LIBS="$LIBS"
5294         LIBS="-lgpm $LIBS"
5295         if { (eval echo "$as_me:5295: \"$ac_compile\"") >&5
5296   (eval $ac_compile) 2>&5
5297   ac_status=$?
5298   echo "$as_me:5298: \$? = $ac_status" >&5
5299   (exit $ac_status); } ; then
5300                 if { (eval echo "$as_me:5300: \"$ac_link\"") >&5
5301   (eval $ac_link) 2>&5
5302   ac_status=$?
5303   echo "$as_me:5303: \$? = $ac_status" >&5
5304   (exit $ac_status); } ; then
5305                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5306                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5307                 fi
5308         fi
5309 rm -rf conftest*
5310 LIBS="$cf_save_LIBS"
5311 fi
5312
5313 fi
5314 echo "$as_me:5314: result: $cf_cv_gpm_soname" >&5
5315 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5316
5317                 fi
5318                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5319 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5320 EOF
5321
5322                 SHLIB_LIST="-ldl $SHLIB_LIST"
5323         else
5324                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5325                 TEST_LIBS="-lgpm $TEST_LIBS"
5326         fi
5327         cat >>confdefs.h <<\EOF
5328 #define HAVE_LIBGPM 1
5329 EOF
5330
5331 echo "$as_me:5331: checking for Gpm_Wgetch in -lgpm" >&5
5332 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5333 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5334   echo $ECHO_N "(cached) $ECHO_C" >&6
5335 else
5336   ac_check_lib_save_LIBS=$LIBS
5337 LIBS="-lgpm  $LIBS"
5338 cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 #ifdef __cplusplus
5344 extern "C"
5345 #endif
5346 /* We use char because int might match the return type of a gcc2
5347    builtin and then its argument prototype would still apply.  */
5348 char Gpm_Wgetch ();
5349 int
5350 main ()
5351 {
5352 Gpm_Wgetch ();
5353   ;
5354   return 0;
5355 }
5356 _ACEOF
5357 rm -f conftest.$ac_objext conftest$ac_exeext
5358 if { (eval echo "$as_me:5358: \"$ac_link\"") >&5
5359   (eval $ac_link) 2>&5
5360   ac_status=$?
5361   echo "$as_me:5361: \$? = $ac_status" >&5
5362   (exit $ac_status); } &&
5363          { ac_try='test -s conftest$ac_exeext'
5364   { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5365   (eval $ac_try) 2>&5
5366   ac_status=$?
5367   echo "$as_me:5367: \$? = $ac_status" >&5
5368   (exit $ac_status); }; }; then
5369   ac_cv_lib_gpm_Gpm_Wgetch=yes
5370 else
5371   echo "$as_me: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 ac_cv_lib_gpm_Gpm_Wgetch=no
5374 fi
5375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5376 LIBS=$ac_check_lib_save_LIBS
5377 fi
5378 echo "$as_me:5378: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5379 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5380 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5381
5382 echo "$as_me:5382: checking if GPM is weakly bound to curses library" >&5
5383 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5384 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5385   echo $ECHO_N "(cached) $ECHO_C" >&6
5386 else
5387
5388 cf_cv_check_gpm_wgetch=unknown
5389 if test "$cross_compiling" != yes ; then
5390
5391 cat >conftest.$ac_ext <<CF_EOF
5392 #include <gpm.h>
5393 int main()
5394 {
5395         Gpm_Wgetch();
5396         ${cf_cv_main_return:-return}(0);
5397 }
5398 CF_EOF
5399
5400         cf_save_LIBS="$LIBS"
5401         # This only works if we can look at the symbol table.  If a shared
5402         # library is stripped for install, we cannot use that.  So we're forced
5403         # to rely on the static library, noting that some packagers may not
5404         # include it.
5405         LIBS="-static -lgpm -dynamic $LIBS"
5406         if { (eval echo "$as_me:5406: \"$ac_compile\"") >&5
5407   (eval $ac_compile) 2>&5
5408   ac_status=$?
5409   echo "$as_me:5409: \$? = $ac_status" >&5
5410   (exit $ac_status); } ; then
5411                 if { (eval echo "$as_me:5411: \"$ac_link\"") >&5
5412   (eval $ac_link) 2>&5
5413   ac_status=$?
5414   echo "$as_me:5414: \$? = $ac_status" >&5
5415   (exit $ac_status); } ; then
5416                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5417                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5418                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5419                 fi
5420         fi
5421         rm -rf conftest*
5422         LIBS="$cf_save_LIBS"
5423 fi
5424
5425 fi
5426 echo "$as_me:5426: result: $cf_cv_check_gpm_wgetch" >&5
5427 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5428
5429 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5430         { echo "$as_me:5430: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5431 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5432 fi
5433
5434 fi
5435
5436 fi
5437
5438 # not everyone has "test -c"
5439 if test -c /dev/sysmouse 2>/dev/null ; then
5440 echo "$as_me:5440: checking if you want to use sysmouse" >&5
5441 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5442
5443 # Check whether --with-sysmouse or --without-sysmouse was given.
5444 if test "${with_sysmouse+set}" = set; then
5445   withval="$with_sysmouse"
5446   cf_with_sysmouse=$withval
5447 else
5448   cf_with_sysmouse=maybe
5449 fi;
5450         if test "$cf_with_sysmouse" != no ; then
5451         cat >conftest.$ac_ext <<_ACEOF
5452 #line 5452 "configure"
5453 #include "confdefs.h"
5454
5455 #include <osreldate.h>
5456 #if (__FreeBSD_version >= 400017)
5457 #include <sys/consio.h>
5458 #include <sys/fbio.h>
5459 #else
5460 #include <machine/console.h>
5461 #endif
5462
5463 int
5464 main ()
5465 {
5466
5467         struct mouse_info the_mouse;
5468         ioctl(0, CONS_MOUSECTL, &the_mouse);
5469
5470   ;
5471   return 0;
5472 }
5473 _ACEOF
5474 rm -f conftest.$ac_objext
5475 if { (eval echo "$as_me:5475: \"$ac_compile\"") >&5
5476   (eval $ac_compile) 2>&5
5477   ac_status=$?
5478   echo "$as_me:5478: \$? = $ac_status" >&5
5479   (exit $ac_status); } &&
5480          { ac_try='test -s conftest.$ac_objext'
5481   { (eval echo "$as_me:5481: \"$ac_try\"") >&5
5482   (eval $ac_try) 2>&5
5483   ac_status=$?
5484   echo "$as_me:5484: \$? = $ac_status" >&5
5485   (exit $ac_status); }; }; then
5486   cf_with_sysmouse=yes
5487 else
5488   echo "$as_me: failed program was:" >&5
5489 cat conftest.$ac_ext >&5
5490 cf_with_sysmouse=no
5491 fi
5492 rm -f conftest.$ac_objext conftest.$ac_ext
5493         fi
5494 echo "$as_me:5494: result: $cf_with_sysmouse" >&5
5495 echo "${ECHO_T}$cf_with_sysmouse" >&6
5496 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5497 #define USE_SYSMOUSE 1
5498 EOF
5499
5500 fi
5501
5502 if test X"$CC_G_OPT" = X"" ; then
5503         CC_G_OPT='-g'
5504         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5505 fi
5506
5507 if test X"$CXX_G_OPT" = X"" ; then
5508         CXX_G_OPT='-g'
5509         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5510 fi
5511
5512 echo "$as_me:5512: checking for default loader flags" >&5
5513 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5514 case $DFT_LWR_MODEL in
5515 libtool) LD_MODEL=''   ;;
5516 normal)  LD_MODEL=''   ;;
5517 debug)   LD_MODEL=$CC_G_OPT ;;
5518 profile) LD_MODEL='-pg';;
5519 shared)  LD_MODEL=''   ;;
5520 esac
5521 echo "$as_me:5521: result: $LD_MODEL" >&5
5522 echo "${ECHO_T}$LD_MODEL" >&6
5523
5524 case $DFT_LWR_MODEL in
5525 shared)
5526
5527 echo "$as_me:5527: checking if rpath option should be used" >&5
5528 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5529
5530 # Check whether --enable-rpath or --disable-rpath was given.
5531 if test "${enable_rpath+set}" = set; then
5532   enableval="$enable_rpath"
5533   cf_cv_enable_rpath=$enableval
5534 else
5535   cf_cv_enable_rpath=no
5536 fi;
5537 echo "$as_me:5537: result: $cf_cv_enable_rpath" >&5
5538 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5539
5540 echo "$as_me:5540: checking if shared libraries should be relinked during install" >&5
5541 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5542
5543 # Check whether --enable-relink or --disable-relink was given.
5544 if test "${enable_relink+set}" = set; then
5545   enableval="$enable_relink"
5546   cf_cv_do_relink=$enableval
5547 else
5548   cf_cv_do_relink=yes
5549 fi;
5550 echo "$as_me:5550: result: $cf_cv_do_relink" >&5
5551 echo "${ECHO_T}$cf_cv_do_relink" >&6
5552         ;;
5553 esac
5554
5555 LD_RPATH_OPT=
5556 echo "$as_me:5556: checking for an rpath option" >&5
5557 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5558 case $cf_cv_system_name in #(vi
5559 irix*) #(vi
5560         if test "$GCC" = yes; then
5561                 LD_RPATH_OPT="-Wl,-rpath,"
5562         else
5563                 LD_RPATH_OPT="-rpath "
5564         fi
5565         ;;
5566 linux*|gnu*|k*bsd*-gnu) #(vi
5567         LD_RPATH_OPT="-Wl,-rpath,"
5568         ;;
5569 openbsd[2-9].*|mirbsd*) #(vi
5570         LD_RPATH_OPT="-Wl,-rpath,"
5571         ;;
5572 dragonfly*|freebsd*) #(vi
5573         LD_RPATH_OPT="-rpath "
5574         ;;
5575 netbsd*) #(vi
5576         LD_RPATH_OPT="-Wl,-rpath,"
5577         ;;
5578 osf*|mls+*) #(vi
5579         LD_RPATH_OPT="-rpath "
5580         ;;
5581 solaris2*) #(vi
5582         LD_RPATH_OPT="-R"
5583         ;;
5584 *)
5585         ;;
5586 esac
5587 echo "$as_me:5587: result: $LD_RPATH_OPT" >&5
5588 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5589
5590 case "x$LD_RPATH_OPT" in #(vi
5591 x-R*)
5592         echo "$as_me:5592: checking if we need a space after rpath option" >&5
5593 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5594         cf_save_LIBS="$LIBS"
5595         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5596         cat >conftest.$ac_ext <<_ACEOF
5597 #line 5597 "configure"
5598 #include "confdefs.h"
5599
5600 int
5601 main ()
5602 {
5603
5604   ;
5605   return 0;
5606 }
5607 _ACEOF
5608 rm -f conftest.$ac_objext conftest$ac_exeext
5609 if { (eval echo "$as_me:5609: \"$ac_link\"") >&5
5610   (eval $ac_link) 2>&5
5611   ac_status=$?
5612   echo "$as_me:5612: \$? = $ac_status" >&5
5613   (exit $ac_status); } &&
5614          { ac_try='test -s conftest$ac_exeext'
5615   { (eval echo "$as_me:5615: \"$ac_try\"") >&5
5616   (eval $ac_try) 2>&5
5617   ac_status=$?
5618   echo "$as_me:5618: \$? = $ac_status" >&5
5619   (exit $ac_status); }; }; then
5620   cf_rpath_space=no
5621 else
5622   echo "$as_me: failed program was:" >&5
5623 cat conftest.$ac_ext >&5
5624 cf_rpath_space=yes
5625 fi
5626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5627         LIBS="$cf_save_LIBS"
5628         echo "$as_me:5628: result: $cf_rpath_space" >&5
5629 echo "${ECHO_T}$cf_rpath_space" >&6
5630         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5631         ;;
5632 esac
5633
5634         LOCAL_LDFLAGS=
5635         LOCAL_LDFLAGS2=
5636         LD_SHARED_OPTS=
5637         INSTALL_LIB="-m 644"
5638
5639         cf_cv_do_symlinks=no
5640         cf_ld_rpath_opt=
5641         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5642
5643         echo "$as_me:5643: checking if release/abi version should be used for shared libs" >&5
5644 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5645
5646 # Check whether --with-shlib-version or --without-shlib-version was given.
5647 if test "${with_shlib_version+set}" = set; then
5648   withval="$with_shlib_version"
5649   test -z "$withval" && withval=auto
5650         case $withval in #(vi
5651         yes) #(vi
5652                 cf_cv_shlib_version=auto
5653                 ;;
5654         rel|abi|auto|no) #(vi
5655                 cf_cv_shlib_version=$withval
5656                 ;;
5657         *)
5658                 { { echo "$as_me:5658: error: option value must be one of: rel, abi, auto or no" >&5
5659 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5660    { (exit 1); exit 1; }; }
5661                 ;;
5662         esac
5663
5664 else
5665   cf_cv_shlib_version=auto
5666 fi;
5667         echo "$as_me:5667: result: $cf_cv_shlib_version" >&5
5668 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5669
5670         cf_cv_rm_so_locs=no
5671
5672         # Some less-capable ports of gcc support only -fpic
5673         CC_SHARED_OPTS=
5674         if test "$GCC" = yes
5675         then
5676                 echo "$as_me:5676: checking which $CC option to use" >&5
5677 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5678                 cf_save_CFLAGS="$CFLAGS"
5679                 for CC_SHARED_OPTS in -fPIC -fpic ''
5680                 do
5681                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5682                         cat >conftest.$ac_ext <<_ACEOF
5683 #line 5683 "configure"
5684 #include "confdefs.h"
5685 #include <stdio.h>
5686 int
5687 main ()
5688 {
5689 int x = 1
5690   ;
5691   return 0;
5692 }
5693 _ACEOF
5694 rm -f conftest.$ac_objext
5695 if { (eval echo "$as_me:5695: \"$ac_compile\"") >&5
5696   (eval $ac_compile) 2>&5
5697   ac_status=$?
5698   echo "$as_me:5698: \$? = $ac_status" >&5
5699   (exit $ac_status); } &&
5700          { ac_try='test -s conftest.$ac_objext'
5701   { (eval echo "$as_me:5701: \"$ac_try\"") >&5
5702   (eval $ac_try) 2>&5
5703   ac_status=$?
5704   echo "$as_me:5704: \$? = $ac_status" >&5
5705   (exit $ac_status); }; }; then
5706   break
5707 else
5708   echo "$as_me: failed program was:" >&5
5709 cat conftest.$ac_ext >&5
5710 fi
5711 rm -f conftest.$ac_objext conftest.$ac_ext
5712                 done
5713                 echo "$as_me:5713: result: $CC_SHARED_OPTS" >&5
5714 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5715                 CFLAGS="$cf_save_CFLAGS"
5716         fi
5717
5718         cf_cv_shlib_version_infix=no
5719
5720         case $cf_cv_system_name in #(vi
5721         aix4.3-9*|aix[5-7]*) #(vi
5722                 if test "$GCC" = yes; then
5723                         CC_SHARED_OPTS=
5724                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5725                 else
5726                         # CC_SHARED_OPTS='-qpic=large -G'
5727                         # perhaps "-bM:SRE -bnoentry -bexpall"
5728                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5729                 fi
5730                 ;;
5731         beos*) #(vi
5732                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5733                 ;;
5734         cygwin*) #(vi
5735                 CC_SHARED_OPTS=
5736                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5737                 cf_cv_shlib_version=cygdll
5738                 cf_cv_shlib_version_infix=cygdll
5739                 cat >mk_shared_lib.sh <<-CF_EOF
5740                 #!/bin/sh
5741                 SHARED_LIB=\$1
5742                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5743                 shift
5744                 cat <<-EOF
5745                 Linking shared library
5746                 ** SHARED_LIB \$SHARED_LIB
5747                 ** IMPORT_LIB \$IMPORT_LIB
5748 EOF
5749                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5750 CF_EOF
5751                 chmod +x mk_shared_lib.sh
5752                 ;;
5753         darwin*) #(vi
5754                 EXTRA_CFLAGS="-no-cpp-precomp"
5755                 CC_SHARED_OPTS="-dynamic"
5756                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5757                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5758                 cf_cv_shlib_version_infix=yes
5759                 echo "$as_me:5759: checking if ld -search_paths_first works" >&5
5760 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5761 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5762   echo $ECHO_N "(cached) $ECHO_C" >&6
5763 else
5764
5765                         cf_save_LDFLAGS=$LDFLAGS
5766                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5767                         cat >conftest.$ac_ext <<_ACEOF
5768 #line 5768 "configure"
5769 #include "confdefs.h"
5770
5771 int
5772 main ()
5773 {
5774 int i;
5775   ;
5776   return 0;
5777 }
5778 _ACEOF
5779 rm -f conftest.$ac_objext conftest$ac_exeext
5780 if { (eval echo "$as_me:5780: \"$ac_link\"") >&5
5781   (eval $ac_link) 2>&5
5782   ac_status=$?
5783   echo "$as_me:5783: \$? = $ac_status" >&5
5784   (exit $ac_status); } &&
5785          { ac_try='test -s conftest$ac_exeext'
5786   { (eval echo "$as_me:5786: \"$ac_try\"") >&5
5787   (eval $ac_try) 2>&5
5788   ac_status=$?
5789   echo "$as_me:5789: \$? = $ac_status" >&5
5790   (exit $ac_status); }; }; then
5791   cf_cv_ldflags_search_paths_first=yes
5792 else
5793   echo "$as_me: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 cf_cv_ldflags_search_paths_first=no
5796 fi
5797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5798                                 LDFLAGS=$cf_save_LDFLAGS
5799 fi
5800 echo "$as_me:5800: result: $cf_cv_ldflags_search_paths_first" >&5
5801 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5802                 if test $cf_cv_ldflags_search_paths_first = yes; then
5803                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5804                 fi
5805                 ;;
5806         hpux*) #(vi
5807                 # (tested with gcc 2.7.2 -- I don't have c89)
5808                 if test "$GCC" = yes; then
5809                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5810                 else
5811                         CC_SHARED_OPTS='+Z'
5812                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5813                 fi
5814                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5815                 # HP-UX shared libraries must be executable, and should be
5816                 # readonly to exploit a quirk in the memory manager.
5817                 INSTALL_LIB="-m 555"
5818                 ;;
5819         interix*)
5820                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5821                 if test "$cf_cv_shlib_version" = rel; then
5822                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5823                 else
5824                         cf_shared_soname='`basename `'
5825                 fi
5826                 CC_SHARED_OPTS=
5827                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5828                 ;;
5829         irix*) #(vi
5830                 if test "$cf_cv_enable_rpath" = yes ; then
5831                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5832                 fi
5833                 # tested with IRIX 5.2 and 'cc'.
5834                 if test "$GCC" != yes; then
5835                         CC_SHARED_OPTS='-KPIC'
5836                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5837                 else
5838                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5839                 fi
5840                 cf_cv_rm_so_locs=yes
5841                 ;;
5842         linux*|gnu*|k*bsd*-gnu) #(vi
5843                 if test "$DFT_LWR_MODEL" = "shared" ; then
5844                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5845                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5846                 fi
5847                 if test "$cf_cv_enable_rpath" = yes ; then
5848                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5849                 fi
5850
5851         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5852         if test "$cf_cv_shlib_version" = rel; then
5853                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5854         else
5855                 cf_cv_shared_soname='`basename $@`'
5856         fi
5857
5858                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5859                 ;;
5860         openbsd[2-9].*|mirbsd*) #(vi
5861                 if test "$DFT_LWR_MODEL" = "shared" ; then
5862                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5863                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5864                 fi
5865                 if test "$cf_cv_enable_rpath" = yes ; then
5866                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5867                 fi
5868                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
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='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5878                 ;;
5879         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5882                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5883                 ;;
5884         dragonfly*|freebsd*) #(vi
5885                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5886                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5887                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5888                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5889                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5890                 fi
5891
5892         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5893         if test "$cf_cv_shlib_version" = rel; then
5894                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5895         else
5896                 cf_cv_shared_soname='`basename $@`'
5897         fi
5898
5899                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5900                 ;;
5901         netbsd*) #(vi
5902                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5903                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5904                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5905                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5906                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5907                         if test "$cf_cv_shlib_version" = auto; then
5908                         if test -f /usr/libexec/ld.elf_so; then
5909                                 cf_cv_shlib_version=abi
5910                         else
5911                                 cf_cv_shlib_version=rel
5912                         fi
5913                         fi
5914
5915         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5916         if test "$cf_cv_shlib_version" = rel; then
5917                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5918         else
5919                 cf_cv_shared_soname='`basename $@`'
5920         fi
5921
5922                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5923                 else
5924                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5925                 fi
5926                 ;;
5927         osf*|mls+*) #(vi
5928                 # tested with OSF/1 V3.2 and 'cc'
5929                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5930                 # link with shared libs).
5931                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5932                 case $host_os in #(vi
5933                 osf4*)
5934                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5935                         ;;
5936                 esac
5937                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5938                 if test "$DFT_LWR_MODEL" = "shared" ; then
5939                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5940                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5941                 fi
5942                 cf_cv_rm_so_locs=yes
5943                 ;;
5944         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5945                 # tested with osr5.0.5
5946                 if test "$GCC" != yes; then
5947                         CC_SHARED_OPTS='-belf -KPIC'
5948                 fi
5949                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5950                 if test "$cf_cv_enable_rpath" = yes ; then
5951                         # only way is to set LD_RUN_PATH but no switch for it
5952                         RUN_PATH=$libdir
5953                 fi
5954                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5955                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5956                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5957                 ;;
5958         sunos4*) #(vi
5959                 # tested with SunOS 4.1.1 and gcc 2.7.0
5960                 if test "$GCC" != yes; then
5961                         CC_SHARED_OPTS='-KPIC'
5962                 fi
5963                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5964                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5965                 ;;
5966         solaris2*) #(vi
5967                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5968                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5969                 if test "$DFT_LWR_MODEL" = "shared" ; then
5970                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5971                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5972                 fi
5973                 if test "$cf_cv_enable_rpath" = yes ; then
5974                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5975                 fi
5976
5977         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5978         if test "$cf_cv_shlib_version" = rel; then
5979                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5980         else
5981                 cf_cv_shared_soname='`basename $@`'
5982         fi
5983
5984                 if test "$GCC" != yes; then
5985                         cf_save_CFLAGS="$CFLAGS"
5986                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5987                         do
5988                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5989                                 cat >conftest.$ac_ext <<_ACEOF
5990 #line 5990 "configure"
5991 #include "confdefs.h"
5992 #include <stdio.h>
5993 int
5994 main ()
5995 {
5996 printf("Hello\n");
5997   ;
5998   return 0;
5999 }
6000 _ACEOF
6001 rm -f conftest.$ac_objext
6002 if { (eval echo "$as_me:6002: \"$ac_compile\"") >&5
6003   (eval $ac_compile) 2>&5
6004   ac_status=$?
6005   echo "$as_me:6005: \$? = $ac_status" >&5
6006   (exit $ac_status); } &&
6007          { ac_try='test -s conftest.$ac_objext'
6008   { (eval echo "$as_me:6008: \"$ac_try\"") >&5
6009   (eval $ac_try) 2>&5
6010   ac_status=$?
6011   echo "$as_me:6011: \$? = $ac_status" >&5
6012   (exit $ac_status); }; }; then
6013   break
6014 else
6015   echo "$as_me: failed program was:" >&5
6016 cat conftest.$ac_ext >&5
6017 fi
6018 rm -f conftest.$ac_objext conftest.$ac_ext
6019                         done
6020                         CFLAGS="$cf_save_CFLAGS"
6021                         CC_SHARED_OPTS=$cf_shared_opts
6022                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6023                 else
6024                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6025                 fi
6026                 ;;
6027         sysv5uw7*|unix_sv*) #(vi
6028                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6029                 if test "$GCC" != yes; then
6030                         CC_SHARED_OPTS='-KPIC'
6031                 fi
6032                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6033                 ;;
6034         *)
6035                 CC_SHARED_OPTS='unknown'
6036                 MK_SHARED_LIB='echo unknown'
6037                 ;;
6038         esac
6039
6040         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6041         case "$cf_cv_shlib_version" in #(vi
6042         rel|abi)
6043                 case "$MK_SHARED_LIB" in #(vi
6044                 *'-o $@') #(vi
6045                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6046                         ;;
6047                 *)
6048                         { echo "$as_me:6048: WARNING: ignored --with-shlib-version" >&5
6049 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6050                         ;;
6051                 esac
6052                 ;;
6053         esac
6054
6055         # RPATH_LIST is a colon-separated list of directories
6056         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6057         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6058
6059 if test "$CC_SHARED_OPTS" = "unknown"; then
6060         for model in $cf_list_models; do
6061                 if test "$model" = "shared"; then
6062                         { { echo "$as_me:6062: error: Shared libraries are not supported in this version" >&5
6063 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6064    { (exit 1); exit 1; }; }
6065                 fi
6066         done
6067 fi
6068
6069 ### If we're building with rpath, try to link non-standard libs that way too.
6070 if test "$DFT_LWR_MODEL" = "shared"; then
6071
6072 echo "$as_me:6072: checking if rpath-hack should be disabled" >&5
6073 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6074
6075 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6076 if test "${enable_rpath_hack+set}" = set; then
6077   enableval="$enable_rpath_hack"
6078   test "$enableval" != no && enableval=yes
6079   if test "$enableval" != "yes" ; then
6080     cf_disable_rpath_hack=yes
6081   else
6082     cf_disable_rpath_hack=no
6083   fi
6084 else
6085   enableval=yes
6086   cf_disable_rpath_hack=no
6087
6088 fi;
6089 echo "$as_me:6089: result: $cf_disable_rpath_hack" >&5
6090 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6091 if test "$cf_disable_rpath_hack" = no ; then
6092
6093 echo "$as_me:6093: checking for updated LDFLAGS" >&5
6094 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6095 if test -n "$LD_RPATH_OPT" ; then
6096         echo "$as_me:6096: result: maybe" >&5
6097 echo "${ECHO_T}maybe" >&6
6098
6099         for ac_prog in ldd
6100 do
6101   # Extract the first word of "$ac_prog", so it can be a program name with args.
6102 set dummy $ac_prog; ac_word=$2
6103 echo "$as_me:6103: checking for $ac_word" >&5
6104 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6105 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6106   echo $ECHO_N "(cached) $ECHO_C" >&6
6107 else
6108   if test -n "$cf_ldd_prog"; then
6109   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6110 else
6111   ac_save_IFS=$IFS; IFS=$ac_path_separator
6112 ac_dummy="$PATH"
6113 for ac_dir in $ac_dummy; do
6114   IFS=$ac_save_IFS
6115   test -z "$ac_dir" && ac_dir=.
6116   $as_executable_p "$ac_dir/$ac_word" || continue
6117 ac_cv_prog_cf_ldd_prog="$ac_prog"
6118 echo "$as_me:6118: found $ac_dir/$ac_word" >&5
6119 break
6120 done
6121
6122 fi
6123 fi
6124 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6125 if test -n "$cf_ldd_prog"; then
6126   echo "$as_me:6126: result: $cf_ldd_prog" >&5
6127 echo "${ECHO_T}$cf_ldd_prog" >&6
6128 else
6129   echo "$as_me:6129: result: no" >&5
6130 echo "${ECHO_T}no" >&6
6131 fi
6132
6133   test -n "$cf_ldd_prog" && break
6134 done
6135 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6136
6137         cf_rpath_list="/usr/lib /lib"
6138         if test "$cf_ldd_prog" != no
6139         then
6140                 cf_rpath_oops=
6141
6142 cat >conftest.$ac_ext <<_ACEOF
6143 #line 6143 "configure"
6144 #include "confdefs.h"
6145 #include <stdio.h>
6146 int
6147 main ()
6148 {
6149 printf("Hello");
6150   ;
6151   return 0;
6152 }
6153 _ACEOF
6154 rm -f conftest.$ac_objext conftest$ac_exeext
6155 if { (eval echo "$as_me:6155: \"$ac_link\"") >&5
6156   (eval $ac_link) 2>&5
6157   ac_status=$?
6158   echo "$as_me:6158: \$? = $ac_status" >&5
6159   (exit $ac_status); } &&
6160          { ac_try='test -s conftest$ac_exeext'
6161   { (eval echo "$as_me:6161: \"$ac_try\"") >&5
6162   (eval $ac_try) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit $ac_status); }; }; then
6166   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6167                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6168 else
6169   echo "$as_me: failed program was:" >&5
6170 cat conftest.$ac_ext >&5
6171 fi
6172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6173
6174                 # If we passed the link-test, but get a "not found" on a given library,
6175                 # this could be due to inept reconfiguration of gcc to make it only
6176                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6177                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6178                 # /usr/local libraries.
6179                 if test -n "$cf_rpath_oops"
6180                 then
6181                         for cf_rpath_src in $cf_rpath_oops
6182                         do
6183                                 for cf_rpath_dir in \
6184                                         /usr/local \
6185                                         /usr/pkg \
6186                                         /opt/sfw
6187                                 do
6188                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6189                                         then
6190                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6191
6192 echo "${as_me:-configure}:6192: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6193
6194                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6195                                                 break
6196                                         fi
6197                                 done
6198                         done
6199                 fi
6200         fi
6201
6202         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6203
6204 echo "${as_me:-configure}:6204: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6205
6206 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6207
6208 echo "${as_me:-configure}:6208: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6209
6210 cf_rpath_dst=
6211 for cf_rpath_src in $LDFLAGS
6212 do
6213         case $cf_rpath_src in #(vi
6214         -L*) #(vi
6215
6216                 # check if this refers to a directory which we will ignore
6217                 cf_rpath_skip=no
6218                 if test -n "$cf_rpath_list"
6219                 then
6220                         for cf_rpath_item in $cf_rpath_list
6221                         do
6222                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6223                                 then
6224                                         cf_rpath_skip=yes
6225                                         break
6226                                 fi
6227                         done
6228                 fi
6229
6230                 if test "$cf_rpath_skip" = no
6231                 then
6232                         # transform the option
6233                         if test "$LD_RPATH_OPT" = "-R " ; then
6234                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6235                         else
6236                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6237                         fi
6238
6239                         # if we have not already added this, add it now
6240                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6241                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6242                         then
6243                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6244
6245 echo "${as_me:-configure}:6245: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6246
6247                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6248                         fi
6249                 fi
6250                 ;;
6251         esac
6252         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6253 done
6254 LDFLAGS=$cf_rpath_dst
6255
6256 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6257
6258 echo "${as_me:-configure}:6258: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6259
6260 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6261
6262 echo "${as_me:-configure}:6262: testing ...checking LIBS $LIBS ..." 1>&5
6263
6264 cf_rpath_dst=
6265 for cf_rpath_src in $LIBS
6266 do
6267         case $cf_rpath_src in #(vi
6268         -L*) #(vi
6269
6270                 # check if this refers to a directory which we will ignore
6271                 cf_rpath_skip=no
6272                 if test -n "$cf_rpath_list"
6273                 then
6274                         for cf_rpath_item in $cf_rpath_list
6275                         do
6276                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6277                                 then
6278                                         cf_rpath_skip=yes
6279                                         break
6280                                 fi
6281                         done
6282                 fi
6283
6284                 if test "$cf_rpath_skip" = no
6285                 then
6286                         # transform the option
6287                         if test "$LD_RPATH_OPT" = "-R " ; then
6288                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6289                         else
6290                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6291                         fi
6292
6293                         # if we have not already added this, add it now
6294                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6295                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6296                         then
6297                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6298
6299 echo "${as_me:-configure}:6299: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6300
6301                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6302                         fi
6303                 fi
6304                 ;;
6305         esac
6306         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6307 done
6308 LIBS=$cf_rpath_dst
6309
6310 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6311
6312 echo "${as_me:-configure}:6312: testing ...checked LIBS $LIBS ..." 1>&5
6313
6314         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6315
6316 echo "${as_me:-configure}:6316: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6317
6318 fi
6319
6320 fi
6321
6322 fi
6323
6324 ###############################################################################
6325
6326 ###     use option --disable-overwrite to leave out the link to -lcurses
6327 echo "$as_me:6327: checking if you wish to install ncurses overwriting curses" >&5
6328 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6329
6330 # Check whether --enable-overwrite or --disable-overwrite was given.
6331 if test "${enable_overwrite+set}" = set; then
6332   enableval="$enable_overwrite"
6333   with_overwrite=$enableval
6334 else
6335   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6336 fi;
6337 echo "$as_me:6337: result: $with_overwrite" >&5
6338 echo "${ECHO_T}$with_overwrite" >&6
6339
6340 echo "$as_me:6340: checking if external terminfo-database is used" >&5
6341 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6342
6343 # Check whether --enable-database or --disable-database was given.
6344 if test "${enable_database+set}" = set; then
6345   enableval="$enable_database"
6346   use_database=$enableval
6347 else
6348   use_database=yes
6349 fi;
6350 echo "$as_me:6350: result: $use_database" >&5
6351 echo "${ECHO_T}$use_database" >&6
6352
6353 case $host_os in #(vi
6354 os2*) #(vi
6355         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6356         ;;
6357 *) #(vi
6358         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6359         ;;
6360 esac
6361
6362 if test "$use_database" != no ; then
6363         cat >>confdefs.h <<\EOF
6364 #define USE_DATABASE 1
6365 EOF
6366
6367         echo "$as_me:6367: checking which terminfo source-file will be installed" >&5
6368 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6369
6370 # Check whether --with-database or --without-database was given.
6371 if test "${with_database+set}" = set; then
6372   withval="$with_database"
6373   TERMINFO_SRC=$withval
6374 fi;
6375         echo "$as_me:6375: result: $TERMINFO_SRC" >&5
6376 echo "${ECHO_T}$TERMINFO_SRC" >&6
6377
6378         echo "$as_me:6378: checking whether to use hashed database instead of directory/tree" >&5
6379 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6380
6381 # Check whether --with-hashed-db or --without-hashed-db was given.
6382 if test "${with_hashed_db+set}" = set; then
6383   withval="$with_hashed_db"
6384
6385 else
6386   with_hashed_db=no
6387 fi;
6388         echo "$as_me:6388: result: $with_hashed_db" >&5
6389 echo "${ECHO_T}$with_hashed_db" >&6
6390 else
6391         with_hashed_db=no
6392 fi
6393
6394 echo "$as_me:6394: checking for list of fallback descriptions" >&5
6395 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6396
6397 # Check whether --with-fallbacks or --without-fallbacks was given.
6398 if test "${with_fallbacks+set}" = set; then
6399   withval="$with_fallbacks"
6400   with_fallback=$withval
6401 else
6402   with_fallback=
6403 fi;
6404 echo "$as_me:6404: result: $with_fallback" >&5
6405 echo "${ECHO_T}$with_fallback" >&6
6406 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6407
6408 echo "$as_me:6408: checking if you want modern xterm or antique" >&5
6409 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6410
6411 # Check whether --with-xterm-new or --without-xterm-new was given.
6412 if test "${with_xterm_new+set}" = set; then
6413   withval="$with_xterm_new"
6414   with_xterm_new=$withval
6415 else
6416   with_xterm_new=yes
6417 fi;
6418 case $with_xterm_new in
6419 no)     with_xterm_new=xterm-old;;
6420 *)      with_xterm_new=xterm-new;;
6421 esac
6422 echo "$as_me:6422: result: $with_xterm_new" >&5
6423 echo "${ECHO_T}$with_xterm_new" >&6
6424 WHICH_XTERM=$with_xterm_new
6425
6426 MAKE_TERMINFO=
6427 if test "$use_database" = no ; then
6428         TERMINFO="${datadir}/terminfo"
6429         MAKE_TERMINFO="#"
6430 else
6431
6432 echo "$as_me:6432: checking for list of terminfo directories" >&5
6433 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6434
6435         case $cf_cv_system_name in
6436         os2*)   PATH_SEPARATOR=';'  ;;
6437         *)      PATH_SEPARATOR=':'  ;;
6438         esac
6439
6440 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6441 if test "${with_terminfo_dirs+set}" = set; then
6442   withval="$with_terminfo_dirs"
6443
6444 else
6445   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6446 fi;
6447 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6448 cf_dst_path=
6449 for cf_src_path in $withval
6450 do
6451
6452 if test "x$prefix" != xNONE; then
6453   cf_path_syntax="$prefix"
6454 else
6455   cf_path_syntax="$ac_default_prefix"
6456 fi
6457
6458 case ".$cf_src_path" in #(vi
6459 .\$\(*\)*|.\'*\'*) #(vi
6460   ;;
6461 ..|./*|.\\*) #(vi
6462   ;;
6463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6464   ;;
6465 .\${*prefix}*) #(vi
6466   eval cf_src_path="$cf_src_path"
6467   case ".$cf_src_path" in #(vi
6468   .NONE/*)
6469     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6470     ;;
6471   esac
6472   ;; #(vi
6473 .no|.NONE/*)
6474   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6475   ;;
6476 *)
6477   { { echo "$as_me:6477: error: expected a pathname, not \"$cf_src_path\"" >&5
6478 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6479    { (exit 1); exit 1; }; }
6480   ;;
6481 esac
6482
6483   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6484   cf_dst_path="${cf_dst_path}${cf_src_path}"
6485 done
6486 IFS="$ac_save_ifs"
6487
6488 eval 'TERMINFO_DIRS="$cf_dst_path"'
6489
6490 echo "$as_me:6490: result: $TERMINFO_DIRS" >&5
6491 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6492 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6493 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6494 EOF
6495
6496 echo "$as_me:6496: checking for default terminfo directory" >&5
6497 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6498
6499 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6500 if test "${with_default_terminfo_dir+set}" = set; then
6501   withval="$with_default_terminfo_dir"
6502
6503 else
6504   withval="${TERMINFO:-${datadir}/terminfo}"
6505 fi; if test -n "${datadir}/terminfo" ; then
6506
6507 if test "x$prefix" != xNONE; then
6508   cf_path_syntax="$prefix"
6509 else
6510   cf_path_syntax="$ac_default_prefix"
6511 fi
6512
6513 case ".$withval" in #(vi
6514 .\$\(*\)*|.\'*\'*) #(vi
6515   ;;
6516 ..|./*|.\\*) #(vi
6517   ;;
6518 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6519   ;;
6520 .\${*prefix}*) #(vi
6521   eval withval="$withval"
6522   case ".$withval" in #(vi
6523   .NONE/*)
6524     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6525     ;;
6526   esac
6527   ;; #(vi
6528 .no|.NONE/*)
6529   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6530   ;;
6531 *)
6532   { { echo "$as_me:6532: error: expected a pathname, not \"$withval\"" >&5
6533 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6534    { (exit 1); exit 1; }; }
6535   ;;
6536 esac
6537
6538 fi
6539 TERMINFO="$withval"
6540
6541 echo "$as_me:6541: result: $TERMINFO" >&5
6542 echo "${ECHO_T}$TERMINFO" >&6
6543 cat >>confdefs.h <<EOF
6544 #define TERMINFO "$TERMINFO"
6545 EOF
6546
6547 fi
6548
6549 ###     use option --disable-big-core to make tic run on small machines
6550 ###     We need 4Mb, check if we can allocate 50% more than that.
6551 echo "$as_me:6551: checking if big-core option selected" >&5
6552 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6553
6554 # Check whether --enable-big-core or --disable-big-core was given.
6555 if test "${enable_big_core+set}" = set; then
6556   enableval="$enable_big_core"
6557   with_big_core=$enableval
6558 else
6559   if test "$cross_compiling" = yes; then
6560   with_big_core=no
6561 else
6562   cat >conftest.$ac_ext <<_ACEOF
6563 #line 6563 "configure"
6564 #include "confdefs.h"
6565
6566 #include <stdlib.h>
6567 #include <string.h>
6568 int main() {
6569         unsigned long n = 6000000L;
6570         char *s = malloc(n);
6571         if (s != 0)
6572                 s[0] = s[n-1] = 0;
6573         ${cf_cv_main_return:-return}(s == 0);
6574 }
6575 _ACEOF
6576 rm -f conftest$ac_exeext
6577 if { (eval echo "$as_me:6577: \"$ac_link\"") >&5
6578   (eval $ac_link) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6582   { (eval echo "$as_me:6582: \"$ac_try\"") >&5
6583   (eval $ac_try) 2>&5
6584   ac_status=$?
6585   echo "$as_me:6585: \$? = $ac_status" >&5
6586   (exit $ac_status); }; }; then
6587   with_big_core=yes
6588 else
6589   echo "$as_me: program exited with status $ac_status" >&5
6590 echo "$as_me: failed program was:" >&5
6591 cat conftest.$ac_ext >&5
6592 with_big_core=no
6593 fi
6594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6595 fi
6596 fi;
6597 echo "$as_me:6597: result: $with_big_core" >&5
6598 echo "${ECHO_T}$with_big_core" >&6
6599 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6600 #define HAVE_BIG_CORE 1
6601 EOF
6602
6603 ### ISO C only guarantees 512-char strings, we have tables which load faster
6604 ### when constructed using "big" strings.  More than the C compiler, the awk
6605 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6606 echo "$as_me:6606: checking if big-strings option selected" >&5
6607 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6608
6609 # Check whether --enable-big-strings or --disable-big-strings was given.
6610 if test "${enable_big_strings+set}" = set; then
6611   enableval="$enable_big_strings"
6612   with_big_strings=$enableval
6613 else
6614
6615         case x$AWK in #(vi
6616         x)
6617                 eval with_big_strings=no
6618                 ;;
6619         *) #(vi
6620                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6621                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $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
6622                         eval with_big_strings=yes
6623                 else
6624                         eval with_big_strings=no
6625                 fi
6626                 ;;
6627         esac
6628
6629 fi;
6630 echo "$as_me:6630: result: $with_big_strings" >&5
6631 echo "${ECHO_T}$with_big_strings" >&6
6632
6633 USE_BIG_STRINGS=0
6634 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6635
6636 ###     use option --enable-termcap to compile in the termcap fallback support
6637 echo "$as_me:6637: checking if you want termcap-fallback support" >&5
6638 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6639
6640 # Check whether --enable-termcap or --disable-termcap was given.
6641 if test "${enable_termcap+set}" = set; then
6642   enableval="$enable_termcap"
6643   with_termcap=$enableval
6644 else
6645   with_termcap=no
6646 fi;
6647 echo "$as_me:6647: result: $with_termcap" >&5
6648 echo "${ECHO_T}$with_termcap" >&6
6649
6650 if test "$with_termcap" != "yes" ; then
6651         if test "$use_database" = no ; then
6652                 if test -z "$with_fallback" ; then
6653                         { { echo "$as_me:6653: error: You have disabled the database w/o specifying fallbacks" >&5
6654 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6655    { (exit 1); exit 1; }; }
6656                 fi
6657         fi
6658         cat >>confdefs.h <<\EOF
6659 #define PURE_TERMINFO 1
6660 EOF
6661
6662 else
6663
6664 if test "$with_ticlib" != no ; then
6665         { { echo "$as_me:6665: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6666 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6667    { (exit 1); exit 1; }; }
6668 fi
6669
6670 cat >>confdefs.h <<\EOF
6671 #define USE_TERMCAP 1
6672 EOF
6673
6674 echo "$as_me:6674: checking for list of termcap files" >&5
6675 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6676
6677 # Check whether --with-termpath or --without-termpath was given.
6678 if test "${with_termpath+set}" = set; then
6679   withval="$with_termpath"
6680
6681 else
6682   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6683 fi;
6684 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6685 cf_dst_path=
6686 for cf_src_path in $withval
6687 do
6688
6689 if test "x$prefix" != xNONE; then
6690   cf_path_syntax="$prefix"
6691 else
6692   cf_path_syntax="$ac_default_prefix"
6693 fi
6694
6695 case ".$cf_src_path" in #(vi
6696 .\$\(*\)*|.\'*\'*) #(vi
6697   ;;
6698 ..|./*|.\\*) #(vi
6699   ;;
6700 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6701   ;;
6702 .\${*prefix}*) #(vi
6703   eval cf_src_path="$cf_src_path"
6704   case ".$cf_src_path" in #(vi
6705   .NONE/*)
6706     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6707     ;;
6708   esac
6709   ;; #(vi
6710 .no|.NONE/*)
6711   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6712   ;;
6713 *)
6714   { { echo "$as_me:6714: error: expected a pathname, not \"$cf_src_path\"" >&5
6715 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6716    { (exit 1); exit 1; }; }
6717   ;;
6718 esac
6719
6720   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6721   cf_dst_path="${cf_dst_path}${cf_src_path}"
6722 done
6723 IFS="$ac_save_ifs"
6724
6725 eval 'TERMPATH="$cf_dst_path"'
6726
6727 echo "$as_me:6727: result: $TERMPATH" >&5
6728 echo "${ECHO_T}$TERMPATH" >&6
6729 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6730 #define TERMPATH "$TERMPATH"
6731 EOF
6732
6733 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6734 echo "$as_me:6734: checking if fast termcap-loader is needed" >&5
6735 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6736
6737 # Check whether --enable-getcap or --disable-getcap was given.
6738 if test "${enable_getcap+set}" = set; then
6739   enableval="$enable_getcap"
6740   with_getcap=$enableval
6741 else
6742   with_getcap=no
6743 fi;
6744 echo "$as_me:6744: result: $with_getcap" >&5
6745 echo "${ECHO_T}$with_getcap" >&6
6746 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6747 #define USE_GETCAP 1
6748 EOF
6749
6750 echo "$as_me:6750: checking if translated termcaps will be cached in ~/.terminfo" >&5
6751 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6752
6753 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6754 if test "${enable_getcap_cache+set}" = set; then
6755   enableval="$enable_getcap_cache"
6756   with_getcap_cache=$enableval
6757 else
6758   with_getcap_cache=no
6759 fi;
6760 echo "$as_me:6760: result: $with_getcap_cache" >&5
6761 echo "${ECHO_T}$with_getcap_cache" >&6
6762 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6763 #define USE_GETCAP_CACHE 1
6764 EOF
6765
6766 fi
6767
6768 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6769 echo "$as_me:6769: checking if ~/.terminfo is wanted" >&5
6770 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6771
6772 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6773 if test "${enable_home_terminfo+set}" = set; then
6774   enableval="$enable_home_terminfo"
6775   with_home_terminfo=$enableval
6776 else
6777   with_home_terminfo=yes
6778 fi;
6779 echo "$as_me:6779: result: $with_home_terminfo" >&5
6780 echo "${ECHO_T}$with_home_terminfo" >&6
6781 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6782 #define USE_HOME_TERMINFO 1
6783 EOF
6784
6785 echo "$as_me:6785: checking if you want to use restricted environment when running as root" >&5
6786 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6787
6788 # Check whether --enable-root-environ or --disable-root-environ was given.
6789 if test "${enable_root_environ+set}" = set; then
6790   enableval="$enable_root_environ"
6791   with_root_environ=$enableval
6792 else
6793   with_root_environ=yes
6794 fi;
6795 echo "$as_me:6795: result: $with_root_environ" >&5
6796 echo "${ECHO_T}$with_root_environ" >&6
6797 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6798 #define USE_ROOT_ENVIRON 1
6799 EOF
6800
6801 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6802 ###   to reduce storage requirements for the terminfo database.
6803
6804 for ac_func in \
6805         remove \
6806         unlink
6807 do
6808 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6809 echo "$as_me:6809: checking for $ac_func" >&5
6810 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6811 if eval "test \"\${$as_ac_var+set}\" = set"; then
6812   echo $ECHO_N "(cached) $ECHO_C" >&6
6813 else
6814   cat >conftest.$ac_ext <<_ACEOF
6815 #line 6815 "configure"
6816 #include "confdefs.h"
6817 /* System header to define __stub macros and hopefully few prototypes,
6818     which can conflict with char $ac_func (); below.  */
6819 #include <assert.h>
6820 /* Override any gcc2 internal prototype to avoid an error.  */
6821 #ifdef __cplusplus
6822 extern "C"
6823 #endif
6824 /* We use char because int might match the return type of a gcc2
6825    builtin and then its argument prototype would still apply.  */
6826 char $ac_func ();
6827 char (*f) ();
6828
6829 int
6830 main ()
6831 {
6832 /* The GNU C library defines this for functions which it implements
6833     to always fail with ENOSYS.  Some functions are actually named
6834     something starting with __ and the normal name is an alias.  */
6835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6836 choke me
6837 #else
6838 f = $ac_func;
6839 #endif
6840
6841   ;
6842   return 0;
6843 }
6844 _ACEOF
6845 rm -f conftest.$ac_objext conftest$ac_exeext
6846 if { (eval echo "$as_me:6846: \"$ac_link\"") >&5
6847   (eval $ac_link) 2>&5
6848   ac_status=$?
6849   echo "$as_me:6849: \$? = $ac_status" >&5
6850   (exit $ac_status); } &&
6851          { ac_try='test -s conftest$ac_exeext'
6852   { (eval echo "$as_me:6852: \"$ac_try\"") >&5
6853   (eval $ac_try) 2>&5
6854   ac_status=$?
6855   echo "$as_me:6855: \$? = $ac_status" >&5
6856   (exit $ac_status); }; }; then
6857   eval "$as_ac_var=yes"
6858 else
6859   echo "$as_me: failed program was:" >&5
6860 cat conftest.$ac_ext >&5
6861 eval "$as_ac_var=no"
6862 fi
6863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6864 fi
6865 echo "$as_me:6865: result: `eval echo '${'$as_ac_var'}'`" >&5
6866 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6867 if test `eval echo '${'$as_ac_var'}'` = yes; then
6868   cat >>confdefs.h <<EOF
6869 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6870 EOF
6871
6872 fi
6873 done
6874
6875 if test "$cross_compiling" = yes ; then
6876
6877 for ac_func in \
6878                 link \
6879                 symlink
6880 do
6881 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6882 echo "$as_me:6882: checking for $ac_func" >&5
6883 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6884 if eval "test \"\${$as_ac_var+set}\" = set"; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887   cat >conftest.$ac_ext <<_ACEOF
6888 #line 6888 "configure"
6889 #include "confdefs.h"
6890 /* System header to define __stub macros and hopefully few prototypes,
6891     which can conflict with char $ac_func (); below.  */
6892 #include <assert.h>
6893 /* Override any gcc2 internal prototype to avoid an error.  */
6894 #ifdef __cplusplus
6895 extern "C"
6896 #endif
6897 /* We use char because int might match the return type of a gcc2
6898    builtin and then its argument prototype would still apply.  */
6899 char $ac_func ();
6900 char (*f) ();
6901
6902 int
6903 main ()
6904 {
6905 /* The GNU C library defines this for functions which it implements
6906     to always fail with ENOSYS.  Some functions are actually named
6907     something starting with __ and the normal name is an alias.  */
6908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6909 choke me
6910 #else
6911 f = $ac_func;
6912 #endif
6913
6914   ;
6915   return 0;
6916 }
6917 _ACEOF
6918 rm -f conftest.$ac_objext conftest$ac_exeext
6919 if { (eval echo "$as_me:6919: \"$ac_link\"") >&5
6920   (eval $ac_link) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); } &&
6924          { ac_try='test -s conftest$ac_exeext'
6925   { (eval echo "$as_me:6925: \"$ac_try\"") >&5
6926   (eval $ac_try) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); }; }; then
6930   eval "$as_ac_var=yes"
6931 else
6932   echo "$as_me: failed program was:" >&5
6933 cat conftest.$ac_ext >&5
6934 eval "$as_ac_var=no"
6935 fi
6936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6937 fi
6938 echo "$as_me:6938: result: `eval echo '${'$as_ac_var'}'`" >&5
6939 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6940 if test `eval echo '${'$as_ac_var'}'` = yes; then
6941   cat >>confdefs.h <<EOF
6942 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6943 EOF
6944
6945 fi
6946 done
6947
6948 else
6949         echo "$as_me:6949: checking if link/symlink functions work" >&5
6950 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6951 if test "${cf_cv_link_funcs+set}" = set; then
6952   echo $ECHO_N "(cached) $ECHO_C" >&6
6953 else
6954
6955                 cf_cv_link_funcs=
6956                 for cf_func in link symlink ; do
6957                         if test "$cross_compiling" = yes; then
6958
6959                         eval 'ac_cv_func_'$cf_func'=error'
6960 else
6961   cat >conftest.$ac_ext <<_ACEOF
6962 #line 6962 "configure"
6963 #include "confdefs.h"
6964
6965 #include <sys/types.h>
6966 #include <sys/stat.h>
6967 #ifdef HAVE_UNISTD_H
6968 #include <unistd.h>
6969 #endif
6970 int main()
6971 {
6972         int fail = 0;
6973         char *src = "config.log";
6974         char *dst = "conftest.chk";
6975         struct stat src_sb;
6976         struct stat dst_sb;
6977
6978         stat(src, &src_sb);
6979         fail = ($cf_func("config.log", "conftest.chk") < 0)
6980             || (stat(dst, &dst_sb) < 0)
6981             || (dst_sb.st_mtime != src_sb.st_mtime);
6982 #ifdef HAVE_UNLINK
6983         unlink(dst);
6984 #else
6985         remove(dst);
6986 #endif
6987         ${cf_cv_main_return:-return} (fail);
6988 }
6989
6990 _ACEOF
6991 rm -f conftest$ac_exeext
6992 if { (eval echo "$as_me:6992: \"$ac_link\"") >&5
6993   (eval $ac_link) 2>&5
6994   ac_status=$?
6995   echo "$as_me:6995: \$? = $ac_status" >&5
6996   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6997   { (eval echo "$as_me:6997: \"$ac_try\"") >&5
6998   (eval $ac_try) 2>&5
6999   ac_status=$?
7000   echo "$as_me:7000: \$? = $ac_status" >&5
7001   (exit $ac_status); }; }; then
7002
7003                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7004                         eval 'ac_cv_func_'$cf_func'=yes'
7005 else
7006   echo "$as_me: program exited with status $ac_status" >&5
7007 echo "$as_me: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7009
7010                         eval 'ac_cv_func_'$cf_func'=no'
7011 fi
7012 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7013 fi
7014                 done
7015                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7016
7017 fi
7018 echo "$as_me:7018: result: $cf_cv_link_funcs" >&5
7019 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7020         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
7021 #define HAVE_LINK 1
7022 EOF
7023
7024         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7025 #define HAVE_SYMLINK 1
7026 EOF
7027
7028 fi
7029
7030 with_links=no
7031 with_symlinks=no
7032
7033 # soft links (symbolic links) are useful for some systems where hard links do
7034 # not work, or to make it simpler to copy terminfo trees around.
7035 if test "$ac_cv_func_symlink" = yes ; then
7036     echo "$as_me:7036: checking if tic should use symbolic links" >&5
7037 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7038
7039 # Check whether --enable-symlinks or --disable-symlinks was given.
7040 if test "${enable_symlinks+set}" = set; then
7041   enableval="$enable_symlinks"
7042   with_symlinks=$enableval
7043 else
7044   with_symlinks=no
7045 fi;
7046     echo "$as_me:7046: result: $with_symlinks" >&5
7047 echo "${ECHO_T}$with_symlinks" >&6
7048 fi
7049
7050 # If we have hard links and did not choose to use soft links instead, there is
7051 # no reason to make this choice optional - use the hard links.
7052 if test "$with_symlinks" = no ; then
7053     echo "$as_me:7053: checking if tic should use hard links" >&5
7054 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7055     if test "$ac_cv_func_link" = yes ; then
7056         with_links=yes
7057     else
7058         with_links=no
7059     fi
7060     echo "$as_me:7060: result: $with_links" >&5
7061 echo "${ECHO_T}$with_links" >&6
7062 fi
7063
7064 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7065 #define USE_LINKS 1
7066 EOF
7067
7068 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7069 #define USE_SYMLINKS 1
7070 EOF
7071
7072 ###   use option --enable-broken-linker to force on use of broken-linker support
7073 echo "$as_me:7073: checking if you want broken-linker support code" >&5
7074 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7075
7076 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7077 if test "${enable_broken_linker+set}" = set; then
7078   enableval="$enable_broken_linker"
7079   with_broken_linker=$enableval
7080 else
7081   with_broken_linker=${BROKEN_LINKER:-no}
7082 fi;
7083 echo "$as_me:7083: result: $with_broken_linker" >&5
7084 echo "${ECHO_T}$with_broken_linker" >&6
7085
7086 BROKEN_LINKER=0
7087 if test "$with_broken_linker" = yes ; then
7088         cat >>confdefs.h <<\EOF
7089 #define BROKEN_LINKER 1
7090 EOF
7091
7092         BROKEN_LINKER=1
7093 elif test "$DFT_LWR_MODEL" = shared ; then
7094         case $cf_cv_system_name in #(vi
7095         cygwin*)
7096                 cat >>confdefs.h <<\EOF
7097 #define BROKEN_LINKER 1
7098 EOF
7099
7100                 BROKEN_LINKER=1
7101                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7102
7103 echo "${as_me:-configure}:7103: testing cygwin linker is broken anyway ..." 1>&5
7104
7105                 ;;
7106         esac
7107 fi
7108
7109 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7110 echo "$as_me:7110: checking if tputs should process BSD-style prefix padding" >&5
7111 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7112
7113 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7114 if test "${enable_bsdpad+set}" = set; then
7115   enableval="$enable_bsdpad"
7116   with_bsdpad=$enableval
7117 else
7118   with_bsdpad=no
7119 fi;
7120 echo "$as_me:7120: result: $with_bsdpad" >&5
7121 echo "${ECHO_T}$with_bsdpad" >&6
7122 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7123 #define BSD_TPUTS 1
7124 EOF
7125
7126 ###   use option --enable-widec to turn on use of wide-character support
7127 NCURSES_CH_T=chtype
7128 NCURSES_LIBUTF8=0
7129
7130 NEED_WCHAR_H=0
7131 NCURSES_MBSTATE_T=0
7132 NCURSES_WCHAR_T=0
7133 NCURSES_WINT_T=0
7134
7135 # Check to define _XOPEN_SOURCE "automatically"
7136
7137 cf_XOPEN_SOURCE=500
7138 cf_POSIX_C_SOURCE=199506L
7139 cf_xopen_source=
7140
7141 case $host_os in #(vi
7142 aix[4-7]*) #(vi
7143         cf_xopen_source="-D_ALL_SOURCE"
7144         ;;
7145 cygwin) #(vi
7146         cf_XOPEN_SOURCE=600
7147         ;;
7148 darwin[0-8].*) #(vi
7149         cf_xopen_source="-D_APPLE_C_SOURCE"
7150         ;;
7151 darwin*) #(vi
7152         cf_xopen_source="-D_DARWIN_C_SOURCE"
7153         cf_XOPEN_SOURCE=
7154         ;;
7155 freebsd*|dragonfly*) #(vi
7156         # 5.x headers associate
7157         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7158         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7159         cf_POSIX_C_SOURCE=200112L
7160         cf_XOPEN_SOURCE=600
7161         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7162         ;;
7163 hpux11*) #(vi
7164         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7165         ;;
7166 hpux*) #(vi
7167         cf_xopen_source="-D_HPUX_SOURCE"
7168         ;;
7169 irix[56].*) #(vi
7170         cf_xopen_source="-D_SGI_SOURCE"
7171         cf_XOPEN_SOURCE=
7172         ;;
7173 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7174
7175 echo "$as_me:7175: checking if we must define _GNU_SOURCE" >&5
7176 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7177 if test "${cf_cv_gnu_source+set}" = set; then
7178   echo $ECHO_N "(cached) $ECHO_C" >&6
7179 else
7180
7181 cat >conftest.$ac_ext <<_ACEOF
7182 #line 7182 "configure"
7183 #include "confdefs.h"
7184 #include <sys/types.h>
7185 int
7186 main ()
7187 {
7188
7189 #ifndef _XOPEN_SOURCE
7190 make an error
7191 #endif
7192   ;
7193   return 0;
7194 }
7195 _ACEOF
7196 rm -f conftest.$ac_objext
7197 if { (eval echo "$as_me:7197: \"$ac_compile\"") >&5
7198   (eval $ac_compile) 2>&5
7199   ac_status=$?
7200   echo "$as_me:7200: \$? = $ac_status" >&5
7201   (exit $ac_status); } &&
7202          { ac_try='test -s conftest.$ac_objext'
7203   { (eval echo "$as_me:7203: \"$ac_try\"") >&5
7204   (eval $ac_try) 2>&5
7205   ac_status=$?
7206   echo "$as_me:7206: \$? = $ac_status" >&5
7207   (exit $ac_status); }; }; then
7208   cf_cv_gnu_source=no
7209 else
7210   echo "$as_me: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7212 cf_save="$CPPFLAGS"
7213          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7214          cat >conftest.$ac_ext <<_ACEOF
7215 #line 7215 "configure"
7216 #include "confdefs.h"
7217 #include <sys/types.h>
7218 int
7219 main ()
7220 {
7221
7222 #ifdef _XOPEN_SOURCE
7223 make an error
7224 #endif
7225   ;
7226   return 0;
7227 }
7228 _ACEOF
7229 rm -f conftest.$ac_objext
7230 if { (eval echo "$as_me:7230: \"$ac_compile\"") >&5
7231   (eval $ac_compile) 2>&5
7232   ac_status=$?
7233   echo "$as_me:7233: \$? = $ac_status" >&5
7234   (exit $ac_status); } &&
7235          { ac_try='test -s conftest.$ac_objext'
7236   { (eval echo "$as_me:7236: \"$ac_try\"") >&5
7237   (eval $ac_try) 2>&5
7238   ac_status=$?
7239   echo "$as_me:7239: \$? = $ac_status" >&5
7240   (exit $ac_status); }; }; then
7241   cf_cv_gnu_source=no
7242 else
7243   echo "$as_me: failed program was:" >&5
7244 cat conftest.$ac_ext >&5
7245 cf_cv_gnu_source=yes
7246 fi
7247 rm -f conftest.$ac_objext conftest.$ac_ext
7248         CPPFLAGS="$cf_save"
7249
7250 fi
7251 rm -f conftest.$ac_objext conftest.$ac_ext
7252
7253 fi
7254 echo "$as_me:7254: result: $cf_cv_gnu_source" >&5
7255 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7256 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7257
7258         ;;
7259 mirbsd*) #(vi
7260         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7261         cf_XOPEN_SOURCE=
7262
7263 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7264
7265 cf_save_CFLAGS="$CFLAGS"
7266 cf_save_CPPFLAGS="$CPPFLAGS"
7267
7268 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7269         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7270                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7271
7272 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7273         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7274                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7275
7276 echo "$as_me:7276: checking if we should define _POSIX_C_SOURCE" >&5
7277 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7278 if test "${cf_cv_posix_c_source+set}" = set; then
7279   echo $ECHO_N "(cached) $ECHO_C" >&6
7280 else
7281
7282 echo "${as_me:-configure}:7282: testing if the symbol is already defined go no further ..." 1>&5
7283
7284         cat >conftest.$ac_ext <<_ACEOF
7285 #line 7285 "configure"
7286 #include "confdefs.h"
7287 #include <sys/types.h>
7288 int
7289 main ()
7290 {
7291
7292 #ifndef _POSIX_C_SOURCE
7293 make an error
7294 #endif
7295   ;
7296   return 0;
7297 }
7298 _ACEOF
7299 rm -f conftest.$ac_objext
7300 if { (eval echo "$as_me:7300: \"$ac_compile\"") >&5
7301   (eval $ac_compile) 2>&5
7302   ac_status=$?
7303   echo "$as_me:7303: \$? = $ac_status" >&5
7304   (exit $ac_status); } &&
7305          { ac_try='test -s conftest.$ac_objext'
7306   { (eval echo "$as_me:7306: \"$ac_try\"") >&5
7307   (eval $ac_try) 2>&5
7308   ac_status=$?
7309   echo "$as_me:7309: \$? = $ac_status" >&5
7310   (exit $ac_status); }; }; then
7311   cf_cv_posix_c_source=no
7312 else
7313   echo "$as_me: failed program was:" >&5
7314 cat conftest.$ac_ext >&5
7315 cf_want_posix_source=no
7316          case .$cf_POSIX_C_SOURCE in #(vi
7317          .[12]??*) #(vi
7318                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7319                 ;;
7320          .2) #(vi
7321                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7322                 cf_want_posix_source=yes
7323                 ;;
7324          .*)
7325                 cf_want_posix_source=yes
7326                 ;;
7327          esac
7328          if test "$cf_want_posix_source" = yes ; then
7329                 cat >conftest.$ac_ext <<_ACEOF
7330 #line 7330 "configure"
7331 #include "confdefs.h"
7332 #include <sys/types.h>
7333 int
7334 main ()
7335 {
7336
7337 #ifdef _POSIX_SOURCE
7338 make an error
7339 #endif
7340   ;
7341   return 0;
7342 }
7343 _ACEOF
7344 rm -f conftest.$ac_objext
7345 if { (eval echo "$as_me:7345: \"$ac_compile\"") >&5
7346   (eval $ac_compile) 2>&5
7347   ac_status=$?
7348   echo "$as_me:7348: \$? = $ac_status" >&5
7349   (exit $ac_status); } &&
7350          { ac_try='test -s conftest.$ac_objext'
7351   { (eval echo "$as_me:7351: \"$ac_try\"") >&5
7352   (eval $ac_try) 2>&5
7353   ac_status=$?
7354   echo "$as_me:7354: \$? = $ac_status" >&5
7355   (exit $ac_status); }; }; then
7356   :
7357 else
7358   echo "$as_me: failed program was:" >&5
7359 cat conftest.$ac_ext >&5
7360 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7361 fi
7362 rm -f conftest.$ac_objext conftest.$ac_ext
7363          fi
7364
7365 echo "${as_me:-configure}:7365: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7366
7367          CFLAGS="$cf_trim_CFLAGS"
7368          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7369
7370 echo "${as_me:-configure}:7370: testing if the second compile does not leave our definition intact error ..." 1>&5
7371
7372          cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375 #include <sys/types.h>
7376 int
7377 main ()
7378 {
7379
7380 #ifndef _POSIX_C_SOURCE
7381 make an error
7382 #endif
7383   ;
7384   return 0;
7385 }
7386 _ACEOF
7387 rm -f conftest.$ac_objext
7388 if { (eval echo "$as_me:7388: \"$ac_compile\"") >&5
7389   (eval $ac_compile) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest.$ac_objext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   :
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 cf_cv_posix_c_source=no
7404 fi
7405 rm -f conftest.$ac_objext conftest.$ac_ext
7406          CFLAGS="$cf_save_CFLAGS"
7407          CPPFLAGS="$cf_save_CPPFLAGS"
7408
7409 fi
7410 rm -f conftest.$ac_objext conftest.$ac_ext
7411
7412 fi
7413 echo "$as_me:7413: result: $cf_cv_posix_c_source" >&5
7414 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7415
7416 if test "$cf_cv_posix_c_source" != no ; then
7417         CFLAGS="$cf_trim_CFLAGS"
7418         CPPFLAGS="$cf_trim_CPPFLAGS"
7419
7420 cf_fix_cppflags=no
7421 cf_new_cflags=
7422 cf_new_cppflags=
7423 cf_new_extra_cppflags=
7424
7425 for cf_add_cflags in $cf_cv_posix_c_source
7426 do
7427 case $cf_fix_cppflags in
7428 no)
7429         case $cf_add_cflags in #(vi
7430         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7431                 case $cf_add_cflags in
7432                 -D*)
7433                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7434
7435                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7436                                 && test -z "${cf_tst_cflags}" \
7437                                 && cf_fix_cppflags=yes
7438
7439                         if test $cf_fix_cppflags = yes ; then
7440                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7441                                 continue
7442                         elif test "${cf_tst_cflags}" = "\"'" ; then
7443                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7444                                 continue
7445                         fi
7446                         ;;
7447                 esac
7448                 case "$CPPFLAGS" in
7449                 *$cf_add_cflags) #(vi
7450                         ;;
7451                 *) #(vi
7452                         case $cf_add_cflags in #(vi
7453                         -D*)
7454                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7455
7456 CPPFLAGS=`echo "$CPPFLAGS" | \
7457         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7458                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7459
7460                                 ;;
7461                         esac
7462                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7463                         ;;
7464                 esac
7465                 ;;
7466         *)
7467                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7468                 ;;
7469         esac
7470         ;;
7471 yes)
7472         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7473
7474         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7475
7476         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7477                 && test -z "${cf_tst_cflags}" \
7478                 && cf_fix_cppflags=no
7479         ;;
7480 esac
7481 done
7482
7483 if test -n "$cf_new_cflags" ; then
7484
7485         CFLAGS="$CFLAGS $cf_new_cflags"
7486 fi
7487
7488 if test -n "$cf_new_cppflags" ; then
7489
7490         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7491 fi
7492
7493 if test -n "$cf_new_extra_cppflags" ; then
7494
7495         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7496 fi
7497
7498 fi
7499
7500         ;;
7501 netbsd*) #(vi
7502         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7503         ;;
7504 openbsd[4-9]*) #(vi
7505         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7506         cf_xopen_source="-D_BSD_SOURCE"
7507         cf_XOPEN_SOURCE=600
7508         ;;
7509 openbsd*) #(vi
7510         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7511         ;;
7512 osf[45]*) #(vi
7513         cf_xopen_source="-D_OSF_SOURCE"
7514         ;;
7515 nto-qnx*) #(vi
7516         cf_xopen_source="-D_QNX_SOURCE"
7517         ;;
7518 sco*) #(vi
7519         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7520         ;;
7521 solaris2.*) #(vi
7522         cf_xopen_source="-D__EXTENSIONS__"
7523         ;;
7524 *)
7525
7526 echo "$as_me:7526: checking if we should define _XOPEN_SOURCE" >&5
7527 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7528 if test "${cf_cv_xopen_source+set}" = set; then
7529   echo $ECHO_N "(cached) $ECHO_C" >&6
7530 else
7531
7532         cat >conftest.$ac_ext <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535
7536 #include <stdlib.h>
7537 #include <string.h>
7538 #include <sys/types.h>
7539
7540 int
7541 main ()
7542 {
7543
7544 #ifndef _XOPEN_SOURCE
7545 make an error
7546 #endif
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext
7552 if { (eval echo "$as_me:7552: \"$ac_compile\"") >&5
7553   (eval $ac_compile) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); } &&
7557          { ac_try='test -s conftest.$ac_objext'
7558   { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   cf_cv_xopen_source=no
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 cf_save="$CPPFLAGS"
7568          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7569          cat >conftest.$ac_ext <<_ACEOF
7570 #line 7570 "configure"
7571 #include "confdefs.h"
7572
7573 #include <stdlib.h>
7574 #include <string.h>
7575 #include <sys/types.h>
7576
7577 int
7578 main ()
7579 {
7580
7581 #ifdef _XOPEN_SOURCE
7582 make an error
7583 #endif
7584   ;
7585   return 0;
7586 }
7587 _ACEOF
7588 rm -f conftest.$ac_objext
7589 if { (eval echo "$as_me:7589: \"$ac_compile\"") >&5
7590   (eval $ac_compile) 2>&5
7591   ac_status=$?
7592   echo "$as_me:7592: \$? = $ac_status" >&5
7593   (exit $ac_status); } &&
7594          { ac_try='test -s conftest.$ac_objext'
7595   { (eval echo "$as_me:7595: \"$ac_try\"") >&5
7596   (eval $ac_try) 2>&5
7597   ac_status=$?
7598   echo "$as_me:7598: \$? = $ac_status" >&5
7599   (exit $ac_status); }; }; then
7600   cf_cv_xopen_source=no
7601 else
7602   echo "$as_me: failed program was:" >&5
7603 cat conftest.$ac_ext >&5
7604 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7605 fi
7606 rm -f conftest.$ac_objext conftest.$ac_ext
7607         CPPFLAGS="$cf_save"
7608
7609 fi
7610 rm -f conftest.$ac_objext conftest.$ac_ext
7611
7612 fi
7613 echo "$as_me:7613: result: $cf_cv_xopen_source" >&5
7614 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7615
7616 if test "$cf_cv_xopen_source" != no ; then
7617
7618 CFLAGS=`echo "$CFLAGS" | \
7619         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7620                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7621
7622 CPPFLAGS=`echo "$CPPFLAGS" | \
7623         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7624                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7625
7626         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7627
7628 cf_fix_cppflags=no
7629 cf_new_cflags=
7630 cf_new_cppflags=
7631 cf_new_extra_cppflags=
7632
7633 for cf_add_cflags in $cf_temp_xopen_source
7634 do
7635 case $cf_fix_cppflags in
7636 no)
7637         case $cf_add_cflags in #(vi
7638         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7639                 case $cf_add_cflags in
7640                 -D*)
7641                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7642
7643                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7644                                 && test -z "${cf_tst_cflags}" \
7645                                 && cf_fix_cppflags=yes
7646
7647                         if test $cf_fix_cppflags = yes ; then
7648                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7649                                 continue
7650                         elif test "${cf_tst_cflags}" = "\"'" ; then
7651                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7652                                 continue
7653                         fi
7654                         ;;
7655                 esac
7656                 case "$CPPFLAGS" in
7657                 *$cf_add_cflags) #(vi
7658                         ;;
7659                 *) #(vi
7660                         case $cf_add_cflags in #(vi
7661                         -D*)
7662                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7663
7664 CPPFLAGS=`echo "$CPPFLAGS" | \
7665         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7666                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7667
7668                                 ;;
7669                         esac
7670                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7671                         ;;
7672                 esac
7673                 ;;
7674         *)
7675                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7676                 ;;
7677         esac
7678         ;;
7679 yes)
7680         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7681
7682         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7683
7684         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7685                 && test -z "${cf_tst_cflags}" \
7686                 && cf_fix_cppflags=no
7687         ;;
7688 esac
7689 done
7690
7691 if test -n "$cf_new_cflags" ; then
7692
7693         CFLAGS="$CFLAGS $cf_new_cflags"
7694 fi
7695
7696 if test -n "$cf_new_cppflags" ; then
7697
7698         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7699 fi
7700
7701 if test -n "$cf_new_extra_cppflags" ; then
7702
7703         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7704 fi
7705
7706 fi
7707
7708 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7709
7710 cf_save_CFLAGS="$CFLAGS"
7711 cf_save_CPPFLAGS="$CPPFLAGS"
7712
7713 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7714         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7715                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7716
7717 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7718         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7719                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7720
7721 echo "$as_me:7721: checking if we should define _POSIX_C_SOURCE" >&5
7722 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7723 if test "${cf_cv_posix_c_source+set}" = set; then
7724   echo $ECHO_N "(cached) $ECHO_C" >&6
7725 else
7726
7727 echo "${as_me:-configure}:7727: testing if the symbol is already defined go no further ..." 1>&5
7728
7729         cat >conftest.$ac_ext <<_ACEOF
7730 #line 7730 "configure"
7731 #include "confdefs.h"
7732 #include <sys/types.h>
7733 int
7734 main ()
7735 {
7736
7737 #ifndef _POSIX_C_SOURCE
7738 make an error
7739 #endif
7740   ;
7741   return 0;
7742 }
7743 _ACEOF
7744 rm -f conftest.$ac_objext
7745 if { (eval echo "$as_me:7745: \"$ac_compile\"") >&5
7746   (eval $ac_compile) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); } &&
7750          { ac_try='test -s conftest.$ac_objext'
7751   { (eval echo "$as_me:7751: \"$ac_try\"") >&5
7752   (eval $ac_try) 2>&5
7753   ac_status=$?
7754   echo "$as_me:7754: \$? = $ac_status" >&5
7755   (exit $ac_status); }; }; then
7756   cf_cv_posix_c_source=no
7757 else
7758   echo "$as_me: failed program was:" >&5
7759 cat conftest.$ac_ext >&5
7760 cf_want_posix_source=no
7761          case .$cf_POSIX_C_SOURCE in #(vi
7762          .[12]??*) #(vi
7763                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7764                 ;;
7765          .2) #(vi
7766                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7767                 cf_want_posix_source=yes
7768                 ;;
7769          .*)
7770                 cf_want_posix_source=yes
7771                 ;;
7772          esac
7773          if test "$cf_want_posix_source" = yes ; then
7774                 cat >conftest.$ac_ext <<_ACEOF
7775 #line 7775 "configure"
7776 #include "confdefs.h"
7777 #include <sys/types.h>
7778 int
7779 main ()
7780 {
7781
7782 #ifdef _POSIX_SOURCE
7783 make an error
7784 #endif
7785   ;
7786   return 0;
7787 }
7788 _ACEOF
7789 rm -f conftest.$ac_objext
7790 if { (eval echo "$as_me:7790: \"$ac_compile\"") >&5
7791   (eval $ac_compile) 2>&5
7792   ac_status=$?
7793   echo "$as_me:7793: \$? = $ac_status" >&5
7794   (exit $ac_status); } &&
7795          { ac_try='test -s conftest.$ac_objext'
7796   { (eval echo "$as_me:7796: \"$ac_try\"") >&5
7797   (eval $ac_try) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit $ac_status); }; }; then
7801   :
7802 else
7803   echo "$as_me: failed program was:" >&5
7804 cat conftest.$ac_ext >&5
7805 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7806 fi
7807 rm -f conftest.$ac_objext conftest.$ac_ext
7808          fi
7809
7810 echo "${as_me:-configure}:7810: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7811
7812          CFLAGS="$cf_trim_CFLAGS"
7813          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7814
7815 echo "${as_me:-configure}:7815: testing if the second compile does not leave our definition intact error ..." 1>&5
7816
7817          cat >conftest.$ac_ext <<_ACEOF
7818 #line 7818 "configure"
7819 #include "confdefs.h"
7820 #include <sys/types.h>
7821 int
7822 main ()
7823 {
7824
7825 #ifndef _POSIX_C_SOURCE
7826 make an error
7827 #endif
7828   ;
7829   return 0;
7830 }
7831 _ACEOF
7832 rm -f conftest.$ac_objext
7833 if { (eval echo "$as_me:7833: \"$ac_compile\"") >&5
7834   (eval $ac_compile) 2>&5
7835   ac_status=$?
7836   echo "$as_me:7836: \$? = $ac_status" >&5
7837   (exit $ac_status); } &&
7838          { ac_try='test -s conftest.$ac_objext'
7839   { (eval echo "$as_me:7839: \"$ac_try\"") >&5
7840   (eval $ac_try) 2>&5
7841   ac_status=$?
7842   echo "$as_me:7842: \$? = $ac_status" >&5
7843   (exit $ac_status); }; }; then
7844   :
7845 else
7846   echo "$as_me: failed program was:" >&5
7847 cat conftest.$ac_ext >&5
7848 cf_cv_posix_c_source=no
7849 fi
7850 rm -f conftest.$ac_objext conftest.$ac_ext
7851          CFLAGS="$cf_save_CFLAGS"
7852          CPPFLAGS="$cf_save_CPPFLAGS"
7853
7854 fi
7855 rm -f conftest.$ac_objext conftest.$ac_ext
7856
7857 fi
7858 echo "$as_me:7858: result: $cf_cv_posix_c_source" >&5
7859 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7860
7861 if test "$cf_cv_posix_c_source" != no ; then
7862         CFLAGS="$cf_trim_CFLAGS"
7863         CPPFLAGS="$cf_trim_CPPFLAGS"
7864
7865 cf_fix_cppflags=no
7866 cf_new_cflags=
7867 cf_new_cppflags=
7868 cf_new_extra_cppflags=
7869
7870 for cf_add_cflags in $cf_cv_posix_c_source
7871 do
7872 case $cf_fix_cppflags in
7873 no)
7874         case $cf_add_cflags in #(vi
7875         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7876                 case $cf_add_cflags in
7877                 -D*)
7878                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7879
7880                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7881                                 && test -z "${cf_tst_cflags}" \
7882                                 && cf_fix_cppflags=yes
7883
7884                         if test $cf_fix_cppflags = yes ; then
7885                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7886                                 continue
7887                         elif test "${cf_tst_cflags}" = "\"'" ; then
7888                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7889                                 continue
7890                         fi
7891                         ;;
7892                 esac
7893                 case "$CPPFLAGS" in
7894                 *$cf_add_cflags) #(vi
7895                         ;;
7896                 *) #(vi
7897                         case $cf_add_cflags in #(vi
7898                         -D*)
7899                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7900
7901 CPPFLAGS=`echo "$CPPFLAGS" | \
7902         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7903                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7904
7905                                 ;;
7906                         esac
7907                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7908                         ;;
7909                 esac
7910                 ;;
7911         *)
7912                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7913                 ;;
7914         esac
7915         ;;
7916 yes)
7917         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7918
7919         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7920
7921         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7922                 && test -z "${cf_tst_cflags}" \
7923                 && cf_fix_cppflags=no
7924         ;;
7925 esac
7926 done
7927
7928 if test -n "$cf_new_cflags" ; then
7929
7930         CFLAGS="$CFLAGS $cf_new_cflags"
7931 fi
7932
7933 if test -n "$cf_new_cppflags" ; then
7934
7935         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7936 fi
7937
7938 if test -n "$cf_new_extra_cppflags" ; then
7939
7940         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7941 fi
7942
7943 fi
7944
7945         ;;
7946 esac
7947
7948 if test -n "$cf_xopen_source" ; then
7949
7950 cf_fix_cppflags=no
7951 cf_new_cflags=
7952 cf_new_cppflags=
7953 cf_new_extra_cppflags=
7954
7955 for cf_add_cflags in $cf_xopen_source
7956 do
7957 case $cf_fix_cppflags in
7958 no)
7959         case $cf_add_cflags in #(vi
7960         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7961                 case $cf_add_cflags in
7962                 -D*)
7963                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7964
7965                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7966                                 && test -z "${cf_tst_cflags}" \
7967                                 && cf_fix_cppflags=yes
7968
7969                         if test $cf_fix_cppflags = yes ; then
7970                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7971                                 continue
7972                         elif test "${cf_tst_cflags}" = "\"'" ; then
7973                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7974                                 continue
7975                         fi
7976                         ;;
7977                 esac
7978                 case "$CPPFLAGS" in
7979                 *$cf_add_cflags) #(vi
7980                         ;;
7981                 *) #(vi
7982                         case $cf_add_cflags in #(vi
7983                         -D*)
7984                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7985
7986 CPPFLAGS=`echo "$CPPFLAGS" | \
7987         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7988                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7989
7990                                 ;;
7991                         esac
7992                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7993                         ;;
7994                 esac
7995                 ;;
7996         *)
7997                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7998                 ;;
7999         esac
8000         ;;
8001 yes)
8002         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8003
8004         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8005
8006         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8007                 && test -z "${cf_tst_cflags}" \
8008                 && cf_fix_cppflags=no
8009         ;;
8010 esac
8011 done
8012
8013 if test -n "$cf_new_cflags" ; then
8014
8015         CFLAGS="$CFLAGS $cf_new_cflags"
8016 fi
8017
8018 if test -n "$cf_new_cppflags" ; then
8019
8020         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8021 fi
8022
8023 if test -n "$cf_new_extra_cppflags" ; then
8024
8025         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8026 fi
8027
8028 fi
8029
8030 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8031         echo "$as_me:8031: checking if _XOPEN_SOURCE really is set" >&5
8032 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8033         cat >conftest.$ac_ext <<_ACEOF
8034 #line 8034 "configure"
8035 #include "confdefs.h"
8036 #include <stdlib.h>
8037 int
8038 main ()
8039 {
8040
8041 #ifndef _XOPEN_SOURCE
8042 make an error
8043 #endif
8044   ;
8045   return 0;
8046 }
8047 _ACEOF
8048 rm -f conftest.$ac_objext
8049 if { (eval echo "$as_me:8049: \"$ac_compile\"") >&5
8050   (eval $ac_compile) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); } &&
8054          { ac_try='test -s conftest.$ac_objext'
8055   { (eval echo "$as_me:8055: \"$ac_try\"") >&5
8056   (eval $ac_try) 2>&5
8057   ac_status=$?
8058   echo "$as_me:8058: \$? = $ac_status" >&5
8059   (exit $ac_status); }; }; then
8060   cf_XOPEN_SOURCE_set=yes
8061 else
8062   echo "$as_me: failed program was:" >&5
8063 cat conftest.$ac_ext >&5
8064 cf_XOPEN_SOURCE_set=no
8065 fi
8066 rm -f conftest.$ac_objext conftest.$ac_ext
8067         echo "$as_me:8067: result: $cf_XOPEN_SOURCE_set" >&5
8068 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8069         if test $cf_XOPEN_SOURCE_set = yes
8070         then
8071                 cat >conftest.$ac_ext <<_ACEOF
8072 #line 8072 "configure"
8073 #include "confdefs.h"
8074 #include <stdlib.h>
8075 int
8076 main ()
8077 {
8078
8079 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8080 make an error
8081 #endif
8082   ;
8083   return 0;
8084 }
8085 _ACEOF
8086 rm -f conftest.$ac_objext
8087 if { (eval echo "$as_me:8087: \"$ac_compile\"") >&5
8088   (eval $ac_compile) 2>&5
8089   ac_status=$?
8090   echo "$as_me:8090: \$? = $ac_status" >&5
8091   (exit $ac_status); } &&
8092          { ac_try='test -s conftest.$ac_objext'
8093   { (eval echo "$as_me:8093: \"$ac_try\"") >&5
8094   (eval $ac_try) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); }; }; then
8098   cf_XOPEN_SOURCE_set_ok=yes
8099 else
8100   echo "$as_me: failed program was:" >&5
8101 cat conftest.$ac_ext >&5
8102 cf_XOPEN_SOURCE_set_ok=no
8103 fi
8104 rm -f conftest.$ac_objext conftest.$ac_ext
8105                 if test $cf_XOPEN_SOURCE_set_ok = no
8106                 then
8107                         { echo "$as_me:8107: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8108 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8109                 fi
8110         else
8111
8112 echo "$as_me:8112: checking if we should define _XOPEN_SOURCE" >&5
8113 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8114 if test "${cf_cv_xopen_source+set}" = set; then
8115   echo $ECHO_N "(cached) $ECHO_C" >&6
8116 else
8117
8118         cat >conftest.$ac_ext <<_ACEOF
8119 #line 8119 "configure"
8120 #include "confdefs.h"
8121
8122 #include <stdlib.h>
8123 #include <string.h>
8124 #include <sys/types.h>
8125
8126 int
8127 main ()
8128 {
8129
8130 #ifndef _XOPEN_SOURCE
8131 make an error
8132 #endif
8133   ;
8134   return 0;
8135 }
8136 _ACEOF
8137 rm -f conftest.$ac_objext
8138 if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5
8139   (eval $ac_compile) 2>&5
8140   ac_status=$?
8141   echo "$as_me:8141: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -s conftest.$ac_objext'
8144   { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8145   (eval $ac_try) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); }; }; then
8149   cf_cv_xopen_source=no
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153 cf_save="$CPPFLAGS"
8154          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8155          cat >conftest.$ac_ext <<_ACEOF
8156 #line 8156 "configure"
8157 #include "confdefs.h"
8158
8159 #include <stdlib.h>
8160 #include <string.h>
8161 #include <sys/types.h>
8162
8163 int
8164 main ()
8165 {
8166
8167 #ifdef _XOPEN_SOURCE
8168 make an error
8169 #endif
8170   ;
8171   return 0;
8172 }
8173 _ACEOF
8174 rm -f conftest.$ac_objext
8175 if { (eval echo "$as_me:8175: \"$ac_compile\"") >&5
8176   (eval $ac_compile) 2>&5
8177   ac_status=$?
8178   echo "$as_me:8178: \$? = $ac_status" >&5
8179   (exit $ac_status); } &&
8180          { ac_try='test -s conftest.$ac_objext'
8181   { (eval echo "$as_me:8181: \"$ac_try\"") >&5
8182   (eval $ac_try) 2>&5
8183   ac_status=$?
8184   echo "$as_me:8184: \$? = $ac_status" >&5
8185   (exit $ac_status); }; }; then
8186   cf_cv_xopen_source=no
8187 else
8188   echo "$as_me: failed program was:" >&5
8189 cat conftest.$ac_ext >&5
8190 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8191 fi
8192 rm -f conftest.$ac_objext conftest.$ac_ext
8193         CPPFLAGS="$cf_save"
8194
8195 fi
8196 rm -f conftest.$ac_objext conftest.$ac_ext
8197
8198 fi
8199 echo "$as_me:8199: result: $cf_cv_xopen_source" >&5
8200 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8201
8202 if test "$cf_cv_xopen_source" != no ; then
8203
8204 CFLAGS=`echo "$CFLAGS" | \
8205         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8206                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8207
8208 CPPFLAGS=`echo "$CPPFLAGS" | \
8209         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8210                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8211
8212         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8213
8214 cf_fix_cppflags=no
8215 cf_new_cflags=
8216 cf_new_cppflags=
8217 cf_new_extra_cppflags=
8218
8219 for cf_add_cflags in $cf_temp_xopen_source
8220 do
8221 case $cf_fix_cppflags in
8222 no)
8223         case $cf_add_cflags in #(vi
8224         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8225                 case $cf_add_cflags in
8226                 -D*)
8227                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8228
8229                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8230                                 && test -z "${cf_tst_cflags}" \
8231                                 && cf_fix_cppflags=yes
8232
8233                         if test $cf_fix_cppflags = yes ; then
8234                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8235                                 continue
8236                         elif test "${cf_tst_cflags}" = "\"'" ; then
8237                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8238                                 continue
8239                         fi
8240                         ;;
8241                 esac
8242                 case "$CPPFLAGS" in
8243                 *$cf_add_cflags) #(vi
8244                         ;;
8245                 *) #(vi
8246                         case $cf_add_cflags in #(vi
8247                         -D*)
8248                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8249
8250 CPPFLAGS=`echo "$CPPFLAGS" | \
8251         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8252                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8253
8254                                 ;;
8255                         esac
8256                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8257                         ;;
8258                 esac
8259                 ;;
8260         *)
8261                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8262                 ;;
8263         esac
8264         ;;
8265 yes)
8266         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8267
8268         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8269
8270         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8271                 && test -z "${cf_tst_cflags}" \
8272                 && cf_fix_cppflags=no
8273         ;;
8274 esac
8275 done
8276
8277 if test -n "$cf_new_cflags" ; then
8278
8279         CFLAGS="$CFLAGS $cf_new_cflags"
8280 fi
8281
8282 if test -n "$cf_new_cppflags" ; then
8283
8284         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8285 fi
8286
8287 if test -n "$cf_new_extra_cppflags" ; then
8288
8289         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8290 fi
8291
8292 fi
8293
8294         fi
8295 fi
8296
8297 # Work around breakage on OS X
8298
8299 echo "$as_me:8299: checking if SIGWINCH is defined" >&5
8300 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8301 if test "${cf_cv_define_sigwinch+set}" = set; then
8302   echo $ECHO_N "(cached) $ECHO_C" >&6
8303 else
8304
8305         cat >conftest.$ac_ext <<_ACEOF
8306 #line 8306 "configure"
8307 #include "confdefs.h"
8308
8309 #include <sys/types.h>
8310 #include <sys/signal.h>
8311
8312 int
8313 main ()
8314 {
8315 int x = SIGWINCH
8316   ;
8317   return 0;
8318 }
8319 _ACEOF
8320 rm -f conftest.$ac_objext
8321 if { (eval echo "$as_me:8321: \"$ac_compile\"") >&5
8322   (eval $ac_compile) 2>&5
8323   ac_status=$?
8324   echo "$as_me:8324: \$? = $ac_status" >&5
8325   (exit $ac_status); } &&
8326          { ac_try='test -s conftest.$ac_objext'
8327   { (eval echo "$as_me:8327: \"$ac_try\"") >&5
8328   (eval $ac_try) 2>&5
8329   ac_status=$?
8330   echo "$as_me:8330: \$? = $ac_status" >&5
8331   (exit $ac_status); }; }; then
8332   cf_cv_define_sigwinch=yes
8333 else
8334   echo "$as_me: failed program was:" >&5
8335 cat conftest.$ac_ext >&5
8336 cat >conftest.$ac_ext <<_ACEOF
8337 #line 8337 "configure"
8338 #include "confdefs.h"
8339
8340 #undef _XOPEN_SOURCE
8341 #undef _POSIX_SOURCE
8342 #undef _POSIX_C_SOURCE
8343 #include <sys/types.h>
8344 #include <sys/signal.h>
8345
8346 int
8347 main ()
8348 {
8349 int x = SIGWINCH
8350   ;
8351   return 0;
8352 }
8353 _ACEOF
8354 rm -f conftest.$ac_objext
8355 if { (eval echo "$as_me:8355: \"$ac_compile\"") >&5
8356   (eval $ac_compile) 2>&5
8357   ac_status=$?
8358   echo "$as_me:8358: \$? = $ac_status" >&5
8359   (exit $ac_status); } &&
8360          { ac_try='test -s conftest.$ac_objext'
8361   { (eval echo "$as_me:8361: \"$ac_try\"") >&5
8362   (eval $ac_try) 2>&5
8363   ac_status=$?
8364   echo "$as_me:8364: \$? = $ac_status" >&5
8365   (exit $ac_status); }; }; then
8366   cf_cv_define_sigwinch=maybe
8367 else
8368   echo "$as_me: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 cf_cv_define_sigwinch=no
8371 fi
8372 rm -f conftest.$ac_objext conftest.$ac_ext
8373
8374 fi
8375 rm -f conftest.$ac_objext conftest.$ac_ext
8376
8377 fi
8378 echo "$as_me:8378: result: $cf_cv_define_sigwinch" >&5
8379 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8380
8381 if test "$cf_cv_define_sigwinch" = maybe ; then
8382 echo "$as_me:8382: checking for actual SIGWINCH definition" >&5
8383 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8384 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8385   echo $ECHO_N "(cached) $ECHO_C" >&6
8386 else
8387
8388 cf_cv_fixup_sigwinch=unknown
8389 cf_sigwinch=32
8390 while test $cf_sigwinch != 1
8391 do
8392         cat >conftest.$ac_ext <<_ACEOF
8393 #line 8393 "configure"
8394 #include "confdefs.h"
8395
8396 #undef _XOPEN_SOURCE
8397 #undef _POSIX_SOURCE
8398 #undef _POSIX_C_SOURCE
8399 #include <sys/types.h>
8400 #include <sys/signal.h>
8401
8402 int
8403 main ()
8404 {
8405
8406 #if SIGWINCH != $cf_sigwinch
8407 make an error
8408 #endif
8409 int x = SIGWINCH
8410   ;
8411   return 0;
8412 }
8413 _ACEOF
8414 rm -f conftest.$ac_objext
8415 if { (eval echo "$as_me:8415: \"$ac_compile\"") >&5
8416   (eval $ac_compile) 2>&5
8417   ac_status=$?
8418   echo "$as_me:8418: \$? = $ac_status" >&5
8419   (exit $ac_status); } &&
8420          { ac_try='test -s conftest.$ac_objext'
8421   { (eval echo "$as_me:8421: \"$ac_try\"") >&5
8422   (eval $ac_try) 2>&5
8423   ac_status=$?
8424   echo "$as_me:8424: \$? = $ac_status" >&5
8425   (exit $ac_status); }; }; then
8426   cf_cv_fixup_sigwinch=$cf_sigwinch
8427          break
8428 else
8429   echo "$as_me: failed program was:" >&5
8430 cat conftest.$ac_ext >&5
8431 fi
8432 rm -f conftest.$ac_objext conftest.$ac_ext
8433
8434 cf_sigwinch=`expr $cf_sigwinch - 1`
8435 done
8436
8437 fi
8438 echo "$as_me:8438: result: $cf_cv_fixup_sigwinch" >&5
8439 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8440
8441         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8442                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8443         fi
8444 fi
8445
8446 # Checks for CODESET support.
8447
8448   echo "$as_me:8448: checking for nl_langinfo and CODESET" >&5
8449 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8450 if test "${am_cv_langinfo_codeset+set}" = set; then
8451   echo $ECHO_N "(cached) $ECHO_C" >&6
8452 else
8453   cat >conftest.$ac_ext <<_ACEOF
8454 #line 8454 "configure"
8455 #include "confdefs.h"
8456 #include <langinfo.h>
8457 int
8458 main ()
8459 {
8460 char* cs = nl_langinfo(CODESET);
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 rm -f conftest.$ac_objext conftest$ac_exeext
8466 if { (eval echo "$as_me:8466: \"$ac_link\"") >&5
8467   (eval $ac_link) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); } &&
8471          { ac_try='test -s conftest$ac_exeext'
8472   { (eval echo "$as_me:8472: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); }; }; then
8477   am_cv_langinfo_codeset=yes
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 am_cv_langinfo_codeset=no
8482 fi
8483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8484
8485 fi
8486 echo "$as_me:8486: result: $am_cv_langinfo_codeset" >&5
8487 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8488   if test $am_cv_langinfo_codeset = yes; then
8489
8490 cat >>confdefs.h <<\EOF
8491 #define HAVE_LANGINFO_CODESET 1
8492 EOF
8493
8494   fi
8495
8496 # use these variables to work around a defect in gcc's fixincludes.
8497 NCURSES_OK_WCHAR_T=
8498 NCURSES_OK_WINT_T=
8499
8500 echo "$as_me:8500: checking if you want wide-character code" >&5
8501 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8502
8503 # Check whether --enable-widec or --disable-widec was given.
8504 if test "${enable_widec+set}" = set; then
8505   enableval="$enable_widec"
8506   with_widec=$enableval
8507 else
8508   with_widec=no
8509 fi;
8510 echo "$as_me:8510: result: $with_widec" >&5
8511 echo "${ECHO_T}$with_widec" >&6
8512 if test "$with_widec" = yes ; then
8513         LIB_SUFFIX="w${LIB_SUFFIX}"
8514         cat >>confdefs.h <<\EOF
8515 #define USE_WIDEC_SUPPORT 1
8516 EOF
8517
8518         cat >>confdefs.h <<\EOF
8519 #define NCURSES_WIDECHAR 1
8520 EOF
8521
8522 echo "$as_me:8522: checking if wchar.h can be used as is" >&5
8523 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8524 if test "${cf_cv_wchar_h_okay+set}" = set; then
8525   echo $ECHO_N "(cached) $ECHO_C" >&6
8526 else
8527
8528 cat >conftest.$ac_ext <<_ACEOF
8529 #line 8529 "configure"
8530 #include "confdefs.h"
8531
8532 #include <stdlib.h>
8533 #include <wchar.h>
8534
8535 int
8536 main ()
8537 {
8538
8539         wint_t foo = 0;
8540         int bar = iswpunct(foo)
8541   ;
8542   return 0;
8543 }
8544 _ACEOF
8545 rm -f conftest.$ac_objext
8546 if { (eval echo "$as_me:8546: \"$ac_compile\"") >&5
8547   (eval $ac_compile) 2>&5
8548   ac_status=$?
8549   echo "$as_me:8549: \$? = $ac_status" >&5
8550   (exit $ac_status); } &&
8551          { ac_try='test -s conftest.$ac_objext'
8552   { (eval echo "$as_me:8552: \"$ac_try\"") >&5
8553   (eval $ac_try) 2>&5
8554   ac_status=$?
8555   echo "$as_me:8555: \$? = $ac_status" >&5
8556   (exit $ac_status); }; }; then
8557   cf_cv_wchar_h_okay=yes
8558 else
8559   echo "$as_me: failed program was:" >&5
8560 cat conftest.$ac_ext >&5
8561 cf_cv_wchar_h_okay=no
8562 fi
8563 rm -f conftest.$ac_objext conftest.$ac_ext
8564 fi
8565 echo "$as_me:8565: result: $cf_cv_wchar_h_okay" >&5
8566 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8567
8568 if test $cf_cv_wchar_h_okay = no
8569 then
8570
8571 echo "$as_me:8571: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8572 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8573 cat >conftest.$ac_ext <<_ACEOF
8574 #line 8574 "configure"
8575 #include "confdefs.h"
8576 #include <sys/types.h>
8577
8578 int
8579 main ()
8580 {
8581
8582 #ifndef _XOPEN_SOURCE_EXTENDED
8583 make an error
8584 #endif
8585   ;
8586   return 0;
8587 }
8588 _ACEOF
8589 rm -f conftest.$ac_objext
8590 if { (eval echo "$as_me:8590: \"$ac_compile\"") >&5
8591   (eval $ac_compile) 2>&5
8592   ac_status=$?
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); } &&
8595          { ac_try='test -s conftest.$ac_objext'
8596   { (eval echo "$as_me:8596: \"$ac_try\"") >&5
8597   (eval $ac_try) 2>&5
8598   ac_status=$?
8599   echo "$as_me:8599: \$? = $ac_status" >&5
8600   (exit $ac_status); }; }; then
8601   cf_result=no
8602 else
8603   echo "$as_me: failed program was:" >&5
8604 cat conftest.$ac_ext >&5
8605 cf_result=yes
8606 fi
8607 rm -f conftest.$ac_objext conftest.$ac_ext
8608 echo "$as_me:8608: result: $cf_result" >&5
8609 echo "${ECHO_T}$cf_result" >&6
8610
8611 if test "$cf_result" = yes ; then
8612         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8613 elif test "x" != "x" ; then
8614         echo "$as_me:8614: checking checking for compatible value versus " >&5
8615 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8616         cat >conftest.$ac_ext <<_ACEOF
8617 #line 8617 "configure"
8618 #include "confdefs.h"
8619 #include <sys/types.h>
8620
8621 int
8622 main ()
8623 {
8624
8625 #if _XOPEN_SOURCE_EXTENDED- < 0
8626 make an error
8627 #endif
8628   ;
8629   return 0;
8630 }
8631 _ACEOF
8632 rm -f conftest.$ac_objext
8633 if { (eval echo "$as_me:8633: \"$ac_compile\"") >&5
8634   (eval $ac_compile) 2>&5
8635   ac_status=$?
8636   echo "$as_me:8636: \$? = $ac_status" >&5
8637   (exit $ac_status); } &&
8638          { ac_try='test -s conftest.$ac_objext'
8639   { (eval echo "$as_me:8639: \"$ac_try\"") >&5
8640   (eval $ac_try) 2>&5
8641   ac_status=$?
8642   echo "$as_me:8642: \$? = $ac_status" >&5
8643   (exit $ac_status); }; }; then
8644   cf_result=yes
8645 else
8646   echo "$as_me: failed program was:" >&5
8647 cat conftest.$ac_ext >&5
8648 cf_result=no
8649 fi
8650 rm -f conftest.$ac_objext conftest.$ac_ext
8651         echo "$as_me:8651: result: $cf_result" >&5
8652 echo "${ECHO_T}$cf_result" >&6
8653         if test "$cf_result" = no ; then
8654                 # perhaps we can override it - try...
8655                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8656         fi
8657 fi
8658
8659 fi
8660
8661         # with_overwrite=no
8662         NCURSES_CH_T=cchar_t
8663
8664 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8665 do
8666 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8667 echo "$as_me:8667: checking for $ac_func" >&5
8668 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8669 if eval "test \"\${$as_ac_var+set}\" = set"; then
8670   echo $ECHO_N "(cached) $ECHO_C" >&6
8671 else
8672   cat >conftest.$ac_ext <<_ACEOF
8673 #line 8673 "configure"
8674 #include "confdefs.h"
8675 /* System header to define __stub macros and hopefully few prototypes,
8676     which can conflict with char $ac_func (); below.  */
8677 #include <assert.h>
8678 /* Override any gcc2 internal prototype to avoid an error.  */
8679 #ifdef __cplusplus
8680 extern "C"
8681 #endif
8682 /* We use char because int might match the return type of a gcc2
8683    builtin and then its argument prototype would still apply.  */
8684 char $ac_func ();
8685 char (*f) ();
8686
8687 int
8688 main ()
8689 {
8690 /* The GNU C library defines this for functions which it implements
8691     to always fail with ENOSYS.  Some functions are actually named
8692     something starting with __ and the normal name is an alias.  */
8693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8694 choke me
8695 #else
8696 f = $ac_func;
8697 #endif
8698
8699   ;
8700   return 0;
8701 }
8702 _ACEOF
8703 rm -f conftest.$ac_objext conftest$ac_exeext
8704 if { (eval echo "$as_me:8704: \"$ac_link\"") >&5
8705   (eval $ac_link) 2>&5
8706   ac_status=$?
8707   echo "$as_me:8707: \$? = $ac_status" >&5
8708   (exit $ac_status); } &&
8709          { ac_try='test -s conftest$ac_exeext'
8710   { (eval echo "$as_me:8710: \"$ac_try\"") >&5
8711   (eval $ac_try) 2>&5
8712   ac_status=$?
8713   echo "$as_me:8713: \$? = $ac_status" >&5
8714   (exit $ac_status); }; }; then
8715   eval "$as_ac_var=yes"
8716 else
8717   echo "$as_me: failed program was:" >&5
8718 cat conftest.$ac_ext >&5
8719 eval "$as_ac_var=no"
8720 fi
8721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8722 fi
8723 echo "$as_me:8723: result: `eval echo '${'$as_ac_var'}'`" >&5
8724 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8725 if test `eval echo '${'$as_ac_var'}'` = yes; then
8726   cat >>confdefs.h <<EOF
8727 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8728 EOF
8729
8730 fi
8731 done
8732
8733         if test "$ac_cv_func_putwc" != yes ; then
8734
8735 echo "$as_me:8735: checking for multibyte character support" >&5
8736 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8737 if test "${cf_cv_utf8_lib+set}" = set; then
8738   echo $ECHO_N "(cached) $ECHO_C" >&6
8739 else
8740
8741         cf_save_LIBS="$LIBS"
8742         cat >conftest.$ac_ext <<_ACEOF
8743 #line 8743 "configure"
8744 #include "confdefs.h"
8745
8746 #include <stdlib.h>
8747 int
8748 main ()
8749 {
8750 putwc(0,0);
8751   ;
8752   return 0;
8753 }
8754 _ACEOF
8755 rm -f conftest.$ac_objext conftest$ac_exeext
8756 if { (eval echo "$as_me:8756: \"$ac_link\"") >&5
8757   (eval $ac_link) 2>&5
8758   ac_status=$?
8759   echo "$as_me:8759: \$? = $ac_status" >&5
8760   (exit $ac_status); } &&
8761          { ac_try='test -s conftest$ac_exeext'
8762   { (eval echo "$as_me:8762: \"$ac_try\"") >&5
8763   (eval $ac_try) 2>&5
8764   ac_status=$?
8765   echo "$as_me:8765: \$? = $ac_status" >&5
8766   (exit $ac_status); }; }; then
8767   cf_cv_utf8_lib=yes
8768 else
8769   echo "$as_me: failed program was:" >&5
8770 cat conftest.$ac_ext >&5
8771
8772 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8773 # will be set on completion of the AC_TRY_LINK below.
8774 cf_cv_header_path_utf8=
8775 cf_cv_library_path_utf8=
8776
8777 echo "${as_me:-configure}:8777: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8778
8779 cf_save_LIBS="$LIBS"
8780
8781 cat >conftest.$ac_ext <<_ACEOF
8782 #line 8782 "configure"
8783 #include "confdefs.h"
8784
8785 #include <libutf8.h>
8786 int
8787 main ()
8788 {
8789 putwc(0,0);
8790   ;
8791   return 0;
8792 }
8793 _ACEOF
8794 rm -f conftest.$ac_objext conftest$ac_exeext
8795 if { (eval echo "$as_me:8795: \"$ac_link\"") >&5
8796   (eval $ac_link) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); } &&
8800          { ac_try='test -s conftest$ac_exeext'
8801   { (eval echo "$as_me:8801: \"$ac_try\"") >&5
8802   (eval $ac_try) 2>&5
8803   ac_status=$?
8804   echo "$as_me:8804: \$? = $ac_status" >&5
8805   (exit $ac_status); }; }; then
8806
8807         cf_cv_find_linkage_utf8=yes
8808         cf_cv_header_path_utf8=/usr/include
8809         cf_cv_library_path_utf8=/usr/lib
8810
8811 else
8812   echo "$as_me: failed program was:" >&5
8813 cat conftest.$ac_ext >&5
8814
8815 LIBS="-lutf8  $cf_save_LIBS"
8816
8817 cat >conftest.$ac_ext <<_ACEOF
8818 #line 8818 "configure"
8819 #include "confdefs.h"
8820
8821 #include <libutf8.h>
8822 int
8823 main ()
8824 {
8825 putwc(0,0);
8826   ;
8827   return 0;
8828 }
8829 _ACEOF
8830 rm -f conftest.$ac_objext conftest$ac_exeext
8831 if { (eval echo "$as_me:8831: \"$ac_link\"") >&5
8832   (eval $ac_link) 2>&5
8833   ac_status=$?
8834   echo "$as_me:8834: \$? = $ac_status" >&5
8835   (exit $ac_status); } &&
8836          { ac_try='test -s conftest$ac_exeext'
8837   { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8838   (eval $ac_try) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); }; }; then
8842
8843         cf_cv_find_linkage_utf8=yes
8844         cf_cv_header_path_utf8=/usr/include
8845         cf_cv_library_path_utf8=/usr/lib
8846         cf_cv_library_file_utf8="-lutf8"
8847
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8851
8852         cf_cv_find_linkage_utf8=no
8853         LIBS="$cf_save_LIBS"
8854
8855     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8856
8857 echo "${as_me:-configure}:8857: testing find linkage for utf8 library ..." 1>&5
8858
8859 echo "${as_me:-configure}:8859: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8860
8861     cf_save_CPPFLAGS="$CPPFLAGS"
8862     cf_test_CPPFLAGS="$CPPFLAGS"
8863
8864 cf_search=
8865
8866 # collect the current set of include-directories from compiler flags
8867 cf_header_path_list=""
8868 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8869         for cf_header_path in $CPPFLAGS $CFLAGS
8870         do
8871                 case $cf_header_path in #(vi
8872                 -I*)
8873                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8874
8875 test "$cf_header_path" != "NONE" && \
8876 test -d "$cf_header_path" && \
8877  {
8878         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8879         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8880         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8881         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8882         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8883         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8884 }
8885
8886                         cf_header_path_list="$cf_header_path_list $cf_search"
8887                         ;;
8888                 esac
8889         done
8890 fi
8891
8892 # add the variations for the package we are looking for
8893
8894 cf_search=
8895
8896 test "/usr" != "$prefix" && \
8897 test -d "/usr" && \
8898 (test $prefix = NONE || test "/usr" != "$prefix") && {
8899         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8900         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8901         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8902         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8903         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8904         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8905 }
8906
8907 test "$prefix" != "NONE" && \
8908 test -d "$prefix" && \
8909  {
8910         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8911         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8912         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8913         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8914         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8915         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8916 }
8917
8918 test "/usr/local" != "$prefix" && \
8919 test -d "/usr/local" && \
8920 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8921         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8922         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8923         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8924         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8925         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8926         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8927 }
8928
8929 test "/opt" != "$prefix" && \
8930 test -d "/opt" && \
8931 (test $prefix = NONE || test "/opt" != "$prefix") && {
8932         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8933         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8934         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8935         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8936         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8937         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8938 }
8939
8940 test "$HOME" != "$prefix" && \
8941 test -d "$HOME" && \
8942 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8943         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8944         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8945         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8946         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8947         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8948         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8949 }
8950
8951 test "$includedir" != NONE && \
8952 test "$includedir" != "/usr/include" && \
8953 test -d "$includedir" && {
8954         test -d $includedir &&    cf_search="$cf_search $includedir"
8955         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8956 }
8957
8958 test "$oldincludedir" != NONE && \
8959 test "$oldincludedir" != "/usr/include" && \
8960 test -d "$oldincludedir" && {
8961         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8962         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8963 }
8964
8965 cf_search="$cf_search $cf_header_path_list"
8966
8967     for cf_cv_header_path_utf8 in $cf_search
8968     do
8969       if test -d $cf_cv_header_path_utf8 ; then
8970         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8971
8972 echo "${as_me:-configure}:8972: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8973
8974         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8975         cat >conftest.$ac_ext <<_ACEOF
8976 #line 8976 "configure"
8977 #include "confdefs.h"
8978
8979 #include <libutf8.h>
8980 int
8981 main ()
8982 {
8983 putwc(0,0);
8984   ;
8985   return 0;
8986 }
8987 _ACEOF
8988 rm -f conftest.$ac_objext
8989 if { (eval echo "$as_me:8989: \"$ac_compile\"") >&5
8990   (eval $ac_compile) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit $ac_status); } &&
8994          { ac_try='test -s conftest.$ac_objext'
8995   { (eval echo "$as_me:8995: \"$ac_try\"") >&5
8996   (eval $ac_try) 2>&5
8997   ac_status=$?
8998   echo "$as_me:8998: \$? = $ac_status" >&5
8999   (exit $ac_status); }; }; then
9000
9001             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9002
9003 echo "${as_me:-configure}:9003: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9004
9005             cf_cv_find_linkage_utf8=maybe
9006             cf_test_CPPFLAGS="$CPPFLAGS"
9007             break
9008 else
9009   echo "$as_me: failed program was:" >&5
9010 cat conftest.$ac_ext >&5
9011
9012             CPPFLAGS="$cf_save_CPPFLAGS"
9013
9014 fi
9015 rm -f conftest.$ac_objext conftest.$ac_ext
9016       fi
9017     done
9018
9019     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9020
9021 echo "${as_me:-configure}:9021: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9022
9023       cf_save_LIBS="$LIBS"
9024       cf_save_LDFLAGS="$LDFLAGS"
9025
9026       if test "$cf_cv_find_linkage_utf8" != yes ; then
9027
9028 cf_search=
9029 cf_library_path_list=""
9030 if test -n "${LDFLAGS}${LIBS}" ; then
9031         for cf_library_path in $LDFLAGS $LIBS
9032         do
9033                 case $cf_library_path in #(vi
9034                 -L*)
9035                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9036
9037 test "$cf_library_path" != "NONE" && \
9038 test -d "$cf_library_path" && \
9039  {
9040         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9041         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9042         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9043         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9044         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9045         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9046 }
9047
9048                         cf_library_path_list="$cf_library_path_list $cf_search"
9049                         ;;
9050                 esac
9051         done
9052 fi
9053
9054 cf_search=
9055
9056 test "/usr" != "$prefix" && \
9057 test -d "/usr" && \
9058 (test $prefix = NONE || test "/usr" != "$prefix") && {
9059         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9060         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9061         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9062         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9063         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9064         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9065 }
9066
9067 test "$prefix" != "NONE" && \
9068 test -d "$prefix" && \
9069  {
9070         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9071         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9072         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9073         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9074         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9075         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9076 }
9077
9078 test "/usr/local" != "$prefix" && \
9079 test -d "/usr/local" && \
9080 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9081         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9082         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9083         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9084         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9085         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9086         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9087 }
9088
9089 test "/opt" != "$prefix" && \
9090 test -d "/opt" && \
9091 (test $prefix = NONE || test "/opt" != "$prefix") && {
9092         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9093         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9094         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9095         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9096         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9097         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9098 }
9099
9100 test "$HOME" != "$prefix" && \
9101 test -d "$HOME" && \
9102 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9103         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9104         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9105         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9106         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9107         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9108         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9109 }
9110
9111 cf_search="$cf_library_path_list $cf_search"
9112
9113         for cf_cv_library_path_utf8 in $cf_search
9114         do
9115           if test -d $cf_cv_library_path_utf8 ; then
9116             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9117
9118 echo "${as_me:-configure}:9118: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9119
9120             CPPFLAGS="$cf_test_CPPFLAGS"
9121             LIBS="-lutf8  $cf_save_LIBS"
9122             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9123             cat >conftest.$ac_ext <<_ACEOF
9124 #line 9124 "configure"
9125 #include "confdefs.h"
9126
9127 #include <libutf8.h>
9128 int
9129 main ()
9130 {
9131 putwc(0,0);
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 rm -f conftest.$ac_objext conftest$ac_exeext
9137 if { (eval echo "$as_me:9137: \"$ac_link\"") >&5
9138   (eval $ac_link) 2>&5
9139   ac_status=$?
9140   echo "$as_me:9140: \$? = $ac_status" >&5
9141   (exit $ac_status); } &&
9142          { ac_try='test -s conftest$ac_exeext'
9143   { (eval echo "$as_me:9143: \"$ac_try\"") >&5
9144   (eval $ac_try) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); }; }; then
9148
9149                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9150
9151 echo "${as_me:-configure}:9151: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9152
9153                 cf_cv_find_linkage_utf8=yes
9154                 cf_cv_library_file_utf8="-lutf8"
9155                 break
9156 else
9157   echo "$as_me: failed program was:" >&5
9158 cat conftest.$ac_ext >&5
9159
9160                 CPPFLAGS="$cf_save_CPPFLAGS"
9161                 LIBS="$cf_save_LIBS"
9162                 LDFLAGS="$cf_save_LDFLAGS"
9163
9164 fi
9165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9166           fi
9167         done
9168         CPPFLAGS="$cf_save_CPPFLAGS"
9169         LDFLAGS="$cf_save_LDFLAGS"
9170       fi
9171
9172     else
9173       cf_cv_find_linkage_utf8=no
9174     fi
9175
9176 fi
9177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9178
9179 fi
9180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9181
9182 LIBS="$cf_save_LIBS"
9183
9184 if test "$cf_cv_find_linkage_utf8" = yes ; then
9185 cf_cv_utf8_lib=add-on
9186 else
9187 cf_cv_utf8_lib=no
9188 fi
9189
9190 fi
9191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9192 fi
9193 echo "$as_me:9193: result: $cf_cv_utf8_lib" >&5
9194 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9195
9196 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9197 # ncurses/ncursesw:
9198 if test "$cf_cv_utf8_lib" = "add-on" ; then
9199         cat >>confdefs.h <<\EOF
9200 #define HAVE_LIBUTF8_H 1
9201 EOF
9202
9203 if test -n "$cf_cv_header_path_utf8" ; then
9204   for cf_add_incdir in $cf_cv_header_path_utf8
9205   do
9206         while test $cf_add_incdir != /usr/include
9207         do
9208           if test -d $cf_add_incdir
9209           then
9210                 cf_have_incdir=no
9211                 if test -n "$CFLAGS$CPPFLAGS" ; then
9212                   # a loop is needed to ensure we can add subdirs of existing dirs
9213                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9214                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9215                           cf_have_incdir=yes; break
9216                         fi
9217                   done
9218                 fi
9219
9220                 if test "$cf_have_incdir" = no ; then
9221                   if test "$cf_add_incdir" = /usr/local/include ; then
9222                         if test "$GCC" = yes
9223                         then
9224                           cf_save_CPPFLAGS=$CPPFLAGS
9225                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9226                           cat >conftest.$ac_ext <<_ACEOF
9227 #line 9227 "configure"
9228 #include "confdefs.h"
9229 #include <stdio.h>
9230 int
9231 main ()
9232 {
9233 printf("Hello")
9234   ;
9235   return 0;
9236 }
9237 _ACEOF
9238 rm -f conftest.$ac_objext
9239 if { (eval echo "$as_me:9239: \"$ac_compile\"") >&5
9240   (eval $ac_compile) 2>&5
9241   ac_status=$?
9242   echo "$as_me:9242: \$? = $ac_status" >&5
9243   (exit $ac_status); } &&
9244          { ac_try='test -s conftest.$ac_objext'
9245   { (eval echo "$as_me:9245: \"$ac_try\"") >&5
9246   (eval $ac_try) 2>&5
9247   ac_status=$?
9248   echo "$as_me:9248: \$? = $ac_status" >&5
9249   (exit $ac_status); }; }; then
9250   :
9251 else
9252   echo "$as_me: failed program was:" >&5
9253 cat conftest.$ac_ext >&5
9254 cf_have_incdir=yes
9255 fi
9256 rm -f conftest.$ac_objext conftest.$ac_ext
9257                           CPPFLAGS=$cf_save_CPPFLAGS
9258                         fi
9259                   fi
9260                 fi
9261
9262                 if test "$cf_have_incdir" = no ; then
9263                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9264
9265 echo "${as_me:-configure}:9265: testing adding $cf_add_incdir to include-path ..." 1>&5
9266
9267                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9268
9269                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9270                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9271                   cf_add_incdir="$cf_top_incdir"
9272                 else
9273                   break
9274                 fi
9275           fi
9276         done
9277   done
9278 fi
9279
9280 if test -n "$cf_cv_library_path_utf8" ; then
9281   for cf_add_libdir in $cf_cv_library_path_utf8
9282   do
9283     if test $cf_add_libdir = /usr/lib ; then
9284       :
9285     elif test -d $cf_add_libdir
9286     then
9287       cf_have_libdir=no
9288       if test -n "$LDFLAGS$LIBS" ; then
9289         # a loop is needed to ensure we can add subdirs of existing dirs
9290         for cf_test_libdir in $LDFLAGS $LIBS ; do
9291           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9292             cf_have_libdir=yes; break
9293           fi
9294         done
9295       fi
9296       if test "$cf_have_libdir" = no ; then
9297         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9298
9299 echo "${as_me:-configure}:9299: testing adding $cf_add_libdir to library-path ..." 1>&5
9300
9301         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9302       fi
9303     fi
9304   done
9305 fi
9306
9307         LIBS="$cf_cv_library_file_utf8 $LIBS"
9308 fi
9309
9310                 if test "$cf_cv_utf8_lib" != no ; then
9311                         NCURSES_LIBUTF8=1
9312                 fi
9313         fi
9314
9315 # This is needed on Tru64 5.0 to declare mbstate_t
9316 echo "$as_me:9316: checking if we must include wchar.h to declare mbstate_t" >&5
9317 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9318 if test "${cf_cv_mbstate_t+set}" = set; then
9319   echo $ECHO_N "(cached) $ECHO_C" >&6
9320 else
9321
9322 cat >conftest.$ac_ext <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9325
9326 #include <stdlib.h>
9327 #include <stdarg.h>
9328 #include <stdio.h>
9329 #ifdef HAVE_LIBUTF8_H
9330 #include <libutf8.h>
9331 #endif
9332 int
9333 main ()
9334 {
9335 mbstate_t state
9336   ;
9337   return 0;
9338 }
9339 _ACEOF
9340 rm -f conftest.$ac_objext
9341 if { (eval echo "$as_me:9341: \"$ac_compile\"") >&5
9342   (eval $ac_compile) 2>&5
9343   ac_status=$?
9344   echo "$as_me:9344: \$? = $ac_status" >&5
9345   (exit $ac_status); } &&
9346          { ac_try='test -s conftest.$ac_objext'
9347   { (eval echo "$as_me:9347: \"$ac_try\"") >&5
9348   (eval $ac_try) 2>&5
9349   ac_status=$?
9350   echo "$as_me:9350: \$? = $ac_status" >&5
9351   (exit $ac_status); }; }; then
9352   cf_cv_mbstate_t=no
9353 else
9354   echo "$as_me: failed program was:" >&5
9355 cat conftest.$ac_ext >&5
9356 cat >conftest.$ac_ext <<_ACEOF
9357 #line 9357 "configure"
9358 #include "confdefs.h"
9359
9360 #include <stdlib.h>
9361 #include <stdarg.h>
9362 #include <stdio.h>
9363 #include <wchar.h>
9364 #ifdef HAVE_LIBUTF8_H
9365 #include <libutf8.h>
9366 #endif
9367 int
9368 main ()
9369 {
9370 mbstate_t value
9371   ;
9372   return 0;
9373 }
9374 _ACEOF
9375 rm -f conftest.$ac_objext
9376 if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
9377   (eval $ac_compile) 2>&5
9378   ac_status=$?
9379   echo "$as_me:9379: \$? = $ac_status" >&5
9380   (exit $ac_status); } &&
9381          { ac_try='test -s conftest.$ac_objext'
9382   { (eval echo "$as_me:9382: \"$ac_try\"") >&5
9383   (eval $ac_try) 2>&5
9384   ac_status=$?
9385   echo "$as_me:9385: \$? = $ac_status" >&5
9386   (exit $ac_status); }; }; then
9387   cf_cv_mbstate_t=yes
9388 else
9389   echo "$as_me: failed program was:" >&5
9390 cat conftest.$ac_ext >&5
9391 cf_cv_mbstate_t=unknown
9392 fi
9393 rm -f conftest.$ac_objext conftest.$ac_ext
9394 fi
9395 rm -f conftest.$ac_objext conftest.$ac_ext
9396 fi
9397 echo "$as_me:9397: result: $cf_cv_mbstate_t" >&5
9398 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9399
9400 if test "$cf_cv_mbstate_t" = yes ; then
9401         cat >>confdefs.h <<\EOF
9402 #define NEED_WCHAR_H 1
9403 EOF
9404
9405         NEED_WCHAR_H=1
9406 fi
9407
9408 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9409 if test "$cf_cv_mbstate_t" = unknown ; then
9410         NCURSES_MBSTATE_T=1
9411 fi
9412
9413 # This is needed on Tru64 5.0 to declare wchar_t
9414 echo "$as_me:9414: checking if we must include wchar.h to declare wchar_t" >&5
9415 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9416 if test "${cf_cv_wchar_t+set}" = set; then
9417   echo $ECHO_N "(cached) $ECHO_C" >&6
9418 else
9419
9420 cat >conftest.$ac_ext <<_ACEOF
9421 #line 9421 "configure"
9422 #include "confdefs.h"
9423
9424 #include <stdlib.h>
9425 #include <stdarg.h>
9426 #include <stdio.h>
9427 #ifdef HAVE_LIBUTF8_H
9428 #include <libutf8.h>
9429 #endif
9430 int
9431 main ()
9432 {
9433 wchar_t state
9434   ;
9435   return 0;
9436 }
9437 _ACEOF
9438 rm -f conftest.$ac_objext
9439 if { (eval echo "$as_me:9439: \"$ac_compile\"") >&5
9440   (eval $ac_compile) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); } &&
9444          { ac_try='test -s conftest.$ac_objext'
9445   { (eval echo "$as_me:9445: \"$ac_try\"") >&5
9446   (eval $ac_try) 2>&5
9447   ac_status=$?
9448   echo "$as_me:9448: \$? = $ac_status" >&5
9449   (exit $ac_status); }; }; then
9450   cf_cv_wchar_t=no
9451 else
9452   echo "$as_me: failed program was:" >&5
9453 cat conftest.$ac_ext >&5
9454 cat >conftest.$ac_ext <<_ACEOF
9455 #line 9455 "configure"
9456 #include "confdefs.h"
9457
9458 #include <stdlib.h>
9459 #include <stdarg.h>
9460 #include <stdio.h>
9461 #include <wchar.h>
9462 #ifdef HAVE_LIBUTF8_H
9463 #include <libutf8.h>
9464 #endif
9465 int
9466 main ()
9467 {
9468 wchar_t value
9469   ;
9470   return 0;
9471 }
9472 _ACEOF
9473 rm -f conftest.$ac_objext
9474 if { (eval echo "$as_me:9474: \"$ac_compile\"") >&5
9475   (eval $ac_compile) 2>&5
9476   ac_status=$?
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit $ac_status); } &&
9479          { ac_try='test -s conftest.$ac_objext'
9480   { (eval echo "$as_me:9480: \"$ac_try\"") >&5
9481   (eval $ac_try) 2>&5
9482   ac_status=$?
9483   echo "$as_me:9483: \$? = $ac_status" >&5
9484   (exit $ac_status); }; }; then
9485   cf_cv_wchar_t=yes
9486 else
9487   echo "$as_me: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489 cf_cv_wchar_t=unknown
9490 fi
9491 rm -f conftest.$ac_objext conftest.$ac_ext
9492 fi
9493 rm -f conftest.$ac_objext conftest.$ac_ext
9494 fi
9495 echo "$as_me:9495: result: $cf_cv_wchar_t" >&5
9496 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9497
9498 if test "$cf_cv_wchar_t" = yes ; then
9499         cat >>confdefs.h <<\EOF
9500 #define NEED_WCHAR_H 1
9501 EOF
9502
9503         NEED_WCHAR_H=1
9504 fi
9505
9506 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9507 if test "$cf_cv_wchar_t" = unknown ; then
9508         NCURSES_WCHAR_T=1
9509 fi
9510
9511 # if we find wchar_t in either place, use substitution to provide a fallback.
9512 if test "$cf_cv_wchar_t" != unknown ; then
9513         NCURSES_OK_WCHAR_T=1
9514 fi
9515
9516 # This is needed on Tru64 5.0 to declare wint_t
9517 echo "$as_me:9517: checking if we must include wchar.h to declare wint_t" >&5
9518 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9519 if test "${cf_cv_wint_t+set}" = set; then
9520   echo $ECHO_N "(cached) $ECHO_C" >&6
9521 else
9522
9523 cat >conftest.$ac_ext <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526
9527 #include <stdlib.h>
9528 #include <stdarg.h>
9529 #include <stdio.h>
9530 #ifdef HAVE_LIBUTF8_H
9531 #include <libutf8.h>
9532 #endif
9533 int
9534 main ()
9535 {
9536 wint_t state
9537   ;
9538   return 0;
9539 }
9540 _ACEOF
9541 rm -f conftest.$ac_objext
9542 if { (eval echo "$as_me:9542: \"$ac_compile\"") >&5
9543   (eval $ac_compile) 2>&5
9544   ac_status=$?
9545   echo "$as_me:9545: \$? = $ac_status" >&5
9546   (exit $ac_status); } &&
9547          { ac_try='test -s conftest.$ac_objext'
9548   { (eval echo "$as_me:9548: \"$ac_try\"") >&5
9549   (eval $ac_try) 2>&5
9550   ac_status=$?
9551   echo "$as_me:9551: \$? = $ac_status" >&5
9552   (exit $ac_status); }; }; then
9553   cf_cv_wint_t=no
9554 else
9555   echo "$as_me: failed program was:" >&5
9556 cat conftest.$ac_ext >&5
9557 cat >conftest.$ac_ext <<_ACEOF
9558 #line 9558 "configure"
9559 #include "confdefs.h"
9560
9561 #include <stdlib.h>
9562 #include <stdarg.h>
9563 #include <stdio.h>
9564 #include <wchar.h>
9565 #ifdef HAVE_LIBUTF8_H
9566 #include <libutf8.h>
9567 #endif
9568 int
9569 main ()
9570 {
9571 wint_t value
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 rm -f conftest.$ac_objext
9577 if { (eval echo "$as_me:9577: \"$ac_compile\"") >&5
9578   (eval $ac_compile) 2>&5
9579   ac_status=$?
9580   echo "$as_me:9580: \$? = $ac_status" >&5
9581   (exit $ac_status); } &&
9582          { ac_try='test -s conftest.$ac_objext'
9583   { (eval echo "$as_me:9583: \"$ac_try\"") >&5
9584   (eval $ac_try) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); }; }; then
9588   cf_cv_wint_t=yes
9589 else
9590   echo "$as_me: failed program was:" >&5
9591 cat conftest.$ac_ext >&5
9592 cf_cv_wint_t=unknown
9593 fi
9594 rm -f conftest.$ac_objext conftest.$ac_ext
9595 fi
9596 rm -f conftest.$ac_objext conftest.$ac_ext
9597 fi
9598 echo "$as_me:9598: result: $cf_cv_wint_t" >&5
9599 echo "${ECHO_T}$cf_cv_wint_t" >&6
9600
9601 if test "$cf_cv_wint_t" = yes ; then
9602         cat >>confdefs.h <<\EOF
9603 #define NEED_WCHAR_H 1
9604 EOF
9605
9606         NEED_WCHAR_H=1
9607 fi
9608
9609 # if we do not find wint_t in either place, use substitution to provide a fallback.
9610 if test "$cf_cv_wint_t" = unknown ; then
9611         NCURSES_WINT_T=1
9612 fi
9613
9614 # if we find wint_t in either place, use substitution to provide a fallback.
9615 if test "$cf_cv_wint_t" != unknown ; then
9616         NCURSES_OK_WINT_T=1
9617 fi
9618
9619         if test "$NCURSES_MBSTATE_T" != 0; then
9620                 cat >>confdefs.h <<\EOF
9621 #define NEED_MBSTATE_T_DEF 1
9622 EOF
9623
9624         fi
9625 fi
9626
9627 ###   use option --disable-lp64 to allow long chtype
9628 case $cf_cv_abi_version in
9629 [345]*)
9630         default_with_lp64=no
9631         ;;
9632 *)
9633         default_with_lp64=yes
9634         ;;
9635 esac
9636
9637 echo "$as_me:9637: checking whether to enable _LP64 definition in curses.h" >&5
9638 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9639
9640 # Check whether --enable-lp64 or --disable-lp64 was given.
9641 if test "${enable_lp64+set}" = set; then
9642   enableval="$enable_lp64"
9643   with_lp64=$enableval
9644 else
9645   with_lp64=$default_with_lp64
9646 fi;
9647 echo "$as_me:9647: result: $with_lp64" >&5
9648 echo "${ECHO_T}$with_lp64" >&6
9649
9650 if test "$with_lp64" = yes ; then
9651         cf_cv_enable_lp64=1
9652 else
9653         cf_cv_enable_lp64=0
9654 fi
9655
9656 # Check whether --enable-largefile or --disable-largefile was given.
9657 if test "${enable_largefile+set}" = set; then
9658   enableval="$enable_largefile"
9659
9660 fi;
9661 if test "$enable_largefile" != no; then
9662
9663   echo "$as_me:9663: checking for special C compiler options needed for large files" >&5
9664 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9665 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9666   echo $ECHO_N "(cached) $ECHO_C" >&6
9667 else
9668   ac_cv_sys_largefile_CC=no
9669      if test "$GCC" != yes; then
9670        ac_save_CC=$CC
9671        while :; do
9672          # IRIX 6.2 and later do not support large files by default,
9673          # so use the C compiler's -n32 option if that helps.
9674          cat >conftest.$ac_ext <<_ACEOF
9675 #line 9675 "configure"
9676 #include "confdefs.h"
9677 #include <sys/types.h>
9678  /* Check that off_t can represent 2**63 - 1 correctly.
9679     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9680     since some C++ compilers masquerading as C compilers
9681     incorrectly reject 9223372036854775807.  */
9682 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9683   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9684                        && LARGE_OFF_T % 2147483647 == 1)
9685                       ? 1 : -1];
9686 int
9687 main ()
9688 {
9689
9690   ;
9691   return 0;
9692 }
9693 _ACEOF
9694          rm -f conftest.$ac_objext
9695 if { (eval echo "$as_me:9695: \"$ac_compile\"") >&5
9696   (eval $ac_compile) 2>&5
9697   ac_status=$?
9698   echo "$as_me:9698: \$? = $ac_status" >&5
9699   (exit $ac_status); } &&
9700          { ac_try='test -s conftest.$ac_objext'
9701   { (eval echo "$as_me:9701: \"$ac_try\"") >&5
9702   (eval $ac_try) 2>&5
9703   ac_status=$?
9704   echo "$as_me:9704: \$? = $ac_status" >&5
9705   (exit $ac_status); }; }; then
9706   break
9707 else
9708   echo "$as_me: failed program was:" >&5
9709 cat conftest.$ac_ext >&5
9710 fi
9711 rm -f conftest.$ac_objext
9712          CC="$CC -n32"
9713          rm -f conftest.$ac_objext
9714 if { (eval echo "$as_me:9714: \"$ac_compile\"") >&5
9715   (eval $ac_compile) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); } &&
9719          { ac_try='test -s conftest.$ac_objext'
9720   { (eval echo "$as_me:9720: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:9723: \$? = $ac_status" >&5
9724   (exit $ac_status); }; }; then
9725   ac_cv_sys_largefile_CC=' -n32'; break
9726 else
9727   echo "$as_me: failed program was:" >&5
9728 cat conftest.$ac_ext >&5
9729 fi
9730 rm -f conftest.$ac_objext
9731          break
9732        done
9733        CC=$ac_save_CC
9734        rm -f conftest.$ac_ext
9735     fi
9736 fi
9737 echo "$as_me:9737: result: $ac_cv_sys_largefile_CC" >&5
9738 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9739   if test "$ac_cv_sys_largefile_CC" != no; then
9740     CC=$CC$ac_cv_sys_largefile_CC
9741   fi
9742
9743   echo "$as_me:9743: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9744 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9745 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9746   echo $ECHO_N "(cached) $ECHO_C" >&6
9747 else
9748   while :; do
9749   ac_cv_sys_file_offset_bits=no
9750   cat >conftest.$ac_ext <<_ACEOF
9751 #line 9751 "configure"
9752 #include "confdefs.h"
9753 #include <sys/types.h>
9754  /* Check that off_t can represent 2**63 - 1 correctly.
9755     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9756     since some C++ compilers masquerading as C compilers
9757     incorrectly reject 9223372036854775807.  */
9758 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9759   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9760                        && LARGE_OFF_T % 2147483647 == 1)
9761                       ? 1 : -1];
9762 int
9763 main ()
9764 {
9765
9766   ;
9767   return 0;
9768 }
9769 _ACEOF
9770 rm -f conftest.$ac_objext
9771 if { (eval echo "$as_me:9771: \"$ac_compile\"") >&5
9772   (eval $ac_compile) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit $ac_status); } &&
9776          { ac_try='test -s conftest.$ac_objext'
9777   { (eval echo "$as_me:9777: \"$ac_try\"") >&5
9778   (eval $ac_try) 2>&5
9779   ac_status=$?
9780   echo "$as_me:9780: \$? = $ac_status" >&5
9781   (exit $ac_status); }; }; then
9782   break
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat conftest.$ac_ext >&5
9786 fi
9787 rm -f conftest.$ac_objext conftest.$ac_ext
9788   cat >conftest.$ac_ext <<_ACEOF
9789 #line 9789 "configure"
9790 #include "confdefs.h"
9791 #define _FILE_OFFSET_BITS 64
9792 #include <sys/types.h>
9793  /* Check that off_t can represent 2**63 - 1 correctly.
9794     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9795     since some C++ compilers masquerading as C compilers
9796     incorrectly reject 9223372036854775807.  */
9797 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9798   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9799                        && LARGE_OFF_T % 2147483647 == 1)
9800                       ? 1 : -1];
9801 int
9802 main ()
9803 {
9804
9805   ;
9806   return 0;
9807 }
9808 _ACEOF
9809 rm -f conftest.$ac_objext
9810 if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
9811   (eval $ac_compile) 2>&5
9812   ac_status=$?
9813   echo "$as_me:9813: \$? = $ac_status" >&5
9814   (exit $ac_status); } &&
9815          { ac_try='test -s conftest.$ac_objext'
9816   { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9817   (eval $ac_try) 2>&5
9818   ac_status=$?
9819   echo "$as_me:9819: \$? = $ac_status" >&5
9820   (exit $ac_status); }; }; then
9821   ac_cv_sys_file_offset_bits=64; break
9822 else
9823   echo "$as_me: failed program was:" >&5
9824 cat conftest.$ac_ext >&5
9825 fi
9826 rm -f conftest.$ac_objext conftest.$ac_ext
9827   break
9828 done
9829 fi
9830 echo "$as_me:9830: result: $ac_cv_sys_file_offset_bits" >&5
9831 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9832 if test "$ac_cv_sys_file_offset_bits" != no; then
9833
9834 cat >>confdefs.h <<EOF
9835 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9836 EOF
9837
9838 fi
9839 rm -rf conftest*
9840   echo "$as_me:9840: checking for _LARGE_FILES value needed for large files" >&5
9841 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9842 if test "${ac_cv_sys_large_files+set}" = set; then
9843   echo $ECHO_N "(cached) $ECHO_C" >&6
9844 else
9845   while :; do
9846   ac_cv_sys_large_files=no
9847   cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <sys/types.h>
9851  /* Check that off_t can represent 2**63 - 1 correctly.
9852     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9853     since some C++ compilers masquerading as C compilers
9854     incorrectly reject 9223372036854775807.  */
9855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9856   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9857                        && LARGE_OFF_T % 2147483647 == 1)
9858                       ? 1 : -1];
9859 int
9860 main ()
9861 {
9862
9863   ;
9864   return 0;
9865 }
9866 _ACEOF
9867 rm -f conftest.$ac_objext
9868 if { (eval echo "$as_me:9868: \"$ac_compile\"") >&5
9869   (eval $ac_compile) 2>&5
9870   ac_status=$?
9871   echo "$as_me:9871: \$? = $ac_status" >&5
9872   (exit $ac_status); } &&
9873          { ac_try='test -s conftest.$ac_objext'
9874   { (eval echo "$as_me:9874: \"$ac_try\"") >&5
9875   (eval $ac_try) 2>&5
9876   ac_status=$?
9877   echo "$as_me:9877: \$? = $ac_status" >&5
9878   (exit $ac_status); }; }; then
9879   break
9880 else
9881   echo "$as_me: failed program was:" >&5
9882 cat conftest.$ac_ext >&5
9883 fi
9884 rm -f conftest.$ac_objext conftest.$ac_ext
9885   cat >conftest.$ac_ext <<_ACEOF
9886 #line 9886 "configure"
9887 #include "confdefs.h"
9888 #define _LARGE_FILES 1
9889 #include <sys/types.h>
9890  /* Check that off_t can represent 2**63 - 1 correctly.
9891     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9892     since some C++ compilers masquerading as C compilers
9893     incorrectly reject 9223372036854775807.  */
9894 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9895   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9896                        && LARGE_OFF_T % 2147483647 == 1)
9897                       ? 1 : -1];
9898 int
9899 main ()
9900 {
9901
9902   ;
9903   return 0;
9904 }
9905 _ACEOF
9906 rm -f conftest.$ac_objext
9907 if { (eval echo "$as_me:9907: \"$ac_compile\"") >&5
9908   (eval $ac_compile) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); } &&
9912          { ac_try='test -s conftest.$ac_objext'
9913   { (eval echo "$as_me:9913: \"$ac_try\"") >&5
9914   (eval $ac_try) 2>&5
9915   ac_status=$?
9916   echo "$as_me:9916: \$? = $ac_status" >&5
9917   (exit $ac_status); }; }; then
9918   ac_cv_sys_large_files=1; break
9919 else
9920   echo "$as_me: failed program was:" >&5
9921 cat conftest.$ac_ext >&5
9922 fi
9923 rm -f conftest.$ac_objext conftest.$ac_ext
9924   break
9925 done
9926 fi
9927 echo "$as_me:9927: result: $ac_cv_sys_large_files" >&5
9928 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9929 if test "$ac_cv_sys_large_files" != no; then
9930
9931 cat >>confdefs.h <<EOF
9932 #define _LARGE_FILES $ac_cv_sys_large_files
9933 EOF
9934
9935 fi
9936 rm -rf conftest*
9937 fi
9938
9939     if test "$enable_largefile" != no ; then
9940         echo "$as_me:9940: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9941 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9942 if test "${ac_cv_sys_largefile_source+set}" = set; then
9943   echo $ECHO_N "(cached) $ECHO_C" >&6
9944 else
9945   while :; do
9946   ac_cv_sys_largefile_source=no
9947   cat >conftest.$ac_ext <<_ACEOF
9948 #line 9948 "configure"
9949 #include "confdefs.h"
9950 #include <stdio.h>
9951 int
9952 main ()
9953 {
9954 return !fseeko;
9955   ;
9956   return 0;
9957 }
9958 _ACEOF
9959 rm -f conftest.$ac_objext
9960 if { (eval echo "$as_me:9960: \"$ac_compile\"") >&5
9961   (eval $ac_compile) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit $ac_status); } &&
9965          { ac_try='test -s conftest.$ac_objext'
9966   { (eval echo "$as_me:9966: \"$ac_try\"") >&5
9967   (eval $ac_try) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); }; }; then
9971   break
9972 else
9973   echo "$as_me: failed program was:" >&5
9974 cat conftest.$ac_ext >&5
9975 fi
9976 rm -f conftest.$ac_objext conftest.$ac_ext
9977   cat >conftest.$ac_ext <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #define _LARGEFILE_SOURCE 1
9981 #include <stdio.h>
9982 int
9983 main ()
9984 {
9985 return !fseeko;
9986   ;
9987   return 0;
9988 }
9989 _ACEOF
9990 rm -f conftest.$ac_objext
9991 if { (eval echo "$as_me:9991: \"$ac_compile\"") >&5
9992   (eval $ac_compile) 2>&5
9993   ac_status=$?
9994   echo "$as_me:9994: \$? = $ac_status" >&5
9995   (exit $ac_status); } &&
9996          { ac_try='test -s conftest.$ac_objext'
9997   { (eval echo "$as_me:9997: \"$ac_try\"") >&5
9998   (eval $ac_try) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit $ac_status); }; }; then
10002   ac_cv_sys_largefile_source=1; break
10003 else
10004   echo "$as_me: failed program was:" >&5
10005 cat conftest.$ac_ext >&5
10006 fi
10007 rm -f conftest.$ac_objext conftest.$ac_ext
10008   break
10009 done
10010 fi
10011 echo "$as_me:10011: result: $ac_cv_sys_largefile_source" >&5
10012 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10013 if test "$ac_cv_sys_largefile_source" != no; then
10014
10015 cat >>confdefs.h <<EOF
10016 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10017 EOF
10018
10019 fi
10020 rm -rf conftest*
10021
10022 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10023 # in glibc 2.1.3, but that breaks too many other things.
10024 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10025 echo "$as_me:10025: checking for fseeko" >&5
10026 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10027 if test "${ac_cv_func_fseeko+set}" = set; then
10028   echo $ECHO_N "(cached) $ECHO_C" >&6
10029 else
10030   cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033 #include <stdio.h>
10034 int
10035 main ()
10036 {
10037 return fseeko && fseeko (stdin, 0, 0);
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 rm -f conftest.$ac_objext conftest$ac_exeext
10043 if { (eval echo "$as_me:10043: \"$ac_link\"") >&5
10044   (eval $ac_link) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } &&
10048          { ac_try='test -s conftest$ac_exeext'
10049   { (eval echo "$as_me:10049: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); }; }; then
10054   ac_cv_func_fseeko=yes
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 cat conftest.$ac_ext >&5
10058 ac_cv_func_fseeko=no
10059 fi
10060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10061 fi
10062 echo "$as_me:10062: result: $ac_cv_func_fseeko" >&5
10063 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10064 if test $ac_cv_func_fseeko = yes; then
10065
10066 cat >>confdefs.h <<\EOF
10067 #define HAVE_FSEEKO 1
10068 EOF
10069
10070 fi
10071
10072         # Normally we would collect these definitions in the config.h,
10073         # but (like _XOPEN_SOURCE), some environments rely on having these
10074         # defined before any of the system headers are included.  Another
10075         # case comes up with C++, e.g., on AIX the compiler compiles the
10076         # header files by themselves before looking at the body files it is
10077         # told to compile.  For ncurses, those header files do not include
10078         # the config.h
10079         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10080         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10081         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10082
10083         echo "$as_me:10083: checking whether to use struct dirent64" >&5
10084 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10085 if test "${cf_cv_struct_dirent64+set}" = set; then
10086   echo $ECHO_N "(cached) $ECHO_C" >&6
10087 else
10088
10089                 cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092
10093 #include <sys/types.h>
10094 #include <dirent.h>
10095
10096 int
10097 main ()
10098 {
10099
10100                 /* if transitional largefile support is setup, this is true */
10101                 extern struct dirent64 * readdir(DIR *);
10102                 struct dirent64 *x = readdir((DIR *)0);
10103                 struct dirent *y = readdir((DIR *)0);
10104                 int z = x - y;
10105
10106   ;
10107   return 0;
10108 }
10109 _ACEOF
10110 rm -f conftest.$ac_objext
10111 if { (eval echo "$as_me:10111: \"$ac_compile\"") >&5
10112   (eval $ac_compile) 2>&5
10113   ac_status=$?
10114   echo "$as_me:10114: \$? = $ac_status" >&5
10115   (exit $ac_status); } &&
10116          { ac_try='test -s conftest.$ac_objext'
10117   { (eval echo "$as_me:10117: \"$ac_try\"") >&5
10118   (eval $ac_try) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit $ac_status); }; }; then
10122   cf_cv_struct_dirent64=yes
10123 else
10124   echo "$as_me: failed program was:" >&5
10125 cat conftest.$ac_ext >&5
10126 cf_cv_struct_dirent64=no
10127 fi
10128 rm -f conftest.$ac_objext conftest.$ac_ext
10129
10130 fi
10131 echo "$as_me:10131: result: $cf_cv_struct_dirent64" >&5
10132 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10133         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10134 #define HAVE_STRUCT_DIRENT64 1
10135 EOF
10136
10137     fi
10138
10139 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10140 echo "$as_me:10140: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10141 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10142
10143 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10144 if test "${enable_tparm_varargs+set}" = set; then
10145   enableval="$enable_tparm_varargs"
10146   with_tparm_varargs=$enableval
10147 else
10148   with_tparm_varargs=yes
10149 fi;
10150 echo "$as_me:10150: result: $with_tparm_varargs" >&5
10151 echo "${ECHO_T}$with_tparm_varargs" >&6
10152 NCURSES_TPARM_VARARGS=0
10153 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10154
10155 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10156 if test "$with_ticlib" != no ; then
10157 echo "$as_me:10157: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10158 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10159
10160 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10161 if test "${enable_tic_depends+set}" = set; then
10162   enableval="$enable_tic_depends"
10163   with_tic_depends=$enableval
10164 else
10165   with_tic_depends=yes
10166 fi;
10167 echo "$as_me:10167: result: $with_tic_depends" >&5
10168 echo "${ECHO_T}$with_tic_depends" >&6
10169 else
10170         with_tic_depends=no
10171 fi
10172
10173 ###   use option --with-bool to override bool's type
10174 echo "$as_me:10174: checking for type of bool" >&5
10175 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10176
10177 # Check whether --with-bool or --without-bool was given.
10178 if test "${with_bool+set}" = set; then
10179   withval="$with_bool"
10180   NCURSES_BOOL="$withval"
10181 else
10182   NCURSES_BOOL=auto
10183 fi;
10184 echo "$as_me:10184: result: $NCURSES_BOOL" >&5
10185 echo "${ECHO_T}$NCURSES_BOOL" >&6
10186
10187 echo "$as_me:10187: checking for alternate terminal capabilities file" >&5
10188 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10189
10190 # Check whether --with-caps or --without-caps was given.
10191 if test "${with_caps+set}" = set; then
10192   withval="$with_caps"
10193   TERMINFO_CAPS=Caps.$withval
10194 else
10195   TERMINFO_CAPS=Caps
10196 fi;
10197 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10198 echo "$as_me:10198: result: $TERMINFO_CAPS" >&5
10199 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10200
10201 ###   use option --with-chtype to override chtype's type
10202 echo "$as_me:10202: checking for type of chtype" >&5
10203 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10204
10205 # Check whether --with-chtype or --without-chtype was given.
10206 if test "${with_chtype+set}" = set; then
10207   withval="$with_chtype"
10208   NCURSES_CHTYPE="$withval"
10209 else
10210   NCURSES_CHTYPE=auto
10211 fi;
10212 echo "$as_me:10212: result: $NCURSES_CHTYPE" >&5
10213 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10214
10215 ###   use option --with-ospeed to override ospeed's type
10216 echo "$as_me:10216: checking for type of ospeed" >&5
10217 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10218
10219 # Check whether --with-ospeed or --without-ospeed was given.
10220 if test "${with_ospeed+set}" = set; then
10221   withval="$with_ospeed"
10222   NCURSES_OSPEED="$withval"
10223 else
10224   NCURSES_OSPEED=short
10225 fi;
10226 echo "$as_me:10226: result: $NCURSES_OSPEED" >&5
10227 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10228
10229 ###   use option --with-mmask-t to override mmask_t's type
10230 echo "$as_me:10230: checking for type of mmask_t" >&5
10231 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10232
10233 # Check whether --with-mmask-t or --without-mmask-t was given.
10234 if test "${with_mmask_t+set}" = set; then
10235   withval="$with_mmask_t"
10236   NCURSES_MMASK_T="$withval"
10237 else
10238   NCURSES_MMASK_T=auto
10239 fi;
10240 echo "$as_me:10240: result: $NCURSES_MMASK_T" >&5
10241 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10242
10243 ###   use option --with-ccharw-max to override CCHARW_MAX size
10244 echo "$as_me:10244: checking for size CCHARW_MAX" >&5
10245 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10246
10247 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10248 if test "${with_ccharw_max+set}" = set; then
10249   withval="$with_ccharw_max"
10250   NCURSES_CCHARW_MAX="$withval"
10251 else
10252   NCURSES_CCHARW_MAX=5
10253 fi;
10254 echo "$as_me:10254: result: $NCURSES_CCHARW_MAX" >&5
10255 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10256
10257 ### Enable compiling-in rcs id's
10258 echo "$as_me:10258: checking if RCS identifiers should be compiled-in" >&5
10259 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10260
10261 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10262 if test "${with_rcs_ids+set}" = set; then
10263   withval="$with_rcs_ids"
10264   with_rcs_ids=$withval
10265 else
10266   with_rcs_ids=no
10267 fi;
10268 echo "$as_me:10268: result: $with_rcs_ids" >&5
10269 echo "${ECHO_T}$with_rcs_ids" >&6
10270 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10271 #define USE_RCS_IDS 1
10272 EOF
10273
10274 ###############################################################################
10275
10276 echo "$as_me:10276: checking format of man-pages" >&5
10277 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10278
10279 # Check whether --with-manpage-format or --without-manpage-format was given.
10280 if test "${with_manpage_format+set}" = set; then
10281   withval="$with_manpage_format"
10282   MANPAGE_FORMAT=$withval
10283 else
10284   MANPAGE_FORMAT=unknown
10285 fi;
10286
10287 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10288 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10289
10290 cf_unknown=
10291
10292 case $MANPAGE_FORMAT in
10293 unknown)
10294   if test -z "$MANPATH" ; then
10295     MANPATH="/usr/man:/usr/share/man"
10296   fi
10297
10298   # look for the 'date' man-page (it's most likely to be installed!)
10299   MANPAGE_FORMAT=
10300   cf_preform=no
10301   cf_catonly=yes
10302   cf_example=date
10303
10304   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10305   for cf_dir in $MANPATH; do
10306     test -z "$cf_dir" && cf_dir=/usr/man
10307     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
10308     do
10309       cf_test=`echo $cf_name | sed -e 's/*//'`
10310       if test "x$cf_test" = "x$cf_name" ; then
10311
10312         case "$cf_name" in
10313         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10314         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10315         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10316         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10317         esac
10318
10319         case "$cf_name" in
10320         $cf_dir/man*)
10321           cf_catonly=no
10322           ;;
10323         $cf_dir/cat*)
10324           cf_preform=yes
10325           ;;
10326         esac
10327         break
10328       fi
10329
10330       # if we found a match in either man* or cat*, stop looking
10331       if test -n "$MANPAGE_FORMAT" ; then
10332         cf_found=no
10333         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10334         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10335         case "$cf_name" in
10336         $cf_dir/cat*)
10337           cf_found=yes
10338           ;;
10339         esac
10340         test $cf_found=yes && break
10341       fi
10342     done
10343     # only check the first directory in $MANPATH where we find manpages
10344     if test -n "$MANPAGE_FORMAT" ; then
10345        break
10346     fi
10347   done
10348   # if we did not find the example, just assume it is normal
10349   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10350   IFS="$ac_save_ifs"
10351   ;;
10352 *)
10353   for cf_option in $MANPAGE_FORMAT; do
10354      case $cf_option in #(vi
10355      gzip|compress|BSDI|normal|formatted|catonly)
10356        ;;
10357      *)
10358        cf_unknown="$cf_unknown $cf_option"
10359        ;;
10360      esac
10361   done
10362   ;;
10363 esac
10364
10365 echo "$as_me:10365: result: $MANPAGE_FORMAT" >&5
10366 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10367 if test -n "$cf_unknown" ; then
10368   { echo "$as_me:10368: WARNING: Unexpected manpage-format $cf_unknown" >&5
10369 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10370 fi
10371
10372 echo "$as_me:10372: checking for manpage renaming" >&5
10373 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10374
10375 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10376 if test "${with_manpage_renames+set}" = set; then
10377   withval="$with_manpage_renames"
10378   MANPAGE_RENAMES=$withval
10379 else
10380   MANPAGE_RENAMES=yes
10381 fi;
10382
10383 case ".$MANPAGE_RENAMES" in #(vi
10384 .no) #(vi
10385   ;;
10386 .|.yes)
10387   # Debian 'man' program?
10388   if test -f /etc/debian_version ; then
10389     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10390   else
10391     MANPAGE_RENAMES=no
10392   fi
10393   ;;
10394 esac
10395
10396 if test "$MANPAGE_RENAMES" != no ; then
10397   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10398     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10399   elif test ! -f $MANPAGE_RENAMES ; then
10400     { { echo "$as_me:10400: error: not a filename: $MANPAGE_RENAMES" >&5
10401 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10402    { (exit 1); exit 1; }; }
10403   fi
10404
10405   test ! -d man && mkdir man
10406
10407   # Construct a sed-script to perform renaming within man-pages
10408   if test -n "$MANPAGE_RENAMES" ; then
10409     test ! -d man && mkdir man
10410     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10411   fi
10412 fi
10413
10414 echo "$as_me:10414: result: $MANPAGE_RENAMES" >&5
10415 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10416
10417 echo "$as_me:10417: checking if manpage aliases will be installed" >&5
10418 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10419
10420 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10421 if test "${with_manpage_aliases+set}" = set; then
10422   withval="$with_manpage_aliases"
10423   MANPAGE_ALIASES=$withval
10424 else
10425   MANPAGE_ALIASES=yes
10426 fi;
10427
10428 echo "$as_me:10428: result: $MANPAGE_ALIASES" >&5
10429 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10430
10431 case "x$LN_S" in #(vi
10432 xln*) #(vi
10433         cf_use_symlinks=yes
10434         ;;
10435 *)
10436         cf_use_symlinks=no
10437         ;;
10438 esac
10439
10440 MANPAGE_SYMLINKS=no
10441 if test "$MANPAGE_ALIASES" = yes ; then
10442 echo "$as_me:10442: checking if manpage symlinks should be used" >&5
10443 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10444
10445 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10446 if test "${with_manpage_symlinks+set}" = set; then
10447   withval="$with_manpage_symlinks"
10448   MANPAGE_SYMLINKS=$withval
10449 else
10450   MANPAGE_SYMLINKS=$cf_use_symlinks
10451 fi;
10452
10453 if test "$$cf_use_symlinks" = no; then
10454 if test "$MANPAGE_SYMLINKS" = yes ; then
10455         { echo "$as_me:10455: WARNING: cannot make symlinks" >&5
10456 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10457         MANPAGE_SYMLINKS=no
10458 fi
10459 fi
10460
10461 echo "$as_me:10461: result: $MANPAGE_SYMLINKS" >&5
10462 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10463 fi
10464
10465 echo "$as_me:10465: checking for manpage tbl" >&5
10466 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10467
10468 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10469 if test "${with_manpage_tbl+set}" = set; then
10470   withval="$with_manpage_tbl"
10471   MANPAGE_TBL=$withval
10472 else
10473   MANPAGE_TBL=no
10474 fi;
10475
10476 echo "$as_me:10476: result: $MANPAGE_TBL" >&5
10477 echo "${ECHO_T}$MANPAGE_TBL" >&6
10478
10479   if test "$prefix" = "NONE" ; then
10480      cf_prefix="$ac_default_prefix"
10481   else
10482      cf_prefix="$prefix"
10483   fi
10484
10485   case "$MANPAGE_FORMAT" in # (vi
10486   *catonly*) # (vi
10487     cf_format=yes
10488     cf_inboth=no
10489     ;;
10490   *formatted*) # (vi
10491     cf_format=yes
10492     cf_inboth=yes
10493     ;;
10494   *)
10495     cf_format=no
10496     cf_inboth=no
10497     ;;
10498   esac
10499
10500 test ! -d man && mkdir man
10501
10502 cf_so_strip=
10503 cf_compress=
10504 case "$MANPAGE_FORMAT" in #(vi
10505 *compress*) #(vi
10506         cf_so_strip="Z"
10507         cf_compress=compress
10508   ;;
10509 *gzip*)
10510         cf_so_strip="gz"
10511         cf_compress=gzip
10512   ;;
10513 esac
10514
10515 cf_edit_man=./edit_man.sh
10516 cf_man_alias=`pwd`/man_alias.sed
10517
10518 cat >$cf_edit_man <<CF_EOF
10519 #! /bin/sh
10520 # this script is generated by the configure-script CF_MAN_PAGES macro.
10521
10522 prefix="$cf_prefix"
10523 datadir="$datadir"
10524
10525 NCURSES_MAJOR="$NCURSES_MAJOR"
10526 NCURSES_MINOR="$NCURSES_MINOR"
10527 NCURSES_PATCH="$NCURSES_PATCH"
10528
10529 NCURSES_OSPEED="$NCURSES_OSPEED"
10530 TERMINFO="$TERMINFO"
10531
10532 INSTALL="$INSTALL"
10533 INSTALL_DATA="$INSTALL_DATA"
10534
10535 transform="$program_transform_name"
10536
10537 TMP=\${TMPDIR:=/tmp}/man\$\$
10538 trap "rm -f \$TMP" 0 1 2 5 15
10539
10540 form=\$1
10541 shift || exit 1
10542
10543 verb=\$1
10544 shift || exit 1
10545
10546 mandir=\$1
10547 shift || exit 1
10548
10549 srcdir=\$1
10550 top_srcdir=\$srcdir/..
10551 shift || exit 1
10552
10553 if test "\$form" = normal ; then
10554         if test "$cf_format" = yes ; then
10555         if test "$cf_inboth" = no ; then
10556                 sh \$0 format \$verb \$mandir \$srcdir \$*
10557                 exit $?
10558         fi
10559         fi
10560         cf_subdir=\$mandir/man
10561         cf_tables=$MANPAGE_TBL
10562 else
10563         cf_subdir=\$mandir/cat
10564         cf_tables=yes
10565 fi
10566
10567 # process the list of source-files
10568 for i in \$* ; do
10569 case \$i in #(vi
10570 *.orig|*.rej) ;; #(vi
10571 *.[0-9]*)
10572         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10573         if test \$verb = installing ; then
10574         if test ! -d \$cf_subdir\${section} ; then
10575                 mkdir -p \$cf_subdir\$section
10576         fi
10577         fi
10578
10579         # replace variables in man page
10580         if test ! -f $cf_man_alias ; then
10581 cat >>$cf_man_alias <<-CF_EOF2
10582                 s,@DATADIR@,\$datadir,g
10583                 s,@TERMINFO@,\$TERMINFO,g
10584                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10585                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10586                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10587                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10588 CF_EOF
10589
10590         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10591         do
10592                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10593                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10594 cat >>$cf_edit_man <<-CF_EOF
10595                 s,@$cf_NAME@,$cf_name,g
10596 CF_EOF
10597         done
10598
10599 cat >>$cf_edit_man <<CF_EOF
10600 CF_EOF2
10601                 echo "...made $cf_man_alias"
10602         fi
10603
10604         aliases=
10605         cf_source=\`basename \$i\`
10606         inalias=\$cf_source
10607         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10608         if test ! -f \$inalias ; then
10609                 echo .. skipped \$cf_source
10610                 continue
10611         fi
10612 CF_EOF
10613
10614 if test "$MANPAGE_ALIASES" != no ; then
10615 cat >>$cf_edit_man <<CF_EOF
10616         nCurses=ignore.3x
10617         test $with_curses_h = yes && nCurses=ncurses.3x
10618         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10619 CF_EOF
10620 fi
10621
10622 if test "$MANPAGE_RENAMES" = no ; then
10623 cat >>$cf_edit_man <<CF_EOF
10624         # perform program transformations for section 1 man pages
10625         if test \$section = 1 ; then
10626                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10627         else
10628                 cf_target=\$cf_subdir\${section}/\$cf_source
10629         fi
10630 CF_EOF
10631 else
10632 cat >>$cf_edit_man <<CF_EOF
10633         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10634         if test -z "\$cf_target" ; then
10635                 echo '? missing rename for '\$cf_source
10636                 cf_target="\$cf_source"
10637         fi
10638         cf_target="\$cf_subdir\${section}/\${cf_target}"
10639
10640 CF_EOF
10641 fi
10642
10643 cat >>$cf_edit_man <<CF_EOF
10644         sed     -f $cf_man_alias \\
10645 CF_EOF
10646
10647 if test -f $MANPAGE_RENAMES ; then
10648 cat >>$cf_edit_man <<CF_EOF
10649                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10650 CF_EOF
10651 else
10652 cat >>$cf_edit_man <<CF_EOF
10653                 < \$i >\$TMP
10654 CF_EOF
10655 fi
10656
10657 cat >>$cf_edit_man <<CF_EOF
10658 if test \$cf_tables = yes ; then
10659         tbl \$TMP >\$TMP.out
10660         mv \$TMP.out \$TMP
10661 fi
10662 CF_EOF
10663
10664 if test $with_overwrite != yes ; then
10665 cat >>$cf_edit_man <<CF_EOF
10666         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10667         mv \$TMP.out \$TMP
10668 CF_EOF
10669 fi
10670
10671 if test $with_curses_h != yes ; then
10672 cat >>$cf_edit_man <<CF_EOF
10673         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10674         mv \$TMP.out \$TMP
10675 CF_EOF
10676 fi
10677
10678 cat >>$cf_edit_man <<CF_EOF
10679         if test \$form = format ; then
10680                 nroff -man \$TMP >\$TMP.out
10681                 mv \$TMP.out \$TMP
10682         fi
10683 CF_EOF
10684
10685 if test -n "$cf_compress" ; then
10686 cat >>$cf_edit_man <<CF_EOF
10687         if test \$verb = installing ; then
10688         if ( $cf_compress -f \$TMP )
10689         then
10690                 mv \$TMP.$cf_so_strip \$TMP
10691         fi
10692         fi
10693         cf_target="\$cf_target.$cf_so_strip"
10694 CF_EOF
10695 fi
10696
10697 case "$MANPAGE_FORMAT" in #(vi
10698 *BSDI*)
10699 cat >>$cf_edit_man <<CF_EOF
10700         if test \$form = format ; then
10701                 # BSDI installs only .0 suffixes in the cat directories
10702                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10703         fi
10704 CF_EOF
10705   ;;
10706 esac
10707
10708 cat >>$cf_edit_man <<CF_EOF
10709         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10710         if test \$verb = installing ; then
10711                 echo \$verb \$cf_target
10712                 \$INSTALL_DATA \$TMP \$cf_target
10713                 test -d \$cf_subdir\${section} &&
10714                 test -n "\$aliases" && (
10715                         cd \$cf_subdir\${section} && (
10716                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10717                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10718                                 cf_target=\`basename \$cf_target\`
10719                                 for cf_alias in \$aliases
10720                                 do
10721                                         if test \$section = 1 ; then
10722                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10723                                         fi
10724
10725                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10726                                                 if test -f \$cf_alias\${suffix} ; then
10727                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10728                                                         then
10729                                                                 continue
10730                                                         fi
10731                                                 fi
10732                                                 echo .. \$verb alias \$cf_alias\${suffix}
10733 CF_EOF
10734 case "x$LN_S" in #(vi
10735 *-f) #(vi
10736 cat >>$cf_edit_man <<CF_EOF
10737                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10738 CF_EOF
10739         ;;
10740 *)
10741 cat >>$cf_edit_man <<CF_EOF
10742                                                 rm -f \$cf_alias\${suffix}
10743                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10744 CF_EOF
10745         ;;
10746 esac
10747 cat >>$cf_edit_man <<CF_EOF
10748                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10749                                                 echo ".so \$cf_source" >\$TMP
10750 CF_EOF
10751 if test -n "$cf_compress" ; then
10752 cat >>$cf_edit_man <<CF_EOF
10753                                                 if test -n "$cf_so_strip" ; then
10754                                                         $cf_compress -f \$TMP
10755                                                         mv \$TMP.$cf_so_strip \$TMP
10756                                                 fi
10757 CF_EOF
10758 fi
10759 cat >>$cf_edit_man <<CF_EOF
10760                                                 echo .. \$verb alias \$cf_alias\${suffix}
10761                                                 rm -f \$cf_alias\${suffix}
10762                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10763                                         fi
10764                                 done
10765                         )
10766                 )
10767         elif test \$verb = removing ; then
10768                 test -f \$cf_target && (
10769                         echo \$verb \$cf_target
10770                         rm -f \$cf_target
10771                 )
10772                 test -d \$cf_subdir\${section} &&
10773                 test -n "\$aliases" && (
10774                         cd \$cf_subdir\${section} && (
10775                                 for cf_alias in \$aliases
10776                                 do
10777                                         if test \$section = 1 ; then
10778                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10779                                         fi
10780
10781                                         echo .. \$verb alias \$cf_alias\${suffix}
10782                                         rm -f \$cf_alias\${suffix}
10783                                 done
10784                         )
10785                 )
10786         else
10787 #               echo ".hy 0"
10788                 cat \$TMP
10789         fi
10790         ;;
10791 esac
10792 done
10793
10794 if test $cf_inboth = yes ; then
10795 if test \$form != format ; then
10796         sh \$0 format \$verb \$mandir \$srcdir \$*
10797 fi
10798 fi
10799
10800 exit 0
10801 CF_EOF
10802 chmod 755 $cf_edit_man
10803
10804 ###############################################################################
10805
10806 ### Note that some functions (such as const) are normally disabled anyway.
10807 echo "$as_me:10807: checking if you want to build with function extensions" >&5
10808 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10809
10810 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10811 if test "${enable_ext_funcs+set}" = set; then
10812   enableval="$enable_ext_funcs"
10813   with_ext_funcs=$enableval
10814 else
10815   with_ext_funcs=yes
10816 fi;
10817 echo "$as_me:10817: result: $with_ext_funcs" >&5
10818 echo "${ECHO_T}$with_ext_funcs" >&6
10819 if test "$with_ext_funcs" = yes ; then
10820         NCURSES_EXT_FUNCS=1
10821         cat >>confdefs.h <<\EOF
10822 #define HAVE_ASSUME_DEFAULT_COLORS 1
10823 EOF
10824
10825         cat >>confdefs.h <<\EOF
10826 #define HAVE_CURSES_VERSION 1
10827 EOF
10828
10829         cat >>confdefs.h <<\EOF
10830 #define HAVE_HAS_KEY 1
10831 EOF
10832
10833         cat >>confdefs.h <<\EOF
10834 #define HAVE_RESIZETERM 1
10835 EOF
10836
10837         cat >>confdefs.h <<\EOF
10838 #define HAVE_RESIZE_TERM 1
10839 EOF
10840
10841         cat >>confdefs.h <<\EOF
10842 #define HAVE_TERM_ENTRY_H 1
10843 EOF
10844
10845         cat >>confdefs.h <<\EOF
10846 #define HAVE_USE_DEFAULT_COLORS 1
10847 EOF
10848
10849         cat >>confdefs.h <<\EOF
10850 #define HAVE_USE_SCREEN 1
10851 EOF
10852
10853         cat >>confdefs.h <<\EOF
10854 #define HAVE_USE_WINDOW 1
10855 EOF
10856
10857         cat >>confdefs.h <<\EOF
10858 #define HAVE_WRESIZE 1
10859 EOF
10860
10861         cat >>confdefs.h <<\EOF
10862 #define NCURSES_EXT_FUNCS 1
10863 EOF
10864
10865         GENERATED_EXT_FUNCS=generated
10866 else
10867         NCURSES_EXT_FUNCS=0
10868         GENERATED_EXT_FUNCS=
10869 fi
10870
10871 echo "$as_me:10871: checking if you want to build with experimental SCREEN extensions" >&5
10872 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10873
10874 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10875 if test "${enable_sp_funcs+set}" = set; then
10876   enableval="$enable_sp_funcs"
10877   with_sp_funcs=$enableval
10878 else
10879   with_sp_funcs=no
10880 fi;
10881 echo "$as_me:10881: result: $with_sp_funcs" >&5
10882 echo "${ECHO_T}$with_sp_funcs" >&6
10883 if test "$with_sp_funcs" = yes ; then
10884         NCURSES_SP_FUNCS=1
10885         cat >>confdefs.h <<\EOF
10886 #define NCURSES_SP_FUNCS 1
10887 EOF
10888
10889         GENERATED_SP_FUNCS=generated
10890 else
10891         NCURSES_SP_FUNCS=0
10892         GENERATED_SP_FUNCS=
10893 fi
10894
10895 echo "$as_me:10895: checking if you want to build with experimental terminal-driver" >&5
10896 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10897
10898 # Check whether --enable-term-driver or --disable-term-driver was given.
10899 if test "${enable_term_driver+set}" = set; then
10900   enableval="$enable_term_driver"
10901   with_term_driver=$enableval
10902 else
10903   with_term_driver=no
10904 fi;
10905 echo "$as_me:10905: result: $with_term_driver" >&5
10906 echo "${ECHO_T}$with_term_driver" >&6
10907 if test "$with_term_driver" = yes ; then
10908         cat >>confdefs.h <<\EOF
10909 #define USE_TERM_DRIVER 1
10910 EOF
10911
10912         if test "$with_sp_funcs" != yes ; then
10913                 { { echo "$as_me:10913: error: The term-driver option relies upon sp-funcs" >&5
10914 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10915    { (exit 1); exit 1; }; }
10916         fi
10917 fi
10918
10919 ###   use option --enable-const to turn on use of const beyond that in XSI.
10920 echo "$as_me:10920: checking for extended use of const keyword" >&5
10921 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10922
10923 # Check whether --enable-const or --disable-const was given.
10924 if test "${enable_const+set}" = set; then
10925   enableval="$enable_const"
10926   with_ext_const=$enableval
10927 else
10928   with_ext_const=no
10929 fi;
10930 echo "$as_me:10930: result: $with_ext_const" >&5
10931 echo "${ECHO_T}$with_ext_const" >&6
10932 NCURSES_CONST='/*nothing*/'
10933 if test "$with_ext_const" = yes ; then
10934         NCURSES_CONST=const
10935 fi
10936
10937 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10938 echo "$as_me:10938: checking if you want to use extended colors" >&5
10939 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10940
10941 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10942 if test "${enable_ext_colors+set}" = set; then
10943   enableval="$enable_ext_colors"
10944   with_ext_colors=$enableval
10945 else
10946   with_ext_colors=no
10947 fi;
10948 echo "$as_me:10948: result: $with_ext_colors" >&5
10949 echo "${ECHO_T}$with_ext_colors" >&6
10950 NCURSES_EXT_COLORS=0
10951 if test "$with_ext_colors" = yes ; then
10952         if test "$with_widec" != yes ; then
10953                 { { echo "$as_me:10953: error: This option applies only to wide-character library" >&5
10954 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10955    { (exit 1); exit 1; }; }
10956         else
10957                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10958
10959 if test "${with_abi_version+set}" != set; then
10960         case $cf_cv_rel_version in
10961         5.*)
10962                 cf_cv_rel_version=6.0
10963                 cf_cv_abi_version=6
10964                 { echo "$as_me:10964: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10965 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10966                 ;;
10967         esac
10968 fi
10969
10970         fi
10971         NCURSES_EXT_COLORS=1
10972         cat >>confdefs.h <<\EOF
10973 #define NCURSES_EXT_COLORS 1
10974 EOF
10975
10976 fi
10977
10978 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10979 echo "$as_me:10979: checking if you want to use extended mouse encoding" >&5
10980 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10981
10982 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10983 if test "${enable_ext_mouse+set}" = set; then
10984   enableval="$enable_ext_mouse"
10985   with_ext_mouse=$enableval
10986 else
10987   with_ext_mouse=no
10988 fi;
10989 echo "$as_me:10989: result: $with_ext_mouse" >&5
10990 echo "${ECHO_T}$with_ext_mouse" >&6
10991 NCURSES_MOUSE_VERSION=1
10992 if test "$with_ext_mouse" = yes ; then
10993         NCURSES_MOUSE_VERSION=2
10994
10995 if test "${with_abi_version+set}" != set; then
10996         case $cf_cv_rel_version in
10997         5.*)
10998                 cf_cv_rel_version=6.0
10999                 cf_cv_abi_version=6
11000                 { echo "$as_me:11000: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11001 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11002                 ;;
11003         esac
11004 fi
11005
11006 fi
11007
11008 echo "$as_me:11008: checking if you want \$NCURSES_NO_PADDING code" >&5
11009 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11010
11011 # Check whether --enable-no-padding or --disable-no-padding was given.
11012 if test "${enable_no_padding+set}" = set; then
11013   enableval="$enable_no_padding"
11014   with_no_padding=$enableval
11015 else
11016   with_no_padding=$with_ext_funcs
11017 fi;
11018 echo "$as_me:11018: result: $with_no_padding" >&5
11019 echo "${ECHO_T}$with_no_padding" >&6
11020 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
11021 #define NCURSES_NO_PADDING 1
11022 EOF
11023
11024 echo "$as_me:11024: checking for ANSI C header files" >&5
11025 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11026 if test "${ac_cv_header_stdc+set}" = set; then
11027   echo $ECHO_N "(cached) $ECHO_C" >&6
11028 else
11029   cat >conftest.$ac_ext <<_ACEOF
11030 #line 11030 "configure"
11031 #include "confdefs.h"
11032 #include <stdlib.h>
11033 #include <stdarg.h>
11034 #include <string.h>
11035 #include <float.h>
11036
11037 _ACEOF
11038 if { (eval echo "$as_me:11038: \"$ac_cpp conftest.$ac_ext\"") >&5
11039   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11040   ac_status=$?
11041   egrep -v '^ *\+' conftest.er1 >conftest.err
11042   rm -f conftest.er1
11043   cat conftest.err >&5
11044   echo "$as_me:11044: \$? = $ac_status" >&5
11045   (exit $ac_status); } >/dev/null; then
11046   if test -s conftest.err; then
11047     ac_cpp_err=$ac_c_preproc_warn_flag
11048   else
11049     ac_cpp_err=
11050   fi
11051 else
11052   ac_cpp_err=yes
11053 fi
11054 if test -z "$ac_cpp_err"; then
11055   ac_cv_header_stdc=yes
11056 else
11057   echo "$as_me: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   ac_cv_header_stdc=no
11060 fi
11061 rm -f conftest.err conftest.$ac_ext
11062
11063 if test $ac_cv_header_stdc = yes; then
11064   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11065   cat >conftest.$ac_ext <<_ACEOF
11066 #line 11066 "configure"
11067 #include "confdefs.h"
11068 #include <string.h>
11069
11070 _ACEOF
11071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11072   egrep "memchr" >/dev/null 2>&1; then
11073   :
11074 else
11075   ac_cv_header_stdc=no
11076 fi
11077 rm -rf conftest*
11078
11079 fi
11080
11081 if test $ac_cv_header_stdc = yes; then
11082   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11083   cat >conftest.$ac_ext <<_ACEOF
11084 #line 11084 "configure"
11085 #include "confdefs.h"
11086 #include <stdlib.h>
11087
11088 _ACEOF
11089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11090   egrep "free" >/dev/null 2>&1; then
11091   :
11092 else
11093   ac_cv_header_stdc=no
11094 fi
11095 rm -rf conftest*
11096
11097 fi
11098
11099 if test $ac_cv_header_stdc = yes; then
11100   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11101   if test "$cross_compiling" = yes; then
11102   :
11103 else
11104   cat >conftest.$ac_ext <<_ACEOF
11105 #line 11105 "configure"
11106 #include "confdefs.h"
11107 #include <ctype.h>
11108 #if ((' ' & 0x0FF) == 0x020)
11109 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11110 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11111 #else
11112 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11113                      || ('j' <= (c) && (c) <= 'r') \
11114                      || ('s' <= (c) && (c) <= 'z'))
11115 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11116 #endif
11117
11118 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11119 int
11120 main ()
11121 {
11122   int i;
11123   for (i = 0; i < 256; i++)
11124     if (XOR (islower (i), ISLOWER (i))
11125         || toupper (i) != TOUPPER (i))
11126       $ac_main_return(2);
11127   $ac_main_return (0);
11128 }
11129 _ACEOF
11130 rm -f conftest$ac_exeext
11131 if { (eval echo "$as_me:11131: \"$ac_link\"") >&5
11132   (eval $ac_link) 2>&5
11133   ac_status=$?
11134   echo "$as_me:11134: \$? = $ac_status" >&5
11135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11136   { (eval echo "$as_me:11136: \"$ac_try\"") >&5
11137   (eval $ac_try) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); }; }; then
11141   :
11142 else
11143   echo "$as_me: program exited with status $ac_status" >&5
11144 echo "$as_me: failed program was:" >&5
11145 cat conftest.$ac_ext >&5
11146 ac_cv_header_stdc=no
11147 fi
11148 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11149 fi
11150 fi
11151 fi
11152 echo "$as_me:11152: result: $ac_cv_header_stdc" >&5
11153 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11154 if test $ac_cv_header_stdc = yes; then
11155
11156 cat >>confdefs.h <<\EOF
11157 #define STDC_HEADERS 1
11158 EOF
11159
11160 fi
11161
11162 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11163
11164 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11165                   inttypes.h stdint.h unistd.h
11166 do
11167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11168 echo "$as_me:11168: checking for $ac_header" >&5
11169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11171   echo $ECHO_N "(cached) $ECHO_C" >&6
11172 else
11173   cat >conftest.$ac_ext <<_ACEOF
11174 #line 11174 "configure"
11175 #include "confdefs.h"
11176 $ac_includes_default
11177 #include <$ac_header>
11178 _ACEOF
11179 rm -f conftest.$ac_objext
11180 if { (eval echo "$as_me:11180: \"$ac_compile\"") >&5
11181   (eval $ac_compile) 2>&5
11182   ac_status=$?
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } &&
11185          { ac_try='test -s conftest.$ac_objext'
11186   { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187   (eval $ac_try) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); }; }; then
11191   eval "$as_ac_Header=yes"
11192 else
11193   echo "$as_me: failed program was:" >&5
11194 cat conftest.$ac_ext >&5
11195 eval "$as_ac_Header=no"
11196 fi
11197 rm -f conftest.$ac_objext conftest.$ac_ext
11198 fi
11199 echo "$as_me:11199: result: `eval echo '${'$as_ac_Header'}'`" >&5
11200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11202   cat >>confdefs.h <<EOF
11203 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11204 EOF
11205
11206 fi
11207 done
11208
11209 echo "$as_me:11209: checking for signed char" >&5
11210 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11211 if test "${ac_cv_type_signed_char+set}" = set; then
11212   echo $ECHO_N "(cached) $ECHO_C" >&6
11213 else
11214   cat >conftest.$ac_ext <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11217 $ac_includes_default
11218 int
11219 main ()
11220 {
11221 if ((signed char *) 0)
11222   return 0;
11223 if (sizeof (signed char))
11224   return 0;
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 rm -f conftest.$ac_objext
11230 if { (eval echo "$as_me:11230: \"$ac_compile\"") >&5
11231   (eval $ac_compile) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); } &&
11235          { ac_try='test -s conftest.$ac_objext'
11236   { (eval echo "$as_me:11236: \"$ac_try\"") >&5
11237   (eval $ac_try) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); }; }; then
11241   ac_cv_type_signed_char=yes
11242 else
11243   echo "$as_me: failed program was:" >&5
11244 cat conftest.$ac_ext >&5
11245 ac_cv_type_signed_char=no
11246 fi
11247 rm -f conftest.$ac_objext conftest.$ac_ext
11248 fi
11249 echo "$as_me:11249: result: $ac_cv_type_signed_char" >&5
11250 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11251
11252 echo "$as_me:11252: checking size of signed char" >&5
11253 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11254 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11255   echo $ECHO_N "(cached) $ECHO_C" >&6
11256 else
11257   if test "$ac_cv_type_signed_char" = yes; then
11258   if test "$cross_compiling" = yes; then
11259   # Depending upon the size, compute the lo and hi bounds.
11260 cat >conftest.$ac_ext <<_ACEOF
11261 #line 11261 "configure"
11262 #include "confdefs.h"
11263 $ac_includes_default
11264 int
11265 main ()
11266 {
11267 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f conftest.$ac_objext
11273 if { (eval echo "$as_me:11273: \"$ac_compile\"") >&5
11274   (eval $ac_compile) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit $ac_status); } &&
11278          { ac_try='test -s conftest.$ac_objext'
11279   { (eval echo "$as_me:11279: \"$ac_try\"") >&5
11280   (eval $ac_try) 2>&5
11281   ac_status=$?
11282   echo "$as_me:11282: \$? = $ac_status" >&5
11283   (exit $ac_status); }; }; then
11284   ac_lo=0 ac_mid=0
11285   while :; do
11286     cat >conftest.$ac_ext <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289 $ac_includes_default
11290 int
11291 main ()
11292 {
11293 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f conftest.$ac_objext
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); } &&
11304          { ac_try='test -s conftest.$ac_objext'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); }; }; then
11310   ac_hi=$ac_mid; break
11311 else
11312   echo "$as_me: failed program was:" >&5
11313 cat conftest.$ac_ext >&5
11314 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11315 fi
11316 rm -f conftest.$ac_objext conftest.$ac_ext
11317   done
11318 else
11319   echo "$as_me: failed program was:" >&5
11320 cat conftest.$ac_ext >&5
11321 ac_hi=-1 ac_mid=-1
11322   while :; do
11323     cat >conftest.$ac_ext <<_ACEOF
11324 #line 11324 "configure"
11325 #include "confdefs.h"
11326 $ac_includes_default
11327 int
11328 main ()
11329 {
11330 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 rm -f conftest.$ac_objext
11336 if { (eval echo "$as_me:11336: \"$ac_compile\"") >&5
11337   (eval $ac_compile) 2>&5
11338   ac_status=$?
11339   echo "$as_me:11339: \$? = $ac_status" >&5
11340   (exit $ac_status); } &&
11341          { ac_try='test -s conftest.$ac_objext'
11342   { (eval echo "$as_me:11342: \"$ac_try\"") >&5
11343   (eval $ac_try) 2>&5
11344   ac_status=$?
11345   echo "$as_me:11345: \$? = $ac_status" >&5
11346   (exit $ac_status); }; }; then
11347   ac_lo=$ac_mid; break
11348 else
11349   echo "$as_me: failed program was:" >&5
11350 cat conftest.$ac_ext >&5
11351 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11352 fi
11353 rm -f conftest.$ac_objext conftest.$ac_ext
11354   done
11355 fi
11356 rm -f conftest.$ac_objext conftest.$ac_ext
11357 # Binary search between lo and hi bounds.
11358 while test "x$ac_lo" != "x$ac_hi"; do
11359   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11360   cat >conftest.$ac_ext <<_ACEOF
11361 #line 11361 "configure"
11362 #include "confdefs.h"
11363 $ac_includes_default
11364 int
11365 main ()
11366 {
11367 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 rm -f conftest.$ac_objext
11373 if { (eval echo "$as_me:11373: \"$ac_compile\"") >&5
11374   (eval $ac_compile) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } &&
11378          { ac_try='test -s conftest.$ac_objext'
11379   { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380   (eval $ac_try) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); }; }; then
11384   ac_hi=$ac_mid
11385 else
11386   echo "$as_me: failed program was:" >&5
11387 cat conftest.$ac_ext >&5
11388 ac_lo=`expr $ac_mid + 1`
11389 fi
11390 rm -f conftest.$ac_objext conftest.$ac_ext
11391 done
11392 ac_cv_sizeof_signed_char=$ac_lo
11393 else
11394   if test "$cross_compiling" = yes; then
11395   { { echo "$as_me:11395: error: cannot run test program while cross compiling" >&5
11396 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11397    { (exit 1); exit 1; }; }
11398 else
11399   cat >conftest.$ac_ext <<_ACEOF
11400 #line 11400 "configure"
11401 #include "confdefs.h"
11402 $ac_includes_default
11403 int
11404 main ()
11405 {
11406 FILE *f = fopen ("conftest.val", "w");
11407 if (!f)
11408   $ac_main_return (1);
11409 fprintf (f, "%d", (sizeof (signed char)));
11410 fclose (f);
11411   ;
11412   return 0;
11413 }
11414 _ACEOF
11415 rm -f conftest$ac_exeext
11416 if { (eval echo "$as_me:11416: \"$ac_link\"") >&5
11417   (eval $ac_link) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11421   { (eval echo "$as_me:11421: \"$ac_try\"") >&5
11422   (eval $ac_try) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit $ac_status); }; }; then
11426   ac_cv_sizeof_signed_char=`cat conftest.val`
11427 else
11428   echo "$as_me: program exited with status $ac_status" >&5
11429 echo "$as_me: failed program was:" >&5
11430 cat conftest.$ac_ext >&5
11431 fi
11432 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11433 fi
11434 fi
11435 rm -f conftest.val
11436 else
11437   ac_cv_sizeof_signed_char=0
11438 fi
11439 fi
11440 echo "$as_me:11440: result: $ac_cv_sizeof_signed_char" >&5
11441 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11442 cat >>confdefs.h <<EOF
11443 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11444 EOF
11445
11446 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11447         NCURSES_SBOOL="signed char"
11448 else
11449         NCURSES_SBOOL="char"
11450 fi
11451 echo "$as_me:11451: checking if you want to use signed Boolean array in term.h" >&5
11452 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11453
11454 # Check whether --enable-signed-char or --disable-signed-char was given.
11455 if test "${enable_signed_char+set}" = set; then
11456   enableval="$enable_signed_char"
11457   with_signed_char=$enableval
11458 else
11459   with_signed_char=no
11460 fi;
11461 echo "$as_me:11461: result: $with_signed_char" >&5
11462 echo "${ECHO_T}$with_signed_char" >&6
11463 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11464
11465 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11466 echo "$as_me:11466: checking if you want SIGWINCH handler" >&5
11467 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11468
11469 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11470 if test "${enable_sigwinch+set}" = set; then
11471   enableval="$enable_sigwinch"
11472   with_sigwinch=$enableval
11473 else
11474   with_sigwinch=$with_ext_funcs
11475 fi;
11476 echo "$as_me:11476: result: $with_sigwinch" >&5
11477 echo "${ECHO_T}$with_sigwinch" >&6
11478 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11479 #define USE_SIGWINCH 1
11480 EOF
11481
11482 ###   use option --enable-tcap-names to allow user to define new capabilities
11483 echo "$as_me:11483: checking if you want user-definable terminal capabilities like termcap" >&5
11484 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11485
11486 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11487 if test "${enable_tcap_names+set}" = set; then
11488   enableval="$enable_tcap_names"
11489   with_tcap_names=$enableval
11490 else
11491   with_tcap_names=$with_ext_funcs
11492 fi;
11493 echo "$as_me:11493: result: $with_tcap_names" >&5
11494 echo "${ECHO_T}$with_tcap_names" >&6
11495 NCURSES_XNAMES=0
11496 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11497
11498 ###############################################################################
11499 # These options are relatively safe to experiment with.
11500
11501 echo "$as_me:11501: checking if you want all development code" >&5
11502 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11503
11504 # Check whether --with-develop or --without-develop was given.
11505 if test "${with_develop+set}" = set; then
11506   withval="$with_develop"
11507   with_develop=$withval
11508 else
11509   with_develop=no
11510 fi;
11511 echo "$as_me:11511: result: $with_develop" >&5
11512 echo "${ECHO_T}$with_develop" >&6
11513
11514 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11515 echo "$as_me:11515: checking if you want hard-tabs code" >&5
11516 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11517
11518 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11519 if test "${enable_hard_tabs+set}" = set; then
11520   enableval="$enable_hard_tabs"
11521
11522 else
11523   enable_hard_tabs=$with_develop
11524 fi;
11525 echo "$as_me:11525: result: $enable_hard_tabs" >&5
11526 echo "${ECHO_T}$enable_hard_tabs" >&6
11527 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11528 #define USE_HARD_TABS 1
11529 EOF
11530
11531 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11532 echo "$as_me:11532: checking if you want limited support for xmc" >&5
11533 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11534
11535 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11536 if test "${enable_xmc_glitch+set}" = set; then
11537   enableval="$enable_xmc_glitch"
11538
11539 else
11540   enable_xmc_glitch=$with_develop
11541 fi;
11542 echo "$as_me:11542: result: $enable_xmc_glitch" >&5
11543 echo "${ECHO_T}$enable_xmc_glitch" >&6
11544 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11545 #define USE_XMC_SUPPORT 1
11546 EOF
11547
11548 ###############################################################################
11549 # These are just experimental, probably should not be in a package:
11550
11551 echo "$as_me:11551: checking if you do not want to assume colors are white-on-black" >&5
11552 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11553
11554 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11555 if test "${enable_assumed_color+set}" = set; then
11556   enableval="$enable_assumed_color"
11557   with_assumed_color=$enableval
11558 else
11559   with_assumed_color=yes
11560 fi;
11561 echo "$as_me:11561: result: $with_assumed_color" >&5
11562 echo "${ECHO_T}$with_assumed_color" >&6
11563 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11564 #define USE_ASSUMED_COLOR 1
11565 EOF
11566
11567 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11568 echo "$as_me:11568: checking if you want hashmap scrolling-optimization code" >&5
11569 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11570
11571 # Check whether --enable-hashmap or --disable-hashmap was given.
11572 if test "${enable_hashmap+set}" = set; then
11573   enableval="$enable_hashmap"
11574   with_hashmap=$enableval
11575 else
11576   with_hashmap=yes
11577 fi;
11578 echo "$as_me:11578: result: $with_hashmap" >&5
11579 echo "${ECHO_T}$with_hashmap" >&6
11580 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11581 #define USE_HASHMAP 1
11582 EOF
11583
11584 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11585 echo "$as_me:11585: checking if you want colorfgbg code" >&5
11586 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11587
11588 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11589 if test "${enable_colorfgbg+set}" = set; then
11590   enableval="$enable_colorfgbg"
11591   with_colorfgbg=$enableval
11592 else
11593   with_colorfgbg=no
11594 fi;
11595 echo "$as_me:11595: result: $with_colorfgbg" >&5
11596 echo "${ECHO_T}$with_colorfgbg" >&6
11597 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11598 #define USE_COLORFGBG 1
11599 EOF
11600
11601 ###   use option --enable-interop to turn on use of bindings used for interop
11602 echo "$as_me:11602: checking if you want interop bindings" >&5
11603 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11604
11605 # Check whether --enable-interop or --disable-interop was given.
11606 if test "${enable_interop+set}" = set; then
11607   enableval="$enable_interop"
11608   with_exp_interop=$enableval
11609 else
11610   with_exp_interop=no
11611 fi;
11612 echo "$as_me:11612: result: $with_exp_interop" >&5
11613 echo "${ECHO_T}$with_exp_interop" >&6
11614
11615 NCURSES_INTEROP_FUNCS=0
11616 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11617
11618 # This is still experimental (20080329), but should ultimately be moved to
11619 # the script-block --with-normal, etc.
11620
11621 echo "$as_me:11621: checking if you want to link with the pthread library" >&5
11622 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11623
11624 # Check whether --with-pthread or --without-pthread was given.
11625 if test "${with_pthread+set}" = set; then
11626   withval="$with_pthread"
11627   with_pthread=$withval
11628 else
11629   with_pthread=no
11630 fi;
11631 echo "$as_me:11631: result: $with_pthread" >&5
11632 echo "${ECHO_T}$with_pthread" >&6
11633
11634 if test "$with_pthread" != no ; then
11635     echo "$as_me:11635: checking for pthread.h" >&5
11636 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11637 if test "${ac_cv_header_pthread_h+set}" = set; then
11638   echo $ECHO_N "(cached) $ECHO_C" >&6
11639 else
11640   cat >conftest.$ac_ext <<_ACEOF
11641 #line 11641 "configure"
11642 #include "confdefs.h"
11643 #include <pthread.h>
11644 _ACEOF
11645 if { (eval echo "$as_me:11645: \"$ac_cpp conftest.$ac_ext\"") >&5
11646   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11647   ac_status=$?
11648   egrep -v '^ *\+' conftest.er1 >conftest.err
11649   rm -f conftest.er1
11650   cat conftest.err >&5
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); } >/dev/null; then
11653   if test -s conftest.err; then
11654     ac_cpp_err=$ac_c_preproc_warn_flag
11655   else
11656     ac_cpp_err=
11657   fi
11658 else
11659   ac_cpp_err=yes
11660 fi
11661 if test -z "$ac_cpp_err"; then
11662   ac_cv_header_pthread_h=yes
11663 else
11664   echo "$as_me: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   ac_cv_header_pthread_h=no
11667 fi
11668 rm -f conftest.err conftest.$ac_ext
11669 fi
11670 echo "$as_me:11670: result: $ac_cv_header_pthread_h" >&5
11671 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11672 if test $ac_cv_header_pthread_h = yes; then
11673
11674         cat >>confdefs.h <<\EOF
11675 #define HAVE_PTHREADS_H 1
11676 EOF
11677
11678         for cf_lib_pthread in pthread c_r
11679         do
11680             echo "$as_me:11680: checking if we can link with the $cf_lib_pthread library" >&5
11681 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11682             cf_save_LIBS="$LIBS"
11683             LIBS="-l$cf_lib_pthread $LIBS"
11684             cat >conftest.$ac_ext <<_ACEOF
11685 #line 11685 "configure"
11686 #include "confdefs.h"
11687
11688 #include <pthread.h>
11689
11690 int
11691 main ()
11692 {
11693
11694                 int rc = pthread_create(0,0,0,0);
11695                 int r2 = pthread_mutexattr_settype(0, 0);
11696
11697   ;
11698   return 0;
11699 }
11700 _ACEOF
11701 rm -f conftest.$ac_objext conftest$ac_exeext
11702 if { (eval echo "$as_me:11702: \"$ac_link\"") >&5
11703   (eval $ac_link) 2>&5
11704   ac_status=$?
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); } &&
11707          { ac_try='test -s conftest$ac_exeext'
11708   { (eval echo "$as_me:11708: \"$ac_try\"") >&5
11709   (eval $ac_try) 2>&5
11710   ac_status=$?
11711   echo "$as_me:11711: \$? = $ac_status" >&5
11712   (exit $ac_status); }; }; then
11713   with_pthread=yes
11714 else
11715   echo "$as_me: failed program was:" >&5
11716 cat conftest.$ac_ext >&5
11717 with_pthread=no
11718 fi
11719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11720             LIBS="$cf_save_LIBS"
11721             echo "$as_me:11721: result: $with_pthread" >&5
11722 echo "${ECHO_T}$with_pthread" >&6
11723             test "$with_pthread" = yes && break
11724         done
11725
11726         if test "$with_pthread" = yes ; then
11727             LIBS="-l$cf_lib_pthread $LIBS"
11728             cat >>confdefs.h <<\EOF
11729 #define HAVE_LIBPTHREADS 1
11730 EOF
11731
11732         else
11733             { { echo "$as_me:11733: error: Cannot link with pthread library" >&5
11734 echo "$as_me: error: Cannot link with pthread library" >&2;}
11735    { (exit 1); exit 1; }; }
11736         fi
11737
11738 fi
11739
11740 fi
11741
11742 if test "x$with_pthread" != xno; then
11743         echo "$as_me:11743: checking for pthread_kill" >&5
11744 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11745 if test "${ac_cv_func_pthread_kill+set}" = set; then
11746   echo $ECHO_N "(cached) $ECHO_C" >&6
11747 else
11748   cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11751 /* System header to define __stub macros and hopefully few prototypes,
11752     which can conflict with char pthread_kill (); below.  */
11753 #include <assert.h>
11754 /* Override any gcc2 internal prototype to avoid an error.  */
11755 #ifdef __cplusplus
11756 extern "C"
11757 #endif
11758 /* We use char because int might match the return type of a gcc2
11759    builtin and then its argument prototype would still apply.  */
11760 char pthread_kill ();
11761 char (*f) ();
11762
11763 int
11764 main ()
11765 {
11766 /* The GNU C library defines this for functions which it implements
11767     to always fail with ENOSYS.  Some functions are actually named
11768     something starting with __ and the normal name is an alias.  */
11769 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11770 choke me
11771 #else
11772 f = pthread_kill;
11773 #endif
11774
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 rm -f conftest.$ac_objext conftest$ac_exeext
11780 if { (eval echo "$as_me:11780: \"$ac_link\"") >&5
11781   (eval $ac_link) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit $ac_status); } &&
11785          { ac_try='test -s conftest$ac_exeext'
11786   { (eval echo "$as_me:11786: \"$ac_try\"") >&5
11787   (eval $ac_try) 2>&5
11788   ac_status=$?
11789   echo "$as_me:11789: \$? = $ac_status" >&5
11790   (exit $ac_status); }; }; then
11791   ac_cv_func_pthread_kill=yes
11792 else
11793   echo "$as_me: failed program was:" >&5
11794 cat conftest.$ac_ext >&5
11795 ac_cv_func_pthread_kill=no
11796 fi
11797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11798 fi
11799 echo "$as_me:11799: result: $ac_cv_func_pthread_kill" >&5
11800 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11801 if test $ac_cv_func_pthread_kill = yes; then
11802
11803                 echo "$as_me:11803: checking if you want to allow EINTR in wgetch with pthreads" >&5
11804 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11805
11806 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11807 if test "${enable_pthreads_eintr+set}" = set; then
11808   enableval="$enable_pthreads_eintr"
11809   use_pthreads_eintr=$enableval
11810 else
11811   use_pthreads_eintr=no
11812 fi;
11813                 echo "$as_me:11813: result: $use_pthreads_eintr" >&5
11814 echo "${ECHO_T}$use_pthreads_eintr" >&6
11815                 if test $use_pthreads_eintr = yes ; then
11816                         cat >>confdefs.h <<\EOF
11817 #define USE_PTHREADS_EINTR 1
11818 EOF
11819
11820                 fi
11821 fi
11822
11823         echo "$as_me:11823: checking if you want to use weak-symbols for pthreads" >&5
11824 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11825
11826 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11827 if test "${enable_weak_symbols+set}" = set; then
11828   enableval="$enable_weak_symbols"
11829   use_weak_symbols=$enableval
11830 else
11831   use_weak_symbols=no
11832 fi;
11833         echo "$as_me:11833: result: $use_weak_symbols" >&5
11834 echo "${ECHO_T}$use_weak_symbols" >&6
11835         if test "$use_weak_symbols" = yes ; then
11836
11837 echo "$as_me:11837: checking if $CC supports weak symbols" >&5
11838 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11839 if test "${cf_cv_weak_symbols+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842
11843 cat >conftest.$ac_ext <<_ACEOF
11844 #line 11844 "configure"
11845 #include "confdefs.h"
11846
11847 #include <stdio.h>
11848 int
11849 main ()
11850 {
11851
11852 #if defined(__GNUC__)
11853 #  if defined __USE_ISOC99
11854 #    define _cat_pragma(exp)    _Pragma(#exp)
11855 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11856 #  else
11857 #    define _weak_pragma(exp)
11858 #  endif
11859 #  define _declare(name)        __extension__ extern __typeof__(name) name
11860 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11861 #endif
11862
11863 weak_symbol(fopen);
11864
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 rm -f conftest.$ac_objext
11870 if { (eval echo "$as_me:11870: \"$ac_compile\"") >&5
11871   (eval $ac_compile) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); } &&
11875          { ac_try='test -s conftest.$ac_objext'
11876   { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   cf_cv_weak_symbols=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 cat conftest.$ac_ext >&5
11885 cf_cv_weak_symbols=no
11886 fi
11887 rm -f conftest.$ac_objext conftest.$ac_ext
11888
11889 fi
11890 echo "$as_me:11890: result: $cf_cv_weak_symbols" >&5
11891 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11892
11893         else
11894                 cf_cv_weak_symbols=no
11895         fi
11896
11897         if test $cf_cv_weak_symbols = yes ; then
11898                 cat >>confdefs.h <<\EOF
11899 #define USE_WEAK_SYMBOLS 1
11900 EOF
11901
11902         fi
11903 fi
11904
11905 PTHREAD=
11906 if test "$with_pthread" = "yes" ; then
11907     cat >>confdefs.h <<\EOF
11908 #define USE_PTHREADS 1
11909 EOF
11910
11911     enable_reentrant=yes
11912     if test $cf_cv_weak_symbols = yes ; then
11913         PTHREAD=-lpthread
11914     fi
11915 fi
11916
11917 # Reentrant code has to be opaque; there's little advantage to making ncurses
11918 # opaque outside of that, so there is no --enable-opaque option.  We can use
11919 # this option without --with-pthreads, but this will be always set for
11920 # pthreads.
11921 echo "$as_me:11921: checking if you want experimental reentrant code" >&5
11922 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11923
11924 # Check whether --enable-reentrant or --disable-reentrant was given.
11925 if test "${enable_reentrant+set}" = set; then
11926   enableval="$enable_reentrant"
11927   with_reentrant=$enableval
11928 else
11929   with_reentrant=no
11930 fi;
11931 echo "$as_me:11931: result: $with_reentrant" >&5
11932 echo "${ECHO_T}$with_reentrant" >&6
11933 if test "$with_reentrant" = yes ; then
11934         cf_cv_enable_reentrant=1
11935         cf_cv_enable_opaque="NCURSES_INTERNALS"
11936         NCURSES_OPAQUE=1
11937         NCURSES_SIZE_T=int
11938         if test $cf_cv_weak_symbols = yes ; then
11939
11940 # remove pthread library from $LIBS
11941 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11942
11943                 TEST_LIBS="-lpthread $TEST_LIBS"
11944                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11945         else
11946                 LIB_SUFFIX="t${LIB_SUFFIX}"
11947         fi
11948         cat >>confdefs.h <<\EOF
11949 #define USE_REENTRANT 1
11950 EOF
11951
11952 if test "${with_abi_version+set}" != set; then
11953         case $cf_cv_rel_version in
11954         5.*)
11955                 cf_cv_rel_version=6.0
11956                 cf_cv_abi_version=6
11957                 { echo "$as_me:11957: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11958 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11959                 ;;
11960         esac
11961 fi
11962
11963 else
11964         cf_cv_enable_reentrant=0
11965         cf_cv_enable_opaque="NCURSES_OPAQUE"
11966         NCURSES_OPAQUE=0
11967         NCURSES_SIZE_T=short
11968 fi
11969
11970 ### Allow using a different wrap-prefix
11971 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11972         echo "$as_me:11972: checking for prefix used to wrap public variables" >&5
11973 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11974
11975 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11976 if test "${with_wrap_prefix+set}" = set; then
11977   withval="$with_wrap_prefix"
11978   NCURSES_WRAP_PREFIX=$withval
11979 else
11980   NCURSES_WRAP_PREFIX=_nc_
11981 fi;
11982         echo "$as_me:11982: result: $NCURSES_WRAP_PREFIX" >&5
11983 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11984 else
11985         NCURSES_WRAP_PREFIX=_nc_
11986 fi
11987
11988 cat >>confdefs.h <<EOF
11989 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11990 EOF
11991
11992 echo "$as_me:11992: checking if you want experimental safe-sprintf code" >&5
11993 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11994
11995 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11996 if test "${enable_safe_sprintf+set}" = set; then
11997   enableval="$enable_safe_sprintf"
11998   with_safe_sprintf=$enableval
11999 else
12000   with_safe_sprintf=no
12001 fi;
12002 echo "$as_me:12002: result: $with_safe_sprintf" >&5
12003 echo "${ECHO_T}$with_safe_sprintf" >&6
12004 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
12005 #define USE_SAFE_SPRINTF 1
12006 EOF
12007
12008 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12009 # when hashmap is used scroll hints are useless
12010 if test "$with_hashmap" = no ; then
12011 echo "$as_me:12011: checking if you want to experiment without scrolling-hints code" >&5
12012 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12013
12014 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12015 if test "${enable_scroll_hints+set}" = set; then
12016   enableval="$enable_scroll_hints"
12017   with_scroll_hints=$enableval
12018 else
12019   with_scroll_hints=yes
12020 fi;
12021 echo "$as_me:12021: result: $with_scroll_hints" >&5
12022 echo "${ECHO_T}$with_scroll_hints" >&6
12023 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12024 #define USE_SCROLL_HINTS 1
12025 EOF
12026
12027 fi
12028
12029 echo "$as_me:12029: checking if you want experimental wgetch-events code" >&5
12030 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12031
12032 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12033 if test "${enable_wgetch_events+set}" = set; then
12034   enableval="$enable_wgetch_events"
12035   with_wgetch_events=$enableval
12036 else
12037   with_wgetch_events=no
12038 fi;
12039 echo "$as_me:12039: result: $with_wgetch_events" >&5
12040 echo "${ECHO_T}$with_wgetch_events" >&6
12041 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12042 #define NCURSES_WGETCH_EVENTS 1
12043 EOF
12044
12045 ###############################################################################
12046
12047 ###     use option --disable-echo to suppress full display compiling commands
12048 echo "$as_me:12048: checking if you want to display full commands during build" >&5
12049 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12050
12051 # Check whether --enable-echo or --disable-echo was given.
12052 if test "${enable_echo+set}" = set; then
12053   enableval="$enable_echo"
12054   with_echo=$enableval
12055 else
12056   with_echo=yes
12057 fi;
12058 if test "$with_echo" = yes; then
12059         ECHO_LINK=
12060 else
12061         ECHO_LINK='@ echo linking $@ ... ;'
12062         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12063         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12064 fi
12065 echo "$as_me:12065: result: $with_echo" >&5
12066 echo "${ECHO_T}$with_echo" >&6
12067
12068 ###     use option --enable-warnings to turn on all gcc warnings
12069 echo "$as_me:12069: checking if you want to see compiler warnings" >&5
12070 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12071
12072 # Check whether --enable-warnings or --disable-warnings was given.
12073 if test "${enable_warnings+set}" = set; then
12074   enableval="$enable_warnings"
12075   with_warnings=$enableval
12076 fi;
12077 echo "$as_me:12077: result: $with_warnings" >&5
12078 echo "${ECHO_T}$with_warnings" >&6
12079
12080 if test "x$with_warnings" = "xyes"; then
12081
12082         ADAFLAGS="$ADAFLAGS -gnatg"
12083
12084 INTEL_COMPILER=no
12085
12086 if test "$GCC" = yes ; then
12087         case $host_os in
12088         linux*|gnu*)
12089                 echo "$as_me:12089: checking if this is really Intel C compiler" >&5
12090 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12091                 cf_save_CFLAGS="$CFLAGS"
12092                 CFLAGS="$CFLAGS -no-gcc"
12093                 cat >conftest.$ac_ext <<_ACEOF
12094 #line 12094 "configure"
12095 #include "confdefs.h"
12096
12097 int
12098 main ()
12099 {
12100
12101 #ifdef __INTEL_COMPILER
12102 #else
12103 make an error
12104 #endif
12105
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f conftest.$ac_objext
12111 if { (eval echo "$as_me:12111: \"$ac_compile\"") >&5
12112   (eval $ac_compile) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit $ac_status); } &&
12116          { ac_try='test -s conftest.$ac_objext'
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   INTEL_COMPILER=yes
12123 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12124
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 cat conftest.$ac_ext >&5
12128 fi
12129 rm -f conftest.$ac_objext conftest.$ac_ext
12130                 CFLAGS="$cf_save_CFLAGS"
12131                 echo "$as_me:12131: result: $INTEL_COMPILER" >&5
12132 echo "${ECHO_T}$INTEL_COMPILER" >&6
12133                 ;;
12134         esac
12135 fi
12136
12137 cat > conftest.$ac_ext <<EOF
12138 #line 12138 "${as_me:-configure}"
12139 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12140 EOF
12141
12142 if test "$INTEL_COMPILER" = yes
12143 then
12144 # The "-wdXXX" options suppress warnings:
12145 # remark #1419: external declaration in primary source file
12146 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12147 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12148 # remark #193: zero used for undefined preprocessing identifier
12149 # remark #593: variable "curs_sb_left_arrow" was set but never used
12150 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12151 # remark #869: parameter "tw" was never referenced
12152 # remark #981: operands are evaluated in unspecified order
12153 # warning #279: controlling expression is constant
12154
12155         { echo "$as_me:12155: checking for $CC warning options..." >&5
12156 echo "$as_me: checking for $CC warning options..." >&6;}
12157         cf_save_CFLAGS="$CFLAGS"
12158         EXTRA_CFLAGS="-Wall"
12159         for cf_opt in \
12160                 wd1419 \
12161                 wd1683 \
12162                 wd1684 \
12163                 wd193 \
12164                 wd593 \
12165                 wd279 \
12166                 wd810 \
12167                 wd869 \
12168                 wd981
12169         do
12170                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12171                 if { (eval echo "$as_me:12171: \"$ac_compile\"") >&5
12172   (eval $ac_compile) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); }; then
12176                         test -n "$verbose" && echo "$as_me:12176: result: ... -$cf_opt" >&5
12177 echo "${ECHO_T}... -$cf_opt" >&6
12178                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12179                 fi
12180         done
12181         CFLAGS="$cf_save_CFLAGS"
12182
12183 elif test "$GCC" = yes
12184 then
12185         { echo "$as_me:12185: checking for $CC warning options..." >&5
12186 echo "$as_me: checking for $CC warning options..." >&6;}
12187         cf_save_CFLAGS="$CFLAGS"
12188         EXTRA_CFLAGS=
12189         cf_warn_CONST=""
12190         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12191         for cf_opt in W Wall \
12192                 Wbad-function-cast \
12193                 Wcast-align \
12194                 Wcast-qual \
12195                 Winline \
12196                 Wmissing-declarations \
12197                 Wmissing-prototypes \
12198                 Wnested-externs \
12199                 Wpointer-arith \
12200                 Wshadow \
12201                 Wstrict-prototypes \
12202                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12203         do
12204                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12205                 if { (eval echo "$as_me:12205: \"$ac_compile\"") >&5
12206   (eval $ac_compile) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); }; then
12210                         test -n "$verbose" && echo "$as_me:12210: result: ... -$cf_opt" >&5
12211 echo "${ECHO_T}... -$cf_opt" >&6
12212                         case $cf_opt in #(vi
12213                         Wcast-qual) #(vi
12214                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12215                                 ;;
12216                         Winline) #(vi
12217                                 case $GCC_VERSION in
12218                                 [34].*)
12219                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12220
12221 echo "${as_me:-configure}:12221: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12222
12223                                         continue;;
12224                                 esac
12225                                 ;;
12226                         esac
12227                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12228                 fi
12229         done
12230         CFLAGS="$cf_save_CFLAGS"
12231 fi
12232 rm -rf conftest*
12233
12234         if test "$cf_with_cxx" = yes ; then
12235
12236 INTEL_CPLUSPLUS=no
12237
12238 if test "$GCC" = yes ; then
12239         case $host_os in
12240         linux*|gnu*)
12241                 echo "$as_me:12241: checking if this is really Intel C++ compiler" >&5
12242 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12243                 cf_save_CFLAGS="$CXXFLAGS"
12244                 CXXFLAGS="$CXXFLAGS -no-gcc"
12245                 cat >conftest.$ac_ext <<_ACEOF
12246 #line 12246 "configure"
12247 #include "confdefs.h"
12248
12249 int
12250 main ()
12251 {
12252
12253 #ifdef __INTEL_COMPILER
12254 #else
12255 make an error
12256 #endif
12257
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -f conftest.$ac_objext
12263 if { (eval echo "$as_me:12263: \"$ac_compile\"") >&5
12264   (eval $ac_compile) 2>&5
12265   ac_status=$?
12266   echo "$as_me:12266: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -s conftest.$ac_objext'
12269   { (eval echo "$as_me:12269: \"$ac_try\"") >&5
12270   (eval $ac_try) 2>&5
12271   ac_status=$?
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); }; }; then
12274   INTEL_CPLUSPLUS=yes
12275 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12276
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 fi
12281 rm -f conftest.$ac_objext conftest.$ac_ext
12282                 CXXFLAGS="$cf_save_CFLAGS"
12283                 echo "$as_me:12283: result: $INTEL_CPLUSPLUS" >&5
12284 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12285                 ;;
12286         esac
12287 fi
12288
12289 ac_ext=cc
12290 ac_cpp='$CXXCPP $CPPFLAGS'
12291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12294 ac_main_return=return
12295
12296 cat > conftest.$ac_ext <<EOF
12297 #line 12297 "configure"
12298 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12299 EOF
12300
12301 if test "$INTEL_CPLUSPLUS" = yes
12302 then
12303 # The "-wdXXX" options suppress warnings:
12304 # remark #1419: external declaration in primary source file
12305 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12306 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12307 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12308 # remark #193: zero used for undefined preprocessing identifier
12309 # remark #593: variable "curs_sb_left_arrow" was set but never used
12310 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12311 # remark #869: parameter "tw" was never referenced
12312 # remark #981: operands are evaluated in unspecified order
12313 # warning #269: invalid format string conversion
12314
12315         { echo "$as_me:12315: checking for $CC warning options..." >&5
12316 echo "$as_me: checking for $CC warning options..." >&6;}
12317         cf_save_CXXFLAGS="$CXXFLAGS"
12318         EXTRA_CXXFLAGS="-Wall"
12319         for cf_opt in \
12320                 wd1419 \
12321                 wd1682 \
12322                 wd1683 \
12323                 wd1684 \
12324                 wd193 \
12325                 wd279 \
12326                 wd593 \
12327                 wd810 \
12328                 wd869 \
12329                 wd981
12330         do
12331                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12332                 if { (eval echo "$as_me:12332: \"$ac_compile\"") >&5
12333   (eval $ac_compile) 2>&5
12334   ac_status=$?
12335   echo "$as_me:12335: \$? = $ac_status" >&5
12336   (exit $ac_status); }; then
12337                         test -n "$verbose" && echo "$as_me:12337: result: ... -$cf_opt" >&5
12338 echo "${ECHO_T}... -$cf_opt" >&6
12339                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12340                 fi
12341         done
12342         CXXFLAGS="$cf_save_CXXFLAGS"
12343
12344 elif test "$GXX" = yes
12345 then
12346         { echo "$as_me:12346: checking for $CXX warning options..." >&5
12347 echo "$as_me: checking for $CXX warning options..." >&6;}
12348         cf_save_CXXFLAGS="$CXXFLAGS"
12349         EXTRA_CXXFLAGS="-W -Wall"
12350         cf_gxx_extra_warnings=""
12351         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12352         case "$GCC_VERSION" in
12353         [1-2].*)
12354                 ;;
12355         *)
12356                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12357                 ;;
12358         esac
12359         for cf_opt in \
12360                 Wabi \
12361                 fabi-version=0 \
12362                 Woverloaded-virtual \
12363                 Wsign-promo \
12364                 Wsynth \
12365                 Wold-style-cast \
12366                 Wcast-align \
12367                 Wcast-qual \
12368                 Wmissing-prototypes \
12369                 Wpointer-arith \
12370                 Wshadow \
12371                 Wstrict-prototypes \
12372                 Wundef $cf_gxx_extra_warnings Wno-unused
12373         do
12374                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12375                 if { (eval echo "$as_me:12375: \"$ac_compile\"") >&5
12376   (eval $ac_compile) 2>&5
12377   ac_status=$?
12378   echo "$as_me:12378: \$? = $ac_status" >&5
12379   (exit $ac_status); }; then
12380                         test -n "$verbose" && echo "$as_me:12380: result: ... -$cf_opt" >&5
12381 echo "${ECHO_T}... -$cf_opt" >&6
12382                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12383                 else
12384                         test -n "$verbose" && echo "$as_me:12384: result: ... no -$cf_opt" >&5
12385 echo "${ECHO_T}... no -$cf_opt" >&6
12386                 fi
12387         done
12388         CXXFLAGS="$cf_save_CXXFLAGS"
12389 fi
12390
12391 rm -rf conftest*
12392 ac_ext=c
12393 ac_cpp='$CPP $CPPFLAGS'
12394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12397 ac_main_return=return
12398
12399         fi
12400 fi
12401
12402 if test "$GCC" = yes
12403 then
12404 cat > conftest.i <<EOF
12405 #ifndef GCC_PRINTF
12406 #define GCC_PRINTF 0
12407 #endif
12408 #ifndef GCC_SCANF
12409 #define GCC_SCANF 0
12410 #endif
12411 #ifndef GCC_NORETURN
12412 #define GCC_NORETURN /* nothing */
12413 #endif
12414 #ifndef GCC_UNUSED
12415 #define GCC_UNUSED /* nothing */
12416 #endif
12417 EOF
12418 if test "$GCC" = yes
12419 then
12420         { echo "$as_me:12420: checking for $CC __attribute__ directives..." >&5
12421 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12422 cat > conftest.$ac_ext <<EOF
12423 #line 12423 "${as_me:-configure}"
12424 #include "confdefs.h"
12425 #include "conftest.h"
12426 #include "conftest.i"
12427 #if     GCC_PRINTF
12428 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12429 #else
12430 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12431 #endif
12432 #if     GCC_SCANF
12433 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12434 #else
12435 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12436 #endif
12437 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12438 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12439 extern void foo(void) GCC_NORETURN;
12440 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12441 EOF
12442         cf_printf_attribute=no
12443         cf_scanf_attribute=no
12444         for cf_attribute in scanf printf unused noreturn
12445         do
12446
12447 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12448
12449                 cf_directive="__attribute__(($cf_attribute))"
12450                 echo "checking for $CC $cf_directive" 1>&5
12451
12452                 case $cf_attribute in #(vi
12453                 printf) #(vi
12454                         cf_printf_attribute=yes
12455                         cat >conftest.h <<EOF
12456 #define GCC_$cf_ATTRIBUTE 1
12457 EOF
12458                         ;;
12459                 scanf) #(vi
12460                         cf_scanf_attribute=yes
12461                         cat >conftest.h <<EOF
12462 #define GCC_$cf_ATTRIBUTE 1
12463 EOF
12464                         ;;
12465                 *) #(vi
12466                         cat >conftest.h <<EOF
12467 #define GCC_$cf_ATTRIBUTE $cf_directive
12468 EOF
12469                         ;;
12470                 esac
12471
12472                 if { (eval echo "$as_me:12472: \"$ac_compile\"") >&5
12473   (eval $ac_compile) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; then
12477                         test -n "$verbose" && echo "$as_me:12477: result: ... $cf_attribute" >&5
12478 echo "${ECHO_T}... $cf_attribute" >&6
12479                         cat conftest.h >>confdefs.h
12480                         case $cf_attribute in #(vi
12481                         printf) #(vi
12482                                 if test "$cf_printf_attribute" = no ; then
12483                                         cat >>confdefs.h <<EOF
12484 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12485 EOF
12486                                 else
12487                                         cat >>confdefs.h <<EOF
12488 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12489 EOF
12490                                 fi
12491                                 ;;
12492                         scanf) #(vi
12493                                 if test "$cf_scanf_attribute" = no ; then
12494                                         cat >>confdefs.h <<EOF
12495 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12496 EOF
12497                                 else
12498                                         cat >>confdefs.h <<EOF
12499 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12500 EOF
12501                                 fi
12502                                 ;;
12503                         esac
12504                 fi
12505         done
12506 else
12507         fgrep define conftest.i >>confdefs.h
12508 fi
12509 rm -rf conftest*
12510 fi
12511
12512 ###     use option --enable-assertions to turn on generation of assertion code
12513 echo "$as_me:12513: checking if you want to enable runtime assertions" >&5
12514 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12515
12516 # Check whether --enable-assertions or --disable-assertions was given.
12517 if test "${enable_assertions+set}" = set; then
12518   enableval="$enable_assertions"
12519   with_assertions=$enableval
12520 else
12521   with_assertions=no
12522 fi;
12523 echo "$as_me:12523: result: $with_assertions" >&5
12524 echo "${ECHO_T}$with_assertions" >&6
12525 if test -n "$GCC"
12526 then
12527         if test "$with_assertions" = no
12528         then
12529                 cat >>confdefs.h <<\EOF
12530 #define NDEBUG 1
12531 EOF
12532
12533                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12534         else
12535
12536         ADAFLAGS="$ADAFLAGS -gnata"
12537
12538         fi
12539 fi
12540
12541 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12542
12543 echo "$as_me:12543: checking if you want to use dmalloc for testing" >&5
12544 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12545
12546 # Check whether --with-dmalloc or --without-dmalloc was given.
12547 if test "${with_dmalloc+set}" = set; then
12548   withval="$with_dmalloc"
12549   cat >>confdefs.h <<\EOF
12550 #define USE_DMALLOC 1
12551 EOF
12552
12553         : ${with_cflags:=-g}
12554         : ${with_no_leaks:=yes}
12555          with_dmalloc=yes
12556 else
12557   with_dmalloc=
12558 fi;
12559 echo "$as_me:12559: result: ${with_dmalloc:-no}" >&5
12560 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12561
12562 case .$with_cflags in #(vi
12563 .*-g*)
12564         case .$CFLAGS in #(vi
12565         .*-g*) #(vi
12566                 ;;
12567         *)
12568
12569 cf_fix_cppflags=no
12570 cf_new_cflags=
12571 cf_new_cppflags=
12572 cf_new_extra_cppflags=
12573
12574 for cf_add_cflags in -g
12575 do
12576 case $cf_fix_cppflags in
12577 no)
12578         case $cf_add_cflags in #(vi
12579         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12580                 case $cf_add_cflags in
12581                 -D*)
12582                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12583
12584                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12585                                 && test -z "${cf_tst_cflags}" \
12586                                 && cf_fix_cppflags=yes
12587
12588                         if test $cf_fix_cppflags = yes ; then
12589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12590                                 continue
12591                         elif test "${cf_tst_cflags}" = "\"'" ; then
12592                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12593                                 continue
12594                         fi
12595                         ;;
12596                 esac
12597                 case "$CPPFLAGS" in
12598                 *$cf_add_cflags) #(vi
12599                         ;;
12600                 *) #(vi
12601                         case $cf_add_cflags in #(vi
12602                         -D*)
12603                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12604
12605 CPPFLAGS=`echo "$CPPFLAGS" | \
12606         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12607                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12608
12609                                 ;;
12610                         esac
12611                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12612                         ;;
12613                 esac
12614                 ;;
12615         *)
12616                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12617                 ;;
12618         esac
12619         ;;
12620 yes)
12621         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12622
12623         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12624
12625         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12626                 && test -z "${cf_tst_cflags}" \
12627                 && cf_fix_cppflags=no
12628         ;;
12629 esac
12630 done
12631
12632 if test -n "$cf_new_cflags" ; then
12633
12634         CFLAGS="$CFLAGS $cf_new_cflags"
12635 fi
12636
12637 if test -n "$cf_new_cppflags" ; then
12638
12639         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12640 fi
12641
12642 if test -n "$cf_new_extra_cppflags" ; then
12643
12644         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12645 fi
12646
12647                 ;;
12648         esac
12649         ;;
12650 esac
12651
12652 if test "$with_dmalloc" = yes ; then
12653         echo "$as_me:12653: checking for dmalloc.h" >&5
12654 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12655 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12656   echo $ECHO_N "(cached) $ECHO_C" >&6
12657 else
12658   cat >conftest.$ac_ext <<_ACEOF
12659 #line 12659 "configure"
12660 #include "confdefs.h"
12661 #include <dmalloc.h>
12662 _ACEOF
12663 if { (eval echo "$as_me:12663: \"$ac_cpp conftest.$ac_ext\"") >&5
12664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12665   ac_status=$?
12666   egrep -v '^ *\+' conftest.er1 >conftest.err
12667   rm -f conftest.er1
12668   cat conftest.err >&5
12669   echo "$as_me:12669: \$? = $ac_status" >&5
12670   (exit $ac_status); } >/dev/null; then
12671   if test -s conftest.err; then
12672     ac_cpp_err=$ac_c_preproc_warn_flag
12673   else
12674     ac_cpp_err=
12675   fi
12676 else
12677   ac_cpp_err=yes
12678 fi
12679 if test -z "$ac_cpp_err"; then
12680   ac_cv_header_dmalloc_h=yes
12681 else
12682   echo "$as_me: failed program was:" >&5
12683   cat conftest.$ac_ext >&5
12684   ac_cv_header_dmalloc_h=no
12685 fi
12686 rm -f conftest.err conftest.$ac_ext
12687 fi
12688 echo "$as_me:12688: result: $ac_cv_header_dmalloc_h" >&5
12689 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12690 if test $ac_cv_header_dmalloc_h = yes; then
12691
12692 echo "$as_me:12692: checking for dmalloc_debug in -ldmalloc" >&5
12693 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12694 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12695   echo $ECHO_N "(cached) $ECHO_C" >&6
12696 else
12697   ac_check_lib_save_LIBS=$LIBS
12698 LIBS="-ldmalloc  $LIBS"
12699 cat >conftest.$ac_ext <<_ACEOF
12700 #line 12700 "configure"
12701 #include "confdefs.h"
12702
12703 /* Override any gcc2 internal prototype to avoid an error.  */
12704 #ifdef __cplusplus
12705 extern "C"
12706 #endif
12707 /* We use char because int might match the return type of a gcc2
12708    builtin and then its argument prototype would still apply.  */
12709 char dmalloc_debug ();
12710 int
12711 main ()
12712 {
12713 dmalloc_debug ();
12714   ;
12715   return 0;
12716 }
12717 _ACEOF
12718 rm -f conftest.$ac_objext conftest$ac_exeext
12719 if { (eval echo "$as_me:12719: \"$ac_link\"") >&5
12720   (eval $ac_link) 2>&5
12721   ac_status=$?
12722   echo "$as_me:12722: \$? = $ac_status" >&5
12723   (exit $ac_status); } &&
12724          { ac_try='test -s conftest$ac_exeext'
12725   { (eval echo "$as_me:12725: \"$ac_try\"") >&5
12726   (eval $ac_try) 2>&5
12727   ac_status=$?
12728   echo "$as_me:12728: \$? = $ac_status" >&5
12729   (exit $ac_status); }; }; then
12730   ac_cv_lib_dmalloc_dmalloc_debug=yes
12731 else
12732   echo "$as_me: failed program was:" >&5
12733 cat conftest.$ac_ext >&5
12734 ac_cv_lib_dmalloc_dmalloc_debug=no
12735 fi
12736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12737 LIBS=$ac_check_lib_save_LIBS
12738 fi
12739 echo "$as_me:12739: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12740 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12741 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12742   cat >>confdefs.h <<EOF
12743 #define HAVE_LIBDMALLOC 1
12744 EOF
12745
12746   LIBS="-ldmalloc $LIBS"
12747
12748 fi
12749
12750 fi
12751
12752 fi
12753
12754 echo "$as_me:12754: checking if you want to use dbmalloc for testing" >&5
12755 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12756
12757 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12758 if test "${with_dbmalloc+set}" = set; then
12759   withval="$with_dbmalloc"
12760   cat >>confdefs.h <<\EOF
12761 #define USE_DBMALLOC 1
12762 EOF
12763
12764         : ${with_cflags:=-g}
12765         : ${with_no_leaks:=yes}
12766          with_dbmalloc=yes
12767 else
12768   with_dbmalloc=
12769 fi;
12770 echo "$as_me:12770: result: ${with_dbmalloc:-no}" >&5
12771 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12772
12773 case .$with_cflags in #(vi
12774 .*-g*)
12775         case .$CFLAGS in #(vi
12776         .*-g*) #(vi
12777                 ;;
12778         *)
12779
12780 cf_fix_cppflags=no
12781 cf_new_cflags=
12782 cf_new_cppflags=
12783 cf_new_extra_cppflags=
12784
12785 for cf_add_cflags in -g
12786 do
12787 case $cf_fix_cppflags in
12788 no)
12789         case $cf_add_cflags in #(vi
12790         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12791                 case $cf_add_cflags in
12792                 -D*)
12793                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12794
12795                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12796                                 && test -z "${cf_tst_cflags}" \
12797                                 && cf_fix_cppflags=yes
12798
12799                         if test $cf_fix_cppflags = yes ; then
12800                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12801                                 continue
12802                         elif test "${cf_tst_cflags}" = "\"'" ; then
12803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12804                                 continue
12805                         fi
12806                         ;;
12807                 esac
12808                 case "$CPPFLAGS" in
12809                 *$cf_add_cflags) #(vi
12810                         ;;
12811                 *) #(vi
12812                         case $cf_add_cflags in #(vi
12813                         -D*)
12814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12815
12816 CPPFLAGS=`echo "$CPPFLAGS" | \
12817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12819
12820                                 ;;
12821                         esac
12822                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12823                         ;;
12824                 esac
12825                 ;;
12826         *)
12827                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12828                 ;;
12829         esac
12830         ;;
12831 yes)
12832         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12833
12834         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12835
12836         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12837                 && test -z "${cf_tst_cflags}" \
12838                 && cf_fix_cppflags=no
12839         ;;
12840 esac
12841 done
12842
12843 if test -n "$cf_new_cflags" ; then
12844
12845         CFLAGS="$CFLAGS $cf_new_cflags"
12846 fi
12847
12848 if test -n "$cf_new_cppflags" ; then
12849
12850         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12851 fi
12852
12853 if test -n "$cf_new_extra_cppflags" ; then
12854
12855         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12856 fi
12857
12858                 ;;
12859         esac
12860         ;;
12861 esac
12862
12863 if test "$with_dbmalloc" = yes ; then
12864         echo "$as_me:12864: checking for dbmalloc.h" >&5
12865 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12866 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12867   echo $ECHO_N "(cached) $ECHO_C" >&6
12868 else
12869   cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872 #include <dbmalloc.h>
12873 _ACEOF
12874 if { (eval echo "$as_me:12874: \"$ac_cpp conftest.$ac_ext\"") >&5
12875   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12876   ac_status=$?
12877   egrep -v '^ *\+' conftest.er1 >conftest.err
12878   rm -f conftest.er1
12879   cat conftest.err >&5
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); } >/dev/null; then
12882   if test -s conftest.err; then
12883     ac_cpp_err=$ac_c_preproc_warn_flag
12884   else
12885     ac_cpp_err=
12886   fi
12887 else
12888   ac_cpp_err=yes
12889 fi
12890 if test -z "$ac_cpp_err"; then
12891   ac_cv_header_dbmalloc_h=yes
12892 else
12893   echo "$as_me: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   ac_cv_header_dbmalloc_h=no
12896 fi
12897 rm -f conftest.err conftest.$ac_ext
12898 fi
12899 echo "$as_me:12899: result: $ac_cv_header_dbmalloc_h" >&5
12900 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12901 if test $ac_cv_header_dbmalloc_h = yes; then
12902
12903 echo "$as_me:12903: checking for debug_malloc in -ldbmalloc" >&5
12904 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12905 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   ac_check_lib_save_LIBS=$LIBS
12909 LIBS="-ldbmalloc  $LIBS"
12910 cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913
12914 /* Override any gcc2 internal prototype to avoid an error.  */
12915 #ifdef __cplusplus
12916 extern "C"
12917 #endif
12918 /* We use char because int might match the return type of a gcc2
12919    builtin and then its argument prototype would still apply.  */
12920 char debug_malloc ();
12921 int
12922 main ()
12923 {
12924 debug_malloc ();
12925   ;
12926   return 0;
12927 }
12928 _ACEOF
12929 rm -f conftest.$ac_objext conftest$ac_exeext
12930 if { (eval echo "$as_me:12930: \"$ac_link\"") >&5
12931   (eval $ac_link) 2>&5
12932   ac_status=$?
12933   echo "$as_me:12933: \$? = $ac_status" >&5
12934   (exit $ac_status); } &&
12935          { ac_try='test -s conftest$ac_exeext'
12936   { (eval echo "$as_me:12936: \"$ac_try\"") >&5
12937   (eval $ac_try) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit $ac_status); }; }; then
12941   ac_cv_lib_dbmalloc_debug_malloc=yes
12942 else
12943   echo "$as_me: failed program was:" >&5
12944 cat conftest.$ac_ext >&5
12945 ac_cv_lib_dbmalloc_debug_malloc=no
12946 fi
12947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12948 LIBS=$ac_check_lib_save_LIBS
12949 fi
12950 echo "$as_me:12950: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12951 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12952 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12953   cat >>confdefs.h <<EOF
12954 #define HAVE_LIBDBMALLOC 1
12955 EOF
12956
12957   LIBS="-ldbmalloc $LIBS"
12958
12959 fi
12960
12961 fi
12962
12963 fi
12964
12965 echo "$as_me:12965: checking if you want to use valgrind for testing" >&5
12966 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12967
12968 # Check whether --with-valgrind or --without-valgrind was given.
12969 if test "${with_valgrind+set}" = set; then
12970   withval="$with_valgrind"
12971   cat >>confdefs.h <<\EOF
12972 #define USE_VALGRIND 1
12973 EOF
12974
12975         : ${with_cflags:=-g}
12976         : ${with_no_leaks:=yes}
12977          with_valgrind=yes
12978 else
12979   with_valgrind=
12980 fi;
12981 echo "$as_me:12981: result: ${with_valgrind:-no}" >&5
12982 echo "${ECHO_T}${with_valgrind:-no}" >&6
12983
12984 case .$with_cflags in #(vi
12985 .*-g*)
12986         case .$CFLAGS in #(vi
12987         .*-g*) #(vi
12988                 ;;
12989         *)
12990
12991 cf_fix_cppflags=no
12992 cf_new_cflags=
12993 cf_new_cppflags=
12994 cf_new_extra_cppflags=
12995
12996 for cf_add_cflags in -g
12997 do
12998 case $cf_fix_cppflags in
12999 no)
13000         case $cf_add_cflags in #(vi
13001         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13002                 case $cf_add_cflags in
13003                 -D*)
13004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13005
13006                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13007                                 && test -z "${cf_tst_cflags}" \
13008                                 && cf_fix_cppflags=yes
13009
13010                         if test $cf_fix_cppflags = yes ; then
13011                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13012                                 continue
13013                         elif test "${cf_tst_cflags}" = "\"'" ; then
13014                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13015                                 continue
13016                         fi
13017                         ;;
13018                 esac
13019                 case "$CPPFLAGS" in
13020                 *$cf_add_cflags) #(vi
13021                         ;;
13022                 *) #(vi
13023                         case $cf_add_cflags in #(vi
13024                         -D*)
13025                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13026
13027 CPPFLAGS=`echo "$CPPFLAGS" | \
13028         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13029                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13030
13031                                 ;;
13032                         esac
13033                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13034                         ;;
13035                 esac
13036                 ;;
13037         *)
13038                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13039                 ;;
13040         esac
13041         ;;
13042 yes)
13043         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13044
13045         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13046
13047         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13048                 && test -z "${cf_tst_cflags}" \
13049                 && cf_fix_cppflags=no
13050         ;;
13051 esac
13052 done
13053
13054 if test -n "$cf_new_cflags" ; then
13055
13056         CFLAGS="$CFLAGS $cf_new_cflags"
13057 fi
13058
13059 if test -n "$cf_new_cppflags" ; then
13060
13061         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13062 fi
13063
13064 if test -n "$cf_new_extra_cppflags" ; then
13065
13066         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13067 fi
13068
13069                 ;;
13070         esac
13071         ;;
13072 esac
13073
13074 echo "$as_me:13074: checking if you want to perform memory-leak testing" >&5
13075 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13076
13077 # Check whether --enable-leaks or --disable-leaks was given.
13078 if test "${enable_leaks+set}" = set; then
13079   enableval="$enable_leaks"
13080   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13081 else
13082   : ${with_no_leaks:=no}
13083 fi;
13084 echo "$as_me:13084: result: $with_no_leaks" >&5
13085 echo "${ECHO_T}$with_no_leaks" >&6
13086
13087 if test "$with_no_leaks" = yes ; then
13088         cat >>confdefs.h <<\EOF
13089 #define NO_LEAKS 1
13090 EOF
13091
13092         cat >>confdefs.h <<\EOF
13093 #define YY_NO_LEAKS 1
13094 EOF
13095
13096 fi
13097
13098 cat >>confdefs.h <<\EOF
13099 #define HAVE_NC_ALLOC_H 1
13100 EOF
13101
13102 ###     use option --enable-expanded to generate certain macros as functions
13103
13104 # Check whether --enable-expanded or --disable-expanded was given.
13105 if test "${enable_expanded+set}" = set; then
13106   enableval="$enable_expanded"
13107   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13108 #define NCURSES_EXPANDED 1
13109 EOF
13110
13111 fi;
13112
13113 ###     use option --disable-macros to suppress macros in favor of functions
13114
13115 # Check whether --enable-macros or --disable-macros was given.
13116 if test "${enable_macros+set}" = set; then
13117   enableval="$enable_macros"
13118   test "$enableval" = no && cat >>confdefs.h <<\EOF
13119 #define NCURSES_NOMACROS 1
13120 EOF
13121
13122 fi;
13123
13124 # Normally we only add trace() to the debug-library.  Allow this to be
13125 # extended to all models of the ncurses library:
13126 cf_all_traces=no
13127 case "$CFLAGS $CPPFLAGS" in
13128 *-DTRACE*)
13129         cf_all_traces=yes
13130         ;;
13131 esac
13132
13133 echo "$as_me:13133: checking whether to add trace feature to all models" >&5
13134 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13135
13136 # Check whether --with-trace or --without-trace was given.
13137 if test "${with_trace+set}" = set; then
13138   withval="$with_trace"
13139   cf_with_trace=$withval
13140 else
13141   cf_with_trace=$cf_all_traces
13142 fi;
13143 echo "$as_me:13143: result: $cf_with_trace" >&5
13144 echo "${ECHO_T}$cf_with_trace" >&6
13145
13146 if test "$cf_with_trace" = yes ; then
13147         LIB_TRACING=all
13148         ADA_TRACE=TRUE
13149
13150 cf_fix_cppflags=no
13151 cf_new_cflags=
13152 cf_new_cppflags=
13153 cf_new_extra_cppflags=
13154
13155 for cf_add_cflags in -DTRACE
13156 do
13157 case $cf_fix_cppflags in
13158 no)
13159         case $cf_add_cflags in #(vi
13160         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13161                 case $cf_add_cflags in
13162                 -D*)
13163                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13164
13165                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13166                                 && test -z "${cf_tst_cflags}" \
13167                                 && cf_fix_cppflags=yes
13168
13169                         if test $cf_fix_cppflags = yes ; then
13170                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13171                                 continue
13172                         elif test "${cf_tst_cflags}" = "\"'" ; then
13173                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13174                                 continue
13175                         fi
13176                         ;;
13177                 esac
13178                 case "$CPPFLAGS" in
13179                 *$cf_add_cflags) #(vi
13180                         ;;
13181                 *) #(vi
13182                         case $cf_add_cflags in #(vi
13183                         -D*)
13184                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13185
13186 CPPFLAGS=`echo "$CPPFLAGS" | \
13187         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13188                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13189
13190                                 ;;
13191                         esac
13192                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13193                         ;;
13194                 esac
13195                 ;;
13196         *)
13197                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13198                 ;;
13199         esac
13200         ;;
13201 yes)
13202         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13203
13204         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13205
13206         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13207                 && test -z "${cf_tst_cflags}" \
13208                 && cf_fix_cppflags=no
13209         ;;
13210 esac
13211 done
13212
13213 if test -n "$cf_new_cflags" ; then
13214
13215         CFLAGS="$CFLAGS $cf_new_cflags"
13216 fi
13217
13218 if test -n "$cf_new_cppflags" ; then
13219
13220         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13221 fi
13222
13223 if test -n "$cf_new_extra_cppflags" ; then
13224
13225         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13226 fi
13227
13228 else
13229         LIB_TRACING=DEBUG
13230         ADA_TRACE=FALSE
13231 fi
13232
13233 ###     Checks for libraries.
13234 case $cf_cv_system_name in #(vi
13235 *mingw32*) #(vi
13236         ;;
13237 *)
13238 echo "$as_me:13238: checking for gettimeofday" >&5
13239 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13240 if test "${ac_cv_func_gettimeofday+set}" = set; then
13241   echo $ECHO_N "(cached) $ECHO_C" >&6
13242 else
13243   cat >conftest.$ac_ext <<_ACEOF
13244 #line 13244 "configure"
13245 #include "confdefs.h"
13246 /* System header to define __stub macros and hopefully few prototypes,
13247     which can conflict with char gettimeofday (); below.  */
13248 #include <assert.h>
13249 /* Override any gcc2 internal prototype to avoid an error.  */
13250 #ifdef __cplusplus
13251 extern "C"
13252 #endif
13253 /* We use char because int might match the return type of a gcc2
13254    builtin and then its argument prototype would still apply.  */
13255 char gettimeofday ();
13256 char (*f) ();
13257
13258 int
13259 main ()
13260 {
13261 /* The GNU C library defines this for functions which it implements
13262     to always fail with ENOSYS.  Some functions are actually named
13263     something starting with __ and the normal name is an alias.  */
13264 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13265 choke me
13266 #else
13267 f = gettimeofday;
13268 #endif
13269
13270   ;
13271   return 0;
13272 }
13273 _ACEOF
13274 rm -f conftest.$ac_objext conftest$ac_exeext
13275 if { (eval echo "$as_me:13275: \"$ac_link\"") >&5
13276   (eval $ac_link) 2>&5
13277   ac_status=$?
13278   echo "$as_me:13278: \$? = $ac_status" >&5
13279   (exit $ac_status); } &&
13280          { ac_try='test -s conftest$ac_exeext'
13281   { (eval echo "$as_me:13281: \"$ac_try\"") >&5
13282   (eval $ac_try) 2>&5
13283   ac_status=$?
13284   echo "$as_me:13284: \$? = $ac_status" >&5
13285   (exit $ac_status); }; }; then
13286   ac_cv_func_gettimeofday=yes
13287 else
13288   echo "$as_me: failed program was:" >&5
13289 cat conftest.$ac_ext >&5
13290 ac_cv_func_gettimeofday=no
13291 fi
13292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13293 fi
13294 echo "$as_me:13294: result: $ac_cv_func_gettimeofday" >&5
13295 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13296 if test $ac_cv_func_gettimeofday = yes; then
13297   cat >>confdefs.h <<\EOF
13298 #define HAVE_GETTIMEOFDAY 1
13299 EOF
13300
13301 else
13302
13303 echo "$as_me:13303: checking for gettimeofday in -lbsd" >&5
13304 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13305 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308   ac_check_lib_save_LIBS=$LIBS
13309 LIBS="-lbsd  $LIBS"
13310 cat >conftest.$ac_ext <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313
13314 /* Override any gcc2 internal prototype to avoid an error.  */
13315 #ifdef __cplusplus
13316 extern "C"
13317 #endif
13318 /* We use char because int might match the return type of a gcc2
13319    builtin and then its argument prototype would still apply.  */
13320 char gettimeofday ();
13321 int
13322 main ()
13323 {
13324 gettimeofday ();
13325   ;
13326   return 0;
13327 }
13328 _ACEOF
13329 rm -f conftest.$ac_objext conftest$ac_exeext
13330 if { (eval echo "$as_me:13330: \"$ac_link\"") >&5
13331   (eval $ac_link) 2>&5
13332   ac_status=$?
13333   echo "$as_me:13333: \$? = $ac_status" >&5
13334   (exit $ac_status); } &&
13335          { ac_try='test -s conftest$ac_exeext'
13336   { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337   (eval $ac_try) 2>&5
13338   ac_status=$?
13339   echo "$as_me:13339: \$? = $ac_status" >&5
13340   (exit $ac_status); }; }; then
13341   ac_cv_lib_bsd_gettimeofday=yes
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat conftest.$ac_ext >&5
13345 ac_cv_lib_bsd_gettimeofday=no
13346 fi
13347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13348 LIBS=$ac_check_lib_save_LIBS
13349 fi
13350 echo "$as_me:13350: result: $ac_cv_lib_bsd_gettimeofday" >&5
13351 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13352 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13353   cat >>confdefs.h <<\EOF
13354 #define HAVE_GETTIMEOFDAY 1
13355 EOF
13356
13357         LIBS="-lbsd $LIBS"
13358 fi
13359
13360 fi
13361         ;;
13362 esac
13363
13364 echo "$as_me:13364: checking if -lm needed for math functions" >&5
13365 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13366 if test "${cf_cv_need_libm+set}" = set; then
13367   echo $ECHO_N "(cached) $ECHO_C" >&6
13368 else
13369
13370         cat >conftest.$ac_ext <<_ACEOF
13371 #line 13371 "configure"
13372 #include "confdefs.h"
13373
13374         #include <stdio.h>
13375         #include <math.h>
13376
13377 int
13378 main ()
13379 {
13380 double x = rand(); printf("result = %g\n", sin(x))
13381   ;
13382   return 0;
13383 }
13384 _ACEOF
13385 rm -f conftest.$ac_objext conftest$ac_exeext
13386 if { (eval echo "$as_me:13386: \"$ac_link\"") >&5
13387   (eval $ac_link) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit $ac_status); } &&
13391          { ac_try='test -s conftest$ac_exeext'
13392   { (eval echo "$as_me:13392: \"$ac_try\"") >&5
13393   (eval $ac_try) 2>&5
13394   ac_status=$?
13395   echo "$as_me:13395: \$? = $ac_status" >&5
13396   (exit $ac_status); }; }; then
13397   cf_cv_need_libm=no
13398 else
13399   echo "$as_me: failed program was:" >&5
13400 cat conftest.$ac_ext >&5
13401 cf_cv_need_libm=yes
13402 fi
13403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13404 fi
13405 echo "$as_me:13405: result: $cf_cv_need_libm" >&5
13406 echo "${ECHO_T}$cf_cv_need_libm" >&6
13407 if test "$cf_cv_need_libm" = yes
13408 then
13409 MATH_LIB=-lm
13410 fi
13411
13412 ###     Checks for header files.
13413 echo "$as_me:13413: checking for ANSI C header files" >&5
13414 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13415 if test "${ac_cv_header_stdc+set}" = set; then
13416   echo $ECHO_N "(cached) $ECHO_C" >&6
13417 else
13418   cat >conftest.$ac_ext <<_ACEOF
13419 #line 13419 "configure"
13420 #include "confdefs.h"
13421 #include <stdlib.h>
13422 #include <stdarg.h>
13423 #include <string.h>
13424 #include <float.h>
13425
13426 _ACEOF
13427 if { (eval echo "$as_me:13427: \"$ac_cpp conftest.$ac_ext\"") >&5
13428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13429   ac_status=$?
13430   egrep -v '^ *\+' conftest.er1 >conftest.err
13431   rm -f conftest.er1
13432   cat conftest.err >&5
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit $ac_status); } >/dev/null; then
13435   if test -s conftest.err; then
13436     ac_cpp_err=$ac_c_preproc_warn_flag
13437   else
13438     ac_cpp_err=
13439   fi
13440 else
13441   ac_cpp_err=yes
13442 fi
13443 if test -z "$ac_cpp_err"; then
13444   ac_cv_header_stdc=yes
13445 else
13446   echo "$as_me: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   ac_cv_header_stdc=no
13449 fi
13450 rm -f conftest.err conftest.$ac_ext
13451
13452 if test $ac_cv_header_stdc = yes; then
13453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13454   cat >conftest.$ac_ext <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13457 #include <string.h>
13458
13459 _ACEOF
13460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13461   egrep "memchr" >/dev/null 2>&1; then
13462   :
13463 else
13464   ac_cv_header_stdc=no
13465 fi
13466 rm -rf conftest*
13467
13468 fi
13469
13470 if test $ac_cv_header_stdc = yes; then
13471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13472   cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475 #include <stdlib.h>
13476
13477 _ACEOF
13478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13479   egrep "free" >/dev/null 2>&1; then
13480   :
13481 else
13482   ac_cv_header_stdc=no
13483 fi
13484 rm -rf conftest*
13485
13486 fi
13487
13488 if test $ac_cv_header_stdc = yes; then
13489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13490   if test "$cross_compiling" = yes; then
13491   :
13492 else
13493   cat >conftest.$ac_ext <<_ACEOF
13494 #line 13494 "configure"
13495 #include "confdefs.h"
13496 #include <ctype.h>
13497 #if ((' ' & 0x0FF) == 0x020)
13498 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13499 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13500 #else
13501 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13502                      || ('j' <= (c) && (c) <= 'r') \
13503                      || ('s' <= (c) && (c) <= 'z'))
13504 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13505 #endif
13506
13507 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13508 int
13509 main ()
13510 {
13511   int i;
13512   for (i = 0; i < 256; i++)
13513     if (XOR (islower (i), ISLOWER (i))
13514         || toupper (i) != TOUPPER (i))
13515       $ac_main_return(2);
13516   $ac_main_return (0);
13517 }
13518 _ACEOF
13519 rm -f conftest$ac_exeext
13520 if { (eval echo "$as_me:13520: \"$ac_link\"") >&5
13521   (eval $ac_link) 2>&5
13522   ac_status=$?
13523   echo "$as_me:13523: \$? = $ac_status" >&5
13524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13525   { (eval echo "$as_me:13525: \"$ac_try\"") >&5
13526   (eval $ac_try) 2>&5
13527   ac_status=$?
13528   echo "$as_me:13528: \$? = $ac_status" >&5
13529   (exit $ac_status); }; }; then
13530   :
13531 else
13532   echo "$as_me: program exited with status $ac_status" >&5
13533 echo "$as_me: failed program was:" >&5
13534 cat conftest.$ac_ext >&5
13535 ac_cv_header_stdc=no
13536 fi
13537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13538 fi
13539 fi
13540 fi
13541 echo "$as_me:13541: result: $ac_cv_header_stdc" >&5
13542 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13543 if test $ac_cv_header_stdc = yes; then
13544
13545 cat >>confdefs.h <<\EOF
13546 #define STDC_HEADERS 1
13547 EOF
13548
13549 fi
13550
13551 ac_header_dirent=no
13552 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13553   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13554 echo "$as_me:13554: checking for $ac_hdr that defines DIR" >&5
13555 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13556 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13557   echo $ECHO_N "(cached) $ECHO_C" >&6
13558 else
13559   cat >conftest.$ac_ext <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562 #include <sys/types.h>
13563 #include <$ac_hdr>
13564
13565 int
13566 main ()
13567 {
13568 if ((DIR *) 0)
13569 return 0;
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext
13575 if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5
13576   (eval $ac_compile) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest.$ac_objext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   eval "$as_ac_Header=yes"
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 eval "$as_ac_Header=no"
13591 fi
13592 rm -f conftest.$ac_objext conftest.$ac_ext
13593 fi
13594 echo "$as_me:13594: result: `eval echo '${'$as_ac_Header'}'`" >&5
13595 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13596 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13597   cat >>confdefs.h <<EOF
13598 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13599 EOF
13600
13601 ac_header_dirent=$ac_hdr; break
13602 fi
13603
13604 done
13605 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13606 if test $ac_header_dirent = dirent.h; then
13607   echo "$as_me:13607: checking for opendir in -ldir" >&5
13608 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13609 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13610   echo $ECHO_N "(cached) $ECHO_C" >&6
13611 else
13612   ac_check_lib_save_LIBS=$LIBS
13613 LIBS="-ldir  $LIBS"
13614 cat >conftest.$ac_ext <<_ACEOF
13615 #line 13615 "configure"
13616 #include "confdefs.h"
13617
13618 /* Override any gcc2 internal prototype to avoid an error.  */
13619 #ifdef __cplusplus
13620 extern "C"
13621 #endif
13622 /* We use char because int might match the return type of a gcc2
13623    builtin and then its argument prototype would still apply.  */
13624 char opendir ();
13625 int
13626 main ()
13627 {
13628 opendir ();
13629   ;
13630   return 0;
13631 }
13632 _ACEOF
13633 rm -f conftest.$ac_objext conftest$ac_exeext
13634 if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
13635   (eval $ac_link) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -s conftest$ac_exeext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   ac_cv_lib_dir_opendir=yes
13646 else
13647   echo "$as_me: failed program was:" >&5
13648 cat conftest.$ac_ext >&5
13649 ac_cv_lib_dir_opendir=no
13650 fi
13651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13652 LIBS=$ac_check_lib_save_LIBS
13653 fi
13654 echo "$as_me:13654: result: $ac_cv_lib_dir_opendir" >&5
13655 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13656 if test $ac_cv_lib_dir_opendir = yes; then
13657   LIBS="$LIBS -ldir"
13658 fi
13659
13660 else
13661   echo "$as_me:13661: checking for opendir in -lx" >&5
13662 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13663 if test "${ac_cv_lib_x_opendir+set}" = set; then
13664   echo $ECHO_N "(cached) $ECHO_C" >&6
13665 else
13666   ac_check_lib_save_LIBS=$LIBS
13667 LIBS="-lx  $LIBS"
13668 cat >conftest.$ac_ext <<_ACEOF
13669 #line 13669 "configure"
13670 #include "confdefs.h"
13671
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 #ifdef __cplusplus
13674 extern "C"
13675 #endif
13676 /* We use char because int might match the return type of a gcc2
13677    builtin and then its argument prototype would still apply.  */
13678 char opendir ();
13679 int
13680 main ()
13681 {
13682 opendir ();
13683   ;
13684   return 0;
13685 }
13686 _ACEOF
13687 rm -f conftest.$ac_objext conftest$ac_exeext
13688 if { (eval echo "$as_me:13688: \"$ac_link\"") >&5
13689   (eval $ac_link) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit $ac_status); } &&
13693          { ac_try='test -s conftest$ac_exeext'
13694   { (eval echo "$as_me:13694: \"$ac_try\"") >&5
13695   (eval $ac_try) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit $ac_status); }; }; then
13699   ac_cv_lib_x_opendir=yes
13700 else
13701   echo "$as_me: failed program was:" >&5
13702 cat conftest.$ac_ext >&5
13703 ac_cv_lib_x_opendir=no
13704 fi
13705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13706 LIBS=$ac_check_lib_save_LIBS
13707 fi
13708 echo "$as_me:13708: result: $ac_cv_lib_x_opendir" >&5
13709 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13710 if test $ac_cv_lib_x_opendir = yes; then
13711   LIBS="$LIBS -lx"
13712 fi
13713
13714 fi
13715
13716 echo "$as_me:13716: checking whether time.h and sys/time.h may both be included" >&5
13717 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13718 if test "${ac_cv_header_time+set}" = set; then
13719   echo $ECHO_N "(cached) $ECHO_C" >&6
13720 else
13721   cat >conftest.$ac_ext <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13724 #include <sys/types.h>
13725 #include <sys/time.h>
13726 #include <time.h>
13727
13728 int
13729 main ()
13730 {
13731 if ((struct tm *) 0)
13732 return 0;
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext
13738 if { (eval echo "$as_me:13738: \"$ac_compile\"") >&5
13739   (eval $ac_compile) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); } &&
13743          { ac_try='test -s conftest.$ac_objext'
13744   { (eval echo "$as_me:13744: \"$ac_try\"") >&5
13745   (eval $ac_try) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); }; }; then
13749   ac_cv_header_time=yes
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 ac_cv_header_time=no
13754 fi
13755 rm -f conftest.$ac_objext conftest.$ac_ext
13756 fi
13757 echo "$as_me:13757: result: $ac_cv_header_time" >&5
13758 echo "${ECHO_T}$ac_cv_header_time" >&6
13759 if test $ac_cv_header_time = yes; then
13760
13761 cat >>confdefs.h <<\EOF
13762 #define TIME_WITH_SYS_TIME 1
13763 EOF
13764
13765 fi
13766
13767 cf_regex_func=no
13768
13769 cf_regex_libs="regex re"
13770 case $host_os in #(vi
13771 mingw*)
13772         cf_regex_libs="gnurx $cf_regex_libs"
13773         ;;
13774 esac
13775
13776 echo "$as_me:13776: checking for regcomp" >&5
13777 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13778 if test "${ac_cv_func_regcomp+set}" = set; then
13779   echo $ECHO_N "(cached) $ECHO_C" >&6
13780 else
13781   cat >conftest.$ac_ext <<_ACEOF
13782 #line 13782 "configure"
13783 #include "confdefs.h"
13784 /* System header to define __stub macros and hopefully few prototypes,
13785     which can conflict with char regcomp (); below.  */
13786 #include <assert.h>
13787 /* Override any gcc2 internal prototype to avoid an error.  */
13788 #ifdef __cplusplus
13789 extern "C"
13790 #endif
13791 /* We use char because int might match the return type of a gcc2
13792    builtin and then its argument prototype would still apply.  */
13793 char regcomp ();
13794 char (*f) ();
13795
13796 int
13797 main ()
13798 {
13799 /* The GNU C library defines this for functions which it implements
13800     to always fail with ENOSYS.  Some functions are actually named
13801     something starting with __ and the normal name is an alias.  */
13802 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13803 choke me
13804 #else
13805 f = regcomp;
13806 #endif
13807
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext conftest$ac_exeext
13813 if { (eval echo "$as_me:13813: \"$ac_link\"") >&5
13814   (eval $ac_link) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); } &&
13818          { ac_try='test -s conftest$ac_exeext'
13819   { (eval echo "$as_me:13819: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:13822: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   ac_cv_func_regcomp=yes
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 cat conftest.$ac_ext >&5
13828 ac_cv_func_regcomp=no
13829 fi
13830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13831 fi
13832 echo "$as_me:13832: result: $ac_cv_func_regcomp" >&5
13833 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13834 if test $ac_cv_func_regcomp = yes; then
13835   cf_regex_func=regcomp
13836 else
13837
13838         for cf_regex_lib in $cf_regex_libs
13839         do
13840                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13841 echo "$as_me:13841: checking for regcomp in -l$cf_regex_lib" >&5
13842 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13843 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13844   echo $ECHO_N "(cached) $ECHO_C" >&6
13845 else
13846   ac_check_lib_save_LIBS=$LIBS
13847 LIBS="-l$cf_regex_lib  $LIBS"
13848 cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851
13852 /* Override any gcc2 internal prototype to avoid an error.  */
13853 #ifdef __cplusplus
13854 extern "C"
13855 #endif
13856 /* We use char because int might match the return type of a gcc2
13857    builtin and then its argument prototype would still apply.  */
13858 char regcomp ();
13859 int
13860 main ()
13861 {
13862 regcomp ();
13863   ;
13864   return 0;
13865 }
13866 _ACEOF
13867 rm -f conftest.$ac_objext conftest$ac_exeext
13868 if { (eval echo "$as_me:13868: \"$ac_link\"") >&5
13869   (eval $ac_link) 2>&5
13870   ac_status=$?
13871   echo "$as_me:13871: \$? = $ac_status" >&5
13872   (exit $ac_status); } &&
13873          { ac_try='test -s conftest$ac_exeext'
13874   { (eval echo "$as_me:13874: \"$ac_try\"") >&5
13875   (eval $ac_try) 2>&5
13876   ac_status=$?
13877   echo "$as_me:13877: \$? = $ac_status" >&5
13878   (exit $ac_status); }; }; then
13879   eval "$as_ac_Lib=yes"
13880 else
13881   echo "$as_me: failed program was:" >&5
13882 cat conftest.$ac_ext >&5
13883 eval "$as_ac_Lib=no"
13884 fi
13885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13886 LIBS=$ac_check_lib_save_LIBS
13887 fi
13888 echo "$as_me:13888: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13889 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13890 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13891
13892                                 LIBS="-l$cf_regex_lib $LIBS"
13893                                 cf_regex_func=regcomp
13894                                 break
13895 fi
13896
13897         done
13898
13899 fi
13900
13901 if test "$cf_regex_func" = no ; then
13902         echo "$as_me:13902: checking for compile" >&5
13903 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13904 if test "${ac_cv_func_compile+set}" = set; then
13905   echo $ECHO_N "(cached) $ECHO_C" >&6
13906 else
13907   cat >conftest.$ac_ext <<_ACEOF
13908 #line 13908 "configure"
13909 #include "confdefs.h"
13910 /* System header to define __stub macros and hopefully few prototypes,
13911     which can conflict with char compile (); below.  */
13912 #include <assert.h>
13913 /* Override any gcc2 internal prototype to avoid an error.  */
13914 #ifdef __cplusplus
13915 extern "C"
13916 #endif
13917 /* We use char because int might match the return type of a gcc2
13918    builtin and then its argument prototype would still apply.  */
13919 char compile ();
13920 char (*f) ();
13921
13922 int
13923 main ()
13924 {
13925 /* The GNU C library defines this for functions which it implements
13926     to always fail with ENOSYS.  Some functions are actually named
13927     something starting with __ and the normal name is an alias.  */
13928 #if defined (__stub_compile) || defined (__stub___compile)
13929 choke me
13930 #else
13931 f = compile;
13932 #endif
13933
13934   ;
13935   return 0;
13936 }
13937 _ACEOF
13938 rm -f conftest.$ac_objext conftest$ac_exeext
13939 if { (eval echo "$as_me:13939: \"$ac_link\"") >&5
13940   (eval $ac_link) 2>&5
13941   ac_status=$?
13942   echo "$as_me:13942: \$? = $ac_status" >&5
13943   (exit $ac_status); } &&
13944          { ac_try='test -s conftest$ac_exeext'
13945   { (eval echo "$as_me:13945: \"$ac_try\"") >&5
13946   (eval $ac_try) 2>&5
13947   ac_status=$?
13948   echo "$as_me:13948: \$? = $ac_status" >&5
13949   (exit $ac_status); }; }; then
13950   ac_cv_func_compile=yes
13951 else
13952   echo "$as_me: failed program was:" >&5
13953 cat conftest.$ac_ext >&5
13954 ac_cv_func_compile=no
13955 fi
13956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13957 fi
13958 echo "$as_me:13958: result: $ac_cv_func_compile" >&5
13959 echo "${ECHO_T}$ac_cv_func_compile" >&6
13960 if test $ac_cv_func_compile = yes; then
13961   cf_regex_func=compile
13962 else
13963
13964                 echo "$as_me:13964: checking for compile in -lgen" >&5
13965 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13966 if test "${ac_cv_lib_gen_compile+set}" = set; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   ac_check_lib_save_LIBS=$LIBS
13970 LIBS="-lgen  $LIBS"
13971 cat >conftest.$ac_ext <<_ACEOF
13972 #line 13972 "configure"
13973 #include "confdefs.h"
13974
13975 /* Override any gcc2 internal prototype to avoid an error.  */
13976 #ifdef __cplusplus
13977 extern "C"
13978 #endif
13979 /* We use char because int might match the return type of a gcc2
13980    builtin and then its argument prototype would still apply.  */
13981 char compile ();
13982 int
13983 main ()
13984 {
13985 compile ();
13986   ;
13987   return 0;
13988 }
13989 _ACEOF
13990 rm -f conftest.$ac_objext conftest$ac_exeext
13991 if { (eval echo "$as_me:13991: \"$ac_link\"") >&5
13992   (eval $ac_link) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); } &&
13996          { ac_try='test -s conftest$ac_exeext'
13997   { (eval echo "$as_me:13997: \"$ac_try\"") >&5
13998   (eval $ac_try) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); }; }; then
14002   ac_cv_lib_gen_compile=yes
14003 else
14004   echo "$as_me: failed program was:" >&5
14005 cat conftest.$ac_ext >&5
14006 ac_cv_lib_gen_compile=no
14007 fi
14008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14009 LIBS=$ac_check_lib_save_LIBS
14010 fi
14011 echo "$as_me:14011: result: $ac_cv_lib_gen_compile" >&5
14012 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14013 if test $ac_cv_lib_gen_compile = yes; then
14014
14015                                 LIBS="-lgen $LIBS"
14016                                 cf_regex_func=compile
14017 fi
14018
14019 fi
14020
14021 fi
14022
14023 if test "$cf_regex_func" = no ; then
14024         { echo "$as_me:14024: WARNING: cannot find regular expression library" >&5
14025 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14026 fi
14027
14028 echo "$as_me:14028: checking for regular-expression headers" >&5
14029 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14030 if test "${cf_cv_regex_hdrs+set}" = set; then
14031   echo $ECHO_N "(cached) $ECHO_C" >&6
14032 else
14033
14034 cf_cv_regex_hdrs=no
14035 case $cf_regex_func in #(vi
14036 compile) #(vi
14037         for cf_regex_hdr in regexp.h regexpr.h
14038         do
14039                 cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042 #include <$cf_regex_hdr>
14043 int
14044 main ()
14045 {
14046
14047                         char *p = compile("", "", "", 0);
14048                         int x = step("", "");
14049
14050   ;
14051   return 0;
14052 }
14053 _ACEOF
14054 rm -f conftest.$ac_objext conftest$ac_exeext
14055 if { (eval echo "$as_me:14055: \"$ac_link\"") >&5
14056   (eval $ac_link) 2>&5
14057   ac_status=$?
14058   echo "$as_me:14058: \$? = $ac_status" >&5
14059   (exit $ac_status); } &&
14060          { ac_try='test -s conftest$ac_exeext'
14061   { (eval echo "$as_me:14061: \"$ac_try\"") >&5
14062   (eval $ac_try) 2>&5
14063   ac_status=$?
14064   echo "$as_me:14064: \$? = $ac_status" >&5
14065   (exit $ac_status); }; }; then
14066
14067                         cf_cv_regex_hdrs=$cf_regex_hdr
14068                         break
14069
14070 else
14071   echo "$as_me: failed program was:" >&5
14072 cat conftest.$ac_ext >&5
14073 fi
14074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14075         done
14076         ;;
14077 *)
14078         for cf_regex_hdr in regex.h
14079         do
14080                 cat >conftest.$ac_ext <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14083 #include <sys/types.h>
14084 #include <$cf_regex_hdr>
14085 int
14086 main ()
14087 {
14088
14089                         regex_t *p;
14090                         int x = regcomp(p, "", 0);
14091                         int y = regexec(p, "", 0, 0, 0);
14092                         regfree(p);
14093
14094   ;
14095   return 0;
14096 }
14097 _ACEOF
14098 rm -f conftest.$ac_objext conftest$ac_exeext
14099 if { (eval echo "$as_me:14099: \"$ac_link\"") >&5
14100   (eval $ac_link) 2>&5
14101   ac_status=$?
14102   echo "$as_me:14102: \$? = $ac_status" >&5
14103   (exit $ac_status); } &&
14104          { ac_try='test -s conftest$ac_exeext'
14105   { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106   (eval $ac_try) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit $ac_status); }; }; then
14110
14111                         cf_cv_regex_hdrs=$cf_regex_hdr
14112                         break
14113
14114 else
14115   echo "$as_me: failed program was:" >&5
14116 cat conftest.$ac_ext >&5
14117 fi
14118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14119         done
14120         ;;
14121 esac
14122
14123 fi
14124 echo "$as_me:14124: result: $cf_cv_regex_hdrs" >&5
14125 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14126
14127 case $cf_cv_regex_hdrs in #(vi
14128     no)        { echo "$as_me:14128: WARNING: no regular expression header found" >&5
14129 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14130     regex.h)   cat >>confdefs.h <<\EOF
14131 #define HAVE_REGEX_H_FUNCS 1
14132 EOF
14133  ;; #(vi
14134     regexp.h)  cat >>confdefs.h <<\EOF
14135 #define HAVE_REGEXP_H_FUNCS 1
14136 EOF
14137  ;; #(vi
14138     regexpr.h) cat >>confdefs.h <<\EOF
14139 #define HAVE_REGEXPR_H_FUNCS 1
14140 EOF
14141  ;;
14142 esac
14143
14144 for ac_header in \
14145 fcntl.h \
14146 getopt.h \
14147 limits.h \
14148 locale.h \
14149 math.h \
14150 poll.h \
14151 sys/bsdtypes.h \
14152 sys/ioctl.h \
14153 sys/param.h \
14154 sys/poll.h \
14155 sys/select.h \
14156 sys/time.h \
14157 sys/times.h \
14158 ttyent.h \
14159 unistd.h \
14160 wctype.h \
14161
14162 do
14163 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14164 echo "$as_me:14164: checking for $ac_header" >&5
14165 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14166 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14167   echo $ECHO_N "(cached) $ECHO_C" >&6
14168 else
14169   cat >conftest.$ac_ext <<_ACEOF
14170 #line 14170 "configure"
14171 #include "confdefs.h"
14172 #include <$ac_header>
14173 _ACEOF
14174 if { (eval echo "$as_me:14174: \"$ac_cpp conftest.$ac_ext\"") >&5
14175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14176   ac_status=$?
14177   egrep -v '^ *\+' conftest.er1 >conftest.err
14178   rm -f conftest.er1
14179   cat conftest.err >&5
14180   echo "$as_me:14180: \$? = $ac_status" >&5
14181   (exit $ac_status); } >/dev/null; then
14182   if test -s conftest.err; then
14183     ac_cpp_err=$ac_c_preproc_warn_flag
14184   else
14185     ac_cpp_err=
14186   fi
14187 else
14188   ac_cpp_err=yes
14189 fi
14190 if test -z "$ac_cpp_err"; then
14191   eval "$as_ac_Header=yes"
14192 else
14193   echo "$as_me: failed program was:" >&5
14194   cat conftest.$ac_ext >&5
14195   eval "$as_ac_Header=no"
14196 fi
14197 rm -f conftest.err conftest.$ac_ext
14198 fi
14199 echo "$as_me:14199: result: `eval echo '${'$as_ac_Header'}'`" >&5
14200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14202   cat >>confdefs.h <<EOF
14203 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14204 EOF
14205
14206 fi
14207 done
14208
14209 for ac_header in unistd.h getopt.h
14210 do
14211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14212 echo "$as_me:14212: checking for $ac_header" >&5
14213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220 #include <$ac_header>
14221 _ACEOF
14222 if { (eval echo "$as_me:14222: \"$ac_cpp conftest.$ac_ext\"") >&5
14223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14224   ac_status=$?
14225   egrep -v '^ *\+' conftest.er1 >conftest.err
14226   rm -f conftest.er1
14227   cat conftest.err >&5
14228   echo "$as_me:14228: \$? = $ac_status" >&5
14229   (exit $ac_status); } >/dev/null; then
14230   if test -s conftest.err; then
14231     ac_cpp_err=$ac_c_preproc_warn_flag
14232   else
14233     ac_cpp_err=
14234   fi
14235 else
14236   ac_cpp_err=yes
14237 fi
14238 if test -z "$ac_cpp_err"; then
14239   eval "$as_ac_Header=yes"
14240 else
14241   echo "$as_me: failed program was:" >&5
14242   cat conftest.$ac_ext >&5
14243   eval "$as_ac_Header=no"
14244 fi
14245 rm -f conftest.err conftest.$ac_ext
14246 fi
14247 echo "$as_me:14247: result: `eval echo '${'$as_ac_Header'}'`" >&5
14248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14250   cat >>confdefs.h <<EOF
14251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14252 EOF
14253
14254 fi
14255 done
14256
14257 echo "$as_me:14257: checking for header declaring getopt variables" >&5
14258 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14259 if test "${cf_cv_getopt_header+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262
14263 cf_cv_getopt_header=none
14264 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14265 do
14266 cat >conftest.$ac_ext <<_ACEOF
14267 #line 14267 "configure"
14268 #include "confdefs.h"
14269
14270 #include <$cf_header>
14271 int
14272 main ()
14273 {
14274 int x = optind; char *y = optarg
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_getopt_header=$cf_header
14292  break
14293 else
14294   echo "$as_me: failed program was:" >&5
14295 cat conftest.$ac_ext >&5
14296 fi
14297 rm -f conftest.$ac_objext conftest.$ac_ext
14298 done
14299
14300 fi
14301 echo "$as_me:14301: result: $cf_cv_getopt_header" >&5
14302 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14303 if test $cf_cv_getopt_header != none ; then
14304         cat >>confdefs.h <<\EOF
14305 #define HAVE_GETOPT_HEADER 1
14306 EOF
14307
14308 fi
14309
14310 # check for ISC (this may also define _POSIX_SOURCE)
14311 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14312 if test "$ISC" = yes ; then
14313
14314 echo "$as_me:14314: checking for main in -lcposix" >&5
14315 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14316 if test "${ac_cv_lib_cposix_main+set}" = set; then
14317   echo $ECHO_N "(cached) $ECHO_C" >&6
14318 else
14319   ac_check_lib_save_LIBS=$LIBS
14320 LIBS="-lcposix  $LIBS"
14321 cat >conftest.$ac_ext <<_ACEOF
14322 #line 14322 "configure"
14323 #include "confdefs.h"
14324
14325 int
14326 main ()
14327 {
14328 main ();
14329   ;
14330   return 0;
14331 }
14332 _ACEOF
14333 rm -f conftest.$ac_objext conftest$ac_exeext
14334 if { (eval echo "$as_me:14334: \"$ac_link\"") >&5
14335   (eval $ac_link) 2>&5
14336   ac_status=$?
14337   echo "$as_me:14337: \$? = $ac_status" >&5
14338   (exit $ac_status); } &&
14339          { ac_try='test -s conftest$ac_exeext'
14340   { (eval echo "$as_me:14340: \"$ac_try\"") >&5
14341   (eval $ac_try) 2>&5
14342   ac_status=$?
14343   echo "$as_me:14343: \$? = $ac_status" >&5
14344   (exit $ac_status); }; }; then
14345   ac_cv_lib_cposix_main=yes
14346 else
14347   echo "$as_me: failed program was:" >&5
14348 cat conftest.$ac_ext >&5
14349 ac_cv_lib_cposix_main=no
14350 fi
14351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14352 LIBS=$ac_check_lib_save_LIBS
14353 fi
14354 echo "$as_me:14354: result: $ac_cv_lib_cposix_main" >&5
14355 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14356 if test $ac_cv_lib_cposix_main = yes; then
14357   cat >>confdefs.h <<EOF
14358 #define HAVE_LIBCPOSIX 1
14359 EOF
14360
14361   LIBS="-lcposix $LIBS"
14362
14363 fi
14364
14365         echo "$as_me:14365: checking for bzero in -linet" >&5
14366 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14367 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14368   echo $ECHO_N "(cached) $ECHO_C" >&6
14369 else
14370   ac_check_lib_save_LIBS=$LIBS
14371 LIBS="-linet  $LIBS"
14372 cat >conftest.$ac_ext <<_ACEOF
14373 #line 14373 "configure"
14374 #include "confdefs.h"
14375
14376 /* Override any gcc2 internal prototype to avoid an error.  */
14377 #ifdef __cplusplus
14378 extern "C"
14379 #endif
14380 /* We use char because int might match the return type of a gcc2
14381    builtin and then its argument prototype would still apply.  */
14382 char bzero ();
14383 int
14384 main ()
14385 {
14386 bzero ();
14387   ;
14388   return 0;
14389 }
14390 _ACEOF
14391 rm -f conftest.$ac_objext conftest$ac_exeext
14392 if { (eval echo "$as_me:14392: \"$ac_link\"") >&5
14393   (eval $ac_link) 2>&5
14394   ac_status=$?
14395   echo "$as_me:14395: \$? = $ac_status" >&5
14396   (exit $ac_status); } &&
14397          { ac_try='test -s conftest$ac_exeext'
14398   { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399   (eval $ac_try) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); }; }; then
14403   ac_cv_lib_inet_bzero=yes
14404 else
14405   echo "$as_me: failed program was:" >&5
14406 cat conftest.$ac_ext >&5
14407 ac_cv_lib_inet_bzero=no
14408 fi
14409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14410 LIBS=$ac_check_lib_save_LIBS
14411 fi
14412 echo "$as_me:14412: result: $ac_cv_lib_inet_bzero" >&5
14413 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14414 if test $ac_cv_lib_inet_bzero = yes; then
14415   LIBS="-linet $LIBS"
14416 fi
14417 fi
14418
14419 echo "$as_me:14419: checking if sys/time.h works with sys/select.h" >&5
14420 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14421 if test "${cf_cv_sys_time_select+set}" = set; then
14422   echo $ECHO_N "(cached) $ECHO_C" >&6
14423 else
14424
14425 cat >conftest.$ac_ext <<_ACEOF
14426 #line 14426 "configure"
14427 #include "confdefs.h"
14428
14429 #include <sys/types.h>
14430 #ifdef HAVE_SYS_TIME_H
14431 #include <sys/time.h>
14432 #endif
14433 #ifdef HAVE_SYS_SELECT_H
14434 #include <sys/select.h>
14435 #endif
14436
14437 int
14438 main ()
14439 {
14440
14441   ;
14442   return 0;
14443 }
14444 _ACEOF
14445 rm -f conftest.$ac_objext
14446 if { (eval echo "$as_me:14446: \"$ac_compile\"") >&5
14447   (eval $ac_compile) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); } &&
14451          { ac_try='test -s conftest.$ac_objext'
14452   { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453   (eval $ac_try) 2>&5
14454   ac_status=$?
14455   echo "$as_me:14455: \$? = $ac_status" >&5
14456   (exit $ac_status); }; }; then
14457   cf_cv_sys_time_select=yes
14458 else
14459   echo "$as_me: failed program was:" >&5
14460 cat conftest.$ac_ext >&5
14461 cf_cv_sys_time_select=no
14462 fi
14463 rm -f conftest.$ac_objext conftest.$ac_ext
14464
14465 fi
14466
14467 echo "$as_me:14467: result: $cf_cv_sys_time_select" >&5
14468 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14469 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14470 #define HAVE_SYS_TIME_SELECT 1
14471 EOF
14472
14473 ###     checks for compiler characteristics
14474 ac_ext=c
14475 ac_cpp='$CPP $CPPFLAGS'
14476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14479 ac_main_return=return
14480
14481 echo "$as_me:14481: checking for $CC option to accept ANSI C" >&5
14482 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14483 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14484   echo $ECHO_N "(cached) $ECHO_C" >&6
14485 else
14486   ac_cv_prog_cc_stdc=no
14487 ac_save_CC=$CC
14488 cat >conftest.$ac_ext <<_ACEOF
14489 #line 14489 "configure"
14490 #include "confdefs.h"
14491 #include <stdarg.h>
14492 #include <stdio.h>
14493 #include <sys/types.h>
14494 #include <sys/stat.h>
14495 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14496 struct buf { int x; };
14497 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14498 static char *e (p, i)
14499      char **p;
14500      int i;
14501 {
14502   return p[i];
14503 }
14504 static char *f (char * (*g) (char **, int), char **p, ...)
14505 {
14506   char *s;
14507   va_list v;
14508   va_start (v,p);
14509   s = g (p, va_arg (v,int));
14510   va_end (v);
14511   return s;
14512 }
14513 int test (int i, double x);
14514 struct s1 {int (*f) (int a);};
14515 struct s2 {int (*f) (double a);};
14516 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14517 int argc;
14518 char **argv;
14519 int
14520 main ()
14521 {
14522 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14523   ;
14524   return 0;
14525 }
14526 _ACEOF
14527 # Don't try gcc -ansi; that turns off useful extensions and
14528 # breaks some systems' header files.
14529 # AIX                   -qlanglvl=ansi
14530 # Ultrix and OSF/1      -std1
14531 # HP-UX 10.20 and later -Ae
14532 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14533 # SVR4                  -Xc -D__EXTENSIONS__
14534 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14535 do
14536   CC="$ac_save_CC $ac_arg"
14537   rm -f conftest.$ac_objext
14538 if { (eval echo "$as_me:14538: \"$ac_compile\"") >&5
14539   (eval $ac_compile) 2>&5
14540   ac_status=$?
14541   echo "$as_me:14541: \$? = $ac_status" >&5
14542   (exit $ac_status); } &&
14543          { ac_try='test -s conftest.$ac_objext'
14544   { (eval echo "$as_me:14544: \"$ac_try\"") >&5
14545   (eval $ac_try) 2>&5
14546   ac_status=$?
14547   echo "$as_me:14547: \$? = $ac_status" >&5
14548   (exit $ac_status); }; }; then
14549   ac_cv_prog_cc_stdc=$ac_arg
14550 break
14551 else
14552   echo "$as_me: failed program was:" >&5
14553 cat conftest.$ac_ext >&5
14554 fi
14555 rm -f conftest.$ac_objext
14556 done
14557 rm -f conftest.$ac_ext conftest.$ac_objext
14558 CC=$ac_save_CC
14559
14560 fi
14561
14562 case "x$ac_cv_prog_cc_stdc" in
14563   x|xno)
14564     echo "$as_me:14564: result: none needed" >&5
14565 echo "${ECHO_T}none needed" >&6 ;;
14566   *)
14567     echo "$as_me:14567: result: $ac_cv_prog_cc_stdc" >&5
14568 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14569     CC="$CC $ac_cv_prog_cc_stdc" ;;
14570 esac
14571
14572 echo "$as_me:14572: checking for an ANSI C-conforming const" >&5
14573 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14574 if test "${ac_cv_c_const+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580
14581 int
14582 main ()
14583 {
14584 /* FIXME: Include the comments suggested by Paul. */
14585 #ifndef __cplusplus
14586   /* Ultrix mips cc rejects this.  */
14587   typedef int charset[2];
14588   const charset x;
14589   /* SunOS 4.1.1 cc rejects this.  */
14590   char const *const *ccp;
14591   char **p;
14592   /* NEC SVR4.0.2 mips cc rejects this.  */
14593   struct point {int x, y;};
14594   static struct point const zero = {0,0};
14595   /* AIX XL C 1.02.0.0 rejects this.
14596      It does not let you subtract one const X* pointer from another in
14597      an arm of an if-expression whose if-part is not a constant
14598      expression */
14599   const char *g = "string";
14600   ccp = &g + (g ? g-g : 0);
14601   /* HPUX 7.0 cc rejects these. */
14602   ++ccp;
14603   p = (char**) ccp;
14604   ccp = (char const *const *) p;
14605   { /* SCO 3.2v4 cc rejects this.  */
14606     char *t;
14607     char const *s = 0 ? (char *) 0 : (char const *) 0;
14608
14609     *t++ = 0;
14610   }
14611   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14612     int x[] = {25, 17};
14613     const int *foo = &x[0];
14614     ++foo;
14615   }
14616   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14617     typedef const int *iptr;
14618     iptr p = 0;
14619     ++p;
14620   }
14621   { /* AIX XL C 1.02.0.0 rejects this saying
14622        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14623     struct s { int j; const int *ap[3]; };
14624     struct s *b; b->j = 5;
14625   }
14626   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14627     const int foo = 10;
14628   }
14629 #endif
14630
14631   ;
14632   return 0;
14633 }
14634 _ACEOF
14635 rm -f conftest.$ac_objext
14636 if { (eval echo "$as_me:14636: \"$ac_compile\"") >&5
14637   (eval $ac_compile) 2>&5
14638   ac_status=$?
14639   echo "$as_me:14639: \$? = $ac_status" >&5
14640   (exit $ac_status); } &&
14641          { ac_try='test -s conftest.$ac_objext'
14642   { (eval echo "$as_me:14642: \"$ac_try\"") >&5
14643   (eval $ac_try) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); }; }; then
14647   ac_cv_c_const=yes
14648 else
14649   echo "$as_me: failed program was:" >&5
14650 cat conftest.$ac_ext >&5
14651 ac_cv_c_const=no
14652 fi
14653 rm -f conftest.$ac_objext conftest.$ac_ext
14654 fi
14655 echo "$as_me:14655: result: $ac_cv_c_const" >&5
14656 echo "${ECHO_T}$ac_cv_c_const" >&6
14657 if test $ac_cv_c_const = no; then
14658
14659 cat >>confdefs.h <<\EOF
14660 #define const
14661 EOF
14662
14663 fi
14664
14665 echo "$as_me:14665: checking for inline" >&5
14666 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14667 if test "${ac_cv_c_inline+set}" = set; then
14668   echo $ECHO_N "(cached) $ECHO_C" >&6
14669 else
14670   ac_cv_c_inline=no
14671 for ac_kw in inline __inline__ __inline; do
14672   cat >conftest.$ac_ext <<_ACEOF
14673 #line 14673 "configure"
14674 #include "confdefs.h"
14675 #ifndef __cplusplus
14676 static $ac_kw int static_foo () {return 0; }
14677 $ac_kw int foo () {return 0; }
14678 #endif
14679
14680 _ACEOF
14681 rm -f conftest.$ac_objext
14682 if { (eval echo "$as_me:14682: \"$ac_compile\"") >&5
14683   (eval $ac_compile) 2>&5
14684   ac_status=$?
14685   echo "$as_me:14685: \$? = $ac_status" >&5
14686   (exit $ac_status); } &&
14687          { ac_try='test -s conftest.$ac_objext'
14688   { (eval echo "$as_me:14688: \"$ac_try\"") >&5
14689   (eval $ac_try) 2>&5
14690   ac_status=$?
14691   echo "$as_me:14691: \$? = $ac_status" >&5
14692   (exit $ac_status); }; }; then
14693   ac_cv_c_inline=$ac_kw; break
14694 else
14695   echo "$as_me: failed program was:" >&5
14696 cat conftest.$ac_ext >&5
14697 fi
14698 rm -f conftest.$ac_objext conftest.$ac_ext
14699 done
14700
14701 fi
14702 echo "$as_me:14702: result: $ac_cv_c_inline" >&5
14703 echo "${ECHO_T}$ac_cv_c_inline" >&6
14704 case $ac_cv_c_inline in
14705   inline | yes) ;;
14706   no)
14707 cat >>confdefs.h <<\EOF
14708 #define inline
14709 EOF
14710  ;;
14711   *)  cat >>confdefs.h <<EOF
14712 #define inline $ac_cv_c_inline
14713 EOF
14714  ;;
14715 esac
14716
14717 NCURSES_INLINE=
14718 if test "$ac_cv_c_inline" != no ; then
14719   NCURSES_INLINE=inline
14720   if test "$INTEL_COMPILER" = yes
14721   then
14722     :
14723   elif test "$GCC" = yes
14724   then
14725     echo "$as_me:14725: checking if $CC supports options to tune inlining" >&5
14726 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14727 if test "${cf_cv_gcc_inline+set}" = set; then
14728   echo $ECHO_N "(cached) $ECHO_C" >&6
14729 else
14730
14731       cf_save_CFLAGS=$CFLAGS
14732       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14733       cat >conftest.$ac_ext <<_ACEOF
14734 #line 14734 "configure"
14735 #include "confdefs.h"
14736 inline int foo(void) { return 1; }
14737 int
14738 main ()
14739 {
14740 ${cf_cv_main_return:-return} foo()
14741   ;
14742   return 0;
14743 }
14744 _ACEOF
14745 rm -f conftest.$ac_objext
14746 if { (eval echo "$as_me:14746: \"$ac_compile\"") >&5
14747   (eval $ac_compile) 2>&5
14748   ac_status=$?
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit $ac_status); } &&
14751          { ac_try='test -s conftest.$ac_objext'
14752   { (eval echo "$as_me:14752: \"$ac_try\"") >&5
14753   (eval $ac_try) 2>&5
14754   ac_status=$?
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit $ac_status); }; }; then
14757   cf_cv_gcc_inline=yes
14758 else
14759   echo "$as_me: failed program was:" >&5
14760 cat conftest.$ac_ext >&5
14761 cf_cv_gcc_inline=no
14762 fi
14763 rm -f conftest.$ac_objext conftest.$ac_ext
14764       CFLAGS=$cf_save_CFLAGS
14765
14766 fi
14767 echo "$as_me:14767: result: $cf_cv_gcc_inline" >&5
14768 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14769     if test "$cf_cv_gcc_inline" = yes ; then
14770
14771 cf_fix_cppflags=no
14772 cf_new_cflags=
14773 cf_new_cppflags=
14774 cf_new_extra_cppflags=
14775
14776 for cf_add_cflags in --param max-inline-insns-single=1200
14777 do
14778 case $cf_fix_cppflags in
14779 no)
14780         case $cf_add_cflags in #(vi
14781         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14782                 case $cf_add_cflags in
14783                 -D*)
14784                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14785
14786                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14787                                 && test -z "${cf_tst_cflags}" \
14788                                 && cf_fix_cppflags=yes
14789
14790                         if test $cf_fix_cppflags = yes ; then
14791                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14792                                 continue
14793                         elif test "${cf_tst_cflags}" = "\"'" ; then
14794                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14795                                 continue
14796                         fi
14797                         ;;
14798                 esac
14799                 case "$CPPFLAGS" in
14800                 *$cf_add_cflags) #(vi
14801                         ;;
14802                 *) #(vi
14803                         case $cf_add_cflags in #(vi
14804                         -D*)
14805                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14806
14807 CPPFLAGS=`echo "$CPPFLAGS" | \
14808         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14809                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14810
14811                                 ;;
14812                         esac
14813                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14814                         ;;
14815                 esac
14816                 ;;
14817         *)
14818                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14819                 ;;
14820         esac
14821         ;;
14822 yes)
14823         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14824
14825         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14826
14827         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14828                 && test -z "${cf_tst_cflags}" \
14829                 && cf_fix_cppflags=no
14830         ;;
14831 esac
14832 done
14833
14834 if test -n "$cf_new_cflags" ; then
14835
14836         CFLAGS="$CFLAGS $cf_new_cflags"
14837 fi
14838
14839 if test -n "$cf_new_cppflags" ; then
14840
14841         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14842 fi
14843
14844 if test -n "$cf_new_extra_cppflags" ; then
14845
14846         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14847 fi
14848
14849     fi
14850   fi
14851 fi
14852
14853 echo "$as_me:14853: checking for signal global datatype" >&5
14854 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14855 if test "${cf_cv_sig_atomic_t+set}" = set; then
14856   echo $ECHO_N "(cached) $ECHO_C" >&6
14857 else
14858
14859         for cf_type in \
14860                 "volatile sig_atomic_t" \
14861                 "sig_atomic_t" \
14862                 "int"
14863         do
14864         cat >conftest.$ac_ext <<_ACEOF
14865 #line 14865 "configure"
14866 #include "confdefs.h"
14867
14868 #include <sys/types.h>
14869 #include <signal.h>
14870 #include <stdio.h>
14871
14872 extern $cf_type x;
14873 $cf_type x;
14874 static void handler(int sig)
14875 {
14876         x = 5;
14877 }
14878 int
14879 main ()
14880 {
14881 signal(SIGINT, handler);
14882                  x = 1
14883   ;
14884   return 0;
14885 }
14886 _ACEOF
14887 rm -f conftest.$ac_objext
14888 if { (eval echo "$as_me:14888: \"$ac_compile\"") >&5
14889   (eval $ac_compile) 2>&5
14890   ac_status=$?
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); } &&
14893          { ac_try='test -s conftest.$ac_objext'
14894   { (eval echo "$as_me:14894: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:14897: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }; then
14899   cf_cv_sig_atomic_t=$cf_type
14900 else
14901   echo "$as_me: failed program was:" >&5
14902 cat conftest.$ac_ext >&5
14903 cf_cv_sig_atomic_t=no
14904 fi
14905 rm -f conftest.$ac_objext conftest.$ac_ext
14906                 test "$cf_cv_sig_atomic_t" != no && break
14907         done
14908
14909 fi
14910
14911 echo "$as_me:14911: result: $cf_cv_sig_atomic_t" >&5
14912 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14913 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14914 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14915 EOF
14916
14917 if test $NCURSES_CHTYPE = auto ; then
14918
14919 echo "$as_me:14919: checking for type of chtype" >&5
14920 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14921 if test "${cf_cv_typeof_chtype+set}" = set; then
14922   echo $ECHO_N "(cached) $ECHO_C" >&6
14923 else
14924
14925                 if test "$cross_compiling" = yes; then
14926   cf_cv_typeof_chtype=long
14927 else
14928   cat >conftest.$ac_ext <<_ACEOF
14929 #line 14929 "configure"
14930 #include "confdefs.h"
14931
14932 #define WANT_BITS 31
14933 #include <stdio.h>
14934 int main()
14935 {
14936         FILE *fp = fopen("cf_test.out", "w");
14937         if (fp != 0) {
14938                 char *result = "long";
14939                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14940                         int n;
14941                         unsigned int x, y;
14942                         for (n = 0; n < WANT_BITS; n++) {
14943                                 x = (1 << n);
14944                                 y = (x >> n);
14945                                 if (y != 1 || x == 0) {
14946                                         x = 0;
14947                                         break;
14948                                 }
14949                         }
14950                         /*
14951                          * If x is nonzero, an int is big enough for the bits
14952                          * that we want.
14953                          */
14954                         result = (x != 0) ? "int" : "long";
14955                 }
14956                 fputs(result, fp);
14957                 fclose(fp);
14958         }
14959         ${cf_cv_main_return:-return}(0);
14960 }
14961
14962 _ACEOF
14963 rm -f conftest$ac_exeext
14964 if { (eval echo "$as_me:14964: \"$ac_link\"") >&5
14965   (eval $ac_link) 2>&5
14966   ac_status=$?
14967   echo "$as_me:14967: \$? = $ac_status" >&5
14968   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14969   { (eval echo "$as_me:14969: \"$ac_try\"") >&5
14970   (eval $ac_try) 2>&5
14971   ac_status=$?
14972   echo "$as_me:14972: \$? = $ac_status" >&5
14973   (exit $ac_status); }; }; then
14974   cf_cv_typeof_chtype=`cat cf_test.out`
14975 else
14976   echo "$as_me: program exited with status $ac_status" >&5
14977 echo "$as_me: failed program was:" >&5
14978 cat conftest.$ac_ext >&5
14979 cf_cv_typeof_chtype=long
14980 fi
14981 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14982 fi
14983                 rm -f cf_test.out
14984
14985 fi
14986
14987 echo "$as_me:14987: result: $cf_cv_typeof_chtype" >&5
14988 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14989
14990 cat >>confdefs.h <<EOF
14991 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14992 EOF
14993
14994 else
14995         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14996 fi
14997 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14998
14999 echo "$as_me:14999: checking if unsigned literals are legal" >&5
15000 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15001 if test "${cf_cv_unsigned_literals+set}" = set; then
15002   echo $ECHO_N "(cached) $ECHO_C" >&6
15003 else
15004
15005         cat >conftest.$ac_ext <<_ACEOF
15006 #line 15006 "configure"
15007 #include "confdefs.h"
15008
15009 int
15010 main ()
15011 {
15012 long x = 1L + 1UL + 1U + 1
15013   ;
15014   return 0;
15015 }
15016 _ACEOF
15017 rm -f conftest.$ac_objext
15018 if { (eval echo "$as_me:15018: \"$ac_compile\"") >&5
15019   (eval $ac_compile) 2>&5
15020   ac_status=$?
15021   echo "$as_me:15021: \$? = $ac_status" >&5
15022   (exit $ac_status); } &&
15023          { ac_try='test -s conftest.$ac_objext'
15024   { (eval echo "$as_me:15024: \"$ac_try\"") >&5
15025   (eval $ac_try) 2>&5
15026   ac_status=$?
15027   echo "$as_me:15027: \$? = $ac_status" >&5
15028   (exit $ac_status); }; }; then
15029   cf_cv_unsigned_literals=yes
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 cat conftest.$ac_ext >&5
15033 cf_cv_unsigned_literals=no
15034 fi
15035 rm -f conftest.$ac_objext conftest.$ac_ext
15036
15037 fi
15038
15039 echo "$as_me:15039: result: $cf_cv_unsigned_literals" >&5
15040 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15041
15042 cf_cv_1UL="1"
15043 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15044 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15045
15046 if test $NCURSES_MMASK_T = auto ; then
15047         cf_cv_typeof_mmask_t=long
15048 else
15049         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15050 fi
15051 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15052
15053 ###     Checks for external-data
15054
15055 echo "$as_me:15055: checking if external errno is declared" >&5
15056 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15057 if test "${cf_cv_dcl_errno+set}" = set; then
15058   echo $ECHO_N "(cached) $ECHO_C" >&6
15059 else
15060
15061     cat >conftest.$ac_ext <<_ACEOF
15062 #line 15062 "configure"
15063 #include "confdefs.h"
15064
15065 #ifdef HAVE_STDLIB_H
15066 #include <stdlib.h>
15067 #endif
15068 #include <stdio.h>
15069 #include <sys/types.h>
15070 #include <errno.h>
15071 int
15072 main ()
15073 {
15074 int x = (int) errno
15075   ;
15076   return 0;
15077 }
15078 _ACEOF
15079 rm -f conftest.$ac_objext
15080 if { (eval echo "$as_me:15080: \"$ac_compile\"") >&5
15081   (eval $ac_compile) 2>&5
15082   ac_status=$?
15083   echo "$as_me:15083: \$? = $ac_status" >&5
15084   (exit $ac_status); } &&
15085          { ac_try='test -s conftest.$ac_objext'
15086   { (eval echo "$as_me:15086: \"$ac_try\"") >&5
15087   (eval $ac_try) 2>&5
15088   ac_status=$?
15089   echo "$as_me:15089: \$? = $ac_status" >&5
15090   (exit $ac_status); }; }; then
15091   cf_cv_dcl_errno=yes
15092 else
15093   echo "$as_me: failed program was:" >&5
15094 cat conftest.$ac_ext >&5
15095 cf_cv_dcl_errno=no
15096 fi
15097 rm -f conftest.$ac_objext conftest.$ac_ext
15098
15099 fi
15100 echo "$as_me:15100: result: $cf_cv_dcl_errno" >&5
15101 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15102
15103 if test "$cf_cv_dcl_errno" = no ; then
15104
15105 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15106
15107     cat >>confdefs.h <<EOF
15108 #define $cf_result 1
15109 EOF
15110
15111 fi
15112
15113 # It's possible (for near-UNIX clones) that the data doesn't exist
15114
15115 echo "$as_me:15115: checking if external errno exists" >&5
15116 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15117 if test "${cf_cv_have_errno+set}" = set; then
15118   echo $ECHO_N "(cached) $ECHO_C" >&6
15119 else
15120
15121     cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124
15125 #undef errno
15126 extern int errno;
15127
15128 int
15129 main ()
15130 {
15131 errno = 2
15132   ;
15133   return 0;
15134 }
15135 _ACEOF
15136 rm -f conftest.$ac_objext conftest$ac_exeext
15137 if { (eval echo "$as_me:15137: \"$ac_link\"") >&5
15138   (eval $ac_link) 2>&5
15139   ac_status=$?
15140   echo "$as_me:15140: \$? = $ac_status" >&5
15141   (exit $ac_status); } &&
15142          { ac_try='test -s conftest$ac_exeext'
15143   { (eval echo "$as_me:15143: \"$ac_try\"") >&5
15144   (eval $ac_try) 2>&5
15145   ac_status=$?
15146   echo "$as_me:15146: \$? = $ac_status" >&5
15147   (exit $ac_status); }; }; then
15148   cf_cv_have_errno=yes
15149 else
15150   echo "$as_me: failed program was:" >&5
15151 cat conftest.$ac_ext >&5
15152 cf_cv_have_errno=no
15153 fi
15154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15155
15156 fi
15157 echo "$as_me:15157: result: $cf_cv_have_errno" >&5
15158 echo "${ECHO_T}$cf_cv_have_errno" >&6
15159
15160 if test "$cf_cv_have_errno" = yes ; then
15161
15162 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15163
15164     cat >>confdefs.h <<EOF
15165 #define $cf_result 1
15166 EOF
15167
15168 fi
15169
15170 echo "$as_me:15170: checking if data-only library module links" >&5
15171 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15172 if test "${cf_cv_link_dataonly+set}" = set; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175
15176         rm -f conftest.a
15177         cat >conftest.$ac_ext <<EOF
15178 #line 15178 "configure"
15179 int     testdata[3] = { 123, 456, 789 };
15180 EOF
15181         if { (eval echo "$as_me:15181: \"$ac_compile\"") >&5
15182   (eval $ac_compile) 2>&5
15183   ac_status=$?
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } ; then
15186                 mv conftest.o data.o && \
15187                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15188         fi
15189         rm -f conftest.$ac_ext data.o
15190         cat >conftest.$ac_ext <<EOF
15191 #line 15191 "configure"
15192 int     testfunc()
15193 {
15194 #if defined(NeXT)
15195         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15196 #else
15197         extern int testdata[3];
15198         return testdata[0] == 123
15199            &&  testdata[1] == 456
15200            &&  testdata[2] == 789;
15201 #endif
15202 }
15203 EOF
15204         if { (eval echo "$as_me:15204: \"$ac_compile\"") >&5
15205   (eval $ac_compile) 2>&5
15206   ac_status=$?
15207   echo "$as_me:15207: \$? = $ac_status" >&5
15208   (exit $ac_status); }; then
15209                 mv conftest.o func.o && \
15210                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15211         fi
15212         rm -f conftest.$ac_ext func.o
15213         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15214         cf_saveLIBS="$LIBS"
15215         LIBS="conftest.a $LIBS"
15216         if test "$cross_compiling" = yes; then
15217   cf_cv_link_dataonly=unknown
15218 else
15219   cat >conftest.$ac_ext <<_ACEOF
15220 #line 15220 "configure"
15221 #include "confdefs.h"
15222
15223         int main()
15224         {
15225                 extern int testfunc();
15226                 ${cf_cv_main_return:-return} (!testfunc());
15227         }
15228
15229 _ACEOF
15230 rm -f conftest$ac_exeext
15231 if { (eval echo "$as_me:15231: \"$ac_link\"") >&5
15232   (eval $ac_link) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15236   { (eval echo "$as_me:15236: \"$ac_try\"") >&5
15237   (eval $ac_try) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit $ac_status); }; }; then
15241   cf_cv_link_dataonly=yes
15242 else
15243   echo "$as_me: program exited with status $ac_status" >&5
15244 echo "$as_me: failed program was:" >&5
15245 cat conftest.$ac_ext >&5
15246 cf_cv_link_dataonly=no
15247 fi
15248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15249 fi
15250         LIBS="$cf_saveLIBS"
15251
15252 fi
15253
15254 echo "$as_me:15254: result: $cf_cv_link_dataonly" >&5
15255 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15256
15257 if test "$cf_cv_link_dataonly" = no ; then
15258         cat >>confdefs.h <<\EOF
15259 #define BROKEN_LINKER 1
15260 EOF
15261
15262         BROKEN_LINKER=1
15263 fi
15264
15265 ###     Checks for library functions.
15266
15267 for ac_func in \
15268 getcwd \
15269 getegid \
15270 geteuid \
15271 getttynam \
15272 issetugid \
15273 poll \
15274 remove \
15275 select \
15276 setbuf \
15277 setbuffer \
15278 setvbuf \
15279 sigaction \
15280 sigvec \
15281 strdup \
15282 strstr \
15283 tcgetpgrp \
15284 times \
15285 vsnprintf \
15286
15287 do
15288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15289 echo "$as_me:15289: checking for $ac_func" >&5
15290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15291 if eval "test \"\${$as_ac_var+set}\" = set"; then
15292   echo $ECHO_N "(cached) $ECHO_C" >&6
15293 else
15294   cat >conftest.$ac_ext <<_ACEOF
15295 #line 15295 "configure"
15296 #include "confdefs.h"
15297 /* System header to define __stub macros and hopefully few prototypes,
15298     which can conflict with char $ac_func (); below.  */
15299 #include <assert.h>
15300 /* Override any gcc2 internal prototype to avoid an error.  */
15301 #ifdef __cplusplus
15302 extern "C"
15303 #endif
15304 /* We use char because int might match the return type of a gcc2
15305    builtin and then its argument prototype would still apply.  */
15306 char $ac_func ();
15307 char (*f) ();
15308
15309 int
15310 main ()
15311 {
15312 /* The GNU C library defines this for functions which it implements
15313     to always fail with ENOSYS.  Some functions are actually named
15314     something starting with __ and the normal name is an alias.  */
15315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15316 choke me
15317 #else
15318 f = $ac_func;
15319 #endif
15320
15321   ;
15322   return 0;
15323 }
15324 _ACEOF
15325 rm -f conftest.$ac_objext conftest$ac_exeext
15326 if { (eval echo "$as_me:15326: \"$ac_link\"") >&5
15327   (eval $ac_link) 2>&5
15328   ac_status=$?
15329   echo "$as_me:15329: \$? = $ac_status" >&5
15330   (exit $ac_status); } &&
15331          { ac_try='test -s conftest$ac_exeext'
15332   { (eval echo "$as_me:15332: \"$ac_try\"") >&5
15333   (eval $ac_try) 2>&5
15334   ac_status=$?
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit $ac_status); }; }; then
15337   eval "$as_ac_var=yes"
15338 else
15339   echo "$as_me: failed program was:" >&5
15340 cat conftest.$ac_ext >&5
15341 eval "$as_ac_var=no"
15342 fi
15343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15344 fi
15345 echo "$as_me:15345: result: `eval echo '${'$as_ac_var'}'`" >&5
15346 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15347 if test `eval echo '${'$as_ac_var'}'` = yes; then
15348   cat >>confdefs.h <<EOF
15349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15350 EOF
15351
15352 fi
15353 done
15354
15355 if test "$with_getcap" = "yes" ; then
15356
15357 echo "$as_me:15357: checking for terminal-capability database functions" >&5
15358 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15359 if test "${cf_cv_cgetent+set}" = set; then
15360   echo $ECHO_N "(cached) $ECHO_C" >&6
15361 else
15362
15363 cat >conftest.$ac_ext <<_ACEOF
15364 #line 15364 "configure"
15365 #include "confdefs.h"
15366
15367 #include <stdlib.h>
15368 int
15369 main ()
15370 {
15371
15372         char temp[128];
15373         char *buf = temp;
15374         char *db_array = temp;
15375         cgetent(&buf, &db_array, "vt100");
15376         cgetcap(buf, "tc", '=');
15377         cgetmatch(buf, "tc");
15378
15379   ;
15380   return 0;
15381 }
15382 _ACEOF
15383 rm -f conftest.$ac_objext conftest$ac_exeext
15384 if { (eval echo "$as_me:15384: \"$ac_link\"") >&5
15385   (eval $ac_link) 2>&5
15386   ac_status=$?
15387   echo "$as_me:15387: \$? = $ac_status" >&5
15388   (exit $ac_status); } &&
15389          { ac_try='test -s conftest$ac_exeext'
15390   { (eval echo "$as_me:15390: \"$ac_try\"") >&5
15391   (eval $ac_try) 2>&5
15392   ac_status=$?
15393   echo "$as_me:15393: \$? = $ac_status" >&5
15394   (exit $ac_status); }; }; then
15395   cf_cv_cgetent=yes
15396 else
15397   echo "$as_me: failed program was:" >&5
15398 cat conftest.$ac_ext >&5
15399 cf_cv_cgetent=no
15400 fi
15401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15402
15403 fi
15404 echo "$as_me:15404: result: $cf_cv_cgetent" >&5
15405 echo "${ECHO_T}$cf_cv_cgetent" >&6
15406
15407 if test "$cf_cv_cgetent" = yes
15408 then
15409         cat >>confdefs.h <<\EOF
15410 #define HAVE_BSD_CGETENT 1
15411 EOF
15412
15413 echo "$as_me:15413: checking if cgetent uses const parameter" >&5
15414 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15415 if test "${cf_cv_cgetent_const+set}" = set; then
15416   echo $ECHO_N "(cached) $ECHO_C" >&6
15417 else
15418
15419 cat >conftest.$ac_ext <<_ACEOF
15420 #line 15420 "configure"
15421 #include "confdefs.h"
15422
15423 #include <stdlib.h>
15424 int
15425 main ()
15426 {
15427
15428         char temp[128];
15429         char *buf = temp;
15430 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15431         const char *db_array = temp;
15432         cgetent(&buf, &db_array, "vt100");
15433 #endif
15434         cgetcap(buf, "tc", '=');
15435         cgetmatch(buf, "tc");
15436
15437   ;
15438   return 0;
15439 }
15440 _ACEOF
15441 rm -f conftest.$ac_objext conftest$ac_exeext
15442 if { (eval echo "$as_me:15442: \"$ac_link\"") >&5
15443   (eval $ac_link) 2>&5
15444   ac_status=$?
15445   echo "$as_me:15445: \$? = $ac_status" >&5
15446   (exit $ac_status); } &&
15447          { ac_try='test -s conftest$ac_exeext'
15448   { (eval echo "$as_me:15448: \"$ac_try\"") >&5
15449   (eval $ac_try) 2>&5
15450   ac_status=$?
15451   echo "$as_me:15451: \$? = $ac_status" >&5
15452   (exit $ac_status); }; }; then
15453   cf_cv_cgetent_const=yes
15454 else
15455   echo "$as_me: failed program was:" >&5
15456 cat conftest.$ac_ext >&5
15457 cf_cv_cgetent_const=no
15458 fi
15459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15460
15461 fi
15462 echo "$as_me:15462: result: $cf_cv_cgetent_const" >&5
15463 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15464         if test "$cf_cv_cgetent_const" = yes
15465         then
15466                 cat >>confdefs.h <<EOF
15467 #define CGETENT_CONST const
15468 EOF
15469
15470         fi
15471 fi
15472
15473 fi
15474
15475 echo "$as_me:15475: checking for isascii" >&5
15476 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15477 if test "${cf_cv_have_isascii+set}" = set; then
15478   echo $ECHO_N "(cached) $ECHO_C" >&6
15479 else
15480
15481         cat >conftest.$ac_ext <<_ACEOF
15482 #line 15482 "configure"
15483 #include "confdefs.h"
15484 #include <ctype.h>
15485 int
15486 main ()
15487 {
15488 int x = isascii(' ')
15489   ;
15490   return 0;
15491 }
15492 _ACEOF
15493 rm -f conftest.$ac_objext conftest$ac_exeext
15494 if { (eval echo "$as_me:15494: \"$ac_link\"") >&5
15495   (eval $ac_link) 2>&5
15496   ac_status=$?
15497   echo "$as_me:15497: \$? = $ac_status" >&5
15498   (exit $ac_status); } &&
15499          { ac_try='test -s conftest$ac_exeext'
15500   { (eval echo "$as_me:15500: \"$ac_try\"") >&5
15501   (eval $ac_try) 2>&5
15502   ac_status=$?
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit $ac_status); }; }; then
15505   cf_cv_have_isascii=yes
15506 else
15507   echo "$as_me: failed program was:" >&5
15508 cat conftest.$ac_ext >&5
15509 cf_cv_have_isascii=no
15510 fi
15511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15512
15513 fi
15514 echo "$as_me:15514: result: $cf_cv_have_isascii" >&5
15515 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15516 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15517 #define HAVE_ISASCII 1
15518 EOF
15519
15520 if test "$ac_cv_func_sigaction" = yes; then
15521 echo "$as_me:15521: checking whether sigaction needs _POSIX_SOURCE" >&5
15522 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15523 cat >conftest.$ac_ext <<_ACEOF
15524 #line 15524 "configure"
15525 #include "confdefs.h"
15526
15527 #include <sys/types.h>
15528 #include <signal.h>
15529 int
15530 main ()
15531 {
15532 struct sigaction act
15533   ;
15534   return 0;
15535 }
15536 _ACEOF
15537 rm -f conftest.$ac_objext
15538 if { (eval echo "$as_me:15538: \"$ac_compile\"") >&5
15539   (eval $ac_compile) 2>&5
15540   ac_status=$?
15541   echo "$as_me:15541: \$? = $ac_status" >&5
15542   (exit $ac_status); } &&
15543          { ac_try='test -s conftest.$ac_objext'
15544   { (eval echo "$as_me:15544: \"$ac_try\"") >&5
15545   (eval $ac_try) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); }; }; then
15549   sigact_bad=no
15550 else
15551   echo "$as_me: failed program was:" >&5
15552 cat conftest.$ac_ext >&5
15553
15554 cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 #define _POSIX_SOURCE
15559 #include <sys/types.h>
15560 #include <signal.h>
15561 int
15562 main ()
15563 {
15564 struct sigaction act
15565   ;
15566   return 0;
15567 }
15568 _ACEOF
15569 rm -f conftest.$ac_objext
15570 if { (eval echo "$as_me:15570: \"$ac_compile\"") >&5
15571   (eval $ac_compile) 2>&5
15572   ac_status=$?
15573   echo "$as_me:15573: \$? = $ac_status" >&5
15574   (exit $ac_status); } &&
15575          { ac_try='test -s conftest.$ac_objext'
15576   { (eval echo "$as_me:15576: \"$ac_try\"") >&5
15577   (eval $ac_try) 2>&5
15578   ac_status=$?
15579   echo "$as_me:15579: \$? = $ac_status" >&5
15580   (exit $ac_status); }; }; then
15581   sigact_bad=yes
15582          cat >>confdefs.h <<\EOF
15583 #define _POSIX_SOURCE 1
15584 EOF
15585
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 cat conftest.$ac_ext >&5
15589 sigact_bad=unknown
15590 fi
15591 rm -f conftest.$ac_objext conftest.$ac_ext
15592 fi
15593 rm -f conftest.$ac_objext conftest.$ac_ext
15594 echo "$as_me:15594: result: $sigact_bad" >&5
15595 echo "${ECHO_T}$sigact_bad" >&6
15596 fi
15597
15598 echo "$as_me:15598: checking if nanosleep really works" >&5
15599 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15600 if test "${cf_cv_func_nanosleep+set}" = set; then
15601   echo $ECHO_N "(cached) $ECHO_C" >&6
15602 else
15603
15604 if test "$cross_compiling" = yes; then
15605   cf_cv_func_nanosleep=unknown
15606 else
15607   cat >conftest.$ac_ext <<_ACEOF
15608 #line 15608 "configure"
15609 #include "confdefs.h"
15610
15611 #include <stdio.h>
15612 #include <errno.h>
15613 #include <time.h>
15614
15615 #ifdef HAVE_SYS_TIME_H
15616 #include <sys/time.h>
15617 #endif
15618
15619 int main() {
15620         struct timespec ts1, ts2;
15621         int code;
15622         ts1.tv_sec  = 0;
15623         ts1.tv_nsec = 750000000;
15624         ts2.tv_sec  = 0;
15625         ts2.tv_nsec = 0;
15626         errno = 0;
15627         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15628         ${cf_cv_main_return:-return}(code != 0);
15629 }
15630
15631 _ACEOF
15632 rm -f conftest$ac_exeext
15633 if { (eval echo "$as_me:15633: \"$ac_link\"") >&5
15634   (eval $ac_link) 2>&5
15635   ac_status=$?
15636   echo "$as_me:15636: \$? = $ac_status" >&5
15637   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15638   { (eval echo "$as_me:15638: \"$ac_try\"") >&5
15639   (eval $ac_try) 2>&5
15640   ac_status=$?
15641   echo "$as_me:15641: \$? = $ac_status" >&5
15642   (exit $ac_status); }; }; then
15643   cf_cv_func_nanosleep=yes
15644 else
15645   echo "$as_me: program exited with status $ac_status" >&5
15646 echo "$as_me: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15648 cf_cv_func_nanosleep=no
15649 fi
15650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15651 fi
15652 fi
15653 echo "$as_me:15653: result: $cf_cv_func_nanosleep" >&5
15654 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15655
15656 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15657 #define HAVE_NANOSLEEP 1
15658 EOF
15659
15660 for ac_header in \
15661 termio.h \
15662 termios.h \
15663 unistd.h \
15664
15665 do
15666 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15667 echo "$as_me:15667: checking for $ac_header" >&5
15668 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15669 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15670   echo $ECHO_N "(cached) $ECHO_C" >&6
15671 else
15672   cat >conftest.$ac_ext <<_ACEOF
15673 #line 15673 "configure"
15674 #include "confdefs.h"
15675 #include <$ac_header>
15676 _ACEOF
15677 if { (eval echo "$as_me:15677: \"$ac_cpp conftest.$ac_ext\"") >&5
15678   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15679   ac_status=$?
15680   egrep -v '^ *\+' conftest.er1 >conftest.err
15681   rm -f conftest.er1
15682   cat conftest.err >&5
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); } >/dev/null; then
15685   if test -s conftest.err; then
15686     ac_cpp_err=$ac_c_preproc_warn_flag
15687   else
15688     ac_cpp_err=
15689   fi
15690 else
15691   ac_cpp_err=yes
15692 fi
15693 if test -z "$ac_cpp_err"; then
15694   eval "$as_ac_Header=yes"
15695 else
15696   echo "$as_me: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   eval "$as_ac_Header=no"
15699 fi
15700 rm -f conftest.err conftest.$ac_ext
15701 fi
15702 echo "$as_me:15702: result: `eval echo '${'$as_ac_Header'}'`" >&5
15703 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15704 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15705   cat >>confdefs.h <<EOF
15706 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15707 EOF
15708
15709 fi
15710 done
15711
15712 if test "$ISC" = yes ; then
15713
15714 for ac_header in sys/termio.h
15715 do
15716 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15717 echo "$as_me:15717: checking for $ac_header" >&5
15718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15720   echo $ECHO_N "(cached) $ECHO_C" >&6
15721 else
15722   cat >conftest.$ac_ext <<_ACEOF
15723 #line 15723 "configure"
15724 #include "confdefs.h"
15725 #include <$ac_header>
15726 _ACEOF
15727 if { (eval echo "$as_me:15727: \"$ac_cpp conftest.$ac_ext\"") >&5
15728   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15729   ac_status=$?
15730   egrep -v '^ *\+' conftest.er1 >conftest.err
15731   rm -f conftest.er1
15732   cat conftest.err >&5
15733   echo "$as_me:15733: \$? = $ac_status" >&5
15734   (exit $ac_status); } >/dev/null; then
15735   if test -s conftest.err; then
15736     ac_cpp_err=$ac_c_preproc_warn_flag
15737   else
15738     ac_cpp_err=
15739   fi
15740 else
15741   ac_cpp_err=yes
15742 fi
15743 if test -z "$ac_cpp_err"; then
15744   eval "$as_ac_Header=yes"
15745 else
15746   echo "$as_me: failed program was:" >&5
15747   cat conftest.$ac_ext >&5
15748   eval "$as_ac_Header=no"
15749 fi
15750 rm -f conftest.err conftest.$ac_ext
15751 fi
15752 echo "$as_me:15752: result: `eval echo '${'$as_ac_Header'}'`" >&5
15753 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15754 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15755   cat >>confdefs.h <<EOF
15756 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15757 EOF
15758
15759 fi
15760 done
15761
15762 fi
15763 if test "$ac_cv_header_termios_h" = yes ; then
15764         case "$CFLAGS $CPPFLAGS" in
15765         *-D_POSIX_SOURCE*)
15766                 termios_bad=dunno ;;
15767         *)      termios_bad=maybe ;;
15768         esac
15769         if test "$termios_bad" = maybe ; then
15770         echo "$as_me:15770: checking whether termios.h needs _POSIX_SOURCE" >&5
15771 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15772         cat >conftest.$ac_ext <<_ACEOF
15773 #line 15773 "configure"
15774 #include "confdefs.h"
15775 #include <termios.h>
15776 int
15777 main ()
15778 {
15779 struct termios foo; int x = foo.c_iflag
15780   ;
15781   return 0;
15782 }
15783 _ACEOF
15784 rm -f conftest.$ac_objext
15785 if { (eval echo "$as_me:15785: \"$ac_compile\"") >&5
15786   (eval $ac_compile) 2>&5
15787   ac_status=$?
15788   echo "$as_me:15788: \$? = $ac_status" >&5
15789   (exit $ac_status); } &&
15790          { ac_try='test -s conftest.$ac_objext'
15791   { (eval echo "$as_me:15791: \"$ac_try\"") >&5
15792   (eval $ac_try) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); }; }; then
15796   termios_bad=no
15797 else
15798   echo "$as_me: failed program was:" >&5
15799 cat conftest.$ac_ext >&5
15800
15801                 cat >conftest.$ac_ext <<_ACEOF
15802 #line 15802 "configure"
15803 #include "confdefs.h"
15804
15805 #define _POSIX_SOURCE
15806 #include <termios.h>
15807 int
15808 main ()
15809 {
15810 struct termios foo; int x = foo.c_iflag
15811   ;
15812   return 0;
15813 }
15814 _ACEOF
15815 rm -f conftest.$ac_objext
15816 if { (eval echo "$as_me:15816: \"$ac_compile\"") >&5
15817   (eval $ac_compile) 2>&5
15818   ac_status=$?
15819   echo "$as_me:15819: \$? = $ac_status" >&5
15820   (exit $ac_status); } &&
15821          { ac_try='test -s conftest.$ac_objext'
15822   { (eval echo "$as_me:15822: \"$ac_try\"") >&5
15823   (eval $ac_try) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); }; }; then
15827   termios_bad=unknown
15828 else
15829   echo "$as_me: failed program was:" >&5
15830 cat conftest.$ac_ext >&5
15831 termios_bad=yes cat >>confdefs.h <<\EOF
15832 #define _POSIX_SOURCE 1
15833 EOF
15834
15835 fi
15836 rm -f conftest.$ac_objext conftest.$ac_ext
15837
15838 fi
15839 rm -f conftest.$ac_objext conftest.$ac_ext
15840         echo "$as_me:15840: result: $termios_bad" >&5
15841 echo "${ECHO_T}$termios_bad" >&6
15842         fi
15843 fi
15844
15845 echo "$as_me:15845: checking for tcgetattr" >&5
15846 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15847 if test "${cf_cv_have_tcgetattr+set}" = set; then
15848   echo $ECHO_N "(cached) $ECHO_C" >&6
15849 else
15850
15851 cat >conftest.$ac_ext <<_ACEOF
15852 #line 15852 "configure"
15853 #include "confdefs.h"
15854
15855 #include <sys/types.h>
15856 #ifdef HAVE_UNISTD_H
15857 #include <unistd.h>
15858 #endif
15859 #ifdef HAVE_TERMIOS_H
15860 #include <termios.h>
15861 #define TTY struct termios
15862 #else
15863 #ifdef HAVE_TERMIO_H
15864 #include <termio.h>
15865 #define TTY struct termio
15866 #endif
15867 #endif
15868
15869 int
15870 main ()
15871 {
15872
15873 TTY foo;
15874 tcgetattr(1, &foo);
15875   ;
15876   return 0;
15877 }
15878 _ACEOF
15879 rm -f conftest.$ac_objext conftest$ac_exeext
15880 if { (eval echo "$as_me:15880: \"$ac_link\"") >&5
15881   (eval $ac_link) 2>&5
15882   ac_status=$?
15883   echo "$as_me:15883: \$? = $ac_status" >&5
15884   (exit $ac_status); } &&
15885          { ac_try='test -s conftest$ac_exeext'
15886   { (eval echo "$as_me:15886: \"$ac_try\"") >&5
15887   (eval $ac_try) 2>&5
15888   ac_status=$?
15889   echo "$as_me:15889: \$? = $ac_status" >&5
15890   (exit $ac_status); }; }; then
15891   cf_cv_have_tcgetattr=yes
15892 else
15893   echo "$as_me: failed program was:" >&5
15894 cat conftest.$ac_ext >&5
15895 cf_cv_have_tcgetattr=no
15896 fi
15897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15898 fi
15899 echo "$as_me:15899: result: $cf_cv_have_tcgetattr" >&5
15900 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15901 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15902 #define HAVE_TCGETATTR 1
15903 EOF
15904
15905 echo "$as_me:15905: checking for vsscanf function or workaround" >&5
15906 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15907 if test "${cf_cv_func_vsscanf+set}" = set; then
15908   echo $ECHO_N "(cached) $ECHO_C" >&6
15909 else
15910
15911 cat >conftest.$ac_ext <<_ACEOF
15912 #line 15912 "configure"
15913 #include "confdefs.h"
15914
15915 #include <stdarg.h>
15916 #include <stdio.h>
15917 int
15918 main ()
15919 {
15920
15921         va_list ap;
15922         vsscanf("from", "%d", ap)
15923   ;
15924   return 0;
15925 }
15926 _ACEOF
15927 rm -f conftest.$ac_objext conftest$ac_exeext
15928 if { (eval echo "$as_me:15928: \"$ac_link\"") >&5
15929   (eval $ac_link) 2>&5
15930   ac_status=$?
15931   echo "$as_me:15931: \$? = $ac_status" >&5
15932   (exit $ac_status); } &&
15933          { ac_try='test -s conftest$ac_exeext'
15934   { (eval echo "$as_me:15934: \"$ac_try\"") >&5
15935   (eval $ac_try) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); }; }; then
15939   cf_cv_func_vsscanf=vsscanf
15940 else
15941   echo "$as_me: failed program was:" >&5
15942 cat conftest.$ac_ext >&5
15943
15944 cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15947
15948 #include <stdarg.h>
15949 #include <stdio.h>
15950 int
15951 main ()
15952 {
15953
15954     FILE strbuf;
15955     char *str = "from";
15956
15957     strbuf._flag = _IOREAD;
15958     strbuf._ptr = strbuf._base = (unsigned char *) str;
15959     strbuf._cnt = strlen(str);
15960     strbuf._file = _NFILE;
15961     return (vfscanf(&strbuf, "%d", ap))
15962   ;
15963   return 0;
15964 }
15965 _ACEOF
15966 rm -f conftest.$ac_objext conftest$ac_exeext
15967 if { (eval echo "$as_me:15967: \"$ac_link\"") >&5
15968   (eval $ac_link) 2>&5
15969   ac_status=$?
15970   echo "$as_me:15970: \$? = $ac_status" >&5
15971   (exit $ac_status); } &&
15972          { ac_try='test -s conftest$ac_exeext'
15973   { (eval echo "$as_me:15973: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); }; }; then
15978   cf_cv_func_vsscanf=vfscanf
15979 else
15980   echo "$as_me: failed program was:" >&5
15981 cat conftest.$ac_ext >&5
15982
15983 cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986
15987 #include <stdarg.h>
15988 #include <stdio.h>
15989 int
15990 main ()
15991 {
15992
15993     FILE strbuf;
15994     char *str = "from";
15995
15996     strbuf._flag = _IOREAD;
15997     strbuf._ptr = strbuf._base = (unsigned char *) str;
15998     strbuf._cnt = strlen(str);
15999     strbuf._file = _NFILE;
16000     return (_doscan(&strbuf, "%d", ap))
16001   ;
16002   return 0;
16003 }
16004 _ACEOF
16005 rm -f conftest.$ac_objext conftest$ac_exeext
16006 if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
16007   (eval $ac_link) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); } &&
16011          { ac_try='test -s conftest$ac_exeext'
16012   { (eval echo "$as_me:16012: \"$ac_try\"") >&5
16013   (eval $ac_try) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit $ac_status); }; }; then
16017   cf_cv_func_vsscanf=_doscan
16018 else
16019   echo "$as_me: failed program was:" >&5
16020 cat conftest.$ac_ext >&5
16021
16022 cf_cv_func_vsscanf=no
16023 fi
16024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16025 fi
16026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16027 fi
16028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16029 fi
16030 echo "$as_me:16030: result: $cf_cv_func_vsscanf" >&5
16031 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16032
16033 case $cf_cv_func_vsscanf in #(vi
16034 vsscanf) cat >>confdefs.h <<\EOF
16035 #define HAVE_VSSCANF 1
16036 EOF
16037 ;; #(vi
16038 vfscanf) cat >>confdefs.h <<\EOF
16039 #define HAVE_VFSCANF 1
16040 EOF
16041 ;; #(vi
16042 _doscan) cat >>confdefs.h <<\EOF
16043 #define HAVE__DOSCAN 1
16044 EOF
16045 ;;
16046 esac
16047
16048 echo "$as_me:16048: checking for working mkstemp" >&5
16049 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16050 if test "${cf_cv_func_mkstemp+set}" = set; then
16051   echo $ECHO_N "(cached) $ECHO_C" >&6
16052 else
16053
16054 rm -rf conftest*
16055 if test "$cross_compiling" = yes; then
16056   echo "$as_me:16056: checking for mkstemp" >&5
16057 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16058 if test "${ac_cv_func_mkstemp+set}" = set; then
16059   echo $ECHO_N "(cached) $ECHO_C" >&6
16060 else
16061   cat >conftest.$ac_ext <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16064 /* System header to define __stub macros and hopefully few prototypes,
16065     which can conflict with char mkstemp (); below.  */
16066 #include <assert.h>
16067 /* Override any gcc2 internal prototype to avoid an error.  */
16068 #ifdef __cplusplus
16069 extern "C"
16070 #endif
16071 /* We use char because int might match the return type of a gcc2
16072    builtin and then its argument prototype would still apply.  */
16073 char mkstemp ();
16074 char (*f) ();
16075
16076 int
16077 main ()
16078 {
16079 /* The GNU C library defines this for functions which it implements
16080     to always fail with ENOSYS.  Some functions are actually named
16081     something starting with __ and the normal name is an alias.  */
16082 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16083 choke me
16084 #else
16085 f = mkstemp;
16086 #endif
16087
16088   ;
16089   return 0;
16090 }
16091 _ACEOF
16092 rm -f conftest.$ac_objext conftest$ac_exeext
16093 if { (eval echo "$as_me:16093: \"$ac_link\"") >&5
16094   (eval $ac_link) 2>&5
16095   ac_status=$?
16096   echo "$as_me:16096: \$? = $ac_status" >&5
16097   (exit $ac_status); } &&
16098          { ac_try='test -s conftest$ac_exeext'
16099   { (eval echo "$as_me:16099: \"$ac_try\"") >&5
16100   (eval $ac_try) 2>&5
16101   ac_status=$?
16102   echo "$as_me:16102: \$? = $ac_status" >&5
16103   (exit $ac_status); }; }; then
16104   ac_cv_func_mkstemp=yes
16105 else
16106   echo "$as_me: failed program was:" >&5
16107 cat conftest.$ac_ext >&5
16108 ac_cv_func_mkstemp=no
16109 fi
16110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16111 fi
16112 echo "$as_me:16112: result: $ac_cv_func_mkstemp" >&5
16113 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16114
16115 else
16116   cat >conftest.$ac_ext <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16119
16120 #include <sys/types.h>
16121 #include <stdlib.h>
16122 #include <stdio.h>
16123 #include <string.h>
16124 #include <sys/stat.h>
16125 int main()
16126 {
16127         char *tmpl = "conftestXXXXXX";
16128         char name[2][80];
16129         int n;
16130         int result = 0;
16131         int fd;
16132         struct stat sb;
16133
16134         umask(077);
16135         for (n = 0; n < 2; ++n) {
16136                 strcpy(name[n], tmpl);
16137                 if ((fd = mkstemp(name[n])) >= 0) {
16138                         if (!strcmp(name[n], tmpl)
16139                          || stat(name[n], &sb) != 0
16140                          || (sb.st_mode & S_IFMT) != S_IFREG
16141                          || (sb.st_mode & 077) != 0) {
16142                                 result = 1;
16143                         }
16144                         close(fd);
16145                 }
16146         }
16147         if (result == 0
16148          && !strcmp(name[0], name[1]))
16149                 result = 1;
16150         ${cf_cv_main_return:-return}(result);
16151 }
16152
16153 _ACEOF
16154 rm -f conftest$ac_exeext
16155 if { (eval echo "$as_me:16155: \"$ac_link\"") >&5
16156   (eval $ac_link) 2>&5
16157   ac_status=$?
16158   echo "$as_me:16158: \$? = $ac_status" >&5
16159   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16160   { (eval echo "$as_me:16160: \"$ac_try\"") >&5
16161   (eval $ac_try) 2>&5
16162   ac_status=$?
16163   echo "$as_me:16163: \$? = $ac_status" >&5
16164   (exit $ac_status); }; }; then
16165   cf_cv_func_mkstemp=yes
16166
16167 else
16168   echo "$as_me: program exited with status $ac_status" >&5
16169 echo "$as_me: failed program was:" >&5
16170 cat conftest.$ac_ext >&5
16171 cf_cv_func_mkstemp=no
16172
16173 fi
16174 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16175 fi
16176
16177 fi
16178 echo "$as_me:16178: result: $cf_cv_func_mkstemp" >&5
16179 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16180 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16181         cat >>confdefs.h <<\EOF
16182 #define HAVE_MKSTEMP 1
16183 EOF
16184
16185 fi
16186
16187 # setup for prototype of fallback for vsscanf()
16188
16189 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16190         HAVE_VSSCANF=1
16191 else
16192         HAVE_VSSCANF=0
16193 fi
16194
16195 if test "$cross_compiling" = yes ; then
16196         { echo "$as_me:16196: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16197 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16198 else
16199         echo "$as_me:16199: checking whether setvbuf arguments are reversed" >&5
16200 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16201 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16202   echo $ECHO_N "(cached) $ECHO_C" >&6
16203 else
16204   if test "$cross_compiling" = yes; then
16205   { { echo "$as_me:16205: error: cannot run test program while cross compiling" >&5
16206 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16207    { (exit 1); exit 1; }; }
16208 else
16209   cat >conftest.$ac_ext <<_ACEOF
16210 #line 16210 "configure"
16211 #include "confdefs.h"
16212 #include <stdio.h>
16213 /* If setvbuf has the reversed format, exit 0. */
16214 int
16215 main ()
16216 {
16217   /* This call has the arguments reversed.
16218      A reversed system may check and see that the address of main
16219      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16220   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16221     $ac_main_return(1);
16222   putc('\r', stdout);
16223   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16224 }
16225 _ACEOF
16226 rm -f conftest$ac_exeext
16227 if { (eval echo "$as_me:16227: \"$ac_link\"") >&5
16228   (eval $ac_link) 2>&5
16229   ac_status=$?
16230   echo "$as_me:16230: \$? = $ac_status" >&5
16231   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16232   { (eval echo "$as_me:16232: \"$ac_try\"") >&5
16233   (eval $ac_try) 2>&5
16234   ac_status=$?
16235   echo "$as_me:16235: \$? = $ac_status" >&5
16236   (exit $ac_status); }; }; then
16237   ac_cv_func_setvbuf_reversed=yes
16238 else
16239   echo "$as_me: program exited with status $ac_status" >&5
16240 echo "$as_me: failed program was:" >&5
16241 cat conftest.$ac_ext >&5
16242 ac_cv_func_setvbuf_reversed=no
16243 fi
16244 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16245 fi
16246 rm -f core core.* *.core
16247 fi
16248 echo "$as_me:16248: result: $ac_cv_func_setvbuf_reversed" >&5
16249 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16250 if test $ac_cv_func_setvbuf_reversed = yes; then
16251
16252 cat >>confdefs.h <<\EOF
16253 #define SETVBUF_REVERSED 1
16254 EOF
16255
16256 fi
16257
16258 fi
16259 echo "$as_me:16259: checking return type of signal handlers" >&5
16260 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16261 if test "${ac_cv_type_signal+set}" = set; then
16262   echo $ECHO_N "(cached) $ECHO_C" >&6
16263 else
16264   cat >conftest.$ac_ext <<_ACEOF
16265 #line 16265 "configure"
16266 #include "confdefs.h"
16267 #include <sys/types.h>
16268 #include <signal.h>
16269 #ifdef signal
16270 # undef signal
16271 #endif
16272 #ifdef __cplusplus
16273 extern "C" void (*signal (int, void (*)(int)))(int);
16274 #else
16275 void (*signal ()) ();
16276 #endif
16277
16278 int
16279 main ()
16280 {
16281 int i;
16282   ;
16283   return 0;
16284 }
16285 _ACEOF
16286 rm -f conftest.$ac_objext
16287 if { (eval echo "$as_me:16287: \"$ac_compile\"") >&5
16288   (eval $ac_compile) 2>&5
16289   ac_status=$?
16290   echo "$as_me:16290: \$? = $ac_status" >&5
16291   (exit $ac_status); } &&
16292          { ac_try='test -s conftest.$ac_objext'
16293   { (eval echo "$as_me:16293: \"$ac_try\"") >&5
16294   (eval $ac_try) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); }; }; then
16298   ac_cv_type_signal=void
16299 else
16300   echo "$as_me: failed program was:" >&5
16301 cat conftest.$ac_ext >&5
16302 ac_cv_type_signal=int
16303 fi
16304 rm -f conftest.$ac_objext conftest.$ac_ext
16305 fi
16306 echo "$as_me:16306: result: $ac_cv_type_signal" >&5
16307 echo "${ECHO_T}$ac_cv_type_signal" >&6
16308
16309 cat >>confdefs.h <<EOF
16310 #define RETSIGTYPE $ac_cv_type_signal
16311 EOF
16312
16313 echo "$as_me:16313: checking for intptr_t" >&5
16314 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16315 if test "${ac_cv_type_intptr_t+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   cat >conftest.$ac_ext <<_ACEOF
16319 #line 16319 "configure"
16320 #include "confdefs.h"
16321 $ac_includes_default
16322 int
16323 main ()
16324 {
16325 if ((intptr_t *) 0)
16326   return 0;
16327 if (sizeof (intptr_t))
16328   return 0;
16329   ;
16330   return 0;
16331 }
16332 _ACEOF
16333 rm -f conftest.$ac_objext
16334 if { (eval echo "$as_me:16334: \"$ac_compile\"") >&5
16335   (eval $ac_compile) 2>&5
16336   ac_status=$?
16337   echo "$as_me:16337: \$? = $ac_status" >&5
16338   (exit $ac_status); } &&
16339          { ac_try='test -s conftest.$ac_objext'
16340   { (eval echo "$as_me:16340: \"$ac_try\"") >&5
16341   (eval $ac_try) 2>&5
16342   ac_status=$?
16343   echo "$as_me:16343: \$? = $ac_status" >&5
16344   (exit $ac_status); }; }; then
16345   ac_cv_type_intptr_t=yes
16346 else
16347   echo "$as_me: failed program was:" >&5
16348 cat conftest.$ac_ext >&5
16349 ac_cv_type_intptr_t=no
16350 fi
16351 rm -f conftest.$ac_objext conftest.$ac_ext
16352 fi
16353 echo "$as_me:16353: result: $ac_cv_type_intptr_t" >&5
16354 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16355 if test $ac_cv_type_intptr_t = yes; then
16356   :
16357 else
16358
16359 cat >>confdefs.h <<EOF
16360 #define intptr_t long
16361 EOF
16362
16363 fi
16364
16365 echo "$as_me:16365: checking for type sigaction_t" >&5
16366 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16367 if test "${cf_cv_type_sigaction+set}" = set; then
16368   echo $ECHO_N "(cached) $ECHO_C" >&6
16369 else
16370
16371         cat >conftest.$ac_ext <<_ACEOF
16372 #line 16372 "configure"
16373 #include "confdefs.h"
16374
16375 #include <signal.h>
16376 int
16377 main ()
16378 {
16379 sigaction_t x
16380   ;
16381   return 0;
16382 }
16383 _ACEOF
16384 rm -f conftest.$ac_objext
16385 if { (eval echo "$as_me:16385: \"$ac_compile\"") >&5
16386   (eval $ac_compile) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit $ac_status); } &&
16390          { ac_try='test -s conftest.$ac_objext'
16391   { (eval echo "$as_me:16391: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit $ac_status); }; }; then
16396   cf_cv_type_sigaction=yes
16397 else
16398   echo "$as_me: failed program was:" >&5
16399 cat conftest.$ac_ext >&5
16400 cf_cv_type_sigaction=no
16401 fi
16402 rm -f conftest.$ac_objext conftest.$ac_ext
16403 fi
16404
16405 echo "$as_me:16405: result: $cf_cv_type_sigaction" >&5
16406 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16407 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16408 #define HAVE_TYPE_SIGACTION 1
16409 EOF
16410
16411 echo "$as_me:16411: checking declaration of size-change" >&5
16412 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16413 if test "${cf_cv_sizechange+set}" = set; then
16414   echo $ECHO_N "(cached) $ECHO_C" >&6
16415 else
16416
16417     cf_cv_sizechange=unknown
16418     cf_save_CPPFLAGS="$CPPFLAGS"
16419
16420 for cf_opts in "" "NEED_PTEM_H"
16421 do
16422
16423     CPPFLAGS="$cf_save_CPPFLAGS"
16424     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16425     cat >conftest.$ac_ext <<_ACEOF
16426 #line 16426 "configure"
16427 #include "confdefs.h"
16428 #include <sys/types.h>
16429 #ifdef HAVE_TERMIOS_H
16430 #include <termios.h>
16431 #else
16432 #ifdef HAVE_TERMIO_H
16433 #include <termio.h>
16434 #endif
16435 #endif
16436 #ifdef NEED_PTEM_H
16437 /* This is a workaround for SCO:  they neglected to define struct winsize in
16438  * termios.h -- it's only in termio.h and ptem.h
16439  */
16440 #include        <sys/stream.h>
16441 #include        <sys/ptem.h>
16442 #endif
16443 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16444 #include <sys/ioctl.h>
16445 #endif
16446
16447 int
16448 main ()
16449 {
16450
16451 #ifdef TIOCGSIZE
16452         struct ttysize win;     /* FIXME: what system is this? */
16453         int y = win.ts_lines;
16454         int x = win.ts_cols;
16455 #else
16456 #ifdef TIOCGWINSZ
16457         struct winsize win;
16458         int y = win.ws_row;
16459         int x = win.ws_col;
16460 #else
16461         no TIOCGSIZE or TIOCGWINSZ
16462 #endif /* TIOCGWINSZ */
16463 #endif /* TIOCGSIZE */
16464
16465   ;
16466   return 0;
16467 }
16468 _ACEOF
16469 rm -f conftest.$ac_objext
16470 if { (eval echo "$as_me:16470: \"$ac_compile\"") >&5
16471   (eval $ac_compile) 2>&5
16472   ac_status=$?
16473   echo "$as_me:16473: \$? = $ac_status" >&5
16474   (exit $ac_status); } &&
16475          { ac_try='test -s conftest.$ac_objext'
16476   { (eval echo "$as_me:16476: \"$ac_try\"") >&5
16477   (eval $ac_try) 2>&5
16478   ac_status=$?
16479   echo "$as_me:16479: \$? = $ac_status" >&5
16480   (exit $ac_status); }; }; then
16481   cf_cv_sizechange=yes
16482 else
16483   echo "$as_me: failed program was:" >&5
16484 cat conftest.$ac_ext >&5
16485 cf_cv_sizechange=no
16486 fi
16487 rm -f conftest.$ac_objext conftest.$ac_ext
16488
16489         CPPFLAGS="$cf_save_CPPFLAGS"
16490         if test "$cf_cv_sizechange" = yes ; then
16491                 echo "size-change succeeded ($cf_opts)" >&5
16492                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16493                 break
16494         fi
16495 done
16496
16497 fi
16498 echo "$as_me:16498: result: $cf_cv_sizechange" >&5
16499 echo "${ECHO_T}$cf_cv_sizechange" >&6
16500 if test "$cf_cv_sizechange" != no ; then
16501         cat >>confdefs.h <<\EOF
16502 #define HAVE_SIZECHANGE 1
16503 EOF
16504
16505         case $cf_cv_sizechange in #(vi
16506         NEED*)
16507                 cat >>confdefs.h <<EOF
16508 #define $cf_cv_sizechange  1
16509 EOF
16510
16511                 ;;
16512         esac
16513 fi
16514
16515 echo "$as_me:16515: checking for memmove" >&5
16516 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16517 if test "${ac_cv_func_memmove+set}" = set; then
16518   echo $ECHO_N "(cached) $ECHO_C" >&6
16519 else
16520   cat >conftest.$ac_ext <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16523 /* System header to define __stub macros and hopefully few prototypes,
16524     which can conflict with char memmove (); below.  */
16525 #include <assert.h>
16526 /* Override any gcc2 internal prototype to avoid an error.  */
16527 #ifdef __cplusplus
16528 extern "C"
16529 #endif
16530 /* We use char because int might match the return type of a gcc2
16531    builtin and then its argument prototype would still apply.  */
16532 char memmove ();
16533 char (*f) ();
16534
16535 int
16536 main ()
16537 {
16538 /* The GNU C library defines this for functions which it implements
16539     to always fail with ENOSYS.  Some functions are actually named
16540     something starting with __ and the normal name is an alias.  */
16541 #if defined (__stub_memmove) || defined (__stub___memmove)
16542 choke me
16543 #else
16544 f = memmove;
16545 #endif
16546
16547   ;
16548   return 0;
16549 }
16550 _ACEOF
16551 rm -f conftest.$ac_objext conftest$ac_exeext
16552 if { (eval echo "$as_me:16552: \"$ac_link\"") >&5
16553   (eval $ac_link) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); } &&
16557          { ac_try='test -s conftest$ac_exeext'
16558   { (eval echo "$as_me:16558: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:16561: \$? = $ac_status" >&5
16562   (exit $ac_status); }; }; then
16563   ac_cv_func_memmove=yes
16564 else
16565   echo "$as_me: failed program was:" >&5
16566 cat conftest.$ac_ext >&5
16567 ac_cv_func_memmove=no
16568 fi
16569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16570 fi
16571 echo "$as_me:16571: result: $ac_cv_func_memmove" >&5
16572 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16573 if test $ac_cv_func_memmove = yes; then
16574   :
16575 else
16576
16577 echo "$as_me:16577: checking for bcopy" >&5
16578 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16579 if test "${ac_cv_func_bcopy+set}" = set; then
16580   echo $ECHO_N "(cached) $ECHO_C" >&6
16581 else
16582   cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585 /* System header to define __stub macros and hopefully few prototypes,
16586     which can conflict with char bcopy (); below.  */
16587 #include <assert.h>
16588 /* Override any gcc2 internal prototype to avoid an error.  */
16589 #ifdef __cplusplus
16590 extern "C"
16591 #endif
16592 /* We use char because int might match the return type of a gcc2
16593    builtin and then its argument prototype would still apply.  */
16594 char bcopy ();
16595 char (*f) ();
16596
16597 int
16598 main ()
16599 {
16600 /* The GNU C library defines this for functions which it implements
16601     to always fail with ENOSYS.  Some functions are actually named
16602     something starting with __ and the normal name is an alias.  */
16603 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16604 choke me
16605 #else
16606 f = bcopy;
16607 #endif
16608
16609   ;
16610   return 0;
16611 }
16612 _ACEOF
16613 rm -f conftest.$ac_objext conftest$ac_exeext
16614 if { (eval echo "$as_me:16614: \"$ac_link\"") >&5
16615   (eval $ac_link) 2>&5
16616   ac_status=$?
16617   echo "$as_me:16617: \$? = $ac_status" >&5
16618   (exit $ac_status); } &&
16619          { ac_try='test -s conftest$ac_exeext'
16620   { (eval echo "$as_me:16620: \"$ac_try\"") >&5
16621   (eval $ac_try) 2>&5
16622   ac_status=$?
16623   echo "$as_me:16623: \$? = $ac_status" >&5
16624   (exit $ac_status); }; }; then
16625   ac_cv_func_bcopy=yes
16626 else
16627   echo "$as_me: failed program was:" >&5
16628 cat conftest.$ac_ext >&5
16629 ac_cv_func_bcopy=no
16630 fi
16631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16632 fi
16633 echo "$as_me:16633: result: $ac_cv_func_bcopy" >&5
16634 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16635 if test $ac_cv_func_bcopy = yes; then
16636
16637         echo "$as_me:16637: checking if bcopy does overlapping moves" >&5
16638 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16639 if test "${cf_cv_good_bcopy+set}" = set; then
16640   echo $ECHO_N "(cached) $ECHO_C" >&6
16641 else
16642
16643                 if test "$cross_compiling" = yes; then
16644   cf_cv_good_bcopy=unknown
16645 else
16646   cat >conftest.$ac_ext <<_ACEOF
16647 #line 16647 "configure"
16648 #include "confdefs.h"
16649
16650 int main() {
16651         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16652         char temp[40];
16653         bcopy(data, temp, sizeof(data));
16654         bcopy(temp+10, temp, 15);
16655         bcopy(temp+5, temp+15, 10);
16656         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16657 }
16658
16659 _ACEOF
16660 rm -f conftest$ac_exeext
16661 if { (eval echo "$as_me:16661: \"$ac_link\"") >&5
16662   (eval $ac_link) 2>&5
16663   ac_status=$?
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16666   { (eval echo "$as_me:16666: \"$ac_try\"") >&5
16667   (eval $ac_try) 2>&5
16668   ac_status=$?
16669   echo "$as_me:16669: \$? = $ac_status" >&5
16670   (exit $ac_status); }; }; then
16671   cf_cv_good_bcopy=yes
16672 else
16673   echo "$as_me: program exited with status $ac_status" >&5
16674 echo "$as_me: failed program was:" >&5
16675 cat conftest.$ac_ext >&5
16676 cf_cv_good_bcopy=no
16677 fi
16678 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16679 fi
16680
16681 fi
16682 echo "$as_me:16682: result: $cf_cv_good_bcopy" >&5
16683 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16684
16685 else
16686   cf_cv_good_bcopy=no
16687 fi
16688
16689         if test "$cf_cv_good_bcopy" = yes ; then
16690                 cat >>confdefs.h <<\EOF
16691 #define USE_OK_BCOPY 1
16692 EOF
16693
16694         else
16695                 cat >>confdefs.h <<\EOF
16696 #define USE_MY_MEMMOVE 1
16697 EOF
16698
16699         fi
16700
16701 fi
16702
16703 echo "$as_me:16703: checking if poll really works" >&5
16704 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16705 if test "${cf_cv_working_poll+set}" = set; then
16706   echo $ECHO_N "(cached) $ECHO_C" >&6
16707 else
16708
16709 if test "$cross_compiling" = yes; then
16710   cf_cv_working_poll=unknown
16711 else
16712   cat >conftest.$ac_ext <<_ACEOF
16713 #line 16713 "configure"
16714 #include "confdefs.h"
16715
16716 #include <stdio.h>
16717 #ifdef HAVE_POLL_H
16718 #include <poll.h>
16719 #else
16720 #include <sys/poll.h>
16721 #endif
16722 int main() {
16723         struct pollfd myfds;
16724         int ret;
16725
16726         myfds.fd = 0;
16727         myfds.events = POLLIN;
16728
16729         ret = poll(&myfds, 1, 100);
16730         ${cf_cv_main_return:-return}(ret != 0);
16731 }
16732 _ACEOF
16733 rm -f conftest$ac_exeext
16734 if { (eval echo "$as_me:16734: \"$ac_link\"") >&5
16735   (eval $ac_link) 2>&5
16736   ac_status=$?
16737   echo "$as_me:16737: \$? = $ac_status" >&5
16738   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16739   { (eval echo "$as_me:16739: \"$ac_try\"") >&5
16740   (eval $ac_try) 2>&5
16741   ac_status=$?
16742   echo "$as_me:16742: \$? = $ac_status" >&5
16743   (exit $ac_status); }; }; then
16744   cf_cv_working_poll=yes
16745 else
16746   echo "$as_me: program exited with status $ac_status" >&5
16747 echo "$as_me: failed program was:" >&5
16748 cat conftest.$ac_ext >&5
16749 cf_cv_working_poll=no
16750 fi
16751 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16752 fi
16753 fi
16754 echo "$as_me:16754: result: $cf_cv_working_poll" >&5
16755 echo "${ECHO_T}$cf_cv_working_poll" >&6
16756 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16757 #define HAVE_WORKING_POLL 1
16758 EOF
16759
16760 echo "$as_me:16760: checking for va_copy" >&5
16761 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16762 if test "${cf_cv_have_va_copy+set}" = set; then
16763   echo $ECHO_N "(cached) $ECHO_C" >&6
16764 else
16765
16766 cat >conftest.$ac_ext <<_ACEOF
16767 #line 16767 "configure"
16768 #include "confdefs.h"
16769
16770 #include <stdarg.h>
16771
16772 int
16773 main ()
16774 {
16775
16776         static va_list dst;
16777         static va_list src;
16778         va_copy(dst, src)
16779   ;
16780   return 0;
16781 }
16782 _ACEOF
16783 rm -f conftest.$ac_objext conftest$ac_exeext
16784 if { (eval echo "$as_me:16784: \"$ac_link\"") >&5
16785   (eval $ac_link) 2>&5
16786   ac_status=$?
16787   echo "$as_me:16787: \$? = $ac_status" >&5
16788   (exit $ac_status); } &&
16789          { ac_try='test -s conftest$ac_exeext'
16790   { (eval echo "$as_me:16790: \"$ac_try\"") >&5
16791   (eval $ac_try) 2>&5
16792   ac_status=$?
16793   echo "$as_me:16793: \$? = $ac_status" >&5
16794   (exit $ac_status); }; }; then
16795   cf_cv_have_va_copy=yes
16796 else
16797   echo "$as_me: failed program was:" >&5
16798 cat conftest.$ac_ext >&5
16799 cf_cv_have_va_copy=no
16800 fi
16801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16802 fi
16803 echo "$as_me:16803: result: $cf_cv_have_va_copy" >&5
16804 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16805
16806 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16807 #define HAVE_VA_COPY 1
16808 EOF
16809
16810 echo "$as_me:16810: checking for __va_copy" >&5
16811 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16812 if test "${cf_cv_have___va_copy+set}" = set; then
16813   echo $ECHO_N "(cached) $ECHO_C" >&6
16814 else
16815
16816 cat >conftest.$ac_ext <<_ACEOF
16817 #line 16817 "configure"
16818 #include "confdefs.h"
16819
16820 #include <stdarg.h>
16821
16822 int
16823 main ()
16824 {
16825
16826         static va_list dst;
16827         static va_list src;
16828         __va_copy(dst, src)
16829   ;
16830   return 0;
16831 }
16832 _ACEOF
16833 rm -f conftest.$ac_objext conftest$ac_exeext
16834 if { (eval echo "$as_me:16834: \"$ac_link\"") >&5
16835   (eval $ac_link) 2>&5
16836   ac_status=$?
16837   echo "$as_me:16837: \$? = $ac_status" >&5
16838   (exit $ac_status); } &&
16839          { ac_try='test -s conftest$ac_exeext'
16840   { (eval echo "$as_me:16840: \"$ac_try\"") >&5
16841   (eval $ac_try) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); }; }; then
16845   cf_cv_have___va_copy=yes
16846 else
16847   echo "$as_me: failed program was:" >&5
16848 cat conftest.$ac_ext >&5
16849 cf_cv_have___va_copy=no
16850 fi
16851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16852 fi
16853 echo "$as_me:16853: result: $cf_cv_have___va_copy" >&5
16854 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16855
16856 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16857 #define HAVE___VA_COPY 1
16858 EOF
16859
16860 echo "$as_me:16860: checking for pid_t" >&5
16861 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16862 if test "${ac_cv_type_pid_t+set}" = set; then
16863   echo $ECHO_N "(cached) $ECHO_C" >&6
16864 else
16865   cat >conftest.$ac_ext <<_ACEOF
16866 #line 16866 "configure"
16867 #include "confdefs.h"
16868 $ac_includes_default
16869 int
16870 main ()
16871 {
16872 if ((pid_t *) 0)
16873   return 0;
16874 if (sizeof (pid_t))
16875   return 0;
16876   ;
16877   return 0;
16878 }
16879 _ACEOF
16880 rm -f conftest.$ac_objext
16881 if { (eval echo "$as_me:16881: \"$ac_compile\"") >&5
16882   (eval $ac_compile) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit $ac_status); } &&
16886          { ac_try='test -s conftest.$ac_objext'
16887   { (eval echo "$as_me:16887: \"$ac_try\"") >&5
16888   (eval $ac_try) 2>&5
16889   ac_status=$?
16890   echo "$as_me:16890: \$? = $ac_status" >&5
16891   (exit $ac_status); }; }; then
16892   ac_cv_type_pid_t=yes
16893 else
16894   echo "$as_me: failed program was:" >&5
16895 cat conftest.$ac_ext >&5
16896 ac_cv_type_pid_t=no
16897 fi
16898 rm -f conftest.$ac_objext conftest.$ac_ext
16899 fi
16900 echo "$as_me:16900: result: $ac_cv_type_pid_t" >&5
16901 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16902 if test $ac_cv_type_pid_t = yes; then
16903   :
16904 else
16905
16906 cat >>confdefs.h <<EOF
16907 #define pid_t int
16908 EOF
16909
16910 fi
16911
16912 for ac_header in unistd.h vfork.h
16913 do
16914 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16915 echo "$as_me:16915: checking for $ac_header" >&5
16916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16918   echo $ECHO_N "(cached) $ECHO_C" >&6
16919 else
16920   cat >conftest.$ac_ext <<_ACEOF
16921 #line 16921 "configure"
16922 #include "confdefs.h"
16923 #include <$ac_header>
16924 _ACEOF
16925 if { (eval echo "$as_me:16925: \"$ac_cpp conftest.$ac_ext\"") >&5
16926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16927   ac_status=$?
16928   egrep -v '^ *\+' conftest.er1 >conftest.err
16929   rm -f conftest.er1
16930   cat conftest.err >&5
16931   echo "$as_me:16931: \$? = $ac_status" >&5
16932   (exit $ac_status); } >/dev/null; then
16933   if test -s conftest.err; then
16934     ac_cpp_err=$ac_c_preproc_warn_flag
16935   else
16936     ac_cpp_err=
16937   fi
16938 else
16939   ac_cpp_err=yes
16940 fi
16941 if test -z "$ac_cpp_err"; then
16942   eval "$as_ac_Header=yes"
16943 else
16944   echo "$as_me: failed program was:" >&5
16945   cat conftest.$ac_ext >&5
16946   eval "$as_ac_Header=no"
16947 fi
16948 rm -f conftest.err conftest.$ac_ext
16949 fi
16950 echo "$as_me:16950: result: `eval echo '${'$as_ac_Header'}'`" >&5
16951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16952 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16953   cat >>confdefs.h <<EOF
16954 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16955 EOF
16956
16957 fi
16958 done
16959
16960 for ac_func in fork vfork
16961 do
16962 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16963 echo "$as_me:16963: checking for $ac_func" >&5
16964 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16965 if eval "test \"\${$as_ac_var+set}\" = set"; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968   cat >conftest.$ac_ext <<_ACEOF
16969 #line 16969 "configure"
16970 #include "confdefs.h"
16971 /* System header to define __stub macros and hopefully few prototypes,
16972     which can conflict with char $ac_func (); below.  */
16973 #include <assert.h>
16974 /* Override any gcc2 internal prototype to avoid an error.  */
16975 #ifdef __cplusplus
16976 extern "C"
16977 #endif
16978 /* We use char because int might match the return type of a gcc2
16979    builtin and then its argument prototype would still apply.  */
16980 char $ac_func ();
16981 char (*f) ();
16982
16983 int
16984 main ()
16985 {
16986 /* The GNU C library defines this for functions which it implements
16987     to always fail with ENOSYS.  Some functions are actually named
16988     something starting with __ and the normal name is an alias.  */
16989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16990 choke me
16991 #else
16992 f = $ac_func;
16993 #endif
16994
16995   ;
16996   return 0;
16997 }
16998 _ACEOF
16999 rm -f conftest.$ac_objext conftest$ac_exeext
17000 if { (eval echo "$as_me:17000: \"$ac_link\"") >&5
17001   (eval $ac_link) 2>&5
17002   ac_status=$?
17003   echo "$as_me:17003: \$? = $ac_status" >&5
17004   (exit $ac_status); } &&
17005          { ac_try='test -s conftest$ac_exeext'
17006   { (eval echo "$as_me:17006: \"$ac_try\"") >&5
17007   (eval $ac_try) 2>&5
17008   ac_status=$?
17009   echo "$as_me:17009: \$? = $ac_status" >&5
17010   (exit $ac_status); }; }; then
17011   eval "$as_ac_var=yes"
17012 else
17013   echo "$as_me: failed program was:" >&5
17014 cat conftest.$ac_ext >&5
17015 eval "$as_ac_var=no"
17016 fi
17017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17018 fi
17019 echo "$as_me:17019: result: `eval echo '${'$as_ac_var'}'`" >&5
17020 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17021 if test `eval echo '${'$as_ac_var'}'` = yes; then
17022   cat >>confdefs.h <<EOF
17023 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17024 EOF
17025
17026 fi
17027 done
17028
17029 ac_cv_func_fork_works=$ac_cv_func_fork
17030 if test "x$ac_cv_func_fork" = xyes; then
17031   echo "$as_me:17031: checking for working fork" >&5
17032 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17033 if test "${ac_cv_func_fork_works+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036   if test "$cross_compiling" = yes; then
17037   ac_cv_func_fork_works=cross
17038 else
17039   cat >conftest.$ac_ext <<_ACEOF
17040 /* By Rüdiger Kuhlmann. */
17041       #include <sys/types.h>
17042       #if HAVE_UNISTD_H
17043       # include <unistd.h>
17044       #endif
17045       /* Some systems only have a dummy stub for fork() */
17046       int main ()
17047       {
17048         if (fork() < 0)
17049           $ac_main_return (1);
17050         $ac_main_return (0);
17051       }
17052 _ACEOF
17053 rm -f conftest$ac_exeext
17054 if { (eval echo "$as_me:17054: \"$ac_link\"") >&5
17055   (eval $ac_link) 2>&5
17056   ac_status=$?
17057   echo "$as_me:17057: \$? = $ac_status" >&5
17058   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17059   { (eval echo "$as_me:17059: \"$ac_try\"") >&5
17060   (eval $ac_try) 2>&5
17061   ac_status=$?
17062   echo "$as_me:17062: \$? = $ac_status" >&5
17063   (exit $ac_status); }; }; then
17064   ac_cv_func_fork_works=yes
17065 else
17066   echo "$as_me: program exited with status $ac_status" >&5
17067 echo "$as_me: failed program was:" >&5
17068 cat conftest.$ac_ext >&5
17069 ac_cv_func_fork_works=no
17070 fi
17071 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17072 fi
17073 fi
17074 echo "$as_me:17074: result: $ac_cv_func_fork_works" >&5
17075 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17076
17077 fi
17078 if test "x$ac_cv_func_fork_works" = xcross; then
17079   case $host in
17080     *-*-amigaos* | *-*-msdosdjgpp*)
17081       # Override, as these systems have only a dummy fork() stub
17082       ac_cv_func_fork_works=no
17083       ;;
17084     *)
17085       ac_cv_func_fork_works=yes
17086       ;;
17087   esac
17088   { echo "$as_me:17088: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17089 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17090 fi
17091 ac_cv_func_vfork_works=$ac_cv_func_vfork
17092 if test "x$ac_cv_func_vfork" = xyes; then
17093   echo "$as_me:17093: checking for working vfork" >&5
17094 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17095 if test "${ac_cv_func_vfork_works+set}" = set; then
17096   echo $ECHO_N "(cached) $ECHO_C" >&6
17097 else
17098   if test "$cross_compiling" = yes; then
17099   ac_cv_func_vfork_works=cross
17100 else
17101   cat >conftest.$ac_ext <<_ACEOF
17102 #line 17102 "configure"
17103 #include "confdefs.h"
17104 /* Thanks to Paul Eggert for this test.  */
17105 #include <stdio.h>
17106 #include <sys/types.h>
17107 #include <sys/stat.h>
17108 #if HAVE_UNISTD_H
17109 # include <unistd.h>
17110 #endif
17111 #if HAVE_VFORK_H
17112 # include <vfork.h>
17113 #endif
17114 /* On some sparc systems, changes by the child to local and incoming
17115    argument registers are propagated back to the parent.  The compiler
17116    is told about this with #include <vfork.h>, but some compilers
17117    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17118    static variable whose address is put into a register that is
17119    clobbered by the vfork.  */
17120 static
17121 #ifdef __cplusplus
17122 sparc_address_test (int arg)
17123 # else
17124 sparc_address_test (arg) int arg;
17125 #endif
17126 {
17127   static pid_t child;
17128   if (!child) {
17129     child = vfork ();
17130     if (child < 0) {
17131       perror ("vfork");
17132       _exit(2);
17133     }
17134     if (!child) {
17135       arg = getpid();
17136       write(-1, "", 0);
17137       _exit (arg);
17138     }
17139   }
17140 }
17141
17142 int
17143 main ()
17144 {
17145   pid_t parent = getpid ();
17146   pid_t child;
17147
17148   sparc_address_test ();
17149
17150   child = vfork ();
17151
17152   if (child == 0) {
17153     /* Here is another test for sparc vfork register problems.  This
17154        test uses lots of local variables, at least as many local
17155        variables as main has allocated so far including compiler
17156        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17157        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17158        reuse the register of parent for one of the local variables,
17159        since it will think that parent can't possibly be used any more
17160        in this routine.  Assigning to the local variable will thus
17161        munge parent in the parent process.  */
17162     pid_t
17163       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17164       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17165     /* Convince the compiler that p..p7 are live; otherwise, it might
17166        use the same hardware register for all 8 local variables.  */
17167     if (p != p1 || p != p2 || p != p3 || p != p4
17168         || p != p5 || p != p6 || p != p7)
17169       _exit(1);
17170
17171     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17172        from child file descriptors.  If the child closes a descriptor
17173        before it execs or exits, this munges the parent's descriptor
17174        as well.  Test for this by closing stdout in the child.  */
17175     _exit(close(fileno(stdout)) != 0);
17176   } else {
17177     int status;
17178     struct stat st;
17179
17180     while (wait(&status) != child)
17181       ;
17182     $ac_main_return(
17183          /* Was there some problem with vforking?  */
17184          child < 0
17185
17186          /* Did the child fail?  (This shouldn't happen.)  */
17187          || status
17188
17189          /* Did the vfork/compiler bug occur?  */
17190          || parent != getpid()
17191
17192          /* Did the file descriptor bug occur?  */
17193          || fstat(fileno(stdout), &st) != 0
17194          );
17195   }
17196 }
17197 _ACEOF
17198 rm -f conftest$ac_exeext
17199 if { (eval echo "$as_me:17199: \"$ac_link\"") >&5
17200   (eval $ac_link) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17204   { (eval echo "$as_me:17204: \"$ac_try\"") >&5
17205   (eval $ac_try) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit $ac_status); }; }; then
17209   ac_cv_func_vfork_works=yes
17210 else
17211   echo "$as_me: program exited with status $ac_status" >&5
17212 echo "$as_me: failed program was:" >&5
17213 cat conftest.$ac_ext >&5
17214 ac_cv_func_vfork_works=no
17215 fi
17216 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17217 fi
17218 fi
17219 echo "$as_me:17219: result: $ac_cv_func_vfork_works" >&5
17220 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17221
17222 fi;
17223 if test "x$ac_cv_func_fork_works" = xcross; then
17224   ac_cv_func_vfork_works=ac_cv_func_vfork
17225   { echo "$as_me:17225: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17226 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17227 fi
17228
17229 if test "x$ac_cv_func_vfork_works" = xyes; then
17230
17231 cat >>confdefs.h <<\EOF
17232 #define HAVE_WORKING_VFORK 1
17233 EOF
17234
17235 else
17236
17237 cat >>confdefs.h <<\EOF
17238 #define vfork fork
17239 EOF
17240
17241 fi
17242 if test "x$ac_cv_func_fork_works" = xyes; then
17243
17244 cat >>confdefs.h <<\EOF
17245 #define HAVE_WORKING_FORK 1
17246 EOF
17247
17248 fi
17249
17250 # special check for test/ditto.c
17251
17252 echo "$as_me:17252: checking for openpty in -lutil" >&5
17253 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17254 if test "${ac_cv_lib_util_openpty+set}" = set; then
17255   echo $ECHO_N "(cached) $ECHO_C" >&6
17256 else
17257   ac_check_lib_save_LIBS=$LIBS
17258 LIBS="-lutil  $LIBS"
17259 cat >conftest.$ac_ext <<_ACEOF
17260 #line 17260 "configure"
17261 #include "confdefs.h"
17262
17263 /* Override any gcc2 internal prototype to avoid an error.  */
17264 #ifdef __cplusplus
17265 extern "C"
17266 #endif
17267 /* We use char because int might match the return type of a gcc2
17268    builtin and then its argument prototype would still apply.  */
17269 char openpty ();
17270 int
17271 main ()
17272 {
17273 openpty ();
17274   ;
17275   return 0;
17276 }
17277 _ACEOF
17278 rm -f conftest.$ac_objext conftest$ac_exeext
17279 if { (eval echo "$as_me:17279: \"$ac_link\"") >&5
17280   (eval $ac_link) 2>&5
17281   ac_status=$?
17282   echo "$as_me:17282: \$? = $ac_status" >&5
17283   (exit $ac_status); } &&
17284          { ac_try='test -s conftest$ac_exeext'
17285   { (eval echo "$as_me:17285: \"$ac_try\"") >&5
17286   (eval $ac_try) 2>&5
17287   ac_status=$?
17288   echo "$as_me:17288: \$? = $ac_status" >&5
17289   (exit $ac_status); }; }; then
17290   ac_cv_lib_util_openpty=yes
17291 else
17292   echo "$as_me: failed program was:" >&5
17293 cat conftest.$ac_ext >&5
17294 ac_cv_lib_util_openpty=no
17295 fi
17296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17297 LIBS=$ac_check_lib_save_LIBS
17298 fi
17299 echo "$as_me:17299: result: $ac_cv_lib_util_openpty" >&5
17300 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17301 if test $ac_cv_lib_util_openpty = yes; then
17302   cf_cv_lib_util=yes
17303 else
17304   cf_cv_lib_util=no
17305 fi
17306
17307 echo "$as_me:17307: checking for openpty header" >&5
17308 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17309 if test "${cf_cv_func_openpty+set}" = set; then
17310   echo $ECHO_N "(cached) $ECHO_C" >&6
17311 else
17312
17313     cf_save_LIBS="$LIBS"
17314     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17315     for cf_header in pty.h libutil.h util.h
17316     do
17317     cat >conftest.$ac_ext <<_ACEOF
17318 #line 17318 "configure"
17319 #include "confdefs.h"
17320
17321 #include <$cf_header>
17322
17323 int
17324 main ()
17325 {
17326
17327     int x = openpty((int *)0, (int *)0, (char *)0,
17328                    (struct termios *)0, (struct winsize *)0);
17329
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 rm -f conftest.$ac_objext conftest$ac_exeext
17335 if { (eval echo "$as_me:17335: \"$ac_link\"") >&5
17336   (eval $ac_link) 2>&5
17337   ac_status=$?
17338   echo "$as_me:17338: \$? = $ac_status" >&5
17339   (exit $ac_status); } &&
17340          { ac_try='test -s conftest$ac_exeext'
17341   { (eval echo "$as_me:17341: \"$ac_try\"") >&5
17342   (eval $ac_try) 2>&5
17343   ac_status=$?
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit $ac_status); }; }; then
17346
17347         cf_cv_func_openpty=$cf_header
17348         break
17349
17350 else
17351   echo "$as_me: failed program was:" >&5
17352 cat conftest.$ac_ext >&5
17353
17354         cf_cv_func_openpty=no
17355
17356 fi
17357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17358     done
17359     LIBS="$cf_save_LIBS"
17360
17361 fi
17362 echo "$as_me:17362: result: $cf_cv_func_openpty" >&5
17363 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17364
17365 if test "$cf_cv_func_openpty" != no ; then
17366     cat >>confdefs.h <<EOF
17367 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17368 EOF
17369
17370     cat >>confdefs.h <<\EOF
17371 #define USE_XTERM_PTY 1
17372 EOF
17373
17374     if test "$cf_cv_lib_util" = yes ; then
17375         TEST_LIBS="-lutil $TEST_LIBS"
17376     fi
17377 fi
17378
17379 if test "$with_hashed_db" != no ; then
17380         cat >>confdefs.h <<\EOF
17381 #define USE_HASHED_DB 1
17382 EOF
17383
17384 case $with_hashed_db in #(vi
17385 yes|*able*) #(vi
17386     ;;
17387 *)
17388     if test -d "$with_hashed_db" ; then
17389
17390 if test -n "$with_hashed_db/include" ; then
17391   for cf_add_incdir in $with_hashed_db/include
17392   do
17393         while test $cf_add_incdir != /usr/include
17394         do
17395           if test -d $cf_add_incdir
17396           then
17397                 cf_have_incdir=no
17398                 if test -n "$CFLAGS$CPPFLAGS" ; then
17399                   # a loop is needed to ensure we can add subdirs of existing dirs
17400                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17401                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17402                           cf_have_incdir=yes; break
17403                         fi
17404                   done
17405                 fi
17406
17407                 if test "$cf_have_incdir" = no ; then
17408                   if test "$cf_add_incdir" = /usr/local/include ; then
17409                         if test "$GCC" = yes
17410                         then
17411                           cf_save_CPPFLAGS=$CPPFLAGS
17412                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17413                           cat >conftest.$ac_ext <<_ACEOF
17414 #line 17414 "configure"
17415 #include "confdefs.h"
17416 #include <stdio.h>
17417 int
17418 main ()
17419 {
17420 printf("Hello")
17421   ;
17422   return 0;
17423 }
17424 _ACEOF
17425 rm -f conftest.$ac_objext
17426 if { (eval echo "$as_me:17426: \"$ac_compile\"") >&5
17427   (eval $ac_compile) 2>&5
17428   ac_status=$?
17429   echo "$as_me:17429: \$? = $ac_status" >&5
17430   (exit $ac_status); } &&
17431          { ac_try='test -s conftest.$ac_objext'
17432   { (eval echo "$as_me:17432: \"$ac_try\"") >&5
17433   (eval $ac_try) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); }; }; then
17437   :
17438 else
17439   echo "$as_me: failed program was:" >&5
17440 cat conftest.$ac_ext >&5
17441 cf_have_incdir=yes
17442 fi
17443 rm -f conftest.$ac_objext conftest.$ac_ext
17444                           CPPFLAGS=$cf_save_CPPFLAGS
17445                         fi
17446                   fi
17447                 fi
17448
17449                 if test "$cf_have_incdir" = no ; then
17450                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17451
17452 echo "${as_me:-configure}:17452: testing adding $cf_add_incdir to include-path ..." 1>&5
17453
17454                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17455
17456                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17457                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17458                   cf_add_incdir="$cf_top_incdir"
17459                 else
17460                   break
17461                 fi
17462           fi
17463         done
17464   done
17465 fi
17466
17467 if test -n "$with_hashed_db/lib" ; then
17468   for cf_add_libdir in $with_hashed_db/lib
17469   do
17470     if test $cf_add_libdir = /usr/lib ; then
17471       :
17472     elif test -d $cf_add_libdir
17473     then
17474       cf_have_libdir=no
17475       if test -n "$LDFLAGS$LIBS" ; then
17476         # a loop is needed to ensure we can add subdirs of existing dirs
17477         for cf_test_libdir in $LDFLAGS $LIBS ; do
17478           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17479             cf_have_libdir=yes; break
17480           fi
17481         done
17482       fi
17483       if test "$cf_have_libdir" = no ; then
17484         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17485
17486 echo "${as_me:-configure}:17486: testing adding $cf_add_libdir to library-path ..." 1>&5
17487
17488         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17489       fi
17490     fi
17491   done
17492 fi
17493
17494     fi
17495 esac
17496
17497 echo "$as_me:17497: checking for db.h" >&5
17498 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17499 if test "${ac_cv_header_db_h+set}" = set; then
17500   echo $ECHO_N "(cached) $ECHO_C" >&6
17501 else
17502   cat >conftest.$ac_ext <<_ACEOF
17503 #line 17503 "configure"
17504 #include "confdefs.h"
17505 #include <db.h>
17506 _ACEOF
17507 if { (eval echo "$as_me:17507: \"$ac_cpp conftest.$ac_ext\"") >&5
17508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17509   ac_status=$?
17510   egrep -v '^ *\+' conftest.er1 >conftest.err
17511   rm -f conftest.er1
17512   cat conftest.err >&5
17513   echo "$as_me:17513: \$? = $ac_status" >&5
17514   (exit $ac_status); } >/dev/null; then
17515   if test -s conftest.err; then
17516     ac_cpp_err=$ac_c_preproc_warn_flag
17517   else
17518     ac_cpp_err=
17519   fi
17520 else
17521   ac_cpp_err=yes
17522 fi
17523 if test -z "$ac_cpp_err"; then
17524   ac_cv_header_db_h=yes
17525 else
17526   echo "$as_me: failed program was:" >&5
17527   cat conftest.$ac_ext >&5
17528   ac_cv_header_db_h=no
17529 fi
17530 rm -f conftest.err conftest.$ac_ext
17531 fi
17532 echo "$as_me:17532: result: $ac_cv_header_db_h" >&5
17533 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17534 if test $ac_cv_header_db_h = yes; then
17535
17536 echo "$as_me:17536: checking for version of db" >&5
17537 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17538 if test "${cf_cv_hashed_db_version+set}" = set; then
17539   echo $ECHO_N "(cached) $ECHO_C" >&6
17540 else
17541
17542 cf_cv_hashed_db_version=unknown
17543
17544 for cf_db_version in 1 2 3 4 5
17545 do
17546
17547 echo "${as_me:-configure}:17547: testing checking for db version $cf_db_version ..." 1>&5
17548
17549         cat >conftest.$ac_ext <<_ACEOF
17550 #line 17550 "configure"
17551 #include "confdefs.h"
17552
17553 $ac_includes_default
17554 #include <db.h>
17555
17556 #ifdef DB_VERSION_MAJOR
17557         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17558 #if $cf_db_version == DB_VERSION_MAJOR
17559         /* ok */
17560 #else
17561         make an error
17562 #endif
17563 #else
17564 #if $cf_db_version == 1
17565         /* ok: assuming this is DB 1.8.5 */
17566 #else
17567         make an error
17568 #endif
17569 #endif
17570
17571 int
17572 main ()
17573 {
17574 DBT *foo = 0
17575   ;
17576   return 0;
17577 }
17578 _ACEOF
17579 rm -f conftest.$ac_objext
17580 if { (eval echo "$as_me:17580: \"$ac_compile\"") >&5
17581   (eval $ac_compile) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit $ac_status); } &&
17585          { ac_try='test -s conftest.$ac_objext'
17586   { (eval echo "$as_me:17586: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:17589: \$? = $ac_status" >&5
17590   (exit $ac_status); }; }; then
17591
17592         cf_cv_hashed_db_version=$cf_db_version
17593         break
17594
17595 else
17596   echo "$as_me: failed program was:" >&5
17597 cat conftest.$ac_ext >&5
17598 fi
17599 rm -f conftest.$ac_objext conftest.$ac_ext
17600 done
17601
17602 fi
17603 echo "$as_me:17603: result: $cf_cv_hashed_db_version" >&5
17604 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17605
17606 if test "$cf_cv_hashed_db_version" = unknown ; then
17607         { { echo "$as_me:17607: error: Cannot determine version of db" >&5
17608 echo "$as_me: error: Cannot determine version of db" >&2;}
17609    { (exit 1); exit 1; }; }
17610 else
17611
17612 echo "$as_me:17612: checking for db libraries" >&5
17613 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17614 if test "${cf_cv_hashed_db_libs+set}" = set; then
17615   echo $ECHO_N "(cached) $ECHO_C" >&6
17616 else
17617
17618 cf_cv_hashed_db_libs=unknown
17619 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17620 do
17621         cf_save_libs="$LIBS"
17622         if test -n "$cf_db_libs"; then
17623                 LIBS="-l$cf_db_libs $LIBS"
17624         fi
17625
17626 echo "${as_me:-configure}:17626: testing checking for library "$cf_db_libs" ..." 1>&5
17627
17628         cat >conftest.$ac_ext <<_ACEOF
17629 #line 17629 "configure"
17630 #include "confdefs.h"
17631
17632 $ac_includes_default
17633 #include <db.h>
17634
17635 int
17636 main ()
17637 {
17638
17639         char *path = "/tmp/foo";
17640 #ifdef DB_VERSION_MAJOR
17641 #if DB_VERSION_MAJOR >= 4
17642         DB *result = 0;
17643         db_create(&result, NULL, 0);
17644         result->open(result,
17645                 NULL,
17646                 path,
17647                 path,
17648                 DB_HASH,
17649                 DB_CREATE,
17650                 0644);
17651 #elif DB_VERSION_MAJOR >= 3
17652         DB *result = 0;
17653         db_create(&result, NULL, 0);
17654         result->open(result,
17655                 path,
17656                 path,
17657                 DB_HASH,
17658                 DB_CREATE,
17659                 0644);
17660 #elif DB_VERSION_MAJOR >= 2
17661         DB *result = 0;
17662         db_open(path,
17663                 DB_HASH,
17664                 DB_CREATE,
17665                 0644,
17666                 (DB_ENV *) 0,
17667                 (DB_INFO *) 0,
17668                 &result);
17669 #endif /* DB_VERSION_MAJOR */
17670 #else
17671         DB *result = dbopen(path,
17672                      2,
17673                      0644,
17674                      DB_HASH,
17675                      0);
17676 #endif
17677         ${cf_cv_main_return:-return}(result != 0)
17678
17679   ;
17680   return 0;
17681 }
17682 _ACEOF
17683 rm -f conftest.$ac_objext conftest$ac_exeext
17684 if { (eval echo "$as_me:17684: \"$ac_link\"") >&5
17685   (eval $ac_link) 2>&5
17686   ac_status=$?
17687   echo "$as_me:17687: \$? = $ac_status" >&5
17688   (exit $ac_status); } &&
17689          { ac_try='test -s conftest$ac_exeext'
17690   { (eval echo "$as_me:17690: \"$ac_try\"") >&5
17691   (eval $ac_try) 2>&5
17692   ac_status=$?
17693   echo "$as_me:17693: \$? = $ac_status" >&5
17694   (exit $ac_status); }; }; then
17695
17696         if test -n "$cf_db_libs" ; then
17697                 cf_cv_hashed_db_libs=$cf_db_libs
17698         else
17699                 cf_cv_hashed_db_libs=default
17700         fi
17701         LIBS="$cf_save_libs"
17702         break
17703
17704 else
17705   echo "$as_me: failed program was:" >&5
17706 cat conftest.$ac_ext >&5
17707 fi
17708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17709         LIBS="$cf_save_libs"
17710 done
17711
17712 fi
17713 echo "$as_me:17713: result: $cf_cv_hashed_db_libs" >&5
17714 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17715
17716         if test "$cf_cv_hashed_db_libs" = unknown ; then
17717                 { { echo "$as_me:17717: error: Cannot determine library for db" >&5
17718 echo "$as_me: error: Cannot determine library for db" >&2;}
17719    { (exit 1); exit 1; }; }
17720         elif test "$cf_cv_hashed_db_libs" != default ; then
17721                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17722         fi
17723 fi
17724
17725 else
17726
17727         { { echo "$as_me:17727: error: Cannot find db.h" >&5
17728 echo "$as_me: error: Cannot find db.h" >&2;}
17729    { (exit 1); exit 1; }; }
17730
17731 fi
17732
17733 fi
17734
17735 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17736         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17737         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17738 fi
17739
17740 # Just in case, check if the C compiler has a bool type.
17741
17742 echo "$as_me:17742: checking if we should include stdbool.h" >&5
17743 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17744
17745 if test "${cf_cv_header_stdbool_h+set}" = set; then
17746   echo $ECHO_N "(cached) $ECHO_C" >&6
17747 else
17748
17749         cat >conftest.$ac_ext <<_ACEOF
17750 #line 17750 "configure"
17751 #include "confdefs.h"
17752
17753 int
17754 main ()
17755 {
17756 bool foo = false
17757   ;
17758   return 0;
17759 }
17760 _ACEOF
17761 rm -f conftest.$ac_objext
17762 if { (eval echo "$as_me:17762: \"$ac_compile\"") >&5
17763   (eval $ac_compile) 2>&5
17764   ac_status=$?
17765   echo "$as_me:17765: \$? = $ac_status" >&5
17766   (exit $ac_status); } &&
17767          { ac_try='test -s conftest.$ac_objext'
17768   { (eval echo "$as_me:17768: \"$ac_try\"") >&5
17769   (eval $ac_try) 2>&5
17770   ac_status=$?
17771   echo "$as_me:17771: \$? = $ac_status" >&5
17772   (exit $ac_status); }; }; then
17773   cf_cv_header_stdbool_h=0
17774 else
17775   echo "$as_me: failed program was:" >&5
17776 cat conftest.$ac_ext >&5
17777 cat >conftest.$ac_ext <<_ACEOF
17778 #line 17778 "configure"
17779 #include "confdefs.h"
17780
17781 #ifndef __BEOS__
17782 #include <stdbool.h>
17783 #endif
17784
17785 int
17786 main ()
17787 {
17788 bool foo = false
17789   ;
17790   return 0;
17791 }
17792 _ACEOF
17793 rm -f conftest.$ac_objext
17794 if { (eval echo "$as_me:17794: \"$ac_compile\"") >&5
17795   (eval $ac_compile) 2>&5
17796   ac_status=$?
17797   echo "$as_me:17797: \$? = $ac_status" >&5
17798   (exit $ac_status); } &&
17799          { ac_try='test -s conftest.$ac_objext'
17800   { (eval echo "$as_me:17800: \"$ac_try\"") >&5
17801   (eval $ac_try) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit $ac_status); }; }; then
17805   cf_cv_header_stdbool_h=1
17806 else
17807   echo "$as_me: failed program was:" >&5
17808 cat conftest.$ac_ext >&5
17809 cf_cv_header_stdbool_h=0
17810 fi
17811 rm -f conftest.$ac_objext conftest.$ac_ext
17812 fi
17813 rm -f conftest.$ac_objext conftest.$ac_ext
17814 fi
17815
17816 if test "$cf_cv_header_stdbool_h" = 1
17817 then    echo "$as_me:17817: result: yes" >&5
17818 echo "${ECHO_T}yes" >&6
17819 else    echo "$as_me:17819: result: no" >&5
17820 echo "${ECHO_T}no" >&6
17821 fi
17822
17823 echo "$as_me:17823: checking for builtin bool type" >&5
17824 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17825
17826 if test "${cf_cv_cc_bool_type+set}" = set; then
17827   echo $ECHO_N "(cached) $ECHO_C" >&6
17828 else
17829
17830         cat >conftest.$ac_ext <<_ACEOF
17831 #line 17831 "configure"
17832 #include "confdefs.h"
17833
17834 #include <stdio.h>
17835 #include <sys/types.h>
17836
17837 int
17838 main ()
17839 {
17840 bool x = false
17841   ;
17842   return 0;
17843 }
17844 _ACEOF
17845 rm -f conftest.$ac_objext
17846 if { (eval echo "$as_me:17846: \"$ac_compile\"") >&5
17847   (eval $ac_compile) 2>&5
17848   ac_status=$?
17849   echo "$as_me:17849: \$? = $ac_status" >&5
17850   (exit $ac_status); } &&
17851          { ac_try='test -s conftest.$ac_objext'
17852   { (eval echo "$as_me:17852: \"$ac_try\"") >&5
17853   (eval $ac_try) 2>&5
17854   ac_status=$?
17855   echo "$as_me:17855: \$? = $ac_status" >&5
17856   (exit $ac_status); }; }; then
17857   cf_cv_cc_bool_type=1
17858 else
17859   echo "$as_me: failed program was:" >&5
17860 cat conftest.$ac_ext >&5
17861 cf_cv_cc_bool_type=0
17862 fi
17863 rm -f conftest.$ac_objext conftest.$ac_ext
17864
17865 fi
17866
17867 if test "$cf_cv_cc_bool_type" = 1
17868 then    echo "$as_me:17868: result: yes" >&5
17869 echo "${ECHO_T}yes" >&6
17870 else    echo "$as_me:17870: result: no" >&5
17871 echo "${ECHO_T}no" >&6
17872 fi
17873
17874 # Check for C++ compiler characteristics (and ensure that it's there!)
17875 if test -n "$CXX" ; then
17876         ac_ext=cc
17877 ac_cpp='$CXXCPP $CPPFLAGS'
17878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17879 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17881 ac_main_return=return
17882
17883 if test -n "$GXX" ; then
17884 case $cf_cv_system_name in #(vi
17885 os2*) #(vi
17886         cf_stdcpp_libname=stdcpp
17887         ;;
17888 *)
17889         cf_stdcpp_libname=stdc++
17890         ;;
17891 esac
17892 echo "$as_me:17892: checking for library $cf_stdcpp_libname" >&5
17893 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17894 if test "${cf_cv_libstdcpp+set}" = set; then
17895   echo $ECHO_N "(cached) $ECHO_C" >&6
17896 else
17897
17898         cf_save="$LIBS"
17899         LIBS="-l$cf_stdcpp_libname $LIBS"
17900 cat >conftest.$ac_ext <<_ACEOF
17901 #line 17901 "configure"
17902 #include "confdefs.h"
17903
17904 #include <strstream.h>
17905 int
17906 main ()
17907 {
17908
17909 char buf[80];
17910 strstreambuf foo(buf, sizeof(buf))
17911
17912   ;
17913   return 0;
17914 }
17915 _ACEOF
17916 rm -f conftest.$ac_objext conftest$ac_exeext
17917 if { (eval echo "$as_me:17917: \"$ac_link\"") >&5
17918   (eval $ac_link) 2>&5
17919   ac_status=$?
17920   echo "$as_me:17920: \$? = $ac_status" >&5
17921   (exit $ac_status); } &&
17922          { ac_try='test -s conftest$ac_exeext'
17923   { (eval echo "$as_me:17923: \"$ac_try\"") >&5
17924   (eval $ac_try) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); }; }; then
17928   cf_cv_libstdcpp=yes
17929 else
17930   echo "$as_me: failed program was:" >&5
17931 cat conftest.$ac_ext >&5
17932 cf_cv_libstdcpp=no
17933 fi
17934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17935         LIBS="$cf_save"
17936
17937 fi
17938 echo "$as_me:17938: result: $cf_cv_libstdcpp" >&5
17939 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17940 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17941 fi
17942
17943         echo "$as_me:17943: checking whether $CXX understands -c and -o together" >&5
17944 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17945 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17946   echo $ECHO_N "(cached) $ECHO_C" >&6
17947 else
17948
17949 cat > conftest.$ac_ext <<CF_EOF
17950 #include <stdio.h>
17951 int main()
17952 {
17953         ${cf_cv_main_return:-return}(0);
17954 }
17955 CF_EOF
17956 # We do the test twice because some compilers refuse to overwrite an
17957 # existing .o file with -o, though they will create one.
17958 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17959 if { (eval echo "$as_me:17959: \"$ac_try\"") >&5
17960   (eval $ac_try) 2>&5
17961   ac_status=$?
17962   echo "$as_me:17962: \$? = $ac_status" >&5
17963   (exit $ac_status); } &&
17964   test -f conftest2.$ac_objext && { (eval echo "$as_me:17964: \"$ac_try\"") >&5
17965   (eval $ac_try) 2>&5
17966   ac_status=$?
17967   echo "$as_me:17967: \$? = $ac_status" >&5
17968   (exit $ac_status); };
17969 then
17970   eval cf_cv_prog_CXX_c_o=yes
17971 else
17972   eval cf_cv_prog_CXX_c_o=no
17973 fi
17974 rm -rf conftest*
17975
17976 fi
17977 if test $cf_cv_prog_CXX_c_o = yes; then
17978   echo "$as_me:17978: result: yes" >&5
17979 echo "${ECHO_T}yes" >&6
17980 else
17981   echo "$as_me:17981: result: no" >&5
17982 echo "${ECHO_T}no" >&6
17983 fi
17984
17985         case $GXX_VERSION in
17986         1*|2.0-6*)
17987                 cf_cxx_library=yes
17988                 ;;
17989         *-2.7*|2.7*)
17990
17991 cf_cxx_library=unknown
17992 case $cf_cv_system_name in #(vi
17993 os2*) #(vi
17994         cf_gpp_libname=gpp
17995         ;;
17996 *)
17997         cf_gpp_libname=g++
17998         ;;
17999 esac
18000 if test "$GXX" = yes; then
18001         echo "$as_me:18001: checking for lib$cf_gpp_libname" >&5
18002 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18003         cf_save="$LIBS"
18004         LIBS="-l$cf_gpp_libname $LIBS"
18005         cat >conftest.$ac_ext <<_ACEOF
18006 #line 18006 "configure"
18007 #include "confdefs.h"
18008
18009 #include <$cf_gpp_libname/builtin.h>
18010
18011 int
18012 main ()
18013 {
18014 two_arg_error_handler_t foo2 = lib_error_handler
18015   ;
18016   return 0;
18017 }
18018 _ACEOF
18019 rm -f conftest.$ac_objext conftest$ac_exeext
18020 if { (eval echo "$as_me:18020: \"$ac_link\"") >&5
18021   (eval $ac_link) 2>&5
18022   ac_status=$?
18023   echo "$as_me:18023: \$? = $ac_status" >&5
18024   (exit $ac_status); } &&
18025          { ac_try='test -s conftest$ac_exeext'
18026   { (eval echo "$as_me:18026: \"$ac_try\"") >&5
18027   (eval $ac_try) 2>&5
18028   ac_status=$?
18029   echo "$as_me:18029: \$? = $ac_status" >&5
18030   (exit $ac_status); }; }; then
18031   cf_cxx_library=yes
18032          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18033          if test "$cf_gpp_libname" = cpp ; then
18034             cat >>confdefs.h <<\EOF
18035 #define HAVE_GPP_BUILTIN_H 1
18036 EOF
18037
18038          else
18039             cat >>confdefs.h <<\EOF
18040 #define HAVE_GXX_BUILTIN_H 1
18041 EOF
18042
18043          fi
18044 else
18045   echo "$as_me: failed program was:" >&5
18046 cat conftest.$ac_ext >&5
18047 cat >conftest.$ac_ext <<_ACEOF
18048 #line 18048 "configure"
18049 #include "confdefs.h"
18050
18051 #include <builtin.h>
18052
18053 int
18054 main ()
18055 {
18056 two_arg_error_handler_t foo2 = lib_error_handler
18057   ;
18058   return 0;
18059 }
18060 _ACEOF
18061 rm -f conftest.$ac_objext conftest$ac_exeext
18062 if { (eval echo "$as_me:18062: \"$ac_link\"") >&5
18063   (eval $ac_link) 2>&5
18064   ac_status=$?
18065   echo "$as_me:18065: \$? = $ac_status" >&5
18066   (exit $ac_status); } &&
18067          { ac_try='test -s conftest$ac_exeext'
18068   { (eval echo "$as_me:18068: \"$ac_try\"") >&5
18069   (eval $ac_try) 2>&5
18070   ac_status=$?
18071   echo "$as_me:18071: \$? = $ac_status" >&5
18072   (exit $ac_status); }; }; then
18073   cf_cxx_library=yes
18074          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18075          cat >>confdefs.h <<\EOF
18076 #define HAVE_BUILTIN_H 1
18077 EOF
18078
18079 else
18080   echo "$as_me: failed program was:" >&5
18081 cat conftest.$ac_ext >&5
18082 cf_cxx_library=no
18083 fi
18084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18085 fi
18086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18087         LIBS="$cf_save"
18088         echo "$as_me:18088: result: $cf_cxx_library" >&5
18089 echo "${ECHO_T}$cf_cxx_library" >&6
18090 fi
18091
18092                 ;;
18093         *)
18094                 cf_cxx_library=no
18095                 ;;
18096         esac
18097
18098         ac_ext=cc
18099 ac_cpp='$CXXCPP $CPPFLAGS'
18100 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18101 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18102 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18103 ac_main_return=return
18104 echo "$as_me:18104: checking how to run the C++ preprocessor" >&5
18105 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18106 if test -z "$CXXCPP"; then
18107   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18108   echo $ECHO_N "(cached) $ECHO_C" >&6
18109 else
18110       # Double quotes because CXXCPP needs to be expanded
18111     for CXXCPP in "$CXX -E" "/lib/cpp"
18112     do
18113       ac_preproc_ok=false
18114 for ac_cxx_preproc_warn_flag in '' yes
18115 do
18116   # Use a header file that comes with gcc, so configuring glibc
18117   # with a fresh cross-compiler works.
18118   # On the NeXT, cc -E runs the code through the compiler's parser,
18119   # not just through cpp. "Syntax error" is here to catch this case.
18120   cat >conftest.$ac_ext <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18123 #include <assert.h>
18124                      Syntax error
18125 _ACEOF
18126 if { (eval echo "$as_me:18126: \"$ac_cpp conftest.$ac_ext\"") >&5
18127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18128   ac_status=$?
18129   egrep -v '^ *\+' conftest.er1 >conftest.err
18130   rm -f conftest.er1
18131   cat conftest.err >&5
18132   echo "$as_me:18132: \$? = $ac_status" >&5
18133   (exit $ac_status); } >/dev/null; then
18134   if test -s conftest.err; then
18135     ac_cpp_err=$ac_cxx_preproc_warn_flag
18136   else
18137     ac_cpp_err=
18138   fi
18139 else
18140   ac_cpp_err=yes
18141 fi
18142 if test -z "$ac_cpp_err"; then
18143   :
18144 else
18145   echo "$as_me: failed program was:" >&5
18146   cat conftest.$ac_ext >&5
18147   # Broken: fails on valid input.
18148 continue
18149 fi
18150 rm -f conftest.err conftest.$ac_ext
18151
18152   # OK, works on sane cases.  Now check whether non-existent headers
18153   # can be detected and how.
18154   cat >conftest.$ac_ext <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157 #include <ac_nonexistent.h>
18158 _ACEOF
18159 if { (eval echo "$as_me:18159: \"$ac_cpp conftest.$ac_ext\"") >&5
18160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18161   ac_status=$?
18162   egrep -v '^ *\+' conftest.er1 >conftest.err
18163   rm -f conftest.er1
18164   cat conftest.err >&5
18165   echo "$as_me:18165: \$? = $ac_status" >&5
18166   (exit $ac_status); } >/dev/null; then
18167   if test -s conftest.err; then
18168     ac_cpp_err=$ac_cxx_preproc_warn_flag
18169   else
18170     ac_cpp_err=
18171   fi
18172 else
18173   ac_cpp_err=yes
18174 fi
18175 if test -z "$ac_cpp_err"; then
18176   # Broken: success on invalid input.
18177 continue
18178 else
18179   echo "$as_me: failed program was:" >&5
18180   cat conftest.$ac_ext >&5
18181   # Passes both tests.
18182 ac_preproc_ok=:
18183 break
18184 fi
18185 rm -f conftest.err conftest.$ac_ext
18186
18187 done
18188 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18189 rm -f conftest.err conftest.$ac_ext
18190 if $ac_preproc_ok; then
18191   break
18192 fi
18193
18194     done
18195     ac_cv_prog_CXXCPP=$CXXCPP
18196
18197 fi
18198   CXXCPP=$ac_cv_prog_CXXCPP
18199 else
18200   ac_cv_prog_CXXCPP=$CXXCPP
18201 fi
18202 echo "$as_me:18202: result: $CXXCPP" >&5
18203 echo "${ECHO_T}$CXXCPP" >&6
18204 ac_preproc_ok=false
18205 for ac_cxx_preproc_warn_flag in '' yes
18206 do
18207   # Use a header file that comes with gcc, so configuring glibc
18208   # with a fresh cross-compiler works.
18209   # On the NeXT, cc -E runs the code through the compiler's parser,
18210   # not just through cpp. "Syntax error" is here to catch this case.
18211   cat >conftest.$ac_ext <<_ACEOF
18212 #line 18212 "configure"
18213 #include "confdefs.h"
18214 #include <assert.h>
18215                      Syntax error
18216 _ACEOF
18217 if { (eval echo "$as_me:18217: \"$ac_cpp conftest.$ac_ext\"") >&5
18218   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18219   ac_status=$?
18220   egrep -v '^ *\+' conftest.er1 >conftest.err
18221   rm -f conftest.er1
18222   cat conftest.err >&5
18223   echo "$as_me:18223: \$? = $ac_status" >&5
18224   (exit $ac_status); } >/dev/null; then
18225   if test -s conftest.err; then
18226     ac_cpp_err=$ac_cxx_preproc_warn_flag
18227   else
18228     ac_cpp_err=
18229   fi
18230 else
18231   ac_cpp_err=yes
18232 fi
18233 if test -z "$ac_cpp_err"; then
18234   :
18235 else
18236   echo "$as_me: failed program was:" >&5
18237   cat conftest.$ac_ext >&5
18238   # Broken: fails on valid input.
18239 continue
18240 fi
18241 rm -f conftest.err conftest.$ac_ext
18242
18243   # OK, works on sane cases.  Now check whether non-existent headers
18244   # can be detected and how.
18245   cat >conftest.$ac_ext <<_ACEOF
18246 #line 18246 "configure"
18247 #include "confdefs.h"
18248 #include <ac_nonexistent.h>
18249 _ACEOF
18250 if { (eval echo "$as_me:18250: \"$ac_cpp conftest.$ac_ext\"") >&5
18251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18252   ac_status=$?
18253   egrep -v '^ *\+' conftest.er1 >conftest.err
18254   rm -f conftest.er1
18255   cat conftest.err >&5
18256   echo "$as_me:18256: \$? = $ac_status" >&5
18257   (exit $ac_status); } >/dev/null; then
18258   if test -s conftest.err; then
18259     ac_cpp_err=$ac_cxx_preproc_warn_flag
18260   else
18261     ac_cpp_err=
18262   fi
18263 else
18264   ac_cpp_err=yes
18265 fi
18266 if test -z "$ac_cpp_err"; then
18267   # Broken: success on invalid input.
18268 continue
18269 else
18270   echo "$as_me: failed program was:" >&5
18271   cat conftest.$ac_ext >&5
18272   # Passes both tests.
18273 ac_preproc_ok=:
18274 break
18275 fi
18276 rm -f conftest.err conftest.$ac_ext
18277
18278 done
18279 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18280 rm -f conftest.err conftest.$ac_ext
18281 if $ac_preproc_ok; then
18282   :
18283 else
18284   { { echo "$as_me:18284: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18285 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18286    { (exit 1); exit 1; }; }
18287 fi
18288
18289 ac_ext=cc
18290 ac_cpp='$CXXCPP $CPPFLAGS'
18291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18294 ac_main_return=return
18295
18296 for ac_header in typeinfo
18297 do
18298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18299 echo "$as_me:18299: checking for $ac_header" >&5
18300 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18301 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18302   echo $ECHO_N "(cached) $ECHO_C" >&6
18303 else
18304   cat >conftest.$ac_ext <<_ACEOF
18305 #line 18305 "configure"
18306 #include "confdefs.h"
18307 #include <$ac_header>
18308 _ACEOF
18309 if { (eval echo "$as_me:18309: \"$ac_cpp conftest.$ac_ext\"") >&5
18310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18311   ac_status=$?
18312   egrep -v '^ *\+' conftest.er1 >conftest.err
18313   rm -f conftest.er1
18314   cat conftest.err >&5
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); } >/dev/null; then
18317   if test -s conftest.err; then
18318     ac_cpp_err=$ac_cxx_preproc_warn_flag
18319   else
18320     ac_cpp_err=
18321   fi
18322 else
18323   ac_cpp_err=yes
18324 fi
18325 if test -z "$ac_cpp_err"; then
18326   eval "$as_ac_Header=yes"
18327 else
18328   echo "$as_me: failed program was:" >&5
18329   cat conftest.$ac_ext >&5
18330   eval "$as_ac_Header=no"
18331 fi
18332 rm -f conftest.err conftest.$ac_ext
18333 fi
18334 echo "$as_me:18334: result: `eval echo '${'$as_ac_Header'}'`" >&5
18335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18336 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18337   cat >>confdefs.h <<EOF
18338 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18339 EOF
18340
18341 fi
18342 done
18343
18344 for ac_header in iostream
18345 do
18346 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18347 echo "$as_me:18347: checking for $ac_header" >&5
18348 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18349 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18350   echo $ECHO_N "(cached) $ECHO_C" >&6
18351 else
18352   cat >conftest.$ac_ext <<_ACEOF
18353 #line 18353 "configure"
18354 #include "confdefs.h"
18355 #include <$ac_header>
18356 _ACEOF
18357 if { (eval echo "$as_me:18357: \"$ac_cpp conftest.$ac_ext\"") >&5
18358   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18359   ac_status=$?
18360   egrep -v '^ *\+' conftest.er1 >conftest.err
18361   rm -f conftest.er1
18362   cat conftest.err >&5
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); } >/dev/null; then
18365   if test -s conftest.err; then
18366     ac_cpp_err=$ac_cxx_preproc_warn_flag
18367   else
18368     ac_cpp_err=
18369   fi
18370 else
18371   ac_cpp_err=yes
18372 fi
18373 if test -z "$ac_cpp_err"; then
18374   eval "$as_ac_Header=yes"
18375 else
18376   echo "$as_me: failed program was:" >&5
18377   cat conftest.$ac_ext >&5
18378   eval "$as_ac_Header=no"
18379 fi
18380 rm -f conftest.err conftest.$ac_ext
18381 fi
18382 echo "$as_me:18382: result: `eval echo '${'$as_ac_Header'}'`" >&5
18383 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18384 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18385   cat >>confdefs.h <<EOF
18386 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18387 EOF
18388
18389 fi
18390 done
18391
18392 if test x"$ac_cv_header_iostream" = xyes ; then
18393         echo "$as_me:18393: checking if iostream uses std-namespace" >&5
18394 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18395         cat >conftest.$ac_ext <<_ACEOF
18396 #line 18396 "configure"
18397 #include "confdefs.h"
18398
18399 #include <iostream>
18400 using std::endl;
18401 using std::cerr;
18402 int
18403 main ()
18404 {
18405
18406 cerr << "testing" << endl;
18407
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest.$ac_objext
18413 if { (eval echo "$as_me:18413: \"$ac_compile\"") >&5
18414   (eval $ac_compile) 2>&5
18415   ac_status=$?
18416   echo "$as_me:18416: \$? = $ac_status" >&5
18417   (exit $ac_status); } &&
18418          { ac_try='test -s conftest.$ac_objext'
18419   { (eval echo "$as_me:18419: \"$ac_try\"") >&5
18420   (eval $ac_try) 2>&5
18421   ac_status=$?
18422   echo "$as_me:18422: \$? = $ac_status" >&5
18423   (exit $ac_status); }; }; then
18424   cf_iostream_namespace=yes
18425 else
18426   echo "$as_me: failed program was:" >&5
18427 cat conftest.$ac_ext >&5
18428 cf_iostream_namespace=no
18429 fi
18430 rm -f conftest.$ac_objext conftest.$ac_ext
18431         echo "$as_me:18431: result: $cf_iostream_namespace" >&5
18432 echo "${ECHO_T}$cf_iostream_namespace" >&6
18433         if test "$cf_iostream_namespace" = yes ; then
18434                 cat >>confdefs.h <<\EOF
18435 #define IOSTREAM_NAMESPACE 1
18436 EOF
18437
18438         fi
18439 fi
18440
18441 echo "$as_me:18441: checking if we should include stdbool.h" >&5
18442 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18443
18444 if test "${cf_cv_header_stdbool_h+set}" = set; then
18445   echo $ECHO_N "(cached) $ECHO_C" >&6
18446 else
18447
18448         cat >conftest.$ac_ext <<_ACEOF
18449 #line 18449 "configure"
18450 #include "confdefs.h"
18451
18452 int
18453 main ()
18454 {
18455 bool foo = false
18456   ;
18457   return 0;
18458 }
18459 _ACEOF
18460 rm -f conftest.$ac_objext
18461 if { (eval echo "$as_me:18461: \"$ac_compile\"") >&5
18462   (eval $ac_compile) 2>&5
18463   ac_status=$?
18464   echo "$as_me:18464: \$? = $ac_status" >&5
18465   (exit $ac_status); } &&
18466          { ac_try='test -s conftest.$ac_objext'
18467   { (eval echo "$as_me:18467: \"$ac_try\"") >&5
18468   (eval $ac_try) 2>&5
18469   ac_status=$?
18470   echo "$as_me:18470: \$? = $ac_status" >&5
18471   (exit $ac_status); }; }; then
18472   cf_cv_header_stdbool_h=0
18473 else
18474   echo "$as_me: failed program was:" >&5
18475 cat conftest.$ac_ext >&5
18476 cat >conftest.$ac_ext <<_ACEOF
18477 #line 18477 "configure"
18478 #include "confdefs.h"
18479
18480 #ifndef __BEOS__
18481 #include <stdbool.h>
18482 #endif
18483
18484 int
18485 main ()
18486 {
18487 bool foo = false
18488   ;
18489   return 0;
18490 }
18491 _ACEOF
18492 rm -f conftest.$ac_objext
18493 if { (eval echo "$as_me:18493: \"$ac_compile\"") >&5
18494   (eval $ac_compile) 2>&5
18495   ac_status=$?
18496   echo "$as_me:18496: \$? = $ac_status" >&5
18497   (exit $ac_status); } &&
18498          { ac_try='test -s conftest.$ac_objext'
18499   { (eval echo "$as_me:18499: \"$ac_try\"") >&5
18500   (eval $ac_try) 2>&5
18501   ac_status=$?
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit $ac_status); }; }; then
18504   cf_cv_header_stdbool_h=1
18505 else
18506   echo "$as_me: failed program was:" >&5
18507 cat conftest.$ac_ext >&5
18508 cf_cv_header_stdbool_h=0
18509 fi
18510 rm -f conftest.$ac_objext conftest.$ac_ext
18511 fi
18512 rm -f conftest.$ac_objext conftest.$ac_ext
18513 fi
18514
18515 if test "$cf_cv_header_stdbool_h" = 1
18516 then    echo "$as_me:18516: result: yes" >&5
18517 echo "${ECHO_T}yes" >&6
18518 else    echo "$as_me:18518: result: no" >&5
18519 echo "${ECHO_T}no" >&6
18520 fi
18521
18522 echo "$as_me:18522: checking for builtin bool type" >&5
18523 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18524
18525 if test "${cf_cv_builtin_bool+set}" = set; then
18526   echo $ECHO_N "(cached) $ECHO_C" >&6
18527 else
18528
18529         cat >conftest.$ac_ext <<_ACEOF
18530 #line 18530 "configure"
18531 #include "confdefs.h"
18532
18533 #include <stdio.h>
18534 #include <sys/types.h>
18535
18536 int
18537 main ()
18538 {
18539 bool x = false
18540   ;
18541   return 0;
18542 }
18543 _ACEOF
18544 rm -f conftest.$ac_objext
18545 if { (eval echo "$as_me:18545: \"$ac_compile\"") >&5
18546   (eval $ac_compile) 2>&5
18547   ac_status=$?
18548   echo "$as_me:18548: \$? = $ac_status" >&5
18549   (exit $ac_status); } &&
18550          { ac_try='test -s conftest.$ac_objext'
18551   { (eval echo "$as_me:18551: \"$ac_try\"") >&5
18552   (eval $ac_try) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); }; }; then
18556   cf_cv_builtin_bool=1
18557 else
18558   echo "$as_me: failed program was:" >&5
18559 cat conftest.$ac_ext >&5
18560 cf_cv_builtin_bool=0
18561 fi
18562 rm -f conftest.$ac_objext conftest.$ac_ext
18563
18564 fi
18565
18566 if test "$cf_cv_builtin_bool" = 1
18567 then    echo "$as_me:18567: result: yes" >&5
18568 echo "${ECHO_T}yes" >&6
18569 else    echo "$as_me:18569: result: no" >&5
18570 echo "${ECHO_T}no" >&6
18571 fi
18572
18573 echo "$as_me:18573: checking for size of bool" >&5
18574 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18575 if test "${cf_cv_type_of_bool+set}" = set; then
18576   echo $ECHO_N "(cached) $ECHO_C" >&6
18577 else
18578
18579         rm -f cf_test.out
18580         if test "$cross_compiling" = yes; then
18581   cf_cv_type_of_bool=unknown
18582 else
18583   cat >conftest.$ac_ext <<_ACEOF
18584 #line 18584 "configure"
18585 #include "confdefs.h"
18586
18587 #include <stdlib.h>
18588 #include <stdio.h>
18589
18590 #if defined(__cplusplus)
18591
18592 #ifdef HAVE_GXX_BUILTIN_H
18593 #include <g++/builtin.h>
18594 #elif HAVE_GPP_BUILTIN_H
18595 #include <gpp/builtin.h>
18596 #elif HAVE_BUILTIN_H
18597 #include <builtin.h>
18598 #endif
18599
18600 #else
18601
18602 #if $cf_cv_header_stdbool_h
18603 #include <stdbool.h>
18604 #endif
18605
18606 #endif
18607
18608 main()
18609 {
18610         FILE *fp = fopen("cf_test.out", "w");
18611         if (fp != 0) {
18612                 bool x = true;
18613                 if ((bool)(-x) >= 0)
18614                         fputs("unsigned ", fp);
18615                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18616                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18617                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18618                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18619                 fclose(fp);
18620         }
18621         ${cf_cv_main_return:-return}(0);
18622 }
18623
18624 _ACEOF
18625 rm -f conftest$ac_exeext
18626 if { (eval echo "$as_me:18626: \"$ac_link\"") >&5
18627   (eval $ac_link) 2>&5
18628   ac_status=$?
18629   echo "$as_me:18629: \$? = $ac_status" >&5
18630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18631   { (eval echo "$as_me:18631: \"$ac_try\"") >&5
18632   (eval $ac_try) 2>&5
18633   ac_status=$?
18634   echo "$as_me:18634: \$? = $ac_status" >&5
18635   (exit $ac_status); }; }; then
18636   cf_cv_type_of_bool=`cat cf_test.out`
18637                  if test -z "$cf_cv_type_of_bool"; then
18638                    cf_cv_type_of_bool=unknown
18639                  fi
18640 else
18641   echo "$as_me: program exited with status $ac_status" >&5
18642 echo "$as_me: failed program was:" >&5
18643 cat conftest.$ac_ext >&5
18644 cf_cv_type_of_bool=unknown
18645 fi
18646 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18647 fi
18648
18649 fi
18650
18651         rm -f cf_test.out
18652 echo "$as_me:18652: result: $cf_cv_type_of_bool" >&5
18653 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18654 if test "$cf_cv_type_of_bool" = unknown ; then
18655         case .$NCURSES_BOOL in #(vi
18656         .auto|.) NCURSES_BOOL=unsigned;;
18657         esac
18658         { echo "$as_me:18658: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18659 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18660         cf_cv_type_of_bool=$NCURSES_BOOL
18661 fi
18662
18663 echo "$as_me:18663: checking for special defines needed for etip.h" >&5
18664 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18665 cf_save_CXXFLAGS="$CXXFLAGS"
18666 cf_result="none"
18667
18668 # etip.h includes ncurses.h which includes ncurses_dll.h
18669 # But ncurses_dll.h is generated - fix here.
18670 test -d include || mkdir include
18671 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18672
18673 for cf_math in "" MATH_H
18674 do
18675 for cf_excp in "" MATH_EXCEPTION
18676 do
18677         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18678         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18679         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18680 cat >conftest.$ac_ext <<_ACEOF
18681 #line 18681 "configure"
18682 #include "confdefs.h"
18683
18684 #include <etip.h.in>
18685
18686 int
18687 main ()
18688 {
18689
18690   ;
18691   return 0;
18692 }
18693 _ACEOF
18694 rm -f conftest.$ac_objext
18695 if { (eval echo "$as_me:18695: \"$ac_compile\"") >&5
18696   (eval $ac_compile) 2>&5
18697   ac_status=$?
18698   echo "$as_me:18698: \$? = $ac_status" >&5
18699   (exit $ac_status); } &&
18700          { ac_try='test -s conftest.$ac_objext'
18701   { (eval echo "$as_me:18701: \"$ac_try\"") >&5
18702   (eval $ac_try) 2>&5
18703   ac_status=$?
18704   echo "$as_me:18704: \$? = $ac_status" >&5
18705   (exit $ac_status); }; }; then
18706
18707         test -n "$cf_math" && cat >>confdefs.h <<EOF
18708 #define ETIP_NEEDS_${cf_math} 1
18709 EOF
18710
18711         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18712 #define ETIP_NEEDS_${cf_excp} 1
18713 EOF
18714
18715         cf_result="$cf_math $cf_excp"
18716         break
18717
18718 else
18719   echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18721 fi
18722 rm -f conftest.$ac_objext conftest.$ac_ext
18723 done
18724 done
18725 echo "$as_me:18725: result: $cf_result" >&5
18726 echo "${ECHO_T}$cf_result" >&6
18727 CXXFLAGS="$cf_save_CXXFLAGS"
18728
18729 if test -n "$CXX"; then
18730 echo "$as_me:18730: checking if $CXX accepts parameter initialization" >&5
18731 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18732 if test "${cf_cv_cpp_param_init+set}" = set; then
18733   echo $ECHO_N "(cached) $ECHO_C" >&6
18734 else
18735
18736         ac_ext=cc
18737 ac_cpp='$CXXCPP $CPPFLAGS'
18738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18741 ac_main_return=return
18742
18743         if test "$cross_compiling" = yes; then
18744   cf_cv_cpp_param_init=unknown
18745 else
18746   cat >conftest.$ac_ext <<_ACEOF
18747 #line 18747 "configure"
18748 #include "confdefs.h"
18749
18750 class TEST {
18751 private:
18752         int value;
18753 public:
18754         TEST(int x = 1);
18755         ~TEST();
18756 };
18757
18758 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18759 {
18760         value = x;
18761 }
18762 int main() { }
18763
18764 _ACEOF
18765 rm -f conftest$ac_exeext
18766 if { (eval echo "$as_me:18766: \"$ac_link\"") >&5
18767   (eval $ac_link) 2>&5
18768   ac_status=$?
18769   echo "$as_me:18769: \$? = $ac_status" >&5
18770   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18771   { (eval echo "$as_me:18771: \"$ac_try\"") >&5
18772   (eval $ac_try) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); }; }; then
18776   cf_cv_cpp_param_init=yes
18777 else
18778   echo "$as_me: program exited with status $ac_status" >&5
18779 echo "$as_me: failed program was:" >&5
18780 cat conftest.$ac_ext >&5
18781 cf_cv_cpp_param_init=no
18782 fi
18783 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18784 fi
18785         ac_ext=cc
18786 ac_cpp='$CXXCPP $CPPFLAGS'
18787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18790 ac_main_return=return
18791
18792 fi
18793 echo "$as_me:18793: result: $cf_cv_cpp_param_init" >&5
18794 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18795 fi
18796 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18797 #define CPP_HAS_PARAM_INIT 1
18798 EOF
18799
18800 if test -n "$CXX"; then
18801
18802 echo "$as_me:18802: checking if $CXX accepts static_cast" >&5
18803 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18804 if test "${cf_cv_cpp_static_cast+set}" = set; then
18805   echo $ECHO_N "(cached) $ECHO_C" >&6
18806 else
18807
18808         ac_ext=cc
18809 ac_cpp='$CXXCPP $CPPFLAGS'
18810 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18811 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18812 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18813 ac_main_return=return
18814
18815         cat >conftest.$ac_ext <<_ACEOF
18816 #line 18816 "configure"
18817 #include "confdefs.h"
18818
18819 class NCursesPanel
18820 {
18821 public:
18822   NCursesPanel(int nlines,
18823                int ncols,
18824                int begin_y = 0,
18825                int begin_x = 0)
18826   {
18827   }
18828
18829   ~NCursesPanel();
18830 };
18831
18832 template<class T> class NCursesUserPanel : public NCursesPanel
18833 {
18834 public:
18835   NCursesUserPanel (int nlines,
18836                     int ncols,
18837                     int begin_y = 0,
18838                     int begin_x = 0,
18839                     const T* p_UserData = static_cast<T*>(0))
18840     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18841   {
18842   };
18843   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18844   {
18845   };
18846
18847   virtual ~NCursesUserPanel() {};
18848 };
18849
18850 int
18851 main ()
18852 {
18853
18854         const char* p_UserData = static_cast<char*>(0)
18855   ;
18856   return 0;
18857 }
18858 _ACEOF
18859 rm -f conftest.$ac_objext
18860 if { (eval echo "$as_me:18860: \"$ac_compile\"") >&5
18861   (eval $ac_compile) 2>&5
18862   ac_status=$?
18863   echo "$as_me:18863: \$? = $ac_status" >&5
18864   (exit $ac_status); } &&
18865          { ac_try='test -s conftest.$ac_objext'
18866   { (eval echo "$as_me:18866: \"$ac_try\"") >&5
18867   (eval $ac_try) 2>&5
18868   ac_status=$?
18869   echo "$as_me:18869: \$? = $ac_status" >&5
18870   (exit $ac_status); }; }; then
18871   cf_cv_cpp_static_cast=yes
18872 else
18873   echo "$as_me: failed program was:" >&5
18874 cat conftest.$ac_ext >&5
18875 cf_cv_cpp_static_cast=no
18876 fi
18877 rm -f conftest.$ac_objext conftest.$ac_ext
18878
18879         ac_ext=cc
18880 ac_cpp='$CXXCPP $CPPFLAGS'
18881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18882 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18884 ac_main_return=return
18885
18886 fi
18887 echo "$as_me:18887: result: $cf_cv_cpp_static_cast" >&5
18888 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18889
18890 fi
18891
18892 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18893 #define CPP_HAS_STATIC_CAST 1
18894 EOF
18895
18896         CXX_AR='$(AR)'
18897         CXX_ARFLAGS='$(ARFLAGS)'
18898         case $cf_cv_system_name in #(vi
18899         irix*) #(vi
18900             if test "$GXX" != yes ; then
18901                 CXX_AR='$(CXX)'
18902                 CXX_ARFLAGS='-ar -o'
18903             fi
18904             ;;
18905         sco3.2v5*) #(vi
18906             CXXLDFLAGS="-u main"
18907             ;;
18908         solaris2*)
18909             if test "$GXX" != yes ; then
18910                 CXX_AR='$(CXX)'
18911                 CXX_ARFLAGS='-xar -o'
18912             fi
18913             ;;
18914         esac
18915
18916 else
18917         cf_cxx_library=no
18918         cf_cv_builtin_bool=1
18919
18920         # Just because we are not configuring against C++ right now does not
18921         # mean that a user will not want to use C++.  Some distributors disable
18922         # the C++ portion of this configuration as a shortcut (or just to avoid
18923         # compiling the demo in the c++ directory).  So we need a reasonable
18924         # default for the 'bool' type.
18925         #
18926         # Caveat: since the storage of the bool type is not standardized, it
18927         # may change.
18928
18929         if test "$NCURSES_BOOL" != auto ; then
18930                 cf_cv_type_of_bool=$NCURSES_BOOL
18931                 cf_cv_header_stdbool_h=0
18932         else
18933                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18934
18935 echo "$as_me:18935: checking for size of bool" >&5
18936 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18937 if test "${cf_cv_type_of_bool+set}" = set; then
18938   echo $ECHO_N "(cached) $ECHO_C" >&6
18939 else
18940
18941         rm -f cf_test.out
18942         if test "$cross_compiling" = yes; then
18943   cf_cv_type_of_bool=unknown
18944 else
18945   cat >conftest.$ac_ext <<_ACEOF
18946 #line 18946 "configure"
18947 #include "confdefs.h"
18948
18949 #include <stdlib.h>
18950 #include <stdio.h>
18951
18952 #if defined(__cplusplus)
18953
18954 #ifdef HAVE_GXX_BUILTIN_H
18955 #include <g++/builtin.h>
18956 #elif HAVE_GPP_BUILTIN_H
18957 #include <gpp/builtin.h>
18958 #elif HAVE_BUILTIN_H
18959 #include <builtin.h>
18960 #endif
18961
18962 #else
18963
18964 #if $cf_cv_header_stdbool_h
18965 #include <stdbool.h>
18966 #endif
18967
18968 #endif
18969
18970 main()
18971 {
18972         FILE *fp = fopen("cf_test.out", "w");
18973         if (fp != 0) {
18974                 bool x = true;
18975                 if ((bool)(-x) >= 0)
18976                         fputs("unsigned ", fp);
18977                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18978                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18979                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18980                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18981                 fclose(fp);
18982         }
18983         ${cf_cv_main_return:-return}(0);
18984 }
18985
18986 _ACEOF
18987 rm -f conftest$ac_exeext
18988 if { (eval echo "$as_me:18988: \"$ac_link\"") >&5
18989   (eval $ac_link) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18993   { (eval echo "$as_me:18993: \"$ac_try\"") >&5
18994   (eval $ac_try) 2>&5
18995   ac_status=$?
18996   echo "$as_me:18996: \$? = $ac_status" >&5
18997   (exit $ac_status); }; }; then
18998   cf_cv_type_of_bool=`cat cf_test.out`
18999                  if test -z "$cf_cv_type_of_bool"; then
19000                    cf_cv_type_of_bool=unknown
19001                  fi
19002 else
19003   echo "$as_me: program exited with status $ac_status" >&5
19004 echo "$as_me: failed program was:" >&5
19005 cat conftest.$ac_ext >&5
19006 cf_cv_type_of_bool=unknown
19007 fi
19008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19009 fi
19010
19011 fi
19012
19013         rm -f cf_test.out
19014 echo "$as_me:19014: result: $cf_cv_type_of_bool" >&5
19015 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19016 if test "$cf_cv_type_of_bool" = unknown ; then
19017         case .$NCURSES_BOOL in #(vi
19018         .auto|.) NCURSES_BOOL=unsigned;;
19019         esac
19020         { echo "$as_me:19020: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19021 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19022         cf_cv_type_of_bool=$NCURSES_BOOL
19023 fi
19024
19025                 else
19026                         echo "$as_me:19026: checking for fallback type of bool" >&5
19027 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19028                         case "$host_cpu" in #(vi
19029                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19030                         *)      cf_cv_type_of_bool=int  ;;
19031                         esac
19032                         echo "$as_me:19032: result: $cf_cv_type_of_bool" >&5
19033 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19034                 fi
19035         fi
19036 fi
19037
19038 # If the C compiler did not declare bool, and we did not determine that the C++
19039 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19040 # ncurses library use the same type as C++ bool.  Note that this allows one to
19041 # specify the type of bool in a configure-script option and postpone
19042 # integration with the C++ compiler provided that the types are compatible.
19043 USE_CXX_BOOL=1
19044 if test $cf_cv_cc_bool_type = 1
19045 then
19046         # oops: C has a bool.  Unlikely, but C++ could differ.
19047         USE_CXX_BOOL=0
19048 elif test $cf_cv_builtin_bool = 0
19049 then
19050         # C++ has no bool
19051         USE_CXX_BOOL=0
19052 else
19053         # this is the normal case
19054         USE_CXX_BOOL='defined(__cplusplus)'
19055 fi
19056
19057 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19058
19059         if test "$cf_with_ada" != "no" ; then
19060                 if test "$with_libtool" != "no"; then
19061                         { echo "$as_me:19061: WARNING: libtool does not support Ada - disabling feature" >&5
19062 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19063                         cf_with_ada=no
19064                 fi
19065         fi
19066
19067         if test "$cf_with_ada" != "no" ; then
19068
19069 cf_ada_make=gnatmake
19070 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19071 set dummy $cf_ada_make; ac_word=$2
19072 echo "$as_me:19072: checking for $ac_word" >&5
19073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19074 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19075   echo $ECHO_N "(cached) $ECHO_C" >&6
19076 else
19077   if test -n "$gnat_exists"; then
19078   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19079 else
19080   ac_save_IFS=$IFS; IFS=$ac_path_separator
19081 ac_dummy="$PATH"
19082 for ac_dir in $ac_dummy; do
19083   IFS=$ac_save_IFS
19084   test -z "$ac_dir" && ac_dir=.
19085   $as_executable_p "$ac_dir/$ac_word" || continue
19086 ac_cv_prog_gnat_exists="yes"
19087 echo "$as_me:19087: found $ac_dir/$ac_word" >&5
19088 break
19089 done
19090
19091   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19092 fi
19093 fi
19094 gnat_exists=$ac_cv_prog_gnat_exists
19095 if test -n "$gnat_exists"; then
19096   echo "$as_me:19096: result: $gnat_exists" >&5
19097 echo "${ECHO_T}$gnat_exists" >&6
19098 else
19099   echo "$as_me:19099: result: no" >&5
19100 echo "${ECHO_T}no" >&6
19101 fi
19102
19103 if test "$ac_cv_prog_gnat_exists" = no; then
19104    cf_ada_make=
19105    cf_cv_prog_gnat_correct=no
19106 else
19107
19108 echo "$as_me:19108: checking for gnat version" >&5
19109 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19110 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19111         grep '[0-9].[0-9][0-9]*' |\
19112     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19113 echo "$as_me:19113: result: $cf_gnat_version" >&5
19114 echo "${ECHO_T}$cf_gnat_version" >&6
19115
19116 case $cf_gnat_version in #(vi
19117 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19118         cf_cv_prog_gnat_correct=yes
19119         ;;
19120 *)
19121         { echo "$as_me:19121: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19122 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19123         cf_cv_prog_gnat_correct=no
19124         ;;
19125 esac
19126
19127    # Extract the first word of "m4", so it can be a program name with args.
19128 set dummy m4; ac_word=$2
19129 echo "$as_me:19129: checking for $ac_word" >&5
19130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19131 if test "${ac_cv_prog_M4_exists+set}" = set; then
19132   echo $ECHO_N "(cached) $ECHO_C" >&6
19133 else
19134   if test -n "$M4_exists"; then
19135   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19136 else
19137   ac_save_IFS=$IFS; IFS=$ac_path_separator
19138 ac_dummy="$PATH"
19139 for ac_dir in $ac_dummy; do
19140   IFS=$ac_save_IFS
19141   test -z "$ac_dir" && ac_dir=.
19142   $as_executable_p "$ac_dir/$ac_word" || continue
19143 ac_cv_prog_M4_exists="yes"
19144 echo "$as_me:19144: found $ac_dir/$ac_word" >&5
19145 break
19146 done
19147
19148   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19149 fi
19150 fi
19151 M4_exists=$ac_cv_prog_M4_exists
19152 if test -n "$M4_exists"; then
19153   echo "$as_me:19153: result: $M4_exists" >&5
19154 echo "${ECHO_T}$M4_exists" >&6
19155 else
19156   echo "$as_me:19156: result: no" >&5
19157 echo "${ECHO_T}no" >&6
19158 fi
19159
19160    if test "$ac_cv_prog_M4_exists" = no; then
19161       cf_cv_prog_gnat_correct=no
19162       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19163    fi
19164    if test "$cf_cv_prog_gnat_correct" = yes; then
19165       echo "$as_me:19165: checking if GNAT works" >&5
19166 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19167
19168 rm -rf conftest* *~conftest*
19169 cat >>conftest.ads <<CF_EOF
19170 procedure conftest;
19171 CF_EOF
19172 cat >>conftest.adb <<CF_EOF
19173 with Text_IO;
19174 with GNAT.OS_Lib;
19175 procedure conftest is
19176 begin
19177    Text_IO.Put ("Hello World");
19178    Text_IO.New_Line;
19179    GNAT.OS_Lib.OS_Exit (0);
19180 end conftest;
19181 CF_EOF
19182 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19183    if ( ./conftest 1>&5 2>&1 ) ; then
19184       cf_cv_prog_gnat_correct=yes
19185    else
19186       cf_cv_prog_gnat_correct=no
19187    fi
19188 else
19189    cf_cv_prog_gnat_correct=no
19190 fi
19191 rm -rf conftest* *~conftest*
19192
19193       echo "$as_me:19193: result: $cf_cv_prog_gnat_correct" >&5
19194 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19195    fi
19196 fi
19197
19198                 if test "$cf_cv_prog_gnat_correct" = yes; then
19199
19200         ADAFLAGS="$ADAFLAGS -gnatpn"
19201
19202                         # make ADAFLAGS consistent with CFLAGS
19203                         case "$CFLAGS" in
19204                         *-g*)
19205
19206         ADAFLAGS="$ADAFLAGS -g"
19207
19208                                 ;;
19209                         esac
19210                         case "$CFLAGS" in
19211                         *-O*)
19212
19213         ADAFLAGS="$ADAFLAGS -O3"
19214
19215                                 ;;
19216                         esac
19217
19218 echo "$as_me:19218: checking if GNAT supports generics" >&5
19219 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19220 case $cf_gnat_version in #(vi
19221 3.[1-9]*|[4-9].*) #(vi
19222         cf_gnat_generics=yes
19223         ;;
19224 *)
19225         cf_gnat_generics=no
19226         ;;
19227 esac
19228 echo "$as_me:19228: result: $cf_gnat_generics" >&5
19229 echo "${ECHO_T}$cf_gnat_generics" >&6
19230
19231 if test "$cf_gnat_generics" = yes
19232 then
19233         cf_compile_generics=generics
19234         cf_generic_objects="\${GENOBJS}"
19235 else
19236         cf_compile_generics=
19237         cf_generic_objects=
19238 fi
19239
19240 echo "$as_me:19240: checking if GNAT supports SIGINT" >&5
19241 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19242 if test "${cf_cv_gnat_sigint+set}" = set; then
19243   echo $ECHO_N "(cached) $ECHO_C" >&6
19244 else
19245
19246 rm -rf conftest* *~conftest*
19247 cat >>conftest.ads <<CF_EOF
19248 with Ada.Interrupts.Names;
19249
19250 package ConfTest is
19251
19252    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19253    pragma Unreserve_All_Interrupts;
19254    pragma Warnings (On);
19255
19256    protected Process is
19257       procedure Stop;
19258       function Continue return Boolean;
19259       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19260    private
19261       Done : Boolean := False;
19262    end Process;
19263
19264 end ConfTest;
19265 CF_EOF
19266 cat >>conftest.adb <<CF_EOF
19267 package body ConfTest is
19268    protected body Process is
19269       procedure Stop is
19270       begin
19271          Done := True;
19272       end Stop;
19273       function Continue return Boolean is
19274       begin
19275          return not Done;
19276       end Continue;
19277    end Process;
19278 end ConfTest;
19279 CF_EOF
19280 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19281       cf_cv_gnat_sigint=yes
19282 else
19283    cf_cv_gnat_sigint=no
19284 fi
19285 rm -rf conftest* *~conftest*
19286
19287 fi
19288 echo "$as_me:19288: result: $cf_cv_gnat_sigint" >&5
19289 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19290
19291 if test $cf_cv_gnat_sigint = yes ; then
19292         USE_GNAT_SIGINT=""
19293 else
19294         USE_GNAT_SIGINT="#"
19295 fi
19296
19297 echo "$as_me:19297: checking if GNAT pragma Unreferenced works" >&5
19298 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19299 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19300   echo $ECHO_N "(cached) $ECHO_C" >&6
19301 else
19302
19303 rm -rf conftest* *~conftest*
19304 cat >>conftest.ads <<CF_EOF
19305 procedure conftest;
19306 CF_EOF
19307 cat >>conftest.adb <<CF_EOF
19308 with Text_IO;
19309 with GNAT.OS_Lib;
19310 procedure conftest is
19311    test : Integer;
19312    pragma Unreferenced (test);
19313 begin
19314    test := 1;
19315    Text_IO.Put ("Hello World");
19316    Text_IO.New_Line;
19317    GNAT.OS_Lib.OS_Exit (0);
19318 end conftest;
19319 CF_EOF
19320 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19321       cf_cv_pragma_unreferenced=yes
19322 else
19323    cf_cv_pragma_unreferenced=no
19324 fi
19325 rm -rf conftest* *~conftest*
19326
19327 fi
19328 echo "$as_me:19328: result: $cf_cv_pragma_unreferenced" >&5
19329 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19330
19331 # if the pragma is supported, use it (needed in the Trace code).
19332 if test $cf_cv_pragma_unreferenced = yes ; then
19333         PRAGMA_UNREF=TRUE
19334 else
19335         PRAGMA_UNREF=FALSE
19336 fi
19337
19338 cf_gnat_libraries=no
19339 cf_gnat_projects=no
19340
19341 echo "$as_me:19341: checking if GNAT supports project files" >&5
19342 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19343 case $cf_gnat_version in #(vi
19344 3.[0-9]*) #(vi
19345         ;;
19346 *)
19347         case $cf_cv_system_name in #(vi
19348         cygwin*) #(vi
19349                 ;;
19350         *)
19351                 mkdir conftest.src conftest.bin conftest.lib
19352                 cd conftest.src
19353                 rm -rf conftest* *~conftest*
19354                 cat >>library.gpr <<CF_EOF
19355 project Library is
19356   Kind := External ("LIB_KIND");
19357   for Library_Name use "ConfTest";
19358   for Object_Dir use ".";
19359   for Library_ALI_Dir use External("LIBRARY_DIR");
19360   for Library_Version use External ("SONAME");
19361   for Library_Kind use Kind;
19362   for Library_Dir use External("BUILD_DIR");
19363   Source_Dir := External ("SOURCE_DIR");
19364   for Source_Dirs use (Source_Dir);
19365   package Compiler is
19366      for Default_Switches ("Ada") use
19367        ("-g",
19368         "-O2",
19369         "-gnatafno",
19370         "-gnatVa",   -- All validity checks
19371         "-gnatwa");  -- Activate all optional errors
19372   end Compiler;
19373 end Library;
19374 CF_EOF
19375                 cat >>confpackage.ads <<CF_EOF
19376 package ConfPackage is
19377    procedure conftest;
19378 end ConfPackage;
19379 CF_EOF
19380                 cat >>confpackage.adb <<CF_EOF
19381 with Text_IO;
19382 package body ConfPackage is
19383    procedure conftest is
19384    begin
19385       Text_IO.Put ("Hello World");
19386       Text_IO.New_Line;
19387    end conftest;
19388 end ConfPackage;
19389 CF_EOF
19390                 if ( $cf_ada_make $ADAFLAGS \
19391                                 -Plibrary.gpr \
19392                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19393                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19394                                 -XSOURCE_DIR=`pwd` \
19395                                 -XSONAME=libConfTest.so.1 \
19396                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19397                         cf_gnat_projects=yes
19398                 fi
19399                 cd ..
19400                 if test -f conftest.lib/confpackage.ali
19401                 then
19402                         cf_gnat_libraries=yes
19403                 fi
19404                 rm -rf conftest* *~conftest*
19405                 ;;
19406         esac
19407         ;;
19408 esac
19409 echo "$as_me:19409: result: $cf_gnat_projects" >&5
19410 echo "${ECHO_T}$cf_gnat_projects" >&6
19411
19412 if test $cf_gnat_projects = yes
19413 then
19414         echo "$as_me:19414: checking if GNAT supports libraries" >&5
19415 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19416         echo "$as_me:19416: result: $cf_gnat_libraries" >&5
19417 echo "${ECHO_T}$cf_gnat_libraries" >&6
19418 fi
19419
19420 if test "$cf_gnat_projects" = yes
19421 then
19422         USE_OLD_MAKERULES="#"
19423         USE_GNAT_PROJECTS=""
19424 else
19425         USE_OLD_MAKERULES=""
19426         USE_GNAT_PROJECTS="#"
19427 fi
19428
19429 if test "$cf_gnat_libraries" = yes
19430 then
19431         USE_GNAT_LIBRARIES=""
19432 else
19433         USE_GNAT_LIBRARIES="#"
19434 fi
19435
19436 echo "$as_me:19436: checking for ada-compiler" >&5
19437 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19438
19439 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19440 if test "${with_ada_compiler+set}" = set; then
19441   withval="$with_ada_compiler"
19442   cf_ada_compiler=$withval
19443 else
19444   cf_ada_compiler=gnatmake
19445 fi;
19446
19447 echo "$as_me:19447: result: $cf_ada_compiler" >&5
19448 echo "${ECHO_T}$cf_ada_compiler" >&6
19449
19450                         cf_ada_package=terminal_interface
19451
19452 echo "$as_me:19452: checking for ada-include" >&5
19453 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19454
19455 # Check whether --with-ada-include or --without-ada-include was given.
19456 if test "${with_ada_include+set}" = set; then
19457   withval="$with_ada_include"
19458
19459 else
19460   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19461 fi; if test -n "$prefix/share/ada/adainclude" ; then
19462
19463 if test "x$prefix" != xNONE; then
19464   cf_path_syntax="$prefix"
19465 else
19466   cf_path_syntax="$ac_default_prefix"
19467 fi
19468
19469 case ".$withval" in #(vi
19470 .\$\(*\)*|.\'*\'*) #(vi
19471   ;;
19472 ..|./*|.\\*) #(vi
19473   ;;
19474 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19475   ;;
19476 .\${*prefix}*) #(vi
19477   eval withval="$withval"
19478   case ".$withval" in #(vi
19479   .NONE/*)
19480     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19481     ;;
19482   esac
19483   ;; #(vi
19484 .no|.NONE/*)
19485   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19486   ;;
19487 *)
19488   { { echo "$as_me:19488: error: expected a pathname, not \"$withval\"" >&5
19489 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19490    { (exit 1); exit 1; }; }
19491   ;;
19492 esac
19493
19494 fi
19495 ADA_INCLUDE="$withval"
19496
19497 echo "$as_me:19497: result: $ADA_INCLUDE" >&5
19498 echo "${ECHO_T}$ADA_INCLUDE" >&6
19499
19500 echo "$as_me:19500: checking for ada-objects" >&5
19501 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19502
19503 # Check whether --with-ada-objects or --without-ada-objects was given.
19504 if test "${with_ada_objects+set}" = set; then
19505   withval="$with_ada_objects"
19506
19507 else
19508   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19509 fi; if test -n "$prefix/lib/ada/adalib" ; then
19510
19511 if test "x$prefix" != xNONE; then
19512   cf_path_syntax="$prefix"
19513 else
19514   cf_path_syntax="$ac_default_prefix"
19515 fi
19516
19517 case ".$withval" in #(vi
19518 .\$\(*\)*|.\'*\'*) #(vi
19519   ;;
19520 ..|./*|.\\*) #(vi
19521   ;;
19522 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19523   ;;
19524 .\${*prefix}*) #(vi
19525   eval withval="$withval"
19526   case ".$withval" in #(vi
19527   .NONE/*)
19528     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19529     ;;
19530   esac
19531   ;; #(vi
19532 .no|.NONE/*)
19533   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19534   ;;
19535 *)
19536   { { echo "$as_me:19536: error: expected a pathname, not \"$withval\"" >&5
19537 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19538    { (exit 1); exit 1; }; }
19539   ;;
19540 esac
19541
19542 fi
19543 ADA_OBJECTS="$withval"
19544
19545 echo "$as_me:19545: result: $ADA_OBJECTS" >&5
19546 echo "${ECHO_T}$ADA_OBJECTS" >&6
19547
19548 echo "$as_me:19548: checking if an Ada95 shared-library should be built" >&5
19549 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19550
19551 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19552 if test "${with_ada_sharedlib+set}" = set; then
19553   withval="$with_ada_sharedlib"
19554   with_ada_sharedlib=$withval
19555 else
19556   with_ada_sharedlib=no
19557 fi;
19558 echo "$as_me:19558: result: $with_ada_sharedlib" >&5
19559 echo "${ECHO_T}$with_ada_sharedlib" >&6
19560
19561 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19562 MAKE_ADA_SHAREDLIB="#"
19563
19564 if test "x$with_ada_sharedlib" != xno
19565 then
19566         MAKE_ADA_SHAREDLIB=
19567         if test "x$with_ada_sharedlib" != xyes
19568         then
19569                 ADA_SHAREDLIB="$with_ada_sharedlib"
19570         fi
19571 fi
19572
19573                 fi
19574         fi
19575 else
19576         cf_with_ada=no
19577 fi
19578
19579 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19580 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19581 ###
19582 ### ticlib modules may be a separate library, otherwise contained in termlib.
19583 ### termlib modules may be a separate library, otherwise contained in ncurses.
19584 ###
19585 ### The of "+" or " " between the tokens controls the way the script
19586 ### chooses to split module lists into libraries.
19587 ###
19588 ### (see CF_LIB_RULES).
19589 echo "$as_me:19589: checking for library subsets" >&5
19590 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19591 LIB_SUBSETS=
19592
19593 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19594         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19595         if test "$with_ticlib" != no ; then
19596                 LIB_SUBSETS="${LIB_SUBSETS} "
19597         else
19598                 LIB_SUBSETS="${LIB_SUBSETS}+"
19599         fi
19600 fi
19601
19602 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19603 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19604
19605 if test "$with_termlib" != no ; then
19606         LIB_SUBSETS="${LIB_SUBSETS} "
19607 else
19608         LIB_SUBSETS="${LIB_SUBSETS}+"
19609 fi
19610
19611 LIB_SUBSETS="${LIB_SUBSETS}base"
19612
19613 # Most term-driver calls are to tinfo, but some like init_pair are to the
19614 # base library (so it resides in base).
19615 if test "$with_term_driver" != no ; then
19616         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19617         case $cf_cv_system_name in #(vi
19618         *mingw32*) #(vi
19619                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19620                 ;;
19621         *) #(vi
19622                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19623                 ;;
19624         esac
19625 fi
19626
19627 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19628 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19629
19630 echo "$as_me:19630: result: $LIB_SUBSETS" >&5
19631 echo "${ECHO_T}$LIB_SUBSETS" >&6
19632
19633 ### Construct the list of include-directories to be generated
19634
19635 CPPFLAGS="$CPPFLAGS -I. -I../include"
19636 if test "$srcdir" != "."; then
19637         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19638 fi
19639 if test "$GCC" != yes; then
19640         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19641 elif test "$includedir" != "/usr/include"; then
19642         if test "$includedir" = '${prefix}/include' ; then
19643                 if test $prefix != /usr ; then
19644                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19645                 fi
19646         else
19647                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19648         fi
19649 fi
19650
19651 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19652 if test "$srcdir" != "."; then
19653         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19654 fi
19655 if test "$GCC" != yes; then
19656         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19657 elif test "$includedir" != "/usr/include"; then
19658         if test "$includedir" = '${prefix}/include' ; then
19659                 if test $prefix != /usr ; then
19660                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19661                 fi
19662         else
19663                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19664         fi
19665 fi
19666
19667 ### Build up pieces for makefile rules
19668 echo "$as_me:19668: checking default library suffix" >&5
19669 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19670
19671         case $DFT_LWR_MODEL in
19672         libtool) DFT_ARG_SUFFIX=''   ;;
19673         normal)  DFT_ARG_SUFFIX=''   ;;
19674         debug)   DFT_ARG_SUFFIX='_g' ;;
19675         profile) DFT_ARG_SUFFIX='_p' ;;
19676         shared)  DFT_ARG_SUFFIX=''   ;;
19677         esac
19678         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19679 echo "$as_me:19679: result: $DFT_ARG_SUFFIX" >&5
19680 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19681
19682 echo "$as_me:19682: checking default library-dependency suffix" >&5
19683 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19684
19685         case $DFT_LWR_MODEL in #(vi
19686         libtool) #(vi
19687                 DFT_LIB_SUFFIX='.la'
19688                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19689                 ;;
19690         normal) #(vi
19691                 DFT_LIB_SUFFIX='.a'
19692                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19693                 ;;
19694         debug) #(vi
19695                 DFT_LIB_SUFFIX='_g.a'
19696                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19697                 ;;
19698         profile) #(vi
19699                 DFT_LIB_SUFFIX='_p.a'
19700                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19701                 ;;
19702         shared) #(vi
19703                 case $cf_cv_system_name in
19704                 aix[5-7]*) #(vi
19705                         DFT_LIB_SUFFIX='.a'
19706                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19707                         ;;
19708                 cygwin*) #(vi
19709                         DFT_LIB_SUFFIX='.dll'
19710                         DFT_DEP_SUFFIX='.dll.a'
19711                         ;;
19712                 darwin*) #(vi
19713                         DFT_LIB_SUFFIX='.dylib'
19714                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19715                         ;;
19716                 hpux*) #(vi
19717                         case $target in
19718                         ia64*) #(vi
19719                                 DFT_LIB_SUFFIX='.so'
19720                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19721                                 ;;
19722                         *) #(vi
19723                                 DFT_LIB_SUFFIX='.sl'
19724                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19725                                 ;;
19726                         esac
19727                         ;;
19728                 *)      DFT_LIB_SUFFIX='.so'
19729                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19730                         ;;
19731                 esac
19732         esac
19733         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19734         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19735 echo "$as_me:19735: result: $DFT_DEP_SUFFIX" >&5
19736 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19737
19738 echo "$as_me:19738: checking default object directory" >&5
19739 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19740
19741         case $DFT_LWR_MODEL in
19742         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19743         normal)  DFT_OBJ_SUBDIR='objects' ;;
19744         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19745         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19746         shared)
19747                 case $cf_cv_system_name in #(vi
19748                 cygwin) #(vi
19749                         DFT_OBJ_SUBDIR='objects' ;;
19750                 *)
19751                         DFT_OBJ_SUBDIR='obj_s' ;;
19752                 esac
19753         esac
19754 echo "$as_me:19754: result: $DFT_OBJ_SUBDIR" >&5
19755 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19756
19757 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19758 if test "$cf_with_cxx" = yes ; then
19759 echo "$as_me:19759: checking c++ library-dependency suffix" >&5
19760 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19761 if test "$with_libtool" != "no"; then
19762         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19763 else
19764
19765         case normal in #(vi
19766         libtool) #(vi
19767                 CXX_LIB_SUFFIX='.la'
19768                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19769                 ;;
19770         normal) #(vi
19771                 CXX_LIB_SUFFIX='.a'
19772                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19773                 ;;
19774         debug) #(vi
19775                 CXX_LIB_SUFFIX='_g.a'
19776                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19777                 ;;
19778         profile) #(vi
19779                 CXX_LIB_SUFFIX='_p.a'
19780                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19781                 ;;
19782         shared) #(vi
19783                 case $cf_cv_system_name in
19784                 aix[5-7]*) #(vi
19785                         CXX_LIB_SUFFIX='.a'
19786                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19787                         ;;
19788                 cygwin*) #(vi
19789                         CXX_LIB_SUFFIX='.dll'
19790                         CXX_DEP_SUFFIX='.dll.a'
19791                         ;;
19792                 darwin*) #(vi
19793                         CXX_LIB_SUFFIX='.dylib'
19794                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19795                         ;;
19796                 hpux*) #(vi
19797                         case $target in
19798                         ia64*) #(vi
19799                                 CXX_LIB_SUFFIX='.so'
19800                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19801                                 ;;
19802                         *) #(vi
19803                                 CXX_LIB_SUFFIX='.sl'
19804                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19805                                 ;;
19806                         esac
19807                         ;;
19808                 *)      CXX_LIB_SUFFIX='.so'
19809                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19810                         ;;
19811                 esac
19812         esac
19813         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19814         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19815 fi
19816 echo "$as_me:19816: result: $CXX_LIB_SUFFIX" >&5
19817 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19818
19819 fi
19820
19821 # do not want -ldl in build except as needed for -lncurses dependency
19822 if test "$with_dlsym" = yes ; then
19823 if test $DFT_LWR_MODEL = shared || \
19824    test $DFT_LWR_MODEL = libtool ; then
19825
19826 # remove dl library from $LIBS
19827 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19828
19829 fi
19830 fi
19831 ### Set up low-level terminfo dependencies for makefiles.
19832
19833 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19834 # do not need libdl
19835 TICS_LIST=
19836 if test "$with_dlsym" = yes ; then
19837
19838 # remove dl library from $SHLIB_LIST
19839 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19840
19841 fi
19842
19843 if test "$with_ticlib" != no ; then
19844
19845         if test "$with_ticlib" != yes ; then
19846                 TICS_NAME=$with_ticlib
19847                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19848                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19849                 TICS_LIB_SUFFIX="${with_ticlib}"
19850         else
19851                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19852                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19853                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19854         fi
19855         TICS_LDFLAGS="-L${LIB_DIR}"
19856         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19857 else
19858         TICS_LDFLAGS="-L${LIB_DIR}"
19859         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19860 fi
19861
19862 if test "$with_termlib" != no ; then
19863
19864         if test "$with_termlib" != yes ; then
19865                 TINFO_NAME=$with_termlib
19866                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19867                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19868                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19869                 TINFO_LIB_SUFFIX="${with_termlib}"
19870         else
19871                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19872                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19873                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19874                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19875         fi
19876
19877         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19878         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19879         if test "$DFT_LWR_MODEL" = "libtool"; then
19880                 TEST_ARGS="${TEST_DEPS}"
19881                 TEST_ARG2="${TEST_DEP2}"
19882                 TINFO_LDFLAGS="-L${LIB_DIR}"
19883                 TINFO_LIBS="$TEST_ARGS"
19884                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19885                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19886         else
19887                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19888                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19889                 if test "x$with_term_driver" != xno ; then
19890                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19891                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19892                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19893                 else
19894                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19895                         TINFO_LIBS="$TEST_ARGS"
19896                 fi
19897                 TINFO_LDFLAGS="-L${LIB_DIR}"
19898                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19899         fi
19900 else
19901         # the next lines are needed for linking libtic over libncurses
19902         TINFO_NAME=${LIB_NAME}
19903         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19904         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19905         if test "$with_tic_depends" = yes ; then
19906                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19907         else
19908                 TICS_LIST="$SHLIB_LIST"
19909         fi
19910
19911         TINFO_LDFLAGS="-L${LIB_DIR}"
19912         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19913 fi
19914
19915 if test "$DFT_LWR_MODEL" = shared ; then
19916         case $cf_cv_system_name in #(vi
19917         cygwin*)
19918                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19919                 TINFO_SUFFIX=.dll
19920                 ;;
19921         esac
19922 fi
19923
19924 if test "$with_dlsym" = yes ; then
19925
19926 # remove dl library from $TICS_LIST
19927 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19928
19929 fi
19930
19931 if test "$DFT_LWR_MODEL" = "libtool"; then
19932     OBJEXT=lo
19933 fi
19934
19935 # needed for Ada95
19936 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19937
19938 case $DFT_LWR_MODEL in
19939 normal|debug|profile)
19940
19941 if test "$GCC" = yes ; then
19942         case $cf_cv_system_name in #(
19943         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19944                 LDFLAGS_STATIC=
19945                 LDFLAGS_SHARED=
19946                 ;;
19947     *)  #( normally, except when broken
19948         LDFLAGS_STATIC=-static
19949         LDFLAGS_SHARED=-dynamic
19950         ;;
19951     esac
19952 else
19953         case $cf_cv_system_name in #(
19954         aix[4-7]*)      #( from ld manpage
19955                 LDFLAGS_STATIC=-bstatic
19956                 LDFLAGS_SHARED=-bdynamic
19957                 ;;
19958         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19959                 # We could also use just "archive" and "shared".
19960                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19961                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19962                 ;;
19963         irix*)          #( from ld manpage IRIX64
19964                 LDFLAGS_STATIC=-Bstatic
19965                 LDFLAGS_SHARED=-Bdynamic
19966                 ;;
19967         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19968                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19969                 LDFLAGS_STATIC=-noso
19970                 LDFLAGS_SHARED=-so_archive
19971                 ;;
19972         solaris2*)
19973                 LDFLAGS_STATIC=-Bstatic
19974                 LDFLAGS_SHARED=-Bdynamic
19975                 ;;
19976         esac
19977 fi
19978
19979 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19980 then
19981         echo "$as_me:19981: checking if linker supports switching between static/dynamic" >&5
19982 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19983
19984         rm -f libconftest.a
19985         cat >conftest.$ac_ext <<EOF
19986 #line 19986 "configure"
19987 #include <stdio.h>
19988 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19989 EOF
19990         if { (eval echo "$as_me:19990: \"$ac_compile\"") >&5
19991   (eval $ac_compile) 2>&5
19992   ac_status=$?
19993   echo "$as_me:19993: \$? = $ac_status" >&5
19994   (exit $ac_status); } ; then
19995                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19996                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19997         fi
19998         rm -f conftest.*
19999
20000         cf_save_LIBS="$LIBS"
20001
20002         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20003         cat >conftest.$ac_ext <<_ACEOF
20004 #line 20004 "configure"
20005 #include "confdefs.h"
20006
20007 #line 20007 "configure"
20008 #include <stdio.h>
20009 int cf_ldflags_static(FILE *fp);
20010
20011 int
20012 main ()
20013 {
20014
20015         return cf_ldflags_static(stdin);
20016
20017   ;
20018   return 0;
20019 }
20020 _ACEOF
20021 rm -f conftest.$ac_objext conftest$ac_exeext
20022 if { (eval echo "$as_me:20022: \"$ac_link\"") >&5
20023   (eval $ac_link) 2>&5
20024   ac_status=$?
20025   echo "$as_me:20025: \$? = $ac_status" >&5
20026   (exit $ac_status); } &&
20027          { ac_try='test -s conftest$ac_exeext'
20028   { (eval echo "$as_me:20028: \"$ac_try\"") >&5
20029   (eval $ac_try) 2>&5
20030   ac_status=$?
20031   echo "$as_me:20031: \$? = $ac_status" >&5
20032   (exit $ac_status); }; }; then
20033
20034         # some linkers simply ignore the -dynamic
20035         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20036         *static*) # (vi
20037                 cf_ldflags_static=no
20038                 ;;
20039         *)
20040                 cf_ldflags_static=yes
20041                 ;;
20042         esac
20043
20044 else
20045   echo "$as_me: failed program was:" >&5
20046 cat conftest.$ac_ext >&5
20047 cf_ldflags_static=no
20048 fi
20049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20050
20051         rm -f libconftest.*
20052         LIBS="$cf_save_LIBS"
20053
20054         echo "$as_me:20054: result: $cf_ldflags_static" >&5
20055 echo "${ECHO_T}$cf_ldflags_static" >&6
20056
20057         if test $cf_ldflags_static != yes
20058         then
20059                 LDFLAGS_STATIC=
20060                 LDFLAGS_SHARED=
20061         fi
20062 else
20063         LDFLAGS_STATIC=
20064         LDFLAGS_SHARED=
20065 fi
20066
20067         ;;
20068 esac
20069
20070 echo "$as_me:20070: checking where we will install curses.h" >&5
20071 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20072 test "$with_overwrite" = no && \
20073 test "x$includedir" = 'x${prefix}/include' && \
20074         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20075 echo "$as_me:20075: result: $includedir" >&5
20076 echo "${ECHO_T}$includedir" >&6
20077
20078 ### Resolve a conflict between normal and wide-curses by forcing applications
20079 ### that will need libutf8 to add it to their configure script.
20080 if test "$with_overwrite" != no ; then
20081 if test "$NCURSES_LIBUTF8" = 1 ; then
20082         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20083         { echo "$as_me:20083: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20084 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20085 fi
20086 fi
20087 WITH_OVERWRITE=$with_overwrite
20088
20089 # used to separate tack out of the tree
20090 NCURSES_TREE=
20091
20092 ### predefined stuff for the test programs
20093 cat >>confdefs.h <<\EOF
20094 #define HAVE_SLK_COLOR 1
20095 EOF
20096
20097 ### Construct the list of subdirectories for which we'll customize makefiles
20098 ### with the appropriate compile-rules.
20099
20100 echo "$as_me:20100: checking for src modules" >&5
20101 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20102
20103 # dependencies and linker-arguments for test-programs
20104 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20105 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20106 if test "$DFT_LWR_MODEL" = "libtool"; then
20107         TEST_ARGS="${TEST_DEPS}"
20108         TEST_ARG2="${TEST_DEP2}"
20109 else
20110         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20111         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20112 fi
20113
20114 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20115 cf_cv_src_modules=
20116 for cf_dir in $modules_to_build
20117 do
20118         if test -f $srcdir/$cf_dir/modules; then
20119
20120                 # We may/may not have tack in the distribution, though the
20121                 # makefile is.
20122                 if test $cf_dir = tack ; then
20123                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20124                                 continue
20125                         fi
20126                 fi
20127
20128                 if test -z "$cf_cv_src_modules"; then
20129                         cf_cv_src_modules=$cf_dir
20130                 else
20131                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20132                 fi
20133
20134                 # Make the ncurses_cfg.h file record the library interface files as
20135                 # well.  These are header files that are the same name as their
20136                 # directory.  Ncurses is the only library that does not follow
20137                 # that pattern.
20138                 if test $cf_dir = tack ; then
20139                         continue
20140                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20141
20142 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20143
20144                         cat >>confdefs.h <<EOF
20145 #define HAVE_${cf_have_include}_H 1
20146 EOF
20147
20148                         cat >>confdefs.h <<EOF
20149 #define HAVE_LIB${cf_have_include} 1
20150 EOF
20151
20152                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20153                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20154                         if test "$DFT_LWR_MODEL" = "libtool"; then
20155                                 TEST_ARGS="${TEST_DEPS}"
20156                                 TEST_ARG2="${TEST_DEP2}"
20157                         else
20158                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20159                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20160                         fi
20161                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20162                 fi
20163         fi
20164 done
20165 echo "$as_me:20165: result: $cf_cv_src_modules" >&5
20166 echo "${ECHO_T}$cf_cv_src_modules" >&6
20167
20168 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20169 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20170
20171 SRC_SUBDIRS=
20172 if test "x$cf_with_manpages" != xno ; then
20173         SRC_SUBDIRS="$SRC_SUBDIRS man"
20174 fi
20175 SRC_SUBDIRS="$SRC_SUBDIRS include"
20176 for cf_dir in $cf_cv_src_modules
20177 do
20178         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20179 done
20180 if test "x$cf_with_tests" != "xno" ; then
20181         SRC_SUBDIRS="$SRC_SUBDIRS test"
20182 fi
20183 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20184 if test "$cf_with_cxx_binding" != no; then
20185         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20186         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20187 fi
20188
20189 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20190 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20191
20192 ADA_SUBDIRS=
20193 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20194         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20195         ADA_SUBDIRS="gen src"
20196         if test "x$cf_with_tests" != "xno" ; then
20197                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20198         fi
20199 fi
20200
20201 SUB_MAKEFILES=
20202 for cf_dir in $SRC_SUBDIRS
20203 do
20204         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20205 done
20206
20207 if test -n "$ADA_SUBDIRS"; then
20208         for cf_dir in $ADA_SUBDIRS
20209         do
20210                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20211         done
20212
20213 fi
20214
20215 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20216    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20217    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20218 fi
20219
20220 DIRS_TO_MAKE="lib"
20221 for cf_item in $cf_list_models
20222 do
20223
20224         case $cf_item in
20225         libtool) cf_subdir='obj_lo'  ;;
20226         normal)  cf_subdir='objects' ;;
20227         debug)   cf_subdir='obj_g' ;;
20228         profile) cf_subdir='obj_p' ;;
20229         shared)
20230                 case $cf_cv_system_name in #(vi
20231                 cygwin) #(vi
20232                         cf_subdir='objects' ;;
20233                 *)
20234                         cf_subdir='obj_s' ;;
20235                 esac
20236         esac
20237
20238         for cf_item2 in $DIRS_TO_MAKE
20239         do
20240                 test $cf_item2 = $cf_subdir && break
20241         done
20242         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20243 done
20244 for cf_dir in $DIRS_TO_MAKE
20245 do
20246         test ! -d $cf_dir && mkdir $cf_dir
20247 done
20248
20249 # symbols that differ when compiling Ada95 by itself.
20250 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20251
20252 # values to use as strings
20253 cat >>confdefs.h <<EOF
20254 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20255 EOF
20256
20257 cat >>confdefs.h <<EOF
20258 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20259 EOF
20260
20261 ### Now that we're done running tests, add the compiler-warnings, if any
20262
20263 cf_fix_cppflags=no
20264 cf_new_cflags=
20265 cf_new_cppflags=
20266 cf_new_extra_cppflags=
20267
20268 for cf_add_cflags in $EXTRA_CFLAGS
20269 do
20270 case $cf_fix_cppflags in
20271 no)
20272         case $cf_add_cflags in #(vi
20273         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20274                 case $cf_add_cflags in
20275                 -D*)
20276                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20277
20278                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20279                                 && test -z "${cf_tst_cflags}" \
20280                                 && cf_fix_cppflags=yes
20281
20282                         if test $cf_fix_cppflags = yes ; then
20283                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20284                                 continue
20285                         elif test "${cf_tst_cflags}" = "\"'" ; then
20286                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20287                                 continue
20288                         fi
20289                         ;;
20290                 esac
20291                 case "$CPPFLAGS" in
20292                 *$cf_add_cflags) #(vi
20293                         ;;
20294                 *) #(vi
20295                         case $cf_add_cflags in #(vi
20296                         -D*)
20297                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20298
20299 CPPFLAGS=`echo "$CPPFLAGS" | \
20300         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20301                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20302
20303                                 ;;
20304                         esac
20305                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20306                         ;;
20307                 esac
20308                 ;;
20309         *)
20310                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20311                 ;;
20312         esac
20313         ;;
20314 yes)
20315         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20316
20317         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20318
20319         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20320                 && test -z "${cf_tst_cflags}" \
20321                 && cf_fix_cppflags=no
20322         ;;
20323 esac
20324 done
20325
20326 if test -n "$cf_new_cflags" ; then
20327
20328         CFLAGS="$CFLAGS $cf_new_cflags"
20329 fi
20330
20331 if test -n "$cf_new_cppflags" ; then
20332
20333         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20334 fi
20335
20336 if test -n "$cf_new_extra_cppflags" ; then
20337
20338         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20339 fi
20340
20341 ### Define substitutions for header files to avoid name-pollution
20342
20343 if test "$cf_cv_have_tcgetattr" = yes ; then
20344         HAVE_TCGETATTR=1
20345 else
20346         HAVE_TCGETATTR=0
20347 fi
20348
20349 if test "$ac_cv_header_termio_h" = yes ; then
20350         HAVE_TERMIO_H=1
20351 else
20352         HAVE_TERMIO_H=0
20353 fi
20354
20355 if test "$ac_cv_header_termios_h" = yes ; then
20356         HAVE_TERMIOS_H=1
20357 else
20358         HAVE_TERMIOS_H=0
20359 fi
20360
20361 ################################################################################
20362 test "$use_database" = yes && \
20363 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20364
20365 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20366 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20367
20368 if test x"$enable_pc_files" = xyes ; then \
20369 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20370 MAKE_PC_FILES=
20371 else
20372 MAKE_PC_FILES="#"
20373 fi
20374
20375 # Extract the first word of "tic", so it can be a program name with args.
20376 set dummy tic; ac_word=$2
20377 echo "$as_me:20377: checking for $ac_word" >&5
20378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20379 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20380   echo $ECHO_N "(cached) $ECHO_C" >&6
20381 else
20382   case $TIC_PATH in
20383   [\\/]* | ?:[\\/]*)
20384   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20385   ;;
20386   *)
20387   ac_save_IFS=$IFS; IFS=$ac_path_separator
20388 ac_dummy="$PATH:/usr/local/ncurses/bin"
20389 for ac_dir in $ac_dummy; do
20390   IFS=$ac_save_IFS
20391   test -z "$ac_dir" && ac_dir=.
20392   if $as_executable_p "$ac_dir/$ac_word"; then
20393    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20394    echo "$as_me:20394: found $ac_dir/$ac_word" >&5
20395    break
20396 fi
20397 done
20398
20399   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20400   ;;
20401 esac
20402 fi
20403 TIC_PATH=$ac_cv_path_TIC_PATH
20404
20405 if test -n "$TIC_PATH"; then
20406   echo "$as_me:20406: result: $TIC_PATH" >&5
20407 echo "${ECHO_T}$TIC_PATH" >&6
20408 else
20409   echo "$as_me:20409: result: no" >&5
20410 echo "${ECHO_T}no" >&6
20411 fi
20412
20413 if test -n "$FALLBACK_LIST"
20414 then
20415         if test "$TIC_PATH" = unknown
20416         then
20417                 { echo "$as_me:20417: WARNING: no tic program found for fallbacks" >&5
20418 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20419         fi
20420 fi
20421
20422 if test "x$cf_with_tests" != xno ; then
20423         MAKE_TESTS=
20424 else
20425         MAKE_TESTS="#"
20426 fi
20427
20428 ADAHTML_DIR=../../doc/html/ada
20429
20430 SUB_SCRIPTS=
20431
20432 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"
20433 ac_config_commands="$ac_config_commands default"
20434 cat >confcache <<\_ACEOF
20435 # This file is a shell script that caches the results of configure
20436 # tests run on this system so they can be shared between configure
20437 # scripts and configure runs, see configure's option --config-cache.
20438 # It is not useful on other systems.  If it contains results you don't
20439 # want to keep, you may remove or edit it.
20440 #
20441 # config.status only pays attention to the cache file if you give it
20442 # the --recheck option to rerun configure.
20443 #
20444 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20445 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20446 # following values.
20447
20448 _ACEOF
20449
20450 # The following way of writing the cache mishandles newlines in values,
20451 # but we know of no workaround that is simple, portable, and efficient.
20452 # So, don't put newlines in cache variables' values.
20453 # Ultrix sh set writes to stderr and can't be redirected directly,
20454 # and sets the high bit in the cache file unless we assign to the vars.
20455 {
20456   (set) 2>&1 |
20457     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20458     *ac_space=\ *)
20459       # `set' does not quote correctly, so add quotes (double-quote
20460       # substitution turns \\\\ into \\, and sed turns \\ into \).
20461       sed -n \
20462         "s/'/'\\\\''/g;
20463           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20464       ;;
20465     *)
20466       # `set' quotes correctly as required by POSIX, so do not add quotes.
20467       sed -n \
20468         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20469       ;;
20470     esac;
20471 } |
20472   sed '
20473      t clear
20474      : clear
20475      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20476      t end
20477      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20478      : end' >>confcache
20479 if cmp -s $cache_file confcache; then :; else
20480   if test -w $cache_file; then
20481     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20482     cat confcache >$cache_file
20483   else
20484     echo "not updating unwritable cache $cache_file"
20485   fi
20486 fi
20487 rm -f confcache
20488
20489 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20490 # Let make expand exec_prefix.
20491 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20492
20493 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20494 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20495 # trailing colons and then remove the whole line if VPATH becomes empty
20496 # (actually we leave an empty line to preserve line numbers).
20497 if test "x$srcdir" = x.; then
20498   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20499 s/:*\$(srcdir):*/:/;
20500 s/:*\${srcdir}:*/:/;
20501 s/:*@srcdir@:*/:/;
20502 s/^\([^=]*=[    ]*\):*/\1/;
20503 s/:*$//;
20504 s/^[^=]*=[      ]*$//;
20505 }'
20506 fi
20507
20508 DEFS=-DHAVE_CONFIG_H
20509
20510 : ${CONFIG_STATUS=./config.status}
20511 ac_clean_files_save=$ac_clean_files
20512 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20513 { echo "$as_me:20513: creating $CONFIG_STATUS" >&5
20514 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20515 cat >$CONFIG_STATUS <<_ACEOF
20516 #! $SHELL
20517 # Generated automatically by configure.
20518 # Run this file to recreate the current configuration.
20519 # Compiler output produced by configure, useful for debugging
20520 # configure, is in config.log if it exists.
20521
20522 debug=false
20523 SHELL=\${CONFIG_SHELL-$SHELL}
20524 ac_cs_invocation="\$0 \$@"
20525
20526 _ACEOF
20527
20528 cat >>$CONFIG_STATUS <<\_ACEOF
20529 # Be Bourne compatible
20530 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20531   emulate sh
20532   NULLCMD=:
20533 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20534   set -o posix
20535 fi
20536
20537 # Name of the executable.
20538 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20539
20540 if expr a : '\(a\)' >/dev/null 2>&1; then
20541   as_expr=expr
20542 else
20543   as_expr=false
20544 fi
20545
20546 rm -f conf$$ conf$$.exe conf$$.file
20547 echo >conf$$.file
20548 if ln -s conf$$.file conf$$ 2>/dev/null; then
20549   # We could just check for DJGPP; but this test a) works b) is more generic
20550   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20551   if test -f conf$$.exe; then
20552     # Don't use ln at all; we don't have any links
20553     as_ln_s='cp -p'
20554   else
20555     as_ln_s='ln -s'
20556   fi
20557 elif ln conf$$.file conf$$ 2>/dev/null; then
20558   as_ln_s=ln
20559 else
20560   as_ln_s='cp -p'
20561 fi
20562 rm -f conf$$ conf$$.exe conf$$.file
20563
20564 as_executable_p="test -f"
20565
20566 # Support unset when possible.
20567 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20568   as_unset=unset
20569 else
20570   as_unset=false
20571 fi
20572
20573 # NLS nuisances.
20574 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20575 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20576 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20577 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20578 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20579 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20580 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20581 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20582
20583 # IFS
20584 # We need space, tab and new line, in precisely that order.
20585 as_nl='
20586 '
20587 IFS="   $as_nl"
20588
20589 # CDPATH.
20590 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20591
20592 exec 6>&1
20593
20594 _ACEOF
20595
20596 # Files that config.status was made for.
20597 if test -n "$ac_config_files"; then
20598   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20599 fi
20600
20601 if test -n "$ac_config_headers"; then
20602   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20603 fi
20604
20605 if test -n "$ac_config_links"; then
20606   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20607 fi
20608
20609 if test -n "$ac_config_commands"; then
20610   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20611 fi
20612
20613 cat >>$CONFIG_STATUS <<\EOF
20614
20615 ac_cs_usage="\
20616 \`$as_me' instantiates files from templates according to the
20617 current configuration.
20618
20619 Usage: $0 [OPTIONS] [FILE]...
20620
20621   -h, --help       print this help, then exit
20622   -V, --version    print version number, then exit
20623   -d, --debug      don't remove temporary files
20624       --recheck    update $as_me by reconfiguring in the same conditions
20625   --file=FILE[:TEMPLATE]
20626                    instantiate the configuration file FILE
20627   --header=FILE[:TEMPLATE]
20628                    instantiate the configuration header FILE
20629
20630 Configuration files:
20631 $config_files
20632
20633 Configuration headers:
20634 $config_headers
20635
20636 Configuration commands:
20637 $config_commands
20638
20639 Report bugs to <dickey@invisible-island.net>."
20640 EOF
20641
20642 cat >>$CONFIG_STATUS <<EOF
20643 ac_cs_version="\\
20644 config.status
20645 configured by $0, generated by GNU Autoconf 2.52.20101002,
20646   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20647
20648 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20649 Free Software Foundation, Inc.
20650 This config.status script is free software; the Free Software Foundation
20651 gives unlimited permission to copy, distribute and modify it."
20652 srcdir=$srcdir
20653 INSTALL="$INSTALL"
20654 EOF
20655
20656 cat >>$CONFIG_STATUS <<\EOF
20657 # If no file are specified by the user, then we need to provide default
20658 # value.  By we need to know if files were specified by the user.
20659 ac_need_defaults=:
20660 while test $# != 0
20661 do
20662   case $1 in
20663   --*=*)
20664     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20665     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20666     shift
20667     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20668     shift
20669     ;;
20670   -*);;
20671   *) # This is not an option, so the user has probably given explicit
20672      # arguments.
20673      ac_need_defaults=false;;
20674   esac
20675
20676   case $1 in
20677   # Handling of the options.
20678 EOF
20679 cat >>$CONFIG_STATUS <<EOF
20680   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20681     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20682     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20683 EOF
20684 cat >>$CONFIG_STATUS <<\EOF
20685   --version | --vers* | -V )
20686     echo "$ac_cs_version"; exit 0 ;;
20687   --he | --h)
20688     # Conflict between --help and --header
20689     { { echo "$as_me:20689: error: ambiguous option: $1
20690 Try \`$0 --help' for more information." >&5
20691 echo "$as_me: error: ambiguous option: $1
20692 Try \`$0 --help' for more information." >&2;}
20693    { (exit 1); exit 1; }; };;
20694   --help | --hel | -h )
20695     echo "$ac_cs_usage"; exit 0 ;;
20696   --debug | --d* | -d )
20697     debug=: ;;
20698   --file | --fil | --fi | --f )
20699     shift
20700     CONFIG_FILES="$CONFIG_FILES $1"
20701     ac_need_defaults=false;;
20702   --header | --heade | --head | --hea )
20703     shift
20704     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20705     ac_need_defaults=false;;
20706
20707   # This is an error.
20708   -*) { { echo "$as_me:20708: error: unrecognized option: $1
20709 Try \`$0 --help' for more information." >&5
20710 echo "$as_me: error: unrecognized option: $1
20711 Try \`$0 --help' for more information." >&2;}
20712    { (exit 1); exit 1; }; } ;;
20713
20714   *) ac_config_targets="$ac_config_targets $1" ;;
20715
20716   esac
20717   shift
20718 done
20719
20720 exec 5>>config.log
20721 cat >&5 << _ACEOF
20722
20723 ## ----------------------- ##
20724 ## Running config.status.  ##
20725 ## ----------------------- ##
20726
20727 This file was extended by $as_me 2.52.20101002, executed with
20728   CONFIG_FILES    = $CONFIG_FILES
20729   CONFIG_HEADERS  = $CONFIG_HEADERS
20730   CONFIG_LINKS    = $CONFIG_LINKS
20731   CONFIG_COMMANDS = $CONFIG_COMMANDS
20732   > $ac_cs_invocation
20733 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20734
20735 _ACEOF
20736 EOF
20737
20738 cat >>$CONFIG_STATUS <<EOF
20739 #
20740 # INIT-COMMANDS section.
20741 #
20742
20743 ### Special initialization commands, used to pass information from the
20744 ### configuration-run into config.status
20745
20746 AWK="$AWK"
20747 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20748 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20749 ECHO_LINK="$ECHO_LINK"
20750 LDCONFIG="$LDCONFIG"
20751 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20752 LIB_NAME="$LIB_NAME"
20753 LIB_PREFIX="$LIB_PREFIX"
20754 LIB_SUBSETS="$LIB_SUBSETS"
20755 LIB_SUFFIX="$LIB_SUFFIX"
20756 LIB_TRACING="$LIB_TRACING"
20757 LN_S="$LN_S"
20758 MAKE_TERMINFO="$MAKE_TERMINFO"
20759 NCURSES_MAJOR="$NCURSES_MAJOR"
20760 NCURSES_MINOR="$NCURSES_MINOR"
20761 NCURSES_OSPEED="$NCURSES_OSPEED"
20762 NCURSES_PATCH="$NCURSES_PATCH"
20763 SRC_SUBDIRS="$SRC_SUBDIRS"
20764 TERMINFO="$TERMINFO"
20765 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20766 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20767 TICS_NAME="$TICS_NAME"
20768 TIC_PATH="$TIC_PATH"
20769 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20770 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20771 TINFO_NAME="$TINFO_NAME"
20772 TINFO_SUFFIX="$TINFO_SUFFIX"
20773 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20774 WITH_CURSES_H="$with_curses_h"
20775 WITH_ECHO="$with_echo"
20776 WITH_OVERWRITE="$with_overwrite"
20777 cf_LIST_MODELS="$cf_list_models"
20778 cf_cv_abi_version="$cf_cv_abi_version"
20779 cf_cv_do_relink="$cf_cv_do_relink"
20780 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20781 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20782 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20783 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20784 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20785 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20786 cf_cv_rel_version="$cf_cv_rel_version"
20787 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20788 cf_cv_shared_soname='$cf_cv_shared_soname'
20789 cf_cv_shlib_version="$cf_cv_shlib_version"
20790 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20791 cf_cv_system_name="$cf_cv_system_name"
20792 cf_cv_term_driver="$with_term_driver"
20793 cf_with_ada="$cf_with_ada"
20794 cf_with_cxx_binding="$cf_with_cxx_binding"
20795 cf_with_manpages="$cf_with_manpages"
20796 cf_with_tests="$cf_with_tests"
20797 host="$host"
20798 target="$target"
20799
20800 EOF
20801
20802 cat >>$CONFIG_STATUS <<\EOF
20803 for ac_config_target in $ac_config_targets
20804 do
20805   case "$ac_config_target" in
20806   # Handling of arguments.
20807   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20808   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20809   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20810   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20811   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20812   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20813   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20814   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20815   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20816   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20817   *) { { echo "$as_me:20817: error: invalid argument: $ac_config_target" >&5
20818 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20819    { (exit 1); exit 1; }; };;
20820   esac
20821 done
20822
20823 # If the user did not use the arguments to specify the items to instantiate,
20824 # then the envvar interface is used.  Set only those that are not.
20825 # We use the long form for the default assignment because of an extremely
20826 # bizarre bug on SunOS 4.1.3.
20827 if $ac_need_defaults; then
20828   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20829   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20830   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20831 fi
20832
20833 # Create a temporary directory, and hook for its removal unless debugging.
20834 $debug ||
20835 {
20836   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20837   trap '{ (exit 1); exit 1; }' 1 2 13 15
20838 }
20839
20840 # Create a (secure) tmp directory for tmp files.
20841 : ${TMPDIR=/tmp}
20842 {
20843   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20844   test -n "$tmp" && test -d "$tmp"
20845 }  ||
20846 {
20847   tmp=$TMPDIR/cs$$-$RANDOM
20848   (umask 077 && mkdir $tmp)
20849 } ||
20850 {
20851    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20852    { (exit 1); exit 1; }
20853 }
20854
20855 EOF
20856
20857 cat >>$CONFIG_STATUS <<EOF
20858
20859 #
20860 # CONFIG_FILES section.
20861 #
20862
20863 # No need to generate the scripts if there are no CONFIG_FILES.
20864 # This happens for instance when ./config.status config.h
20865 if test -n "\$CONFIG_FILES"; then
20866   # Protect against being on the right side of a sed subst in config.status.
20867   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20868    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20869 s,@SHELL@,$SHELL,;t t
20870 s,@exec_prefix@,$exec_prefix,;t t
20871 s,@prefix@,$prefix,;t t
20872 s,@program_transform_name@,$program_transform_name,;t t
20873 s,@bindir@,$bindir,;t t
20874 s,@sbindir@,$sbindir,;t t
20875 s,@libexecdir@,$libexecdir,;t t
20876 s,@datadir@,$datadir,;t t
20877 s,@sysconfdir@,$sysconfdir,;t t
20878 s,@sharedstatedir@,$sharedstatedir,;t t
20879 s,@localstatedir@,$localstatedir,;t t
20880 s,@libdir@,$libdir,;t t
20881 s,@includedir@,$includedir,;t t
20882 s,@oldincludedir@,$oldincludedir,;t t
20883 s,@infodir@,$infodir,;t t
20884 s,@mandir@,$mandir,;t t
20885 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20886 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20887 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20888 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20889 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20890 s,@build_alias@,$build_alias,;t t
20891 s,@host_alias@,$host_alias,;t t
20892 s,@target_alias@,$target_alias,;t t
20893 s,@ECHO_C@,$ECHO_C,;t t
20894 s,@ECHO_N@,$ECHO_N,;t t
20895 s,@ECHO_T@,$ECHO_T,;t t
20896 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20897 s,@DEFS@,$DEFS,;t t
20898 s,@LIBS@,$LIBS,;t t
20899 s,@top_builddir@,$top_builddir,;t t
20900 s,@EGREP@,$EGREP,;t t
20901 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20902 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20903 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20904 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20905 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20906 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20907 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20908 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20909 s,@build@,$build,;t t
20910 s,@build_cpu@,$build_cpu,;t t
20911 s,@build_vendor@,$build_vendor,;t t
20912 s,@build_os@,$build_os,;t t
20913 s,@host@,$host,;t t
20914 s,@host_cpu@,$host_cpu,;t t
20915 s,@host_vendor@,$host_vendor,;t t
20916 s,@host_os@,$host_os,;t t
20917 s,@target@,$target,;t t
20918 s,@target_cpu@,$target_cpu,;t t
20919 s,@target_vendor@,$target_vendor,;t t
20920 s,@target_os@,$target_os,;t t
20921 s,@CC@,$CC,;t t
20922 s,@CFLAGS@,$CFLAGS,;t t
20923 s,@LDFLAGS@,$LDFLAGS,;t t
20924 s,@CPPFLAGS@,$CPPFLAGS,;t t
20925 s,@ac_ct_CC@,$ac_ct_CC,;t t
20926 s,@EXEEXT@,$EXEEXT,;t t
20927 s,@OBJEXT@,$OBJEXT,;t t
20928 s,@CPP@,$CPP,;t t
20929 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20930 s,@PROG_EXT@,$PROG_EXT,;t t
20931 s,@LDCONFIG@,$LDCONFIG,;t t
20932 s,@CXX@,$CXX,;t t
20933 s,@CXXFLAGS@,$CXXFLAGS,;t t
20934 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20935 s,@AWK@,$AWK,;t t
20936 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20937 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20938 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20939 s,@LINT@,$LINT,;t t
20940 s,@LINT_OPTS@,$LINT_OPTS,;t t
20941 s,@LN_S@,$LN_S,;t t
20942 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20943 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20944 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20945 s,@SET_MAKE@,$SET_MAKE,;t t
20946 s,@CTAGS@,$CTAGS,;t t
20947 s,@ETAGS@,$ETAGS,;t t
20948 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20949 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20950 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20951 s,@RANLIB@,$RANLIB,;t t
20952 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20953 s,@LD@,$LD,;t t
20954 s,@ac_ct_LD@,$ac_ct_LD,;t t
20955 s,@AR@,$AR,;t t
20956 s,@ac_ct_AR@,$ac_ct_AR,;t t
20957 s,@ARFLAGS@,$ARFLAGS,;t t
20958 s,@DESTDIR@,$DESTDIR,;t t
20959 s,@BUILD_CC@,$BUILD_CC,;t t
20960 s,@BUILD_CPP@,$BUILD_CPP,;t t
20961 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20962 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20963 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20964 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20965 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20966 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20967 s,@cf_list_models@,$cf_list_models,;t t
20968 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20969 s,@LIBTOOL@,$LIBTOOL,;t t
20970 s,@LT_UNDEF@,$LT_UNDEF,;t t
20971 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20972 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20973 s,@LIB_CREATE@,$LIB_CREATE,;t t
20974 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20975 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20976 s,@LIB_PREP@,$LIB_PREP,;t t
20977 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20978 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20979 s,@LIB_LINK@,$LIB_LINK,;t t
20980 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20981 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20982 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20983 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20984 s,@TICS_NAME@,$TICS_NAME,;t t
20985 s,@TINFO_NAME@,$TINFO_NAME,;t t
20986 s,@LIB_NAME@,$LIB_NAME,;t t
20987 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20988 s,@CC_G_OPT@,$CC_G_OPT,;t t
20989 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20990 s,@LD_MODEL@,$LD_MODEL,;t t
20991 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20992 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20993 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20994 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20995 s,@LINK_PROGS@,$LINK_PROGS,;t t
20996 s,@LINK_TESTS@,$LINK_TESTS,;t t
20997 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20998 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20999 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21000 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21001 s,@RPATH_LIST@,$RPATH_LIST,;t t
21002 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21003 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21004 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21005 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21006 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21007 s,@TERMINFO@,$TERMINFO,;t t
21008 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21009 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21010 s,@TERMPATH@,$TERMPATH,;t t
21011 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21012 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21013 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21014 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21015 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21016 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21017 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21018 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21019 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21020 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21021 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21022 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21023 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21024 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21025 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21026 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21027 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21028 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21029 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21030 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21031 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21032 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21033 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21034 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21035 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21036 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21037 s,@PTHREAD@,$PTHREAD,;t t
21038 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21039 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21040 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21041 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21042 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21043 s,@ECHO_LINK@,$ECHO_LINK,;t t
21044 s,@ADAFLAGS@,$ADAFLAGS,;t t
21045 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21046 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21047 s,@ADA_TRACE@,$ADA_TRACE,;t t
21048 s,@MATH_LIB@,$MATH_LIB,;t t
21049 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21050 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21051 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21052 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21053 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21054 s,@TEST_LIBS@,$TEST_LIBS,;t t
21055 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21056 s,@CXXCPP@,$CXXCPP,;t t
21057 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21058 s,@CXX_AR@,$CXX_AR,;t t
21059 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21060 s,@CXXLIBS@,$CXXLIBS,;t t
21061 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21062 s,@gnat_exists@,$gnat_exists,;t t
21063 s,@M4_exists@,$M4_exists,;t t
21064 s,@cf_ada_make@,$cf_ada_make,;t t
21065 s,@cf_compile_generics@,$cf_compile_generics,;t t
21066 s,@cf_generic_objects@,$cf_generic_objects,;t t
21067 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21068 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21069 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21070 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21071 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21072 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21073 s,@cf_ada_package@,$cf_ada_package,;t t
21074 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21075 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21076 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21077 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21078 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21079 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21080 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21081 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21082 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21083 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21084 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21085 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21086 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21087 s,@TICS_LIBS@,$TICS_LIBS,;t t
21088 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21089 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21090 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21091 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21092 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21093 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21094 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21095 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21096 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21097 s,@TICS_LIST@,$TICS_LIST,;t t
21098 s,@TINFO_LIST@,$TINFO_LIST,;t t
21099 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21100 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21101 s,@TEST_ARGS@,$TEST_ARGS,;t t
21102 s,@TEST_DEPS@,$TEST_DEPS,;t t
21103 s,@TEST_ARG2@,$TEST_ARG2,;t t
21104 s,@TEST_DEP2@,$TEST_DEP2,;t t
21105 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21106 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21107 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21108 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21109 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21110 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21111 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21112 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21113 s,@cross_compiling@,$cross_compiling,;t t
21114 s,@TIC_PATH@,$TIC_PATH,;t t
21115 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21116 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21117 CEOF
21118
21119 EOF
21120
21121   cat >>$CONFIG_STATUS <<\EOF
21122   # Split the substitutions into bite-sized pieces for seds with
21123   # small command number limits, like on Digital OSF/1 and HP-UX.
21124   ac_max_sed_lines=48
21125   ac_sed_frag=1 # Number of current file.
21126   ac_beg=1 # First line for current file.
21127   ac_end=$ac_max_sed_lines # Line after last line for current file.
21128   ac_more_lines=:
21129   ac_sed_cmds=
21130   while $ac_more_lines; do
21131     if test $ac_beg -gt 1; then
21132       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21133     else
21134       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21135     fi
21136     if test ! -s $tmp/subs.frag; then
21137       ac_more_lines=false
21138     else
21139       # The purpose of the label and of the branching condition is to
21140       # speed up the sed processing (if there are no `@' at all, there
21141       # is no need to browse any of the substitutions).
21142       # These are the two extra sed commands mentioned above.
21143       (echo ':t
21144   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21145       if test -z "$ac_sed_cmds"; then
21146         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21147       else
21148         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21149       fi
21150       ac_sed_frag=`expr $ac_sed_frag + 1`
21151       ac_beg=$ac_end
21152       ac_end=`expr $ac_end + $ac_max_sed_lines`
21153     fi
21154   done
21155   if test -z "$ac_sed_cmds"; then
21156     ac_sed_cmds=cat
21157   fi
21158 fi # test -n "$CONFIG_FILES"
21159
21160 EOF
21161 cat >>$CONFIG_STATUS <<\EOF
21162 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21163   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21164   case $ac_file in
21165   - | *:- | *:-:* ) # input from stdin
21166         cat >$tmp/stdin
21167         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21168         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21169   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21170         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21171   * )   ac_file_in=$ac_file.in ;;
21172   esac
21173
21174   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21175   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21176          X"$ac_file" : 'X\(//\)[^/]' \| \
21177          X"$ac_file" : 'X\(//\)$' \| \
21178          X"$ac_file" : 'X\(/\)' \| \
21179          .     : '\(.\)' 2>/dev/null ||
21180 echo X"$ac_file" |
21181     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21182           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21183           /^X\(\/\/\)$/{ s//\1/; q; }
21184           /^X\(\/\).*/{ s//\1/; q; }
21185           s/.*/./; q'`
21186   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21187     { case "$ac_dir" in
21188   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21189   *)                      as_incr_dir=.;;
21190 esac
21191 as_dummy="$ac_dir"
21192 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21193   case $as_mkdir_dir in
21194     # Skip DOS drivespec
21195     ?:) as_incr_dir=$as_mkdir_dir ;;
21196     *)
21197       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21198       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21199     ;;
21200   esac
21201 done; }
21202
21203     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21204     # A "../" for each directory in $ac_dir_suffix.
21205     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21206   else
21207     ac_dir_suffix= ac_dots=
21208   fi
21209
21210   case $srcdir in
21211   .)  ac_srcdir=.
21212       if test -z "$ac_dots"; then
21213          ac_top_srcdir=.
21214       else
21215          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21216       fi ;;
21217   [\\/]* | ?:[\\/]* )
21218       ac_srcdir=$srcdir$ac_dir_suffix;
21219       ac_top_srcdir=$srcdir ;;
21220   *) # Relative path.
21221     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21222     ac_top_srcdir=$ac_dots$srcdir ;;
21223   esac
21224
21225   case $INSTALL in
21226   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21227   *) ac_INSTALL=$ac_dots$INSTALL ;;
21228   esac
21229
21230   if test x"$ac_file" != x-; then
21231     { echo "$as_me:21231: creating $ac_file" >&5
21232 echo "$as_me: creating $ac_file" >&6;}
21233     rm -f "$ac_file"
21234   fi
21235   # Let's still pretend it is `configure' which instantiates (i.e., don't
21236   # use $as_me), people would be surprised to read:
21237   #    /* config.h.  Generated automatically by config.status.  */
21238   configure_input="Generated automatically from `echo $ac_file_in |
21239                                                  sed 's,.*/,,'` by configure."
21240
21241   # First look for the input files in the build tree, otherwise in the
21242   # src tree.
21243   ac_file_inputs=`IFS=:
21244     for f in $ac_file_in; do
21245       case $f in
21246       -) echo $tmp/stdin ;;
21247       [\\/$]*)
21248          # Absolute (can't be DOS-style, as IFS=:)
21249          test -f "$f" || { { echo "$as_me:21249: error: cannot find input file: $f" >&5
21250 echo "$as_me: error: cannot find input file: $f" >&2;}
21251    { (exit 1); exit 1; }; }
21252          echo $f;;
21253       *) # Relative
21254          if test -f "$f"; then
21255            # Build tree
21256            echo $f
21257          elif test -f "$srcdir/$f"; then
21258            # Source tree
21259            echo $srcdir/$f
21260          else
21261            # /dev/null tree
21262            { { echo "$as_me:21262: error: cannot find input file: $f" >&5
21263 echo "$as_me: error: cannot find input file: $f" >&2;}
21264    { (exit 1); exit 1; }; }
21265          fi;;
21266       esac
21267     done` || { (exit 1); exit 1; }
21268 EOF
21269 cat >>$CONFIG_STATUS <<EOF
21270   sed "$ac_vpsub
21271 $extrasub
21272 EOF
21273 cat >>$CONFIG_STATUS <<\EOF
21274 :t
21275 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21276 s,@configure_input@,$configure_input,;t t
21277 s,@srcdir@,$ac_srcdir,;t t
21278 s,@top_srcdir@,$ac_top_srcdir,;t t
21279 s,@INSTALL@,$ac_INSTALL,;t t
21280 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21281   rm -f $tmp/stdin
21282   if test x"$ac_file" != x-; then
21283     mv $tmp/out $ac_file
21284   else
21285     cat $tmp/out
21286     rm -f $tmp/out
21287   fi
21288
21289 done
21290 EOF
21291 cat >>$CONFIG_STATUS <<\EOF
21292
21293 #
21294 # CONFIG_HEADER section.
21295 #
21296
21297 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21298 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21299 #
21300 # ac_d sets the value in "#define NAME VALUE" lines.
21301 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21302 ac_dB='[        ].*$,\1#\2'
21303 ac_dC=' '
21304 ac_dD=',;t'
21305 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21306 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21307 ac_iB='\([      ]\),\1#\2define\3'
21308 ac_iC=' '
21309 ac_iD='\4,;t'
21310 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21311 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21312 ac_uB='$,\1#\2define\3'
21313 ac_uC=' '
21314 ac_uD=',;t'
21315
21316 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21317   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21318   case $ac_file in
21319   - | *:- | *:-:* ) # input from stdin
21320         cat >$tmp/stdin
21321         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21322         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21323   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21324         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21325   * )   ac_file_in=$ac_file.in ;;
21326   esac
21327
21328   test x"$ac_file" != x- && { echo "$as_me:21328: creating $ac_file" >&5
21329 echo "$as_me: creating $ac_file" >&6;}
21330
21331   # First look for the input files in the build tree, otherwise in the
21332   # src tree.
21333   ac_file_inputs=`IFS=:
21334     for f in $ac_file_in; do
21335       case $f in
21336       -) echo $tmp/stdin ;;
21337       [\\/$]*)
21338          # Absolute (can't be DOS-style, as IFS=:)
21339          test -f "$f" || { { echo "$as_me:21339: error: cannot find input file: $f" >&5
21340 echo "$as_me: error: cannot find input file: $f" >&2;}
21341    { (exit 1); exit 1; }; }
21342          echo $f;;
21343       *) # Relative
21344          if test -f "$f"; then
21345            # Build tree
21346            echo $f
21347          elif test -f "$srcdir/$f"; then
21348            # Source tree
21349            echo $srcdir/$f
21350          else
21351            # /dev/null tree
21352            { { echo "$as_me:21352: error: cannot find input file: $f" >&5
21353 echo "$as_me: error: cannot find input file: $f" >&2;}
21354    { (exit 1); exit 1; }; }
21355          fi;;
21356       esac
21357     done` || { (exit 1); exit 1; }
21358   # Remove the trailing spaces.
21359   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21360
21361 EOF
21362
21363 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21364 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21365 # be either 'cat' or 'sort'.
21366 cat confdefs.h | uniq >conftest.vals
21367
21368 # Break up conftest.vals because some shells have a limit on
21369 # the size of here documents, and old seds have small limits too.
21370
21371 rm -f conftest.tail
21372 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21373 while grep . conftest.vals >/dev/null
21374 do
21375   # Write chunks of a limited-size here document to conftest.frag.
21376   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21377   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21378   echo 'CEOF' >> $CONFIG_STATUS
21379   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21380   rm -f conftest.vals
21381   mv conftest.tail conftest.vals
21382 done
21383 rm -f conftest.vals
21384
21385 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21386 # marker @DEFS@.
21387 echo '  cat >> conftest.edit <<CEOF
21388 /@DEFS@/r conftest.frag
21389 /@DEFS@/d
21390 CEOF
21391 sed -f conftest.edit $tmp/in > $tmp/out
21392 rm -f $tmp/in
21393 mv $tmp/out $tmp/in
21394 rm -f conftest.edit conftest.frag
21395 ' >> $CONFIG_STATUS
21396
21397 cat >>$CONFIG_STATUS <<\EOF
21398   # Let's still pretend it is `configure' which instantiates (i.e., don't
21399   # use $as_me), people would be surprised to read:
21400   #    /* config.h.  Generated automatically by config.status.  */
21401   if test x"$ac_file" = x-; then
21402     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21403   else
21404     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21405   fi
21406   cat $tmp/in >>$tmp/config.h
21407   rm -f $tmp/in
21408   if test x"$ac_file" != x-; then
21409     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21410       { echo "$as_me:21410: $ac_file is unchanged" >&5
21411 echo "$as_me: $ac_file is unchanged" >&6;}
21412     else
21413       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21414          X"$ac_file" : 'X\(//\)[^/]' \| \
21415          X"$ac_file" : 'X\(//\)$' \| \
21416          X"$ac_file" : 'X\(/\)' \| \
21417          .     : '\(.\)' 2>/dev/null ||
21418 echo X"$ac_file" |
21419     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21420           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21421           /^X\(\/\/\)$/{ s//\1/; q; }
21422           /^X\(\/\).*/{ s//\1/; q; }
21423           s/.*/./; q'`
21424       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21425         { case "$ac_dir" in
21426   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21427   *)                      as_incr_dir=.;;
21428 esac
21429 as_dummy="$ac_dir"
21430 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21431   case $as_mkdir_dir in
21432     # Skip DOS drivespec
21433     ?:) as_incr_dir=$as_mkdir_dir ;;
21434     *)
21435       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21436       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21437     ;;
21438   esac
21439 done; }
21440
21441       fi
21442       rm -f $ac_file
21443       mv $tmp/config.h $ac_file
21444     fi
21445   else
21446     cat $tmp/config.h
21447     rm -f $tmp/config.h
21448   fi
21449 done
21450 EOF
21451 cat >>$CONFIG_STATUS <<\EOF
21452 #
21453 # CONFIG_COMMANDS section.
21454 #
21455 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21456   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21457   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21458
21459   case $ac_dest in
21460     default )
21461 if test "x$cf_with_tests" != xno ; then
21462
21463 for cf_dir in test
21464 do
21465         if test ! -d $srcdir/$cf_dir; then
21466                 continue
21467         elif test -f $srcdir/$cf_dir/programs; then
21468                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21469         fi
21470 done
21471
21472 fi
21473
21474 cf_prefix=$LIB_PREFIX
21475
21476 if test $cf_cv_shlib_version = cygdll ; then
21477         TINFO_NAME=$TINFO_ARG_SUFFIX
21478         TINFO_SUFFIX=.dll
21479 fi
21480
21481 if test -n "$TINFO_SUFFIX" ; then
21482         case $TINFO_SUFFIX in
21483         tw*)
21484                 TINFO_NAME="${TINFO_NAME}tw"
21485                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21486                 ;;
21487         t*)
21488                 TINFO_NAME="${TINFO_NAME}t"
21489                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21490                 ;;
21491         w*)
21492                 TINFO_NAME="${TINFO_NAME}w"
21493                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21494                 ;;
21495         esac
21496 fi
21497
21498 for cf_dir in $SRC_SUBDIRS
21499 do
21500         if test ! -d $srcdir/$cf_dir ; then
21501                 continue
21502         elif test -f $srcdir/$cf_dir/modules; then
21503
21504                 SHARED_LIB=
21505                 LIBS_TO_MAKE=
21506                 for cf_item in $cf_LIST_MODELS
21507                 do
21508
21509         case $cf_item in #(vi
21510         libtool) #(vi
21511                 cf_suffix='.la'
21512                 cf_depsuf=$cf_suffix
21513                 ;;
21514         normal) #(vi
21515                 cf_suffix='.a'
21516                 cf_depsuf=$cf_suffix
21517                 ;;
21518         debug) #(vi
21519                 cf_suffix='_g.a'
21520                 cf_depsuf=$cf_suffix
21521                 ;;
21522         profile) #(vi
21523                 cf_suffix='_p.a'
21524                 cf_depsuf=$cf_suffix
21525                 ;;
21526         shared) #(vi
21527                 case $cf_cv_system_name in
21528                 aix[5-7]*) #(vi
21529                         cf_suffix='.a'
21530                         cf_depsuf=$cf_suffix
21531                         ;;
21532                 cygwin*) #(vi
21533                         cf_suffix='.dll'
21534                         cf_depsuf='.dll.a'
21535                         ;;
21536                 darwin*) #(vi
21537                         cf_suffix='.dylib'
21538                         cf_depsuf=$cf_suffix
21539                         ;;
21540                 hpux*) #(vi
21541                         case $target in
21542                         ia64*) #(vi
21543                                 cf_suffix='.so'
21544                                 cf_depsuf=$cf_suffix
21545                                 ;;
21546                         *) #(vi
21547                                 cf_suffix='.sl'
21548                                 cf_depsuf=$cf_suffix
21549                                 ;;
21550                         esac
21551                         ;;
21552                 *)      cf_suffix='.so'
21553                         cf_depsuf=$cf_suffix
21554                         ;;
21555                 esac
21556         esac
21557         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21558         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21559
21560                         if test $cf_item = shared ; then
21561                         if test "$cf_cv_do_symlinks" = yes ; then
21562                                 case "$cf_cv_shlib_version" in #(vi
21563                                 rel) #(vi
21564                                         case "$cf_cv_system_name" in #(vi
21565                                         darwin*)
21566                                         case .${LIB_SUFFIX} in
21567                                         .tw*)
21568                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21569                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21570                                                 ;;
21571                                         .t*)
21572                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21573                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21574                                                 ;;
21575                                         .w*)
21576                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21577                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21578                                                 ;;
21579                                         *)
21580                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21581                                                 ;;
21582                                         esac
21583                                         ;; #(vi
21584                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21585                                         esac
21586                                         ;;
21587                                 abi)
21588                                         case "$cf_cv_system_name" in #(vi
21589                                         darwin*)
21590                                         case .${LIB_SUFFIX} in
21591                                         .tw*)
21592                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21593                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21594                                                 ;;
21595                                         .t*)
21596                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21597                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21598                                                 ;;
21599                                         .w*)
21600                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21601                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21602                                                 ;;
21603                                         *)
21604                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21605                                                 ;;
21606                                         esac
21607                                         ;; #(vi
21608                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21609                                         esac
21610                                         ;;
21611                                 esac
21612                         fi
21613                         # cygwin needs import library, and has unique naming convention
21614                         # use autodetected ${cf_prefix} for import lib and static lib, but
21615                         # use 'cyg' prefix for shared lib.
21616                         if test $cf_cv_shlib_version = cygdll ; then
21617                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21618                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21619                                 continue
21620                         fi
21621                         fi
21622                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21623                 done
21624
21625                 if test $cf_dir = ncurses ; then
21626                         cf_subsets="$LIB_SUBSETS"
21627                         cf_r_parts="$cf_subsets"
21628                         cf_liblist="$LIBS_TO_MAKE"
21629
21630                         while test -n "$cf_r_parts"
21631                         do
21632                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21633                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21634                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21635                                         cf_item=
21636                                         case $cf_l_parts in #(vi
21637                                         *termlib*) #(vi
21638                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21639                                                 ;;
21640                                         *ticlib*)
21641                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21642                                                 ;;
21643                                         *)
21644                                                 break
21645                                                 ;;
21646                                         esac
21647                                         if test -n "$cf_item"; then
21648                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21649                                         fi
21650                                 else
21651                                         break
21652                                 fi
21653                         done
21654                 else
21655                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21656                 fi
21657
21658                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21659                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21660                         $cf_dir/Makefile >$cf_dir/Makefile.out
21661                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21662
21663                 $AWK -f $srcdir/mk-0th.awk \
21664                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21665                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21666
21667                 for cf_subset in $cf_subsets
21668                 do
21669                         cf_subdirs=
21670                         for cf_item in $cf_LIST_MODELS
21671                         do
21672                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21673
21674 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21675
21676         case $cf_item in #(vi
21677         libtool) #(vi
21678                 cf_suffix='.la'
21679                 cf_depsuf=$cf_suffix
21680                 ;;
21681         normal) #(vi
21682                 cf_suffix='.a'
21683                 cf_depsuf=$cf_suffix
21684                 ;;
21685         debug) #(vi
21686                 cf_suffix='_g.a'
21687                 cf_depsuf=$cf_suffix
21688                 ;;
21689         profile) #(vi
21690                 cf_suffix='_p.a'
21691                 cf_depsuf=$cf_suffix
21692                 ;;
21693         shared) #(vi
21694                 case $cf_cv_system_name in
21695                 aix[5-7]*) #(vi
21696                         cf_suffix='.a'
21697                         cf_depsuf=$cf_suffix
21698                         ;;
21699                 cygwin*) #(vi
21700                         cf_suffix='.dll'
21701                         cf_depsuf='.dll.a'
21702                         ;;
21703                 darwin*) #(vi
21704                         cf_suffix='.dylib'
21705                         cf_depsuf=$cf_suffix
21706                         ;;
21707                 hpux*) #(vi
21708                         case $target in
21709                         ia64*) #(vi
21710                                 cf_suffix='.so'
21711                                 cf_depsuf=$cf_suffix
21712                                 ;;
21713                         *) #(vi
21714                                 cf_suffix='.sl'
21715                                 cf_depsuf=$cf_suffix
21716                                 ;;
21717                         esac
21718                         ;;
21719                 *)      cf_suffix='.so'
21720                         cf_depsuf=$cf_suffix
21721                         ;;
21722                 esac
21723         esac
21724         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21725         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21726
21727         case $cf_item in
21728         libtool) cf_subdir='obj_lo'  ;;
21729         normal)  cf_subdir='objects' ;;
21730         debug)   cf_subdir='obj_g' ;;
21731         profile) cf_subdir='obj_p' ;;
21732         shared)
21733                 case $cf_cv_system_name in #(vi
21734                 cygwin) #(vi
21735                         cf_subdir='objects' ;;
21736                 *)
21737                         cf_subdir='obj_s' ;;
21738                 esac
21739         esac
21740
21741                         # Test for case where we build libtinfo with a different name.
21742                         cf_libname=$cf_dir
21743                         if test $cf_dir = ncurses ; then
21744                                 case $cf_subset in
21745                                 *base*)
21746                                         cf_libname=${cf_libname}$LIB_SUFFIX
21747                                         ;;
21748                                 *termlib*)
21749                                         cf_libname=$TINFO_LIB_SUFFIX
21750                                         ;;
21751                                 ticlib*)
21752                                         cf_libname=$TICS_LIB_SUFFIX
21753                                         ;;
21754                                 esac
21755                         else
21756                                 cf_libname=${cf_libname}$LIB_SUFFIX
21757                         fi
21758                         if test -n "${DFT_ARG_SUFFIX}" ; then
21759                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21760                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21761                         fi
21762
21763                         # These dependencies really are for development, not
21764                         # builds, but they are useful in porting, too.
21765                         cf_depend="../include/ncurses_cfg.h"
21766                         if test "$srcdir" = "."; then
21767                                 cf_reldir="."
21768                         else
21769                                 cf_reldir="\${srcdir}"
21770                         fi
21771
21772                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21773                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21774                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21775                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21776                         fi
21777
21778                         cf_dir_suffix=
21779                         old_cf_suffix="$cf_suffix"
21780                         if test "$cf_cv_shlib_version_infix" = yes ; then
21781                         if test -n "$LIB_SUFFIX" ; then
21782                                 case $LIB_SUFFIX in
21783                                 tw*)
21784                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21785                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21786                                         cf_dir_suffix=tw
21787                                         ;;
21788                                 t*)
21789                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21790                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21791                                         cf_dir_suffix=t
21792                                         ;;
21793                                 w*)
21794                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21795                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21796                                         cf_dir_suffix=w
21797                                         ;;
21798                                 esac
21799                         fi
21800                         fi
21801
21802                         $AWK -f $srcdir/mk-1st.awk \
21803                                 name=${cf_libname}${cf_dir_suffix} \
21804                                 traces=$LIB_TRACING \
21805                                 MODEL=$cf_ITEM \
21806                                 model=$cf_subdir \
21807                                 prefix=$cf_prefix \
21808                                 suffix=$cf_suffix \
21809                                 subset=$cf_subset \
21810                                 driver=$cf_cv_term_driver \
21811                                 SymLink="$LN_S" \
21812                                 TermlibRoot=$TINFO_NAME \
21813                                 TermlibSuffix=$TINFO_SUFFIX \
21814                                 ShlibVer=$cf_cv_shlib_version \
21815                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21816                                 ReLink=${cf_cv_do_relink:-no} \
21817                                 DoLinks=$cf_cv_do_symlinks \
21818                                 rmSoLocs=$cf_cv_rm_so_locs \
21819                                 ldconfig="$LDCONFIG" \
21820                                 overwrite=$WITH_OVERWRITE \
21821                                 depend="$cf_depend" \
21822                                 host="$host" \
21823                                 libtool_version="$LIBTOOL_VERSION" \
21824                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21825
21826                         cf_suffix="$old_cf_suffix"
21827
21828                         for cf_subdir2 in $cf_subdirs lib
21829                         do
21830                                 test $cf_subdir = $cf_subdir2 && break
21831                         done
21832                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21833                         $AWK -f $srcdir/mk-2nd.awk \
21834                                 name=$cf_dir \
21835                                 traces=$LIB_TRACING \
21836                                 MODEL=$cf_ITEM \
21837                                 model=$cf_subdir \
21838                                 subset=$cf_subset \
21839                                 srcdir=$srcdir \
21840                                 echo=$WITH_ECHO \
21841                                 crenames=$cf_cv_prog_CC_c_o \
21842                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21843                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21844                         cf_subdirs="$cf_subdirs $cf_subdir"
21845                         done
21846                 done
21847         fi
21848
21849         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21850 done
21851
21852 for cf_dir in $SRC_SUBDIRS
21853 do
21854         if test ! -d $srcdir/$cf_dir ; then
21855                 continue
21856         fi
21857
21858         if test -f $cf_dir/Makefile ; then
21859                 case "$cf_dir" in
21860                 Ada95) #(vi
21861                         echo 'libs \' >> Makefile
21862                         echo 'install.libs \' >> Makefile
21863                         echo 'uninstall.libs ::' >> Makefile
21864                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21865                         ;;
21866                 esac
21867         fi
21868
21869         if test -f $srcdir/$cf_dir/modules; then
21870                 echo >> Makefile
21871                 if test -f $srcdir/$cf_dir/headers; then
21872 cat >> Makefile <<CF_EOF
21873 install.includes \\
21874 uninstall.includes \\
21875 CF_EOF
21876                 fi
21877 if test "$cf_dir" != "c++" ; then
21878 echo 'lint \' >> Makefile
21879 fi
21880 cat >> Makefile <<CF_EOF
21881 libs \\
21882 lintlib \\
21883 install.libs \\
21884 uninstall.libs \\
21885 install.$cf_dir \\
21886 uninstall.$cf_dir ::
21887         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21888 CF_EOF
21889         elif test -f $srcdir/$cf_dir/headers; then
21890 cat >> Makefile <<CF_EOF
21891
21892 libs \\
21893 install.libs \\
21894 uninstall.libs \\
21895 install.includes \\
21896 uninstall.includes ::
21897         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21898 CF_EOF
21899 fi
21900 done
21901
21902 cat >> Makefile <<CF_EOF
21903
21904 install.libs uninstall.libs \\
21905 install.data uninstall.data ::
21906 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21907 CF_EOF
21908
21909 if test "x$cf_with_manpages" = xyes; then
21910 cat >> Makefile <<CF_EOF
21911
21912 install.man \\
21913 uninstall.man ::
21914         cd man && \${MAKE} \${CF_MFLAGS} \$@
21915 CF_EOF
21916 fi
21917
21918 cat >> Makefile <<CF_EOF
21919
21920 distclean ::
21921         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21922         rm -f headers.sh headers.sed mk_shared_lib.sh
21923         rm -f edit_man.* man_alias.*
21924         rm -rf \${DIRS_TO_MAKE}
21925 CF_EOF
21926
21927 # Special case: tack's manpage lives in its own directory.
21928 if test "x$cf_with_manpages" = xyes; then
21929 if test -d tack ; then
21930 if test -f $srcdir/$tack.h; then
21931 cat >> Makefile <<CF_EOF
21932
21933 install.man \\
21934 uninstall.man ::
21935         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21936 CF_EOF
21937 fi
21938 fi
21939 fi
21940
21941 rm -f headers.sed headers.sh
21942
21943 echo creating headers.sh
21944 cat >headers.sh <<CF_EOF
21945 #! /bin/sh
21946 # This shell script is generated by the 'configure' script.  It is invoked in a
21947 # subdirectory of the build tree.  It generates a sed-script in the parent
21948 # directory that is used to adjust includes for header files that reside in a
21949 # subdirectory of /usr/include, etc.
21950 PRG=""
21951 while test \$# != 3
21952 do
21953 PRG="\$PRG \$1"; shift
21954 done
21955 DST=\$1
21956 REF=\$2
21957 SRC=\$3
21958 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21959 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21960 echo installing \$SRC in \$DST
21961 CF_EOF
21962
21963 if test $WITH_CURSES_H = yes; then
21964         cat >>headers.sh <<CF_EOF
21965 case \$DST in
21966 /*/include/*)
21967         END=\`basename \$DST\`
21968         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21969         do
21970                 NAME=\`basename \$i\`
21971                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21972         done
21973         ;;
21974 *)
21975         echo "" >> \$TMPSED
21976         ;;
21977 esac
21978 CF_EOF
21979
21980 else
21981         cat >>headers.sh <<CF_EOF
21982 case \$DST in
21983 /*/include/*)
21984         END=\`basename \$DST\`
21985         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21986         do
21987                 NAME=\`basename \$i\`
21988                 if test "\$NAME" = "curses.h"
21989                 then
21990                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21991                         NAME=ncurses.h
21992                 fi
21993                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21994         done
21995         ;;
21996 *)
21997         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21998         ;;
21999 esac
22000 CF_EOF
22001 fi
22002 cat >>headers.sh <<CF_EOF
22003 rm -f \$TMPSRC
22004 sed -f \$TMPSED \$SRC > \$TMPSRC
22005 NAME=\`basename \$SRC\`
22006 CF_EOF
22007 if test $WITH_CURSES_H != yes; then
22008         cat >>headers.sh <<CF_EOF
22009 test "\$NAME" = "curses.h" && NAME=ncurses.h
22010 CF_EOF
22011 fi
22012 cat >>headers.sh <<CF_EOF
22013 # Just in case someone gzip'd manpages, remove the conflicting copy.
22014 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22015
22016 eval \$PRG \$TMPSRC \$DST/\$NAME
22017 rm -f \$TMPSRC \$TMPSED
22018 CF_EOF
22019
22020 chmod 0755 headers.sh
22021
22022 for cf_dir in $SRC_SUBDIRS
22023 do
22024         if test ! -d $srcdir/$cf_dir ; then
22025                 continue
22026         fi
22027
22028         if test -f $srcdir/$cf_dir/headers; then
22029                 $AWK -f $srcdir/mk-hdr.awk \
22030                         subset="$LIB_SUBSETS" \
22031                         compat="$WITH_CURSES_H" \
22032                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22033         fi
22034
22035         if test -f $srcdir/$cf_dir/modules; then
22036                 if test "$cf_dir" != "c++" ; then
22037                         cat >>$cf_dir/Makefile <<"CF_EOF"
22038 depend : ${AUTO_SRC}
22039         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22040
22041 # DO NOT DELETE THIS LINE -- make depend depends on it.
22042 CF_EOF
22043                 fi
22044         fi
22045 done
22046
22047 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22048 if test -z "$USE_OLD_MAKERULES" ; then
22049         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22050 fi
22051 fi
22052  ;;
22053   esac
22054 done
22055 EOF
22056
22057 cat >>$CONFIG_STATUS <<\EOF
22058
22059 { (exit 0); exit 0; }
22060 EOF
22061 chmod +x $CONFIG_STATUS
22062 ac_clean_files=$ac_clean_files_save
22063
22064 # configure is writing to config.log, and then calls config.status.
22065 # config.status does its own redirection, appending to config.log.
22066 # Unfortunately, on DOS this fails, as config.log is still kept open
22067 # by configure, so config.status won't be able to write to it; its
22068 # output is simply discarded.  So we exec the FD to /dev/null,
22069 # effectively closing config.log, so it can be properly (re)opened and
22070 # appended to by config.status.  When coming back to configure, we
22071 # need to make the FD available again.
22072 if test "$no_create" != yes; then
22073   ac_cs_success=:
22074   exec 5>/dev/null
22075   $SHELL $CONFIG_STATUS || ac_cs_success=false
22076   exec 5>>config.log
22077   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22078   # would make configure fail if this is the last instruction.
22079   $ac_cs_success || { (exit 1); exit 1; }
22080 fi
22081 ${MAKE:-make} preinstall