]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
a4e670108fdcb004eb160272f1fbabc694091210
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.531 .
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-termlib          generate separate terminfo library
724   --with-ticlib           generate separate tic library
725   --with-gpm              use Alessandro Rubini's GPM library
726   --without-dlsym         do not use dlsym() to load GPM dynamically
727   --with-sysmouse         use sysmouse (FreeBSD console)
728   --enable-rpath          use rpath option when generating shared libraries
729   --disable-relink        relink shared libraries during install
730   --with-shlib-version=X  Specify rel or abi version for shared libs
731   --disable-rpath-hack    don't add rpath options for additional libraries
732 Fine-Tuning Your Configuration:
733   --disable-overwrite     leave out the link to -lcurses
734   --disable-database      do not use terminfo, only fallbacks/termcap
735   --with-database=XXX     specify terminfo source to install
736   --with-hashed-db        specify hashed-database library
737   --with-fallbacks=XXX    specify list of fallback terminal descriptions
738   --without-xterm-new     specify if xterm terminfo should be old version
739   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
740   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
741   --disable-big-core      assume machine has little memory
742   --disable-big-strings   assume compiler has only standard-size strings
743   --enable-termcap        compile in termcap fallback support
744   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
745   --enable-getcap         fast termcap load, no xrefs to terminfo
746   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
747   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
748   --disable-root-environ  restrict environment when running as root
749   --enable-symlinks       make tic use symbolic links not hard links
750   --enable-broken_linker  compile with broken-linker support code
751   --enable-bsdpad         recognize BSD-style prefix padding
752   --enable-widec          compile with wide-char/UTF-8 code
753   --disable-lp64          allow chtype to be long (ignore _LP64)
754   --disable-largefile     omit support for large files
755   --disable-tparm-varargs compile tparm() without varargs interface
756   --disable-tic-depends   link tic library without explicit dependency on ncurses library
757   --with-bool=TYPE        override fallback type of bool variable
758   --with-caps=alt         compile with alternate Caps file
759   --with-chtype=TYPE      override type of chtype
760   --with-ospeed=TYPE      override type of ospeed variable
761   --with-mmask-t=TYPE     override type of mmask_t
762   --with-ccharw-max=XXX   override size CCHARW_MAX
763   --with-rcs-ids          compile-in RCS identifiers
764 Options to Specify How Manpages are Installed:
765   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
766                           optionally formatted/catonly, e.g., gzip,formatted
767   --with-manpage-renames  specify manpage-renaming
768   --with-manpage-aliases  specify manpage-aliases using .so
769   --with-manpage-symlinks specify manpage-aliases using symlinks
770   --with-manpage-tbl      specify manpage processing with tbl
771 Extensions:
772   --disable-ext-funcs     disable function-extensions
773   --enable-sp-funcs       enable experimental SCREEN-extensions
774   --enable-term-driver    enable experimental terminal-driver
775   --enable-const          compile with extra/non-standard const
776   --enable-ext-colors     compile for 256-color support
777   --enable-ext-mouse      compile for extended mouse-encoding
778   --enable-no-padding     compile with $NCURSES_NO_PADDING code
779   --enable-signed-char    compile using signed Boolean's in term.h
780   --enable-sigwinch       compile with SIGWINCH handler
781   --enable-tcap-names     compile with user-definable terminal capabilities
782 Development Code:
783   --without-develop       disable development options
784   --enable-hard-tabs      compile with hard-tabs code
785   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
786 Experimental Code:
787   --disable-assumed-color do not assume anything about default-colors
788   --disable-hashmap       compile without hashmap scrolling-optimization
789   --enable-colorfgbg      compile-in experimental $COLORFGBG code
790   --enable-interop        compile-in experimental interop bindings
791   --with-pthread          use POSIX thread library
792   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
793   --enable-weak-symbols   enable weak-symbols for pthreads
794   --enable-reentrant      compile with experimental reentrant code
795   --with-wrap-prefix=XXX  override prefix used for public variables
796   --enable-safe-sprintf   compile with experimental safe-sprintf code
797   --disable-scroll-hints  compile without scroll-hints code
798   --enable-wgetch-events  compile with experimental wgetch-events code
799 Testing/development Options:
800   --enable-echo           build: display "compiling" commands (default)
801   --enable-warnings       build: turn on GCC compiler warnings
802   --enable-assertions     test: turn on generation of assertion code
803   --with-dmalloc          test: use Gray Watson's dmalloc library
804   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
805   --with-valgrind         test: use valgrind
806   --disable-leaks         test: free permanent memory, analyze leaks
807   --enable-expanded       test: generate functions for certain macros
808   --disable-macros        test: use functions rather than macros
809   --with-trace            test: add trace() function to all models of ncurses
810 Ada95 Binding Options:
811   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
812   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
813   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
814   --with-ada-sharedlib=XX build Ada95 shared-library
815
816 Some influential environment variables:
817   CC          C compiler command
818   CFLAGS      C compiler flags
819   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
820               nonstandard directory <lib dir>
821   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
822               headers in a nonstandard directory <include dir>
823   CPP         C preprocessor
824   CXX         C++ compiler command
825   CXXFLAGS    C++ compiler flags
826   CXXCPP      C++ preprocessor
827
828 Use these variables to override the choices made by `configure' or to help
829 it to find libraries and programs with nonstandard names/locations.
830
831 EOF
832 fi
833
834 if test "$ac_init_help" = "recursive"; then
835   # If there are subdirs, report their specific --help.
836   ac_popdir=`pwd`
837   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
838     cd $ac_subdir
839     # A "../" for each directory in /$ac_subdir.
840     ac_dots=`echo $ac_subdir |
841              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
842
843     case $srcdir in
844     .) # No --srcdir option.  We are building in place.
845       ac_sub_srcdir=$srcdir ;;
846     [\\/]* | ?:[\\/]* ) # Absolute path.
847       ac_sub_srcdir=$srcdir/$ac_subdir ;;
848     *) # Relative path.
849       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
850     esac
851
852     # Check for guested configure; otherwise get Cygnus style configure.
853     if test -f $ac_sub_srcdir/configure.gnu; then
854       echo
855       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
856     elif test -f $ac_sub_srcdir/configure; then
857       echo
858       $SHELL $ac_sub_srcdir/configure  --help=recursive
859     elif test -f $ac_sub_srcdir/configure.ac ||
860            test -f $ac_sub_srcdir/configure.in; then
861       echo
862       $ac_configure --help
863     else
864       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
865     fi
866     cd $ac_popdir
867   done
868 fi
869
870 test -n "$ac_init_help" && exit 0
871 if $ac_init_version; then
872   cat <<\EOF
873
874 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
875 Free Software Foundation, Inc.
876 This configure script is free software; the Free Software Foundation
877 gives unlimited permission to copy, distribute and modify it.
878 EOF
879   exit 0
880 fi
881 exec 5>config.log
882 cat >&5 <<EOF
883 This file contains any messages produced by compilers while
884 running configure, to aid debugging if configure makes a mistake.
885
886 It was created by $as_me, which was
887 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
888
889   $ $0 $@
890
891 EOF
892 {
893 cat <<_ASUNAME
894 ## ---------- ##
895 ## Platform.  ##
896 ## ---------- ##
897
898 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
899 uname -m = `(uname -m) 2>/dev/null || echo unknown`
900 uname -r = `(uname -r) 2>/dev/null || echo unknown`
901 uname -s = `(uname -s) 2>/dev/null || echo unknown`
902 uname -v = `(uname -v) 2>/dev/null || echo unknown`
903
904 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
905 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
906
907 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
908 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
909 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
910 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
911 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
912 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
913 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
914
915 PATH = $PATH
916
917 _ASUNAME
918 } >&5
919
920 cat >&5 <<EOF
921 ## ------------ ##
922 ## Core tests.  ##
923 ## ------------ ##
924
925 EOF
926
927 # Keep a trace of the command line.
928 # Strip out --no-create and --no-recursion so they do not pile up.
929 # Also quote any args containing shell meta-characters.
930 ac_configure_args=
931 ac_sep=
932 for ac_arg
933 do
934   case $ac_arg in
935   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
936   | --no-cr | --no-c) ;;
937   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
938   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
939   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
940     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
941     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
942     ac_sep=" " ;;
943   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
944      ac_sep=" " ;;
945   esac
946   # Get rid of the leading space.
947 done
948
949 # When interrupted or exit'd, cleanup temporary files, and complete
950 # config.log.  We remove comments because anyway the quotes in there
951 # would cause problems or look ugly.
952 trap 'exit_status=$?
953   # Save into config.log some information that might help in debugging.
954   echo >&5
955   echo "## ----------------- ##" >&5
956   echo "## Cache variables.  ##" >&5
957   echo "## ----------------- ##" >&5
958   echo >&5
959   # The following way of writing the cache mishandles newlines in values,
960 {
961   (set) 2>&1 |
962     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
963     *ac_space=\ *)
964       sed -n \
965         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
966           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
967       ;;
968     *)
969       sed -n \
970         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
971       ;;
972     esac;
973 } >&5
974   sed "/^$/d" confdefs.h >conftest.log
975   if test -s conftest.log; then
976     echo >&5
977     echo "## ------------ ##" >&5
978     echo "## confdefs.h.  ##" >&5
979     echo "## ------------ ##" >&5
980     echo >&5
981     cat conftest.log >&5
982   fi
983   (echo; echo) >&5
984   test "$ac_signal" != 0 &&
985     echo "$as_me: caught signal $ac_signal" >&5
986   echo "$as_me: exit $exit_status" >&5
987   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
988     exit $exit_status
989      ' 0
990 for ac_signal in 1 2 13 15; do
991   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
992 done
993 ac_signal=0
994
995 # confdefs.h avoids OS command line length limits that DEFS can exceed.
996 rm -rf conftest* confdefs.h
997 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
998 echo >confdefs.h
999
1000 # Let the site file select an alternate cache file if it wants to.
1001 # Prefer explicitly selected file to automatically selected ones.
1002 if test -z "$CONFIG_SITE"; then
1003   if test "x$prefix" != xNONE; then
1004     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1005   else
1006     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1007   fi
1008 fi
1009 for ac_site_file in $CONFIG_SITE; do
1010   if test -r "$ac_site_file"; then
1011     { echo "$as_me:1011: loading site script $ac_site_file" >&5
1012 echo "$as_me: loading site script $ac_site_file" >&6;}
1013     cat "$ac_site_file" >&5
1014     . "$ac_site_file"
1015   fi
1016 done
1017
1018 if test -r "$cache_file"; then
1019   # Some versions of bash will fail to source /dev/null (special
1020   # files actually), so we avoid doing that.
1021   if test -f "$cache_file"; then
1022     { echo "$as_me:1022: loading cache $cache_file" >&5
1023 echo "$as_me: loading cache $cache_file" >&6;}
1024     case $cache_file in
1025       [\\/]* | ?:[\\/]* ) . $cache_file;;
1026       *)                      . ./$cache_file;;
1027     esac
1028   fi
1029 else
1030   { echo "$as_me:1030: creating cache $cache_file" >&5
1031 echo "$as_me: creating cache $cache_file" >&6;}
1032   >$cache_file
1033 fi
1034
1035 # Check that the precious variables saved in the cache have kept the same
1036 # value.
1037 ac_cache_corrupted=false
1038 for ac_var in `(set) 2>&1 |
1039                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1040   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1041   eval ac_new_set=\$ac_env_${ac_var}_set
1042   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1043   eval ac_new_val="\$ac_env_${ac_var}_value"
1044   case $ac_old_set,$ac_new_set in
1045     set,)
1046       { echo "$as_me:1046: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1047 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1048       ac_cache_corrupted=: ;;
1049     ,set)
1050       { echo "$as_me:1050: error: \`$ac_var' was not set in the previous run" >&5
1051 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1052       ac_cache_corrupted=: ;;
1053     ,);;
1054     *)
1055       if test "x$ac_old_val" != "x$ac_new_val"; then
1056         { echo "$as_me:1056: error: \`$ac_var' has changed since the previous run:" >&5
1057 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1058         { echo "$as_me:1058:   former value:  $ac_old_val" >&5
1059 echo "$as_me:   former value:  $ac_old_val" >&2;}
1060         { echo "$as_me:1060:   current value: $ac_new_val" >&5
1061 echo "$as_me:   current value: $ac_new_val" >&2;}
1062         ac_cache_corrupted=:
1063       fi;;
1064   esac
1065   # Pass precious variables to config.status.  It doesn't matter if
1066   # we pass some twice (in addition to the command line arguments).
1067   if test "$ac_new_set" = set; then
1068     case $ac_new_val in
1069     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1070       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1071       ac_configure_args="$ac_configure_args '$ac_arg'"
1072       ;;
1073     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1074        ;;
1075     esac
1076   fi
1077 done
1078 if $ac_cache_corrupted; then
1079   { echo "$as_me:1079: error: changes in the environment can compromise the build" >&5
1080 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1081   { { echo "$as_me:1081: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1082 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1083    { (exit 1); exit 1; }; }
1084 fi
1085
1086 ac_ext=c
1087 ac_cpp='$CPP $CPPFLAGS'
1088 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1089 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1091 ac_main_return=return
1092
1093 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1094   *c*,-n*) ECHO_N= ECHO_C='
1095 ' ECHO_T='      ' ;;
1096   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1097   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1098 esac
1099 echo "#! $SHELL" >conftest.sh
1100 echo  "exit 0"   >>conftest.sh
1101 chmod +x conftest.sh
1102 if { (echo "$as_me:1102: PATH=\".;.\"; conftest.sh") >&5
1103   (PATH=".;."; conftest.sh) 2>&5
1104   ac_status=$?
1105   echo "$as_me:1105: \$? = $ac_status" >&5
1106   (exit $ac_status); }; then
1107   ac_path_separator=';'
1108 else
1109   ac_path_separator=:
1110 fi
1111 PATH_SEPARATOR="$ac_path_separator"
1112 rm -f conftest.sh
1113
1114 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1115
1116 top_builddir=`pwd`
1117
1118 echo "$as_me:1118: checking for egrep" >&5
1119 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1120 if test "${ac_cv_prog_egrep+set}" = set; then
1121   echo $ECHO_N "(cached) $ECHO_C" >&6
1122 else
1123   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1124     then ac_cv_prog_egrep='grep -E'
1125     else ac_cv_prog_egrep='egrep'
1126     fi
1127 fi
1128 echo "$as_me:1128: result: $ac_cv_prog_egrep" >&5
1129 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1130  EGREP=$ac_cv_prog_egrep
1131
1132 test -z "$EGREP" && { { echo "$as_me:1132: error: No egrep program found" >&5
1133 echo "$as_me: error: No egrep program found" >&2;}
1134    { (exit 1); exit 1; }; }
1135
1136 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1139 cf_cv_abi_version=${NCURSES_MAJOR}
1140 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1141 cf_cv_timestamp=`date`
1142 echo "$as_me:1142: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1143 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1144
1145 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1146
1147 # Check whether --with-rel-version or --without-rel-version was given.
1148 if test "${with_rel_version+set}" = set; then
1149   withval="$with_rel_version"
1150   { echo "$as_me:1150: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1151 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1152  cf_cv_rel_version=$withval
1153 fi;
1154
1155  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1156  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1157
1158 if test -n "$NCURSES_MAJOR" ; then
1159   case $NCURSES_MAJOR in #(vi
1160   [0-9]*) #(vi
1161         ;;
1162   *)
1163         { { echo "$as_me:1163: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1164 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1165    { (exit 1); exit 1; }; }
1166         ;;
1167   esac
1168 else
1169   { { echo "$as_me:1169: error: Release major-version value is empty" >&5
1170 echo "$as_me: error: Release major-version value is empty" >&2;}
1171    { (exit 1); exit 1; }; }
1172 fi
1173
1174 if test -n "$NCURSES_MINOR" ; then
1175   case $NCURSES_MINOR in #(vi
1176   [0-9]*) #(vi
1177         ;;
1178   *)
1179         { { echo "$as_me:1179: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1180 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1181    { (exit 1); exit 1; }; }
1182         ;;
1183   esac
1184 else
1185   { { echo "$as_me:1185: error: Release minor-version value is empty" >&5
1186 echo "$as_me: error: Release minor-version value is empty" >&2;}
1187    { (exit 1); exit 1; }; }
1188 fi
1189
1190 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1191
1192 # Check whether --with-abi-version or --without-abi-version was given.
1193 if test "${with_abi_version+set}" = set; then
1194   withval="$with_abi_version"
1195   { echo "$as_me:1195: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1196 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1197  cf_cv_abi_version=$withval
1198 fi;
1199
1200 if test -n "$cf_cv_abi_version" ; then
1201   case $cf_cv_abi_version in #(vi
1202   [0-9]*) #(vi
1203         ;;
1204   *)
1205         { { echo "$as_me:1205: error: ABI version is not a number: $cf_cv_abi_version" >&5
1206 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1207    { (exit 1); exit 1; }; }
1208         ;;
1209   esac
1210 else
1211   { { echo "$as_me:1211: error: ABI version value is empty" >&5
1212 echo "$as_me: error: ABI version value is empty" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 ac_aux_dir=
1217 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1218   if test -f $ac_dir/install-sh; then
1219     ac_aux_dir=$ac_dir
1220     ac_install_sh="$ac_aux_dir/install-sh -c"
1221     break
1222   elif test -f $ac_dir/install.sh; then
1223     ac_aux_dir=$ac_dir
1224     ac_install_sh="$ac_aux_dir/install.sh -c"
1225     break
1226   elif test -f $ac_dir/shtool; then
1227     ac_aux_dir=$ac_dir
1228     ac_install_sh="$ac_aux_dir/shtool install -c"
1229     break
1230   fi
1231 done
1232 if test -z "$ac_aux_dir"; then
1233   { { echo "$as_me:1233: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1234 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1235    { (exit 1); exit 1; }; }
1236 fi
1237 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1238 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1239 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1240
1241 # Make sure we can run config.sub.
1242 $ac_config_sub sun4 >/dev/null 2>&1 ||
1243   { { echo "$as_me:1243: error: cannot run $ac_config_sub" >&5
1244 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1245    { (exit 1); exit 1; }; }
1246
1247 echo "$as_me:1247: checking build system type" >&5
1248 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1249 if test "${ac_cv_build+set}" = set; then
1250   echo $ECHO_N "(cached) $ECHO_C" >&6
1251 else
1252   ac_cv_build_alias=$build_alias
1253 test -z "$ac_cv_build_alias" &&
1254   ac_cv_build_alias=`$ac_config_guess`
1255 test -z "$ac_cv_build_alias" &&
1256   { { echo "$as_me:1256: error: cannot guess build type; you must specify one" >&5
1257 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1258    { (exit 1); exit 1; }; }
1259 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1260   { { echo "$as_me:1260: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1261 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 fi
1265 echo "$as_me:1265: result: $ac_cv_build" >&5
1266 echo "${ECHO_T}$ac_cv_build" >&6
1267 build=$ac_cv_build
1268 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1269 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1270 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1271
1272 echo "$as_me:1272: checking host system type" >&5
1273 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1274 if test "${ac_cv_host+set}" = set; then
1275   echo $ECHO_N "(cached) $ECHO_C" >&6
1276 else
1277   ac_cv_host_alias=$host_alias
1278 test -z "$ac_cv_host_alias" &&
1279   ac_cv_host_alias=$ac_cv_build_alias
1280 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1281   { { echo "$as_me:1281: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1282 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1283    { (exit 1); exit 1; }; }
1284
1285 fi
1286 echo "$as_me:1286: result: $ac_cv_host" >&5
1287 echo "${ECHO_T}$ac_cv_host" >&6
1288 host=$ac_cv_host
1289 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1290 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1291 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1292
1293 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1294         echo "$as_me:1294: checking target system type" >&5
1295 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1296 if test "${ac_cv_target+set}" = set; then
1297   echo $ECHO_N "(cached) $ECHO_C" >&6
1298 else
1299   ac_cv_target_alias=$target_alias
1300 test "x$ac_cv_target_alias" = "x" &&
1301   ac_cv_target_alias=$ac_cv_host_alias
1302 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1303   { { echo "$as_me:1303: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1304 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1305    { (exit 1); exit 1; }; }
1306
1307 fi
1308 echo "$as_me:1308: result: $ac_cv_target" >&5
1309 echo "${ECHO_T}$ac_cv_target" >&6
1310 target=$ac_cv_target
1311 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1312 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1313 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1314
1315 # The aliases save the names the user supplied, while $host etc.
1316 # will get canonicalized.
1317 test -n "$target_alias" &&
1318   test "$program_prefix$program_suffix$program_transform_name" = \
1319     NONENONEs,x,x, &&
1320   program_prefix=${target_alias}-
1321         system_name="$host_os"
1322 else
1323         system_name="`(uname -s -r) 2>/dev/null`"
1324         if test -z "$system_name" ; then
1325                 system_name="`(hostname) 2>/dev/null`"
1326         fi
1327 fi
1328 test -n "$system_name" && cat >>confdefs.h <<EOF
1329 #define SYSTEM_NAME "$system_name"
1330 EOF
1331
1332 if test "${cf_cv_system_name+set}" = set; then
1333   echo $ECHO_N "(cached) $ECHO_C" >&6
1334 else
1335   cf_cv_system_name="$system_name"
1336 fi
1337
1338 test -z "$system_name" && system_name="$cf_cv_system_name"
1339 test -n "$cf_cv_system_name" && echo "$as_me:1339: result: Configuring for $cf_cv_system_name" >&5
1340 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1341
1342 if test ".$system_name" != ".$cf_cv_system_name" ; then
1343         echo "$as_me:1343: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1344 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1345         { { echo "$as_me:1345: error: \"Please remove config.cache and try again.\"" >&5
1346 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1347    { (exit 1); exit 1; }; }
1348 fi
1349
1350 # Check whether --with-system-type or --without-system-type was given.
1351 if test "${with_system_type+set}" = set; then
1352   withval="$with_system_type"
1353   { echo "$as_me:1353: WARNING: overriding system type to $withval" >&5
1354 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1355  cf_cv_system_name=$withval
1356 fi;
1357
1358 ###     Save the given $CFLAGS to allow user-override.
1359 cf_user_CFLAGS="$CFLAGS"
1360
1361 ###     Default install-location
1362
1363 echo "$as_me:1363: checking for prefix" >&5
1364 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1365 if test "x$prefix" = "xNONE" ; then
1366         case "$cf_cv_system_name" in
1367                 # non-vendor systems don't have a conflict
1368         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1369                 prefix=/usr
1370                 ;;
1371         *)      prefix=$ac_default_prefix
1372                 ;;
1373         esac
1374 fi
1375 echo "$as_me:1375: result: $prefix" >&5
1376 echo "${ECHO_T}$prefix" >&6
1377
1378 if test "x$prefix" = "xNONE" ; then
1379 echo "$as_me:1379: checking for default include-directory" >&5
1380 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1381 test -n "$verbose" && echo 1>&6
1382 for cf_symbol in \
1383         $includedir \
1384         $includedir/ncurses \
1385         $prefix/include \
1386         $prefix/include/ncurses \
1387         /usr/local/include \
1388         /usr/local/include/ncurses \
1389         /usr/include \
1390         /usr/include/ncurses
1391 do
1392         cf_dir=`eval echo $cf_symbol`
1393         if test -f $cf_dir/curses.h ; then
1394         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1395                 includedir="$cf_symbol"
1396                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1397                 break
1398         fi
1399         fi
1400         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1401 done
1402 echo "$as_me:1402: result: $includedir" >&5
1403 echo "${ECHO_T}$includedir" >&6
1404 fi
1405
1406 ###     Checks for programs.
1407 ac_ext=c
1408 ac_cpp='$CPP $CPPFLAGS'
1409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1412 ac_main_return=return
1413 if test -n "$ac_tool_prefix"; then
1414   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1415 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1416 echo "$as_me:1416: checking for $ac_word" >&5
1417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418 if test "${ac_cv_prog_CC+set}" = set; then
1419   echo $ECHO_N "(cached) $ECHO_C" >&6
1420 else
1421   if test -n "$CC"; then
1422   ac_cv_prog_CC="$CC" # Let the user override the test.
1423 else
1424   ac_save_IFS=$IFS; IFS=$ac_path_separator
1425 ac_dummy="$PATH"
1426 for ac_dir in $ac_dummy; do
1427   IFS=$ac_save_IFS
1428   test -z "$ac_dir" && ac_dir=.
1429   $as_executable_p "$ac_dir/$ac_word" || continue
1430 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1431 echo "$as_me:1431: found $ac_dir/$ac_word" >&5
1432 break
1433 done
1434
1435 fi
1436 fi
1437 CC=$ac_cv_prog_CC
1438 if test -n "$CC"; then
1439   echo "$as_me:1439: result: $CC" >&5
1440 echo "${ECHO_T}$CC" >&6
1441 else
1442   echo "$as_me:1442: result: no" >&5
1443 echo "${ECHO_T}no" >&6
1444 fi
1445
1446 fi
1447 if test -z "$ac_cv_prog_CC"; then
1448   ac_ct_CC=$CC
1449   # Extract the first word of "gcc", so it can be a program name with args.
1450 set dummy gcc; ac_word=$2
1451 echo "$as_me:1451: checking for $ac_word" >&5
1452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1454   echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456   if test -n "$ac_ct_CC"; then
1457   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1458 else
1459   ac_save_IFS=$IFS; IFS=$ac_path_separator
1460 ac_dummy="$PATH"
1461 for ac_dir in $ac_dummy; do
1462   IFS=$ac_save_IFS
1463   test -z "$ac_dir" && ac_dir=.
1464   $as_executable_p "$ac_dir/$ac_word" || continue
1465 ac_cv_prog_ac_ct_CC="gcc"
1466 echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467 break
1468 done
1469
1470 fi
1471 fi
1472 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1473 if test -n "$ac_ct_CC"; then
1474   echo "$as_me:1474: result: $ac_ct_CC" >&5
1475 echo "${ECHO_T}$ac_ct_CC" >&6
1476 else
1477   echo "$as_me:1477: result: no" >&5
1478 echo "${ECHO_T}no" >&6
1479 fi
1480
1481   CC=$ac_ct_CC
1482 else
1483   CC="$ac_cv_prog_CC"
1484 fi
1485
1486 if test -z "$CC"; then
1487   if test -n "$ac_tool_prefix"; then
1488   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1489 set dummy ${ac_tool_prefix}cc; ac_word=$2
1490 echo "$as_me:1490: checking for $ac_word" >&5
1491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492 if test "${ac_cv_prog_CC+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   if test -n "$CC"; then
1496   ac_cv_prog_CC="$CC" # Let the user override the test.
1497 else
1498   ac_save_IFS=$IFS; IFS=$ac_path_separator
1499 ac_dummy="$PATH"
1500 for ac_dir in $ac_dummy; do
1501   IFS=$ac_save_IFS
1502   test -z "$ac_dir" && ac_dir=.
1503   $as_executable_p "$ac_dir/$ac_word" || continue
1504 ac_cv_prog_CC="${ac_tool_prefix}cc"
1505 echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506 break
1507 done
1508
1509 fi
1510 fi
1511 CC=$ac_cv_prog_CC
1512 if test -n "$CC"; then
1513   echo "$as_me:1513: result: $CC" >&5
1514 echo "${ECHO_T}$CC" >&6
1515 else
1516   echo "$as_me:1516: result: no" >&5
1517 echo "${ECHO_T}no" >&6
1518 fi
1519
1520 fi
1521 if test -z "$ac_cv_prog_CC"; then
1522   ac_ct_CC=$CC
1523   # Extract the first word of "cc", so it can be a program name with args.
1524 set dummy cc; ac_word=$2
1525 echo "$as_me:1525: checking for $ac_word" >&5
1526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1527 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   if test -n "$ac_ct_CC"; then
1531   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1532 else
1533   ac_save_IFS=$IFS; IFS=$ac_path_separator
1534 ac_dummy="$PATH"
1535 for ac_dir in $ac_dummy; do
1536   IFS=$ac_save_IFS
1537   test -z "$ac_dir" && ac_dir=.
1538   $as_executable_p "$ac_dir/$ac_word" || continue
1539 ac_cv_prog_ac_ct_CC="cc"
1540 echo "$as_me:1540: found $ac_dir/$ac_word" >&5
1541 break
1542 done
1543
1544 fi
1545 fi
1546 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1547 if test -n "$ac_ct_CC"; then
1548   echo "$as_me:1548: result: $ac_ct_CC" >&5
1549 echo "${ECHO_T}$ac_ct_CC" >&6
1550 else
1551   echo "$as_me:1551: result: no" >&5
1552 echo "${ECHO_T}no" >&6
1553 fi
1554
1555   CC=$ac_ct_CC
1556 else
1557   CC="$ac_cv_prog_CC"
1558 fi
1559
1560 fi
1561 if test -z "$CC"; then
1562   # Extract the first word of "cc", so it can be a program name with args.
1563 set dummy cc; ac_word=$2
1564 echo "$as_me:1564: checking for $ac_word" >&5
1565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1566 if test "${ac_cv_prog_CC+set}" = set; then
1567   echo $ECHO_N "(cached) $ECHO_C" >&6
1568 else
1569   if test -n "$CC"; then
1570   ac_cv_prog_CC="$CC" # Let the user override the test.
1571 else
1572   ac_prog_rejected=no
1573   ac_save_IFS=$IFS; IFS=$ac_path_separator
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576   IFS=$ac_save_IFS
1577   test -z "$ac_dir" && ac_dir=.
1578   $as_executable_p "$ac_dir/$ac_word" || continue
1579 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1580   ac_prog_rejected=yes
1581   continue
1582 fi
1583 ac_cv_prog_CC="cc"
1584 echo "$as_me:1584: found $ac_dir/$ac_word" >&5
1585 break
1586 done
1587
1588 if test $ac_prog_rejected = yes; then
1589   # We found a bogon in the path, so make sure we never use it.
1590   set dummy $ac_cv_prog_CC
1591   shift
1592   if test $# != 0; then
1593     # We chose a different compiler from the bogus one.
1594     # However, it has the same basename, so the bogon will be chosen
1595     # first if we set CC to just the basename; use the full file name.
1596     shift
1597     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1598     shift
1599     ac_cv_prog_CC="$@"
1600   fi
1601 fi
1602 fi
1603 fi
1604 CC=$ac_cv_prog_CC
1605 if test -n "$CC"; then
1606   echo "$as_me:1606: result: $CC" >&5
1607 echo "${ECHO_T}$CC" >&6
1608 else
1609   echo "$as_me:1609: result: no" >&5
1610 echo "${ECHO_T}no" >&6
1611 fi
1612
1613 fi
1614 if test -z "$CC"; then
1615   if test -n "$ac_tool_prefix"; then
1616   for ac_prog in cl
1617   do
1618     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1619 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1620 echo "$as_me:1620: checking for $ac_word" >&5
1621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1622 if test "${ac_cv_prog_CC+set}" = set; then
1623   echo $ECHO_N "(cached) $ECHO_C" >&6
1624 else
1625   if test -n "$CC"; then
1626   ac_cv_prog_CC="$CC" # Let the user override the test.
1627 else
1628   ac_save_IFS=$IFS; IFS=$ac_path_separator
1629 ac_dummy="$PATH"
1630 for ac_dir in $ac_dummy; do
1631   IFS=$ac_save_IFS
1632   test -z "$ac_dir" && ac_dir=.
1633   $as_executable_p "$ac_dir/$ac_word" || continue
1634 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1635 echo "$as_me:1635: found $ac_dir/$ac_word" >&5
1636 break
1637 done
1638
1639 fi
1640 fi
1641 CC=$ac_cv_prog_CC
1642 if test -n "$CC"; then
1643   echo "$as_me:1643: result: $CC" >&5
1644 echo "${ECHO_T}$CC" >&6
1645 else
1646   echo "$as_me:1646: result: no" >&5
1647 echo "${ECHO_T}no" >&6
1648 fi
1649
1650     test -n "$CC" && break
1651   done
1652 fi
1653 if test -z "$CC"; then
1654   ac_ct_CC=$CC
1655   for ac_prog in cl
1656 do
1657   # Extract the first word of "$ac_prog", so it can be a program name with args.
1658 set dummy $ac_prog; ac_word=$2
1659 echo "$as_me:1659: checking for $ac_word" >&5
1660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1661 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1662   echo $ECHO_N "(cached) $ECHO_C" >&6
1663 else
1664   if test -n "$ac_ct_CC"; then
1665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1666 else
1667   ac_save_IFS=$IFS; IFS=$ac_path_separator
1668 ac_dummy="$PATH"
1669 for ac_dir in $ac_dummy; do
1670   IFS=$ac_save_IFS
1671   test -z "$ac_dir" && ac_dir=.
1672   $as_executable_p "$ac_dir/$ac_word" || continue
1673 ac_cv_prog_ac_ct_CC="$ac_prog"
1674 echo "$as_me:1674: found $ac_dir/$ac_word" >&5
1675 break
1676 done
1677
1678 fi
1679 fi
1680 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1681 if test -n "$ac_ct_CC"; then
1682   echo "$as_me:1682: result: $ac_ct_CC" >&5
1683 echo "${ECHO_T}$ac_ct_CC" >&6
1684 else
1685   echo "$as_me:1685: result: no" >&5
1686 echo "${ECHO_T}no" >&6
1687 fi
1688
1689   test -n "$ac_ct_CC" && break
1690 done
1691
1692   CC=$ac_ct_CC
1693 fi
1694
1695 fi
1696
1697 test -z "$CC" && { { echo "$as_me:1697: error: no acceptable cc found in \$PATH" >&5
1698 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1699    { (exit 1); exit 1; }; }
1700
1701 # Provide some information about the compiler.
1702 echo "$as_me:1702:" \
1703      "checking for C compiler version" >&5
1704 ac_compiler=`set X $ac_compile; echo $2`
1705 { (eval echo "$as_me:1705: \"$ac_compiler --version </dev/null >&5\"") >&5
1706   (eval $ac_compiler --version </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -v </dev/null >&5\"") >&5
1711   (eval $ac_compiler -v </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -V </dev/null >&5\"") >&5
1716   (eval $ac_compiler -V </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720
1721 cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728
1729   ;
1730   return 0;
1731 }
1732 _ACEOF
1733 ac_clean_files_save=$ac_clean_files
1734 ac_clean_files="$ac_clean_files a.out a.exe"
1735 # Try to create an executable without -o first, disregard a.out.
1736 # It will help us diagnose broken compilers, and finding out an intuition
1737 # of exeext.
1738 echo "$as_me:1738: checking for C compiler default output" >&5
1739 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1740 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1741 if { (eval echo "$as_me:1741: \"$ac_link_default\"") >&5
1742   (eval $ac_link_default) 2>&5
1743   ac_status=$?
1744   echo "$as_me:1744: \$? = $ac_status" >&5
1745   (exit $ac_status); }; then
1746   # Find the output, starting from the most likely.  This scheme is
1747 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1748 # resort.
1749 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1750                 ls a.out conftest 2>/dev/null;
1751                 ls a.* conftest.* 2>/dev/null`; do
1752   case $ac_file in
1753     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1754     a.out ) # We found the default executable, but exeext='' is most
1755             # certainly right.
1756             break;;
1757     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1758           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1759           export ac_cv_exeext
1760           break;;
1761     * ) break;;
1762   esac
1763 done
1764 else
1765   echo "$as_me: failed program was:" >&5
1766 cat conftest.$ac_ext >&5
1767 { { echo "$as_me:1767: error: C compiler cannot create executables" >&5
1768 echo "$as_me: error: C compiler cannot create executables" >&2;}
1769    { (exit 77); exit 77; }; }
1770 fi
1771
1772 ac_exeext=$ac_cv_exeext
1773 echo "$as_me:1773: result: $ac_file" >&5
1774 echo "${ECHO_T}$ac_file" >&6
1775
1776 # Check the compiler produces executables we can run.  If not, either
1777 # the compiler is broken, or we cross compile.
1778 echo "$as_me:1778: checking whether the C compiler works" >&5
1779 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1780 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1781 # If not cross compiling, check that we can run a simple program.
1782 if test "$cross_compiling" != yes; then
1783   if { ac_try='./$ac_file'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789     cross_compiling=no
1790   else
1791     if test "$cross_compiling" = maybe; then
1792         cross_compiling=yes
1793     else
1794         { { echo "$as_me:1794: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&5
1796 echo "$as_me: error: cannot run C compiled programs.
1797 If you meant to cross compile, use \`--host'." >&2;}
1798    { (exit 1); exit 1; }; }
1799     fi
1800   fi
1801 fi
1802 echo "$as_me:1802: result: yes" >&5
1803 echo "${ECHO_T}yes" >&6
1804
1805 rm -f a.out a.exe conftest$ac_cv_exeext
1806 ac_clean_files=$ac_clean_files_save
1807 # Check the compiler produces executables we can run.  If not, either
1808 # the compiler is broken, or we cross compile.
1809 echo "$as_me:1809: checking whether we are cross compiling" >&5
1810 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1811 echo "$as_me:1811: result: $cross_compiling" >&5
1812 echo "${ECHO_T}$cross_compiling" >&6
1813
1814 echo "$as_me:1814: checking for executable suffix" >&5
1815 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1816 if { (eval echo "$as_me:1816: \"$ac_link\"") >&5
1817   (eval $ac_link) 2>&5
1818   ac_status=$?
1819   echo "$as_me:1819: \$? = $ac_status" >&5
1820   (exit $ac_status); }; then
1821   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1822 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1823 # work properly (i.e., refer to `conftest.exe'), while it won't with
1824 # `rm'.
1825 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1826   case $ac_file in
1827     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1828     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1829           export ac_cv_exeext
1830           break;;
1831     * ) break;;
1832   esac
1833 done
1834 else
1835   { { echo "$as_me:1835: error: cannot compute EXEEXT: cannot compile and link" >&5
1836 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1837    { (exit 1); exit 1; }; }
1838 fi
1839
1840 rm -f conftest$ac_cv_exeext
1841 echo "$as_me:1841: result: $ac_cv_exeext" >&5
1842 echo "${ECHO_T}$ac_cv_exeext" >&6
1843
1844 rm -f conftest.$ac_ext
1845 EXEEXT=$ac_cv_exeext
1846 ac_exeext=$EXEEXT
1847 echo "$as_me:1847: checking for object suffix" >&5
1848 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1849 if test "${ac_cv_objext+set}" = set; then
1850   echo $ECHO_N "(cached) $ECHO_C" >&6
1851 else
1852   cat >conftest.$ac_ext <<_ACEOF
1853 #line 1853 "configure"
1854 #include "confdefs.h"
1855
1856 int
1857 main ()
1858 {
1859
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.o conftest.obj
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); }; then
1870   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1871   case $ac_file in
1872     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1873     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1874        break;;
1875   esac
1876 done
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 { { echo "$as_me:1880: error: cannot compute OBJEXT: cannot compile" >&5
1881 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1882    { (exit 1); exit 1; }; }
1883 fi
1884
1885 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1886 fi
1887 echo "$as_me:1887: result: $ac_cv_objext" >&5
1888 echo "${ECHO_T}$ac_cv_objext" >&6
1889 OBJEXT=$ac_cv_objext
1890 ac_objext=$OBJEXT
1891 echo "$as_me:1891: checking whether we are using the GNU C compiler" >&5
1892 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1893 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1894   echo $ECHO_N "(cached) $ECHO_C" >&6
1895 else
1896   cat >conftest.$ac_ext <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main ()
1902 {
1903 #ifndef __GNUC__
1904        choke me
1905 #endif
1906
1907   ;
1908   return 0;
1909 }
1910 _ACEOF
1911 rm -f conftest.$ac_objext
1912 if { (eval echo "$as_me:1912: \"$ac_compile\"") >&5
1913   (eval $ac_compile) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); } &&
1917          { ac_try='test -s conftest.$ac_objext'
1918   { (eval echo "$as_me:1918: \"$ac_try\"") >&5
1919   (eval $ac_try) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit $ac_status); }; }; then
1923   ac_compiler_gnu=yes
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 ac_compiler_gnu=no
1928 fi
1929 rm -f conftest.$ac_objext conftest.$ac_ext
1930 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1931
1932 fi
1933 echo "$as_me:1933: result: $ac_cv_c_compiler_gnu" >&5
1934 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1935 GCC=`test $ac_compiler_gnu = yes && echo yes`
1936 ac_test_CFLAGS=${CFLAGS+set}
1937 ac_save_CFLAGS=$CFLAGS
1938 CFLAGS="-g"
1939 echo "$as_me:1939: checking whether $CC accepts -g" >&5
1940 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1941 if test "${ac_cv_prog_cc_g+set}" = set; then
1942   echo $ECHO_N "(cached) $ECHO_C" >&6
1943 else
1944   cat >conftest.$ac_ext <<_ACEOF
1945 #line 1945 "configure"
1946 #include "confdefs.h"
1947
1948 int
1949 main ()
1950 {
1951
1952   ;
1953   return 0;
1954 }
1955 _ACEOF
1956 rm -f conftest.$ac_objext
1957 if { (eval echo "$as_me:1957: \"$ac_compile\"") >&5
1958   (eval $ac_compile) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); } &&
1962          { ac_try='test -s conftest.$ac_objext'
1963   { (eval echo "$as_me:1963: \"$ac_try\"") >&5
1964   (eval $ac_try) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); }; }; then
1968   ac_cv_prog_cc_g=yes
1969 else
1970   echo "$as_me: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1972 ac_cv_prog_cc_g=no
1973 fi
1974 rm -f conftest.$ac_objext conftest.$ac_ext
1975 fi
1976 echo "$as_me:1976: result: $ac_cv_prog_cc_g" >&5
1977 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1978 if test "$ac_test_CFLAGS" = set; then
1979   CFLAGS=$ac_save_CFLAGS
1980 elif test $ac_cv_prog_cc_g = yes; then
1981   if test "$GCC" = yes; then
1982     CFLAGS="-g -O2"
1983   else
1984     CFLAGS="-g"
1985   fi
1986 else
1987   if test "$GCC" = yes; then
1988     CFLAGS="-O2"
1989   else
1990     CFLAGS=
1991   fi
1992 fi
1993 # Some people use a C++ compiler to compile C.  Since we use `exit',
1994 # in C++ we need to declare it.  In case someone uses the same compiler
1995 # for both compiling C and C++ we need to have the C++ compiler decide
1996 # the declaration of exit, since it's the most demanding environment.
1997 cat >conftest.$ac_ext <<_ACEOF
1998 #ifndef __cplusplus
1999   choke me
2000 #endif
2001 _ACEOF
2002 rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   for ac_declaration in \
2015    ''\
2016    '#include <stdlib.h>' \
2017    'extern "C" void std::exit (int) throw (); using std::exit;' \
2018    'extern "C" void std::exit (int); using std::exit;' \
2019    'extern "C" void exit (int) throw ();' \
2020    'extern "C" void exit (int);' \
2021    'void exit (int);'
2022 do
2023   cat >conftest.$ac_ext <<_ACEOF
2024 #line 2024 "configure"
2025 #include "confdefs.h"
2026 #include <stdlib.h>
2027 $ac_declaration
2028 int
2029 main ()
2030 {
2031 exit (42);
2032   ;
2033   return 0;
2034 }
2035 _ACEOF
2036 rm -f conftest.$ac_objext
2037 if { (eval echo "$as_me:2037: \"$ac_compile\"") >&5
2038   (eval $ac_compile) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); } &&
2042          { ac_try='test -s conftest.$ac_objext'
2043   { (eval echo "$as_me:2043: \"$ac_try\"") >&5
2044   (eval $ac_try) 2>&5
2045   ac_status=$?
2046   echo "$as_me:2046: \$? = $ac_status" >&5
2047   (exit $ac_status); }; }; then
2048   :
2049 else
2050   echo "$as_me: failed program was:" >&5
2051 cat conftest.$ac_ext >&5
2052 continue
2053 fi
2054 rm -f conftest.$ac_objext conftest.$ac_ext
2055   cat >conftest.$ac_ext <<_ACEOF
2056 #line 2056 "configure"
2057 #include "confdefs.h"
2058 $ac_declaration
2059 int
2060 main ()
2061 {
2062 exit (42);
2063   ;
2064   return 0;
2065 }
2066 _ACEOF
2067 rm -f conftest.$ac_objext
2068 if { (eval echo "$as_me:2068: \"$ac_compile\"") >&5
2069   (eval $ac_compile) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); } &&
2073          { ac_try='test -s conftest.$ac_objext'
2074   { (eval echo "$as_me:2074: \"$ac_try\"") >&5
2075   (eval $ac_try) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); }; }; then
2079   break
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 fi
2084 rm -f conftest.$ac_objext conftest.$ac_ext
2085 done
2086 rm -rf conftest*
2087 if test -n "$ac_declaration"; then
2088   echo '#ifdef __cplusplus' >>confdefs.h
2089   echo $ac_declaration      >>confdefs.h
2090   echo '#endif'             >>confdefs.h
2091 fi
2092
2093 else
2094   echo "$as_me: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 fi
2097 rm -f conftest.$ac_objext conftest.$ac_ext
2098 ac_ext=c
2099 ac_cpp='$CPP $CPPFLAGS'
2100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2103 ac_main_return=return
2104
2105 GCC_VERSION=none
2106 if test "$GCC" = yes ; then
2107         echo "$as_me:2107: checking version of $CC" >&5
2108 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2109         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2110         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2111         echo "$as_me:2111: result: $GCC_VERSION" >&5
2112 echo "${ECHO_T}$GCC_VERSION" >&6
2113 fi
2114
2115 ac_ext=c
2116 ac_cpp='$CPP $CPPFLAGS'
2117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2120 ac_main_return=return
2121 echo "$as_me:2121: checking how to run the C preprocessor" >&5
2122 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2123 # On Suns, sometimes $CPP names a directory.
2124 if test -n "$CPP" && test -d "$CPP"; then
2125   CPP=
2126 fi
2127 if test -z "$CPP"; then
2128   if test "${ac_cv_prog_CPP+set}" = set; then
2129   echo $ECHO_N "(cached) $ECHO_C" >&6
2130 else
2131       # Double quotes because CPP needs to be expanded
2132     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2133     do
2134       ac_preproc_ok=false
2135 for ac_c_preproc_warn_flag in '' yes
2136 do
2137   # Use a header file that comes with gcc, so configuring glibc
2138   # with a fresh cross-compiler works.
2139   # On the NeXT, cc -E runs the code through the compiler's parser,
2140   # not just through cpp. "Syntax error" is here to catch this case.
2141   cat >conftest.$ac_ext <<_ACEOF
2142 #line 2142 "configure"
2143 #include "confdefs.h"
2144 #include <assert.h>
2145                      Syntax error
2146 _ACEOF
2147 if { (eval echo "$as_me:2147: \"$ac_cpp conftest.$ac_ext\"") >&5
2148   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2149   ac_status=$?
2150   egrep -v '^ *\+' conftest.er1 >conftest.err
2151   rm -f conftest.er1
2152   cat conftest.err >&5
2153   echo "$as_me:2153: \$? = $ac_status" >&5
2154   (exit $ac_status); } >/dev/null; then
2155   if test -s conftest.err; then
2156     ac_cpp_err=$ac_c_preproc_warn_flag
2157   else
2158     ac_cpp_err=
2159   fi
2160 else
2161   ac_cpp_err=yes
2162 fi
2163 if test -z "$ac_cpp_err"; then
2164   :
2165 else
2166   echo "$as_me: failed program was:" >&5
2167   cat conftest.$ac_ext >&5
2168   # Broken: fails on valid input.
2169 continue
2170 fi
2171 rm -f conftest.err conftest.$ac_ext
2172
2173   # OK, works on sane cases.  Now check whether non-existent headers
2174   # can be detected and how.
2175   cat >conftest.$ac_ext <<_ACEOF
2176 #line 2176 "configure"
2177 #include "confdefs.h"
2178 #include <ac_nonexistent.h>
2179 _ACEOF
2180 if { (eval echo "$as_me:2180: \"$ac_cpp conftest.$ac_ext\"") >&5
2181   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2182   ac_status=$?
2183   egrep -v '^ *\+' conftest.er1 >conftest.err
2184   rm -f conftest.er1
2185   cat conftest.err >&5
2186   echo "$as_me:2186: \$? = $ac_status" >&5
2187   (exit $ac_status); } >/dev/null; then
2188   if test -s conftest.err; then
2189     ac_cpp_err=$ac_c_preproc_warn_flag
2190   else
2191     ac_cpp_err=
2192   fi
2193 else
2194   ac_cpp_err=yes
2195 fi
2196 if test -z "$ac_cpp_err"; then
2197   # Broken: success on invalid input.
2198 continue
2199 else
2200   echo "$as_me: failed program was:" >&5
2201   cat conftest.$ac_ext >&5
2202   # Passes both tests.
2203 ac_preproc_ok=:
2204 break
2205 fi
2206 rm -f conftest.err conftest.$ac_ext
2207
2208 done
2209 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2210 rm -f conftest.err conftest.$ac_ext
2211 if $ac_preproc_ok; then
2212   break
2213 fi
2214
2215     done
2216     ac_cv_prog_CPP=$CPP
2217
2218 fi
2219   CPP=$ac_cv_prog_CPP
2220 else
2221   ac_cv_prog_CPP=$CPP
2222 fi
2223 echo "$as_me:2223: result: $CPP" >&5
2224 echo "${ECHO_T}$CPP" >&6
2225 ac_preproc_ok=false
2226 for ac_c_preproc_warn_flag in '' yes
2227 do
2228   # Use a header file that comes with gcc, so configuring glibc
2229   # with a fresh cross-compiler works.
2230   # On the NeXT, cc -E runs the code through the compiler's parser,
2231   # not just through cpp. "Syntax error" is here to catch this case.
2232   cat >conftest.$ac_ext <<_ACEOF
2233 #line 2233 "configure"
2234 #include "confdefs.h"
2235 #include <assert.h>
2236                      Syntax error
2237 _ACEOF
2238 if { (eval echo "$as_me:2238: \"$ac_cpp conftest.$ac_ext\"") >&5
2239   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2240   ac_status=$?
2241   egrep -v '^ *\+' conftest.er1 >conftest.err
2242   rm -f conftest.er1
2243   cat conftest.err >&5
2244   echo "$as_me:2244: \$? = $ac_status" >&5
2245   (exit $ac_status); } >/dev/null; then
2246   if test -s conftest.err; then
2247     ac_cpp_err=$ac_c_preproc_warn_flag
2248   else
2249     ac_cpp_err=
2250   fi
2251 else
2252   ac_cpp_err=yes
2253 fi
2254 if test -z "$ac_cpp_err"; then
2255   :
2256 else
2257   echo "$as_me: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   # Broken: fails on valid input.
2260 continue
2261 fi
2262 rm -f conftest.err conftest.$ac_ext
2263
2264   # OK, works on sane cases.  Now check whether non-existent headers
2265   # can be detected and how.
2266   cat >conftest.$ac_ext <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 #include <ac_nonexistent.h>
2270 _ACEOF
2271 if { (eval echo "$as_me:2271: \"$ac_cpp conftest.$ac_ext\"") >&5
2272   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2273   ac_status=$?
2274   egrep -v '^ *\+' conftest.er1 >conftest.err
2275   rm -f conftest.er1
2276   cat conftest.err >&5
2277   echo "$as_me:2277: \$? = $ac_status" >&5
2278   (exit $ac_status); } >/dev/null; then
2279   if test -s conftest.err; then
2280     ac_cpp_err=$ac_c_preproc_warn_flag
2281   else
2282     ac_cpp_err=
2283   fi
2284 else
2285   ac_cpp_err=yes
2286 fi
2287 if test -z "$ac_cpp_err"; then
2288   # Broken: success on invalid input.
2289 continue
2290 else
2291   echo "$as_me: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   # Passes both tests.
2294 ac_preproc_ok=:
2295 break
2296 fi
2297 rm -f conftest.err conftest.$ac_ext
2298
2299 done
2300 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2301 rm -f conftest.err conftest.$ac_ext
2302 if $ac_preproc_ok; then
2303   :
2304 else
2305   { { echo "$as_me:2305: error: C preprocessor \"$CPP\" fails sanity check" >&5
2306 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2307    { (exit 1); exit 1; }; }
2308 fi
2309
2310 ac_ext=c
2311 ac_cpp='$CPP $CPPFLAGS'
2312 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2313 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315 ac_main_return=return
2316
2317 if test $ac_cv_c_compiler_gnu = yes; then
2318     echo "$as_me:2318: checking whether $CC needs -traditional" >&5
2319 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2320 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2321   echo $ECHO_N "(cached) $ECHO_C" >&6
2322 else
2323     ac_pattern="Autoconf.*'x'"
2324   cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <sgtty.h>
2328 int Autoconf = TIOCGETP;
2329 _ACEOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "$ac_pattern" >/dev/null 2>&1; then
2332   ac_cv_prog_gcc_traditional=yes
2333 else
2334   ac_cv_prog_gcc_traditional=no
2335 fi
2336 rm -rf conftest*
2337
2338   if test $ac_cv_prog_gcc_traditional = no; then
2339     cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <termio.h>
2343 int Autoconf = TCGETA;
2344 _ACEOF
2345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2346   egrep "$ac_pattern" >/dev/null 2>&1; then
2347   ac_cv_prog_gcc_traditional=yes
2348 fi
2349 rm -rf conftest*
2350
2351   fi
2352 fi
2353 echo "$as_me:2353: result: $ac_cv_prog_gcc_traditional" >&5
2354 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2355   if test $ac_cv_prog_gcc_traditional = yes; then
2356     CC="$CC -traditional"
2357   fi
2358 fi
2359
2360 echo "$as_me:2360: checking whether $CC understands -c and -o together" >&5
2361 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2362 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2363   echo $ECHO_N "(cached) $ECHO_C" >&6
2364 else
2365
2366 cat > conftest.$ac_ext <<CF_EOF
2367 #include <stdio.h>
2368 int main()
2369 {
2370         ${cf_cv_main_return:-return}(0);
2371 }
2372 CF_EOF
2373 # We do the test twice because some compilers refuse to overwrite an
2374 # existing .o file with -o, though they will create one.
2375 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2376 if { (eval echo "$as_me:2376: \"$ac_try\"") >&5
2377   (eval $ac_try) 2>&5
2378   ac_status=$?
2379   echo "$as_me:2379: \$? = $ac_status" >&5
2380   (exit $ac_status); } &&
2381   test -f conftest2.$ac_objext && { (eval echo "$as_me:2381: \"$ac_try\"") >&5
2382   (eval $ac_try) 2>&5
2383   ac_status=$?
2384   echo "$as_me:2384: \$? = $ac_status" >&5
2385   (exit $ac_status); };
2386 then
2387   eval cf_cv_prog_CC_c_o=yes
2388 else
2389   eval cf_cv_prog_CC_c_o=no
2390 fi
2391 rm -rf conftest*
2392
2393 fi
2394 if test $cf_cv_prog_CC_c_o = yes; then
2395   echo "$as_me:2395: result: yes" >&5
2396 echo "${ECHO_T}yes" >&6
2397 else
2398   echo "$as_me:2398: result: no" >&5
2399 echo "${ECHO_T}no" >&6
2400 fi
2401
2402 echo "$as_me:2402: checking for POSIXized ISC" >&5
2403 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2404 if test -d /etc/conf/kconfig.d &&
2405    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2406 then
2407   echo "$as_me:2407: result: yes" >&5
2408 echo "${ECHO_T}yes" >&6
2409   ISC=yes # If later tests want to check for ISC.
2410
2411 cat >>confdefs.h <<\EOF
2412 #define _POSIX_SOURCE 1
2413 EOF
2414
2415   if test "$GCC" = yes; then
2416     CC="$CC -posix"
2417   else
2418     CC="$CC -Xp"
2419   fi
2420 else
2421   echo "$as_me:2421: result: no" >&5
2422 echo "${ECHO_T}no" >&6
2423   ISC=
2424 fi
2425
2426 # This should have been defined by AC_PROG_CC
2427 : ${CC:=cc}
2428
2429 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2430 # into CC.  This will not help with broken scripts that wrap the compiler with
2431 # options, but eliminates a more common category of user confusion.
2432 echo "$as_me:2432: checking \$CC variable" >&5
2433 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2434 case "$CC" in #(vi
2435 *[\ \   ]-[IUD]*)
2436         echo "$as_me:2436: result: broken" >&5
2437 echo "${ECHO_T}broken" >&6
2438         { echo "$as_me:2438: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2439 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2440         # humor him...
2441         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2442         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2443
2444 cf_fix_cppflags=no
2445 cf_new_cflags=
2446 cf_new_cppflags=
2447 cf_new_extra_cppflags=
2448
2449 for cf_add_cflags in $cf_flags
2450 do
2451 case $cf_fix_cppflags in
2452 no)
2453         case $cf_add_cflags in #(vi
2454         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2455                 case $cf_add_cflags in
2456                 -D*)
2457                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2458
2459                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2460                                 && test -z "${cf_tst_cflags}" \
2461                                 && cf_fix_cppflags=yes
2462
2463                         if test $cf_fix_cppflags = yes ; then
2464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2465                                 continue
2466                         elif test "${cf_tst_cflags}" = "\"'" ; then
2467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2468                                 continue
2469                         fi
2470                         ;;
2471                 esac
2472                 case "$CPPFLAGS" in
2473                 *$cf_add_cflags) #(vi
2474                         ;;
2475                 *) #(vi
2476                         case $cf_add_cflags in #(vi
2477                         -D*)
2478                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2479
2480 CPPFLAGS=`echo "$CPPFLAGS" | \
2481         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2482                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2483
2484                                 ;;
2485                         esac
2486                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2487                         ;;
2488                 esac
2489                 ;;
2490         *)
2491                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2492                 ;;
2493         esac
2494         ;;
2495 yes)
2496         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2497
2498         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2499
2500         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2501                 && test -z "${cf_tst_cflags}" \
2502                 && cf_fix_cppflags=no
2503         ;;
2504 esac
2505 done
2506
2507 if test -n "$cf_new_cflags" ; then
2508
2509         CFLAGS="$CFLAGS $cf_new_cflags"
2510 fi
2511
2512 if test -n "$cf_new_cppflags" ; then
2513
2514         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2515 fi
2516
2517 if test -n "$cf_new_extra_cppflags" ; then
2518
2519         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2520 fi
2521
2522         ;;
2523 *)
2524         echo "$as_me:2524: result: ok" >&5
2525 echo "${ECHO_T}ok" >&6
2526         ;;
2527 esac
2528
2529 echo "$as_me:2529: checking for ${CC:-cc} option to accept ANSI C" >&5
2530 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2531 if test "${cf_cv_ansi_cc+set}" = set; then
2532   echo $ECHO_N "(cached) $ECHO_C" >&6
2533 else
2534
2535 cf_cv_ansi_cc=no
2536 cf_save_CFLAGS="$CFLAGS"
2537 cf_save_CPPFLAGS="$CPPFLAGS"
2538 # Don't try gcc -ansi; that turns off useful extensions and
2539 # breaks some systems' header files.
2540 # AIX                   -qlanglvl=ansi
2541 # Ultrix and OSF/1      -std1
2542 # HP-UX                 -Aa -D_HPUX_SOURCE
2543 # SVR4                  -Xc
2544 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2545 for cf_arg in "-DCC_HAS_PROTOS" \
2546         "" \
2547         -qlanglvl=ansi \
2548         -std1 \
2549         -Ae \
2550         "-Aa -D_HPUX_SOURCE" \
2551         -Xc
2552 do
2553
2554 cf_fix_cppflags=no
2555 cf_new_cflags=
2556 cf_new_cppflags=
2557 cf_new_extra_cppflags=
2558
2559 for cf_add_cflags in $cf_arg
2560 do
2561 case $cf_fix_cppflags in
2562 no)
2563         case $cf_add_cflags in #(vi
2564         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2565                 case $cf_add_cflags in
2566                 -D*)
2567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2568
2569                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2570                                 && test -z "${cf_tst_cflags}" \
2571                                 && cf_fix_cppflags=yes
2572
2573                         if test $cf_fix_cppflags = yes ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         elif test "${cf_tst_cflags}" = "\"'" ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         fi
2580                         ;;
2581                 esac
2582                 case "$CPPFLAGS" in
2583                 *$cf_add_cflags) #(vi
2584                         ;;
2585                 *) #(vi
2586                         case $cf_add_cflags in #(vi
2587                         -D*)
2588                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2589
2590 CPPFLAGS=`echo "$CPPFLAGS" | \
2591         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2592                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2593
2594                                 ;;
2595                         esac
2596                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2597                         ;;
2598                 esac
2599                 ;;
2600         *)
2601                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2602                 ;;
2603         esac
2604         ;;
2605 yes)
2606         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2607
2608         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2609
2610         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2611                 && test -z "${cf_tst_cflags}" \
2612                 && cf_fix_cppflags=no
2613         ;;
2614 esac
2615 done
2616
2617 if test -n "$cf_new_cflags" ; then
2618
2619         CFLAGS="$CFLAGS $cf_new_cflags"
2620 fi
2621
2622 if test -n "$cf_new_cppflags" ; then
2623
2624         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2625 fi
2626
2627 if test -n "$cf_new_extra_cppflags" ; then
2628
2629         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2630 fi
2631
2632         cat >conftest.$ac_ext <<_ACEOF
2633 #line 2633 "configure"
2634 #include "confdefs.h"
2635
2636 #ifndef CC_HAS_PROTOS
2637 #if !defined(__STDC__) || (__STDC__ != 1)
2638 choke me
2639 #endif
2640 #endif
2641
2642 int
2643 main ()
2644 {
2645
2646         int test (int i, double x);
2647         struct s1 {int (*f) (int a);};
2648         struct s2 {int (*f) (double a);};
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 rm -f conftest.$ac_objext
2654 if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
2655   (eval $ac_compile) 2>&5
2656   ac_status=$?
2657   echo "$as_me:2657: \$? = $ac_status" >&5
2658   (exit $ac_status); } &&
2659          { ac_try='test -s conftest.$ac_objext'
2660   { (eval echo "$as_me:2660: \"$ac_try\"") >&5
2661   (eval $ac_try) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); }; }; then
2665   cf_cv_ansi_cc="$cf_arg"; break
2666 else
2667   echo "$as_me: failed program was:" >&5
2668 cat conftest.$ac_ext >&5
2669 fi
2670 rm -f conftest.$ac_objext conftest.$ac_ext
2671 done
2672 CFLAGS="$cf_save_CFLAGS"
2673 CPPFLAGS="$cf_save_CPPFLAGS"
2674
2675 fi
2676 echo "$as_me:2676: result: $cf_cv_ansi_cc" >&5
2677 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2678
2679 if test "$cf_cv_ansi_cc" != "no"; then
2680 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2681
2682 cf_fix_cppflags=no
2683 cf_new_cflags=
2684 cf_new_cppflags=
2685 cf_new_extra_cppflags=
2686
2687 for cf_add_cflags in $cf_cv_ansi_cc
2688 do
2689 case $cf_fix_cppflags in
2690 no)
2691         case $cf_add_cflags in #(vi
2692         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2693                 case $cf_add_cflags in
2694                 -D*)
2695                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2696
2697                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2698                                 && test -z "${cf_tst_cflags}" \
2699                                 && cf_fix_cppflags=yes
2700
2701                         if test $cf_fix_cppflags = yes ; then
2702                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2706                                 continue
2707                         fi
2708                         ;;
2709                 esac
2710                 case "$CPPFLAGS" in
2711                 *$cf_add_cflags) #(vi
2712                         ;;
2713                 *) #(vi
2714                         case $cf_add_cflags in #(vi
2715                         -D*)
2716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2717
2718 CPPFLAGS=`echo "$CPPFLAGS" | \
2719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2721
2722                                 ;;
2723                         esac
2724                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2725                         ;;
2726                 esac
2727                 ;;
2728         *)
2729                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2730                 ;;
2731         esac
2732         ;;
2733 yes)
2734         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2735
2736         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2737
2738         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2739                 && test -z "${cf_tst_cflags}" \
2740                 && cf_fix_cppflags=no
2741         ;;
2742 esac
2743 done
2744
2745 if test -n "$cf_new_cflags" ; then
2746
2747         CFLAGS="$CFLAGS $cf_new_cflags"
2748 fi
2749
2750 if test -n "$cf_new_cppflags" ; then
2751
2752         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2753 fi
2754
2755 if test -n "$cf_new_extra_cppflags" ; then
2756
2757         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2758 fi
2759
2760 else
2761         cat >>confdefs.h <<\EOF
2762 #define CC_HAS_PROTOS 1
2763 EOF
2764
2765 fi
2766 fi
2767
2768 if test "$cf_cv_ansi_cc" = "no"; then
2769         { { echo "$as_me:2769: error: Your compiler does not appear to recognize prototypes.
2770 You have the following choices:
2771         a. adjust your compiler options
2772         b. get an up-to-date compiler
2773         c. use a wrapper such as unproto" >&5
2774 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2775 You have the following choices:
2776         a. adjust your compiler options
2777         b. get an up-to-date compiler
2778         c. use a wrapper such as unproto" >&2;}
2779    { (exit 1); exit 1; }; }
2780 fi
2781
2782 case $cf_cv_system_name in
2783 os2*)
2784     CFLAGS="$CFLAGS -Zmt"
2785     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2786     CXXFLAGS="$CXXFLAGS -Zmt"
2787     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2788     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2789     ac_cv_exeext=.exe
2790     ;;
2791 esac
2792
2793 PROG_EXT="$EXEEXT"
2794
2795 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2796 #define PROG_EXT "$PROG_EXT"
2797 EOF
2798
2799 if test "$cross_compiling" = yes ; then
2800   LDCONFIG=:
2801 else
2802 case "$cf_cv_system_name" in #(vi
2803 dragonfly*|mirbsd*|freebsd*) #(vi
2804   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2805   ;;
2806 *) LDPATH=$PATH:/sbin:/usr/sbin
2807   # Extract the first word of "ldconfig", so it can be a program name with args.
2808 set dummy ldconfig; ac_word=$2
2809 echo "$as_me:2809: checking for $ac_word" >&5
2810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   case $LDCONFIG in
2815   [\\/]* | ?:[\\/]*)
2816   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2817   ;;
2818   *)
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$LDPATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   if $as_executable_p "$ac_dir/$ac_word"; then
2825    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2826    echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827    break
2828 fi
2829 done
2830
2831   ;;
2832 esac
2833 fi
2834 LDCONFIG=$ac_cv_path_LDCONFIG
2835
2836 if test -n "$LDCONFIG"; then
2837   echo "$as_me:2837: result: $LDCONFIG" >&5
2838 echo "${ECHO_T}$LDCONFIG" >&6
2839 else
2840   echo "$as_me:2840: result: no" >&5
2841 echo "${ECHO_T}no" >&6
2842 fi
2843
2844   ;;
2845 esac
2846 fi
2847
2848 echo "$as_me:2848: checking if you want to ensure bool is consistent with C++" >&5
2849 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2850
2851 # Check whether --with-cxx or --without-cxx was given.
2852 if test "${with_cxx+set}" = set; then
2853   withval="$with_cxx"
2854   cf_with_cxx=$withval
2855 else
2856   cf_with_cxx=yes
2857 fi;
2858 echo "$as_me:2858: result: $cf_with_cxx" >&5
2859 echo "${ECHO_T}$cf_with_cxx" >&6
2860 if test "X$cf_with_cxx" = Xno ; then
2861         CXX=""
2862         GXX=""
2863 else
2864         # with autoconf 2.13, we can change the error to a warning:
2865                 ac_ext=cc
2866 ac_cpp='$CXXCPP $CPPFLAGS'
2867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2870 ac_main_return=return
2871 if test -n "$ac_tool_prefix"; then
2872   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2873   do
2874     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2876 echo "$as_me:2876: checking for $ac_word" >&5
2877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2878 if test "${ac_cv_prog_CXX+set}" = set; then
2879   echo $ECHO_N "(cached) $ECHO_C" >&6
2880 else
2881   if test -n "$CXX"; then
2882   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2883 else
2884   ac_save_IFS=$IFS; IFS=$ac_path_separator
2885 ac_dummy="$PATH"
2886 for ac_dir in $ac_dummy; do
2887   IFS=$ac_save_IFS
2888   test -z "$ac_dir" && ac_dir=.
2889   $as_executable_p "$ac_dir/$ac_word" || continue
2890 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2891 echo "$as_me:2891: found $ac_dir/$ac_word" >&5
2892 break
2893 done
2894
2895 fi
2896 fi
2897 CXX=$ac_cv_prog_CXX
2898 if test -n "$CXX"; then
2899   echo "$as_me:2899: result: $CXX" >&5
2900 echo "${ECHO_T}$CXX" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906     test -n "$CXX" && break
2907   done
2908 fi
2909 if test -z "$CXX"; then
2910   ac_ct_CXX=$CXX
2911   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2912 do
2913   # Extract the first word of "$ac_prog", so it can be a program name with args.
2914 set dummy $ac_prog; ac_word=$2
2915 echo "$as_me:2915: checking for $ac_word" >&5
2916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2917 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   if test -n "$ac_ct_CXX"; then
2921   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2922 else
2923   ac_save_IFS=$IFS; IFS=$ac_path_separator
2924 ac_dummy="$PATH"
2925 for ac_dir in $ac_dummy; do
2926   IFS=$ac_save_IFS
2927   test -z "$ac_dir" && ac_dir=.
2928   $as_executable_p "$ac_dir/$ac_word" || continue
2929 ac_cv_prog_ac_ct_CXX="$ac_prog"
2930 echo "$as_me:2930: found $ac_dir/$ac_word" >&5
2931 break
2932 done
2933
2934 fi
2935 fi
2936 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2937 if test -n "$ac_ct_CXX"; then
2938   echo "$as_me:2938: result: $ac_ct_CXX" >&5
2939 echo "${ECHO_T}$ac_ct_CXX" >&6
2940 else
2941   echo "$as_me:2941: result: no" >&5
2942 echo "${ECHO_T}no" >&6
2943 fi
2944
2945   test -n "$ac_ct_CXX" && break
2946 done
2947 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2948
2949   CXX=$ac_ct_CXX
2950 fi
2951
2952 # Provide some information about the compiler.
2953 echo "$as_me:2953:" \
2954      "checking for C++ compiler version" >&5
2955 ac_compiler=`set X $ac_compile; echo $2`
2956 { (eval echo "$as_me:2956: \"$ac_compiler --version </dev/null >&5\"") >&5
2957   (eval $ac_compiler --version </dev/null >&5) 2>&5
2958   ac_status=$?
2959   echo "$as_me:2959: \$? = $ac_status" >&5
2960   (exit $ac_status); }
2961 { (eval echo "$as_me:2961: \"$ac_compiler -v </dev/null >&5\"") >&5
2962   (eval $ac_compiler -v </dev/null >&5) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); }
2966 { (eval echo "$as_me:2966: \"$ac_compiler -V </dev/null >&5\"") >&5
2967   (eval $ac_compiler -V </dev/null >&5) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); }
2971
2972 echo "$as_me:2972: checking whether we are using the GNU C++ compiler" >&5
2973 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2974 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2975   echo $ECHO_N "(cached) $ECHO_C" >&6
2976 else
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980
2981 int
2982 main ()
2983 {
2984 #ifndef __GNUC__
2985        choke me
2986 #endif
2987
2988   ;
2989   return 0;
2990 }
2991 _ACEOF
2992 rm -f conftest.$ac_objext
2993 if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
2994   (eval $ac_compile) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); } &&
2998          { ac_try='test -s conftest.$ac_objext'
2999   { (eval echo "$as_me:2999: \"$ac_try\"") >&5
3000   (eval $ac_try) 2>&5
3001   ac_status=$?
3002   echo "$as_me:3002: \$? = $ac_status" >&5
3003   (exit $ac_status); }; }; then
3004   ac_compiler_gnu=yes
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 ac_compiler_gnu=no
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3012
3013 fi
3014 echo "$as_me:3014: result: $ac_cv_cxx_compiler_gnu" >&5
3015 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3016 GXX=`test $ac_compiler_gnu = yes && echo yes`
3017 ac_test_CXXFLAGS=${CXXFLAGS+set}
3018 ac_save_CXXFLAGS=$CXXFLAGS
3019 CXXFLAGS="-g"
3020 echo "$as_me:3020: checking whether $CXX accepts -g" >&5
3021 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3022 if test "${ac_cv_prog_cxx_g+set}" = set; then
3023   echo $ECHO_N "(cached) $ECHO_C" >&6
3024 else
3025   cat >conftest.$ac_ext <<_ACEOF
3026 #line 3026 "configure"
3027 #include "confdefs.h"
3028
3029 int
3030 main ()
3031 {
3032
3033   ;
3034   return 0;
3035 }
3036 _ACEOF
3037 rm -f conftest.$ac_objext
3038 if { (eval echo "$as_me:3038: \"$ac_compile\"") >&5
3039   (eval $ac_compile) 2>&5
3040   ac_status=$?
3041   echo "$as_me:3041: \$? = $ac_status" >&5
3042   (exit $ac_status); } &&
3043          { ac_try='test -s conftest.$ac_objext'
3044   { (eval echo "$as_me:3044: \"$ac_try\"") >&5
3045   (eval $ac_try) 2>&5
3046   ac_status=$?
3047   echo "$as_me:3047: \$? = $ac_status" >&5
3048   (exit $ac_status); }; }; then
3049   ac_cv_prog_cxx_g=yes
3050 else
3051   echo "$as_me: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3053 ac_cv_prog_cxx_g=no
3054 fi
3055 rm -f conftest.$ac_objext conftest.$ac_ext
3056 fi
3057 echo "$as_me:3057: result: $ac_cv_prog_cxx_g" >&5
3058 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3059 if test "$ac_test_CXXFLAGS" = set; then
3060   CXXFLAGS=$ac_save_CXXFLAGS
3061 elif test $ac_cv_prog_cxx_g = yes; then
3062   if test "$GXX" = yes; then
3063     CXXFLAGS="-g -O2"
3064   else
3065     CXXFLAGS="-g"
3066   fi
3067 else
3068   if test "$GXX" = yes; then
3069     CXXFLAGS="-O2"
3070   else
3071     CXXFLAGS=
3072   fi
3073 fi
3074 for ac_declaration in \
3075    ''\
3076    '#include <stdlib.h>' \
3077    'extern "C" void std::exit (int) throw (); using std::exit;' \
3078    'extern "C" void std::exit (int); using std::exit;' \
3079    'extern "C" void exit (int) throw ();' \
3080    'extern "C" void exit (int);' \
3081    'void exit (int);'
3082 do
3083   cat >conftest.$ac_ext <<_ACEOF
3084 #line 3084 "configure"
3085 #include "confdefs.h"
3086 #include <stdlib.h>
3087 $ac_declaration
3088 int
3089 main ()
3090 {
3091 exit (42);
3092   ;
3093   return 0;
3094 }
3095 _ACEOF
3096 rm -f conftest.$ac_objext
3097 if { (eval echo "$as_me:3097: \"$ac_compile\"") >&5
3098   (eval $ac_compile) 2>&5
3099   ac_status=$?
3100   echo "$as_me:3100: \$? = $ac_status" >&5
3101   (exit $ac_status); } &&
3102          { ac_try='test -s conftest.$ac_objext'
3103   { (eval echo "$as_me:3103: \"$ac_try\"") >&5
3104   (eval $ac_try) 2>&5
3105   ac_status=$?
3106   echo "$as_me:3106: \$? = $ac_status" >&5
3107   (exit $ac_status); }; }; then
3108   :
3109 else
3110   echo "$as_me: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3112 continue
3113 fi
3114 rm -f conftest.$ac_objext conftest.$ac_ext
3115   cat >conftest.$ac_ext <<_ACEOF
3116 #line 3116 "configure"
3117 #include "confdefs.h"
3118 $ac_declaration
3119 int
3120 main ()
3121 {
3122 exit (42);
3123   ;
3124   return 0;
3125 }
3126 _ACEOF
3127 rm -f conftest.$ac_objext
3128 if { (eval echo "$as_me:3128: \"$ac_compile\"") >&5
3129   (eval $ac_compile) 2>&5
3130   ac_status=$?
3131   echo "$as_me:3131: \$? = $ac_status" >&5
3132   (exit $ac_status); } &&
3133          { ac_try='test -s conftest.$ac_objext'
3134   { (eval echo "$as_me:3134: \"$ac_try\"") >&5
3135   (eval $ac_try) 2>&5
3136   ac_status=$?
3137   echo "$as_me:3137: \$? = $ac_status" >&5
3138   (exit $ac_status); }; }; then
3139   break
3140 else
3141   echo "$as_me: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3143 fi
3144 rm -f conftest.$ac_objext conftest.$ac_ext
3145 done
3146 rm -rf conftest*
3147 if test -n "$ac_declaration"; then
3148   echo '#ifdef __cplusplus' >>confdefs.h
3149   echo $ac_declaration      >>confdefs.h
3150   echo '#endif'             >>confdefs.h
3151 fi
3152
3153 ac_ext=c
3154 ac_cpp='$CPP $CPPFLAGS'
3155 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3156 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3157 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3158 ac_main_return=return
3159
3160                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3161         if test "$CXX" = "g++" ; then
3162                 # Extract the first word of "g++", so it can be a program name with args.
3163 set dummy g++; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_path_CXX+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   case $CXX in
3170   [\\/]* | ?:[\\/]*)
3171   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3172   ;;
3173   *)
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   if $as_executable_p "$ac_dir/$ac_word"; then
3180    ac_cv_path_CXX="$ac_dir/$ac_word"
3181    echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182    break
3183 fi
3184 done
3185
3186   ;;
3187 esac
3188 fi
3189 CXX=$ac_cv_path_CXX
3190
3191 if test -n "$CXX"; then
3192   echo "$as_me:3192: result: $CXX" >&5
3193 echo "${ECHO_T}$CXX" >&6
3194 else
3195   echo "$as_me:3195: result: no" >&5
3196 echo "${ECHO_T}no" >&6
3197 fi
3198
3199         fi
3200         if test "$CXX" = "g++" ; then
3201                 { echo "$as_me:3201: WARNING: ignoring hardcoded g++" >&5
3202 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3203                 cf_with_cxx=no; CXX=""; GXX="";
3204         fi
3205 fi
3206
3207 GXX_VERSION=none
3208 if test "$GXX" = yes; then
3209         echo "$as_me:3209: checking version of g++" >&5
3210 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3211         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3212         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3213         echo "$as_me:3213: result: $GXX_VERSION" >&5
3214 echo "${ECHO_T}$GXX_VERSION" >&6
3215 fi
3216
3217 case $GXX_VERSION in
3218 1*|2.[0-6]*)
3219         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3220         # cf_cxx_library=no
3221         { echo "$as_me:3221: WARNING: templates do not work" >&5
3222 echo "$as_me: WARNING: templates do not work" >&2;}
3223         ;;
3224 esac
3225
3226 echo "$as_me:3226: checking if you want to build C++ binding and demo" >&5
3227 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3228
3229 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3230 if test "${with_cxx_binding+set}" = set; then
3231   withval="$with_cxx_binding"
3232   cf_with_cxx_binding=$withval
3233 else
3234   cf_with_cxx_binding=$cf_with_cxx
3235 fi;
3236 echo "$as_me:3236: result: $cf_with_cxx_binding" >&5
3237 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3238
3239 echo "$as_me:3239: checking if you want to build with Ada95" >&5
3240 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3241
3242 # Check whether --with-ada or --without-ada was given.
3243 if test "${with_ada+set}" = set; then
3244   withval="$with_ada"
3245   cf_with_ada=$withval
3246 else
3247   cf_with_ada=yes
3248 fi;
3249 echo "$as_me:3249: result: $cf_with_ada" >&5
3250 echo "${ECHO_T}$cf_with_ada" >&6
3251
3252 echo "$as_me:3252: checking if you want to install manpages" >&5
3253 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3254
3255 # Check whether --with-manpages or --without-manpages was given.
3256 if test "${with_manpages+set}" = set; then
3257   withval="$with_manpages"
3258   cf_with_manpages=$withval
3259 else
3260   cf_with_manpages=yes
3261 fi;
3262 echo "$as_me:3262: result: $cf_with_manpages" >&5
3263 echo "${ECHO_T}$cf_with_manpages" >&6
3264
3265 echo "$as_me:3265: checking if you want to build programs such as tic" >&5
3266 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3267
3268 # Check whether --with-progs or --without-progs was given.
3269 if test "${with_progs+set}" = set; then
3270   withval="$with_progs"
3271   cf_with_progs=$withval
3272 else
3273   cf_with_progs=yes
3274 fi;
3275 echo "$as_me:3275: result: $cf_with_progs" >&5
3276 echo "${ECHO_T}$cf_with_progs" >&6
3277
3278 echo "$as_me:3278: checking if you want to build test-programs" >&5
3279 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3280
3281 # Check whether --with-tests or --without-tests was given.
3282 if test "${with_tests+set}" = set; then
3283   withval="$with_tests"
3284   cf_with_tests=$withval
3285 else
3286   cf_with_tests=yes
3287 fi;
3288 echo "$as_me:3288: result: $cf_with_tests" >&5
3289 echo "${ECHO_T}$cf_with_tests" >&6
3290
3291 echo "$as_me:3291: checking if you wish to install curses.h" >&5
3292 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3293
3294 # Check whether --with-curses-h or --without-curses-h was given.
3295 if test "${with_curses_h+set}" = set; then
3296   withval="$with_curses_h"
3297   with_curses_h=$withval
3298 else
3299   with_curses_h=yes
3300 fi;
3301 echo "$as_me:3301: result: $with_curses_h" >&5
3302 echo "${ECHO_T}$with_curses_h" >&6
3303
3304 modules_to_build="ncurses"
3305 if test "X$cf_with_progs" != Xno ; then
3306 modules_to_build="$modules_to_build progs tack"
3307 fi
3308 modules_to_build="$modules_to_build panel menu form"
3309
3310 test "$program_prefix" != NONE &&
3311   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3312 # Use a double $ so make ignores it.
3313 test "$program_suffix" != NONE &&
3314   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3315 # Double any \ or $.  echo might interpret backslashes.
3316 # By default was `s,x,x', remove it if useless.
3317 cat <<\_ACEOF >conftest.sed
3318 s/[\\$]/&&/g;s/;s,x,x,$//
3319 _ACEOF
3320 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3321 rm conftest.sed
3322
3323 for ac_prog in mawk gawk nawk awk
3324 do
3325   # Extract the first word of "$ac_prog", so it can be a program name with args.
3326 set dummy $ac_prog; ac_word=$2
3327 echo "$as_me:3327: checking for $ac_word" >&5
3328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3329 if test "${ac_cv_prog_AWK+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   if test -n "$AWK"; then
3333   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3334 else
3335   ac_save_IFS=$IFS; IFS=$ac_path_separator
3336 ac_dummy="$PATH"
3337 for ac_dir in $ac_dummy; do
3338   IFS=$ac_save_IFS
3339   test -z "$ac_dir" && ac_dir=.
3340   $as_executable_p "$ac_dir/$ac_word" || continue
3341 ac_cv_prog_AWK="$ac_prog"
3342 echo "$as_me:3342: found $ac_dir/$ac_word" >&5
3343 break
3344 done
3345
3346 fi
3347 fi
3348 AWK=$ac_cv_prog_AWK
3349 if test -n "$AWK"; then
3350   echo "$as_me:3350: result: $AWK" >&5
3351 echo "${ECHO_T}$AWK" >&6
3352 else
3353   echo "$as_me:3353: result: no" >&5
3354 echo "${ECHO_T}no" >&6
3355 fi
3356
3357   test -n "$AWK" && break
3358 done
3359
3360 test -z "$AWK" && { { echo "$as_me:3360: error: No awk program found" >&5
3361 echo "$as_me: error: No awk program found" >&2;}
3362    { (exit 1); exit 1; }; }
3363
3364 echo "$as_me:3364: checking for egrep" >&5
3365 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3366 if test "${ac_cv_prog_egrep+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3370     then ac_cv_prog_egrep='grep -E'
3371     else ac_cv_prog_egrep='egrep'
3372     fi
3373 fi
3374 echo "$as_me:3374: result: $ac_cv_prog_egrep" >&5
3375 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3376  EGREP=$ac_cv_prog_egrep
3377
3378 test -z "$EGREP" && { { echo "$as_me:3378: error: No egrep program found" >&5
3379 echo "$as_me: error: No egrep program found" >&2;}
3380    { (exit 1); exit 1; }; }
3381
3382 # Find a good install program.  We prefer a C program (faster),
3383 # so one script is as good as another.  But avoid the broken or
3384 # incompatible versions:
3385 # SysV /etc/install, /usr/sbin/install
3386 # SunOS /usr/etc/install
3387 # IRIX /sbin/install
3388 # AIX /bin/install
3389 # AmigaOS /C/install, which installs bootblocks on floppy discs
3390 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3391 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3392 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3393 # ./install, which can be erroneously created by make from ./install.sh.
3394 echo "$as_me:3394: checking for a BSD compatible install" >&5
3395 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3396 if test -z "$INSTALL"; then
3397 if test "${ac_cv_path_install+set}" = set; then
3398   echo $ECHO_N "(cached) $ECHO_C" >&6
3399 else
3400     ac_save_IFS=$IFS; IFS=$ac_path_separator
3401   for ac_dir in $PATH; do
3402     IFS=$ac_save_IFS
3403     # Account for people who put trailing slashes in PATH elements.
3404     case $ac_dir/ in
3405     / | ./ | .// | /cC/* \
3406     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3407     | /usr/ucb/* ) ;;
3408     *)
3409       # OSF1 and SCO ODT 3.0 have their own names for install.
3410       # Don't use installbsd from OSF since it installs stuff as root
3411       # by default.
3412       for ac_prog in ginstall scoinst install; do
3413         if $as_executable_p "$ac_dir/$ac_prog"; then
3414           if test $ac_prog = install &&
3415             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3416             # AIX install.  It has an incompatible calling convention.
3417             :
3418           elif test $ac_prog = install &&
3419             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3420             # program-specific install script used by HP pwplus--don't use.
3421             :
3422           else
3423             ac_cv_path_install="$ac_dir/$ac_prog -c"
3424             break 2
3425           fi
3426         fi
3427       done
3428       ;;
3429     esac
3430   done
3431
3432 fi
3433   if test "${ac_cv_path_install+set}" = set; then
3434     INSTALL=$ac_cv_path_install
3435   else
3436     # As a last resort, use the slow shell script.  We don't cache a
3437     # path for INSTALL within a source directory, because that will
3438     # break other packages using the cache if that directory is
3439     # removed, or if the path is relative.
3440     INSTALL=$ac_install_sh
3441   fi
3442 fi
3443 echo "$as_me:3443: result: $INSTALL" >&5
3444 echo "${ECHO_T}$INSTALL" >&6
3445
3446 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3447 # It thinks the first close brace ends the variable substitution.
3448 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3449
3450 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3451
3452 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3453
3454 case $INSTALL in
3455 /*)
3456   ;;
3457 *)
3458   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3459   test -z "$cf_dir" && cf_dir=.
3460   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3461   ;;
3462 esac
3463
3464 for ac_prog in tdlint lint alint splint lclint
3465 do
3466   # Extract the first word of "$ac_prog", so it can be a program name with args.
3467 set dummy $ac_prog; ac_word=$2
3468 echo "$as_me:3468: checking for $ac_word" >&5
3469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3470 if test "${ac_cv_prog_LINT+set}" = set; then
3471   echo $ECHO_N "(cached) $ECHO_C" >&6
3472 else
3473   if test -n "$LINT"; then
3474   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3475 else
3476   ac_save_IFS=$IFS; IFS=$ac_path_separator
3477 ac_dummy="$PATH"
3478 for ac_dir in $ac_dummy; do
3479   IFS=$ac_save_IFS
3480   test -z "$ac_dir" && ac_dir=.
3481   $as_executable_p "$ac_dir/$ac_word" || continue
3482 ac_cv_prog_LINT="$ac_prog"
3483 echo "$as_me:3483: found $ac_dir/$ac_word" >&5
3484 break
3485 done
3486
3487 fi
3488 fi
3489 LINT=$ac_cv_prog_LINT
3490 if test -n "$LINT"; then
3491   echo "$as_me:3491: result: $LINT" >&5
3492 echo "${ECHO_T}$LINT" >&6
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496 fi
3497
3498   test -n "$LINT" && break
3499 done
3500
3501 echo "$as_me:3501: checking whether ln -s works" >&5
3502 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3503 LN_S=$as_ln_s
3504 if test "$LN_S" = "ln -s"; then
3505   echo "$as_me:3505: result: yes" >&5
3506 echo "${ECHO_T}yes" >&6
3507 else
3508   echo "$as_me:3508: result: no, using $LN_S" >&5
3509 echo "${ECHO_T}no, using $LN_S" >&6
3510 fi
3511
3512 echo "$as_me:3512: checking if $LN_S -f options work" >&5
3513 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3514
3515 rm -f conf$$.src conf$$dst
3516 echo >conf$$.dst
3517 echo first >conf$$.src
3518 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3519         cf_prog_ln_sf=yes
3520 else
3521         cf_prog_ln_sf=no
3522 fi
3523 rm -f conf$$.dst conf$$src
3524 echo "$as_me:3524: result: $cf_prog_ln_sf" >&5
3525 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3526
3527 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3528
3529 echo "$as_me:3529: checking for long file names" >&5
3530 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3531 if test "${ac_cv_sys_long_file_names+set}" = set; then
3532   echo $ECHO_N "(cached) $ECHO_C" >&6
3533 else
3534   ac_cv_sys_long_file_names=yes
3535 # Test for long file names in all the places we know might matter:
3536 #      .                the current directory, where building will happen
3537 #      $prefix/lib      where we will be installing things
3538 #      $exec_prefix/lib likewise
3539 # eval it to expand exec_prefix.
3540 #      $TMPDIR          if set, where it might want to write temporary files
3541 # if $TMPDIR is not set:
3542 #      /tmp             where it might want to write temporary files
3543 #      /var/tmp         likewise
3544 #      /usr/tmp         likewise
3545 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3546   ac_tmpdirs=$TMPDIR
3547 else
3548   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3549 fi
3550 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3551   test -d $ac_dir || continue
3552   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3553   ac_xdir=$ac_dir/cf$$
3554   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3555   ac_tf1=$ac_xdir/conftest9012345
3556   ac_tf2=$ac_xdir/conftest9012346
3557   (echo 1 >$ac_tf1) 2>/dev/null
3558   (echo 2 >$ac_tf2) 2>/dev/null
3559   ac_val=`cat $ac_tf1 2>/dev/null`
3560   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3561     ac_cv_sys_long_file_names=no
3562     rm -rf $ac_xdir 2>/dev/null
3563     break
3564   fi
3565   rm -rf $ac_xdir 2>/dev/null
3566 done
3567 fi
3568 echo "$as_me:3568: result: $ac_cv_sys_long_file_names" >&5
3569 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3570 if test $ac_cv_sys_long_file_names = yes; then
3571
3572 cat >>confdefs.h <<\EOF
3573 #define HAVE_LONG_FILE_NAMES 1
3574 EOF
3575
3576 fi
3577
3578 # if we find pkg-config, check if we should install the ".pc" files.
3579
3580 echo "$as_me:3580: checking if you want to use pkg-config" >&5
3581 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3582
3583 # Check whether --with-pkg-config or --without-pkg-config was given.
3584 if test "${with_pkg_config+set}" = set; then
3585   withval="$with_pkg_config"
3586   cf_pkg_config=$withval
3587 else
3588   cf_pkg_config=yes
3589 fi;
3590 echo "$as_me:3590: result: $cf_pkg_config" >&5
3591 echo "${ECHO_T}$cf_pkg_config" >&6
3592
3593 case $cf_pkg_config in #(vi
3594 no) #(vi
3595         PKG_CONFIG=none
3596         ;;
3597 yes) #(vi
3598
3599 if test -n "$ac_tool_prefix"; then
3600   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3601 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3602 echo "$as_me:3602: checking for $ac_word" >&5
3603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3604 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3605   echo $ECHO_N "(cached) $ECHO_C" >&6
3606 else
3607   case $PKG_CONFIG in
3608   [\\/]* | ?:[\\/]*)
3609   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3610   ;;
3611   *)
3612   ac_save_IFS=$IFS; IFS=$ac_path_separator
3613 ac_dummy="$PATH"
3614 for ac_dir in $ac_dummy; do
3615   IFS=$ac_save_IFS
3616   test -z "$ac_dir" && ac_dir=.
3617   if $as_executable_p "$ac_dir/$ac_word"; then
3618    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3619    echo "$as_me:3619: found $ac_dir/$ac_word" >&5
3620    break
3621 fi
3622 done
3623
3624   ;;
3625 esac
3626 fi
3627 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3628
3629 if test -n "$PKG_CONFIG"; then
3630   echo "$as_me:3630: result: $PKG_CONFIG" >&5
3631 echo "${ECHO_T}$PKG_CONFIG" >&6
3632 else
3633   echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3635 fi
3636
3637 fi
3638 if test -z "$ac_cv_path_PKG_CONFIG"; then
3639   ac_pt_PKG_CONFIG=$PKG_CONFIG
3640   # Extract the first word of "pkg-config", so it can be a program name with args.
3641 set dummy pkg-config; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   case $ac_pt_PKG_CONFIG in
3648   [\\/]* | ?:[\\/]*)
3649   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3650   ;;
3651   *)
3652   ac_save_IFS=$IFS; IFS=$ac_path_separator
3653 ac_dummy="$PATH"
3654 for ac_dir in $ac_dummy; do
3655   IFS=$ac_save_IFS
3656   test -z "$ac_dir" && ac_dir=.
3657   if $as_executable_p "$ac_dir/$ac_word"; then
3658    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3659    echo "$as_me:3659: found $ac_dir/$ac_word" >&5
3660    break
3661 fi
3662 done
3663
3664   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3665   ;;
3666 esac
3667 fi
3668 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3669
3670 if test -n "$ac_pt_PKG_CONFIG"; then
3671   echo "$as_me:3671: result: $ac_pt_PKG_CONFIG" >&5
3672 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3673 else
3674   echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3676 fi
3677
3678   PKG_CONFIG=$ac_pt_PKG_CONFIG
3679 else
3680   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3681 fi
3682
3683         ;;
3684 *)
3685         PKG_CONFIG=$withval
3686         ;;
3687 esac
3688
3689 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3690 if test "$PKG_CONFIG" != none ; then
3691
3692 if test "x$prefix" != xNONE; then
3693   cf_path_syntax="$prefix"
3694 else
3695   cf_path_syntax="$ac_default_prefix"
3696 fi
3697
3698 case ".$PKG_CONFIG" in #(vi
3699 .\$\(*\)*|.\'*\'*) #(vi
3700   ;;
3701 ..|./*|.\\*) #(vi
3702   ;;
3703 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3704   ;;
3705 .\${*prefix}*) #(vi
3706   eval PKG_CONFIG="$PKG_CONFIG"
3707   case ".$PKG_CONFIG" in #(vi
3708   .NONE/*)
3709     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3710     ;;
3711   esac
3712   ;; #(vi
3713 .no|.NONE/*)
3714   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3715   ;;
3716 *)
3717   { { echo "$as_me:3717: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3718 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3719    { (exit 1); exit 1; }; }
3720   ;;
3721 esac
3722
3723 fi
3724
3725 if test "$PKG_CONFIG" != no ; then
3726         echo "$as_me:3726: checking for $PKG_CONFIG library directory" >&5
3727 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3728
3729 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3730 if test "${with_pkg_config_libdir+set}" = set; then
3731   withval="$with_pkg_config_libdir"
3732   PKG_CONFIG_LIBDIR=$withval
3733 else
3734   PKG_CONFIG_LIBDIR=yes
3735 fi;
3736
3737         case x$PKG_CONFIG_LIBDIR in #(vi
3738         x/*) #(vi
3739                 ;;
3740         xyes) #(vi
3741                 # look for the library directory using the same prefix as the executable
3742                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3743                 case x`(arch) 2>/dev/null` in #(vi
3744                 *64) #(vi
3745                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3746                         do
3747                                 if test -d $cf_config/pkgconfig
3748                                 then
3749                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3750                                         break
3751                                 fi
3752                         done
3753                         ;;
3754                 *)
3755                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3756                         ;;
3757                 esac
3758                 ;;
3759         *)
3760                 ;;
3761         esac
3762
3763         echo "$as_me:3763: result: $PKG_CONFIG_LIBDIR" >&5
3764 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3765 fi
3766
3767 if test "$PKG_CONFIG" != no ; then
3768         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3769                 echo "$as_me:3769: checking if we should install .pc files for $PKG_CONFIG" >&5
3770 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3771
3772 # Check whether --enable-pc-files or --disable-pc-files was given.
3773 if test "${enable_pc_files+set}" = set; then
3774   enableval="$enable_pc_files"
3775   enable_pc_files=$enableval
3776 else
3777   enable_pc_files=no
3778 fi;
3779                 echo "$as_me:3779: result: $enable_pc_files" >&5
3780 echo "${ECHO_T}$enable_pc_files" >&6
3781         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3782                 enable_pc_files=no
3783                 { echo "$as_me:3783: WARNING: did not find $PKG_CONFIG library" >&5
3784 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3785         fi
3786 else
3787         enable_pc_files=no
3788 fi
3789
3790 echo "$as_me:3790: checking if we should assume mixed-case filenames" >&5
3791 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3792
3793 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3794 if test "${enable_mixed_case+set}" = set; then
3795   enableval="$enable_mixed_case"
3796   enable_mixedcase=$enableval
3797 else
3798   enable_mixedcase=auto
3799 fi;
3800 echo "$as_me:3800: result: $enable_mixedcase" >&5
3801 echo "${ECHO_T}$enable_mixedcase" >&6
3802 if test "$enable_mixedcase" = "auto" ; then
3803
3804 echo "$as_me:3804: checking if filesystem supports mixed-case filenames" >&5
3805 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3806 if test "${cf_cv_mixedcase+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809
3810 if test "$cross_compiling" = yes ; then
3811         case $target_alias in #(vi
3812         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3813                 cf_cv_mixedcase=no
3814                 ;;
3815         *)
3816                 cf_cv_mixedcase=yes
3817                 ;;
3818         esac
3819 else
3820         rm -f conftest CONFTEST
3821         echo test >conftest
3822         if test -f CONFTEST ; then
3823                 cf_cv_mixedcase=no
3824         else
3825                 cf_cv_mixedcase=yes
3826         fi
3827         rm -f conftest CONFTEST
3828 fi
3829
3830 fi
3831 echo "$as_me:3831: result: $cf_cv_mixedcase" >&5
3832 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3833 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3834 #define MIXEDCASE_FILENAMES 1
3835 EOF
3836
3837 else
3838     cf_cv_mixedcase=$enable_mixedcase
3839     if test "$enable_mixedcase" = "yes" ; then
3840         cat >>confdefs.h <<\EOF
3841 #define MIXEDCASE_FILENAMES 1
3842 EOF
3843
3844     fi
3845 fi
3846
3847 # do this after mixed-case option (tags/TAGS is not as important as tic).
3848 echo "$as_me:3848: checking whether ${MAKE-make} sets \${MAKE}" >&5
3849 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3850 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3851 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   cat >conftest.make <<\EOF
3855 all:
3856         @echo 'ac_maketemp="${MAKE}"'
3857 EOF
3858 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3859 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3860 if test -n "$ac_maketemp"; then
3861   eval ac_cv_prog_make_${ac_make}_set=yes
3862 else
3863   eval ac_cv_prog_make_${ac_make}_set=no
3864 fi
3865 rm -f conftest.make
3866 fi
3867 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3868   echo "$as_me:3868: result: yes" >&5
3869 echo "${ECHO_T}yes" >&6
3870   SET_MAKE=
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874   SET_MAKE="MAKE=${MAKE-make}"
3875 fi
3876
3877 for ac_prog in exctags ctags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_CTAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$CTAGS"; then
3887   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_CTAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 CTAGS=$ac_cv_prog_CTAGS
3903 if test -n "$CTAGS"; then
3904   echo "$as_me:3904: result: $CTAGS" >&5
3905 echo "${ECHO_T}$CTAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$CTAGS" && break
3912 done
3913
3914 for ac_prog in exetags etags
3915 do
3916   # Extract the first word of "$ac_prog", so it can be a program name with args.
3917 set dummy $ac_prog; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ETAGS+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ETAGS"; then
3924   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ETAGS="$ac_prog"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937 fi
3938 fi
3939 ETAGS=$ac_cv_prog_ETAGS
3940 if test -n "$ETAGS"; then
3941   echo "$as_me:3941: result: $ETAGS" >&5
3942 echo "${ECHO_T}$ETAGS" >&6
3943 else
3944   echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3946 fi
3947
3948   test -n "$ETAGS" && break
3949 done
3950
3951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3952 set dummy ${CTAGS:-ctags}; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3956   echo $ECHO_N "(cached) $ECHO_C" >&6
3957 else
3958   if test -n "$MAKE_LOWER_TAGS"; then
3959   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3960 else
3961   ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 ac_dummy="$PATH"
3963 for ac_dir in $ac_dummy; do
3964   IFS=$ac_save_IFS
3965   test -z "$ac_dir" && ac_dir=.
3966   $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3969 break
3970 done
3971
3972   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3973 fi
3974 fi
3975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3976 if test -n "$MAKE_LOWER_TAGS"; then
3977   echo "$as_me:3977: result: $MAKE_LOWER_TAGS" >&5
3978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3979 else
3980   echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3982 fi
3983
3984 if test "$cf_cv_mixedcase" = yes ; then
3985         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3986 set dummy ${ETAGS:-etags}; ac_word=$2
3987 echo "$as_me:3987: checking for $ac_word" >&5
3988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3990   echo $ECHO_N "(cached) $ECHO_C" >&6
3991 else
3992   if test -n "$MAKE_UPPER_TAGS"; then
3993   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3994 else
3995   ac_save_IFS=$IFS; IFS=$ac_path_separator
3996 ac_dummy="$PATH"
3997 for ac_dir in $ac_dummy; do
3998   IFS=$ac_save_IFS
3999   test -z "$ac_dir" && ac_dir=.
4000   $as_executable_p "$ac_dir/$ac_word" || continue
4001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4002 echo "$as_me:4002: found $ac_dir/$ac_word" >&5
4003 break
4004 done
4005
4006   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4007 fi
4008 fi
4009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4010 if test -n "$MAKE_UPPER_TAGS"; then
4011   echo "$as_me:4011: result: $MAKE_UPPER_TAGS" >&5
4012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4013 else
4014   echo "$as_me:4014: result: no" >&5
4015 echo "${ECHO_T}no" >&6
4016 fi
4017
4018 else
4019         MAKE_UPPER_TAGS=no
4020 fi
4021
4022 if test "$MAKE_UPPER_TAGS" = yes ; then
4023         MAKE_UPPER_TAGS=
4024 else
4025         MAKE_UPPER_TAGS="#"
4026 fi
4027
4028 if test "$MAKE_LOWER_TAGS" = yes ; then
4029         MAKE_LOWER_TAGS=
4030 else
4031         MAKE_LOWER_TAGS="#"
4032 fi
4033
4034 echo "$as_me:4034: checking for makeflags variable" >&5
4035 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4036 if test "${cf_cv_makeflags+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039
4040         cf_cv_makeflags=''
4041         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4042         do
4043                 cat >cf_makeflags.tmp <<CF_EOF
4044 SHELL = /bin/sh
4045 all :
4046         @ echo '.$cf_option'
4047 CF_EOF
4048                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4049                 case "$cf_result" in
4050                 .*k)
4051                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4052                         case "$cf_result" in
4053                         .*CC=*) cf_cv_makeflags=
4054                                 ;;
4055                         *)      cf_cv_makeflags=$cf_option
4056                                 ;;
4057                         esac
4058                         break
4059                         ;;
4060                 .-)     ;;
4061                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4062                         ;;
4063                 esac
4064         done
4065         rm -f cf_makeflags.tmp
4066
4067 fi
4068 echo "$as_me:4068: result: $cf_cv_makeflags" >&5
4069 echo "${ECHO_T}$cf_cv_makeflags" >&6
4070
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_RANLIB+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 RANLIB=$ac_cv_prog_RANLIB
4096 if test -n "$RANLIB"; then
4097   echo "$as_me:4097: result: $RANLIB" >&5
4098 echo "${ECHO_T}$RANLIB" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104 fi
4105 if test -z "$ac_cv_prog_RANLIB"; then
4106   ac_ct_RANLIB=$RANLIB
4107   # Extract the first word of "ranlib", so it can be a program name with args.
4108 set dummy ranlib; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_RANLIB"; then
4115   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ac_ct_RANLIB="ranlib"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4129 fi
4130 fi
4131 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4132 if test -n "$ac_ct_RANLIB"; then
4133   echo "$as_me:4133: result: $ac_ct_RANLIB" >&5
4134 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   RANLIB=$ac_ct_RANLIB
4141 else
4142   RANLIB="$ac_cv_prog_RANLIB"
4143 fi
4144
4145 if test -n "$ac_tool_prefix"; then
4146   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}ld; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_LD+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$LD"; then
4154   ac_cv_prog_LD="$LD" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_LD="${ac_tool_prefix}ld"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167 fi
4168 fi
4169 LD=$ac_cv_prog_LD
4170 if test -n "$LD"; then
4171   echo "$as_me:4171: result: $LD" >&5
4172 echo "${ECHO_T}$LD" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178 fi
4179 if test -z "$ac_cv_prog_LD"; then
4180   ac_ct_LD=$LD
4181   # Extract the first word of "ld", so it can be a program name with args.
4182 set dummy ld; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$ac_ct_LD"; then
4189   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_ac_ct_LD="ld"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4203 fi
4204 fi
4205 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4206 if test -n "$ac_ct_LD"; then
4207   echo "$as_me:4207: result: $ac_ct_LD" >&5
4208 echo "${ECHO_T}$ac_ct_LD" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214   LD=$ac_ct_LD
4215 else
4216   LD="$ac_cv_prog_LD"
4217 fi
4218
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4221 set dummy ${ac_tool_prefix}ar; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_AR+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$AR"; then
4228   ac_cv_prog_AR="$AR" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_AR="${ac_tool_prefix}ar"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241 fi
4242 fi
4243 AR=$ac_cv_prog_AR
4244 if test -n "$AR"; then
4245   echo "$as_me:4245: result: $AR" >&5
4246 echo "${ECHO_T}$AR" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252 fi
4253 if test -z "$ac_cv_prog_AR"; then
4254   ac_ct_AR=$AR
4255   # Extract the first word of "ar", so it can be a program name with args.
4256 set dummy ar; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$ac_ct_AR"; then
4263   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_ac_ct_AR="ar"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4277 fi
4278 fi
4279 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4280 if test -n "$ac_ct_AR"; then
4281   echo "$as_me:4281: result: $ac_ct_AR" >&5
4282 echo "${ECHO_T}$ac_ct_AR" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   AR=$ac_ct_AR
4289 else
4290   AR="$ac_cv_prog_AR"
4291 fi
4292
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$AR"; then
4302   ac_cv_prog_AR="$AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_AR="${ac_tool_prefix}ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 AR=$ac_cv_prog_AR
4318 if test -n "$AR"; then
4319   echo "$as_me:4319: result: $AR" >&5
4320 echo "${ECHO_T}$AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 fi
4327 if test -z "$ac_cv_prog_AR"; then
4328   ac_ct_AR=$AR
4329   # Extract the first word of "ar", so it can be a program name with args.
4330 set dummy ar; ac_word=$2
4331 echo "$as_me:4331: checking for $ac_word" >&5
4332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if test -n "$ac_ct_AR"; then
4337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4338 else
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   $as_executable_p "$ac_dir/$ac_word" || continue
4345 ac_cv_prog_ac_ct_AR="ar"
4346 echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347 break
4348 done
4349
4350   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4351 fi
4352 fi
4353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4354 if test -n "$ac_ct_AR"; then
4355   echo "$as_me:4355: result: $ac_ct_AR" >&5
4356 echo "${ECHO_T}$ac_ct_AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362   AR=$ac_ct_AR
4363 else
4364   AR="$ac_cv_prog_AR"
4365 fi
4366
4367 echo "$as_me:4367: checking for options to update archives" >&5
4368 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4369 if test "${cf_cv_ar_flags+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372
4373         cf_cv_ar_flags=unknown
4374         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4375         do
4376
4377                 # check if $ARFLAGS already contains this choice
4378                 if test "x$ARFLAGS" != "x" ; then
4379                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4380                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4381                                 cf_cv_ar_flags=
4382                                 break
4383                         fi
4384                 fi
4385
4386                 rm -f conftest.$ac_cv_objext
4387                 rm -f conftest.a
4388
4389                 cat >conftest.$ac_ext <<EOF
4390 #line 4390 "configure"
4391 int     testdata[3] = { 123, 456, 789 };
4392 EOF
4393                 if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } ; then
4398                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4399                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4400                         if test -f conftest.a ; then
4401                                 cf_cv_ar_flags=$cf_ar_flags
4402                                 break
4403                         fi
4404                 else
4405                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4406
4407 echo "${as_me:-configure}:4407: testing cannot compile test-program ..." 1>&5
4408
4409                         break
4410                 fi
4411         done
4412         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4413
4414 fi
4415 echo "$as_me:4415: result: $cf_cv_ar_flags" >&5
4416 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4417
4418 if test -n "$ARFLAGS" ; then
4419         if test -n "$cf_cv_ar_flags" ; then
4420                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4421         fi
4422 else
4423         ARFLAGS=$cf_cv_ar_flags
4424 fi
4425
4426 echo "$as_me:4426: checking if you have specified an install-prefix" >&5
4427 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4428
4429 # Check whether --with-install-prefix or --without-install-prefix was given.
4430 if test "${with_install_prefix+set}" = set; then
4431   withval="$with_install_prefix"
4432   case "$withval" in #(vi
4433         yes|no) #(vi
4434                 ;;
4435         *)      DESTDIR="$withval"
4436                 ;;
4437         esac
4438 fi;
4439 echo "$as_me:4439: result: $DESTDIR" >&5
4440 echo "${ECHO_T}$DESTDIR" >&6
4441
4442 ###############################################################################
4443
4444 # If we're cross-compiling, allow the user to override the tools and their
4445 # options.  The configure script is oriented toward identifying the host
4446 # compiler, etc., but we need a build compiler to generate parts of the source.
4447
4448 if test "$cross_compiling" = yes ; then
4449
4450         # defaults that we might want to override
4451         : ${BUILD_CFLAGS:=''}
4452         : ${BUILD_CPPFLAGS:=''}
4453         : ${BUILD_LDFLAGS:=''}
4454         : ${BUILD_LIBS:=''}
4455         : ${BUILD_EXEEXT:='$x'}
4456         : ${BUILD_OBJEXT:='o'}
4457
4458 # Check whether --with-build-cc or --without-build-cc was given.
4459 if test "${with_build_cc+set}" = set; then
4460   withval="$with_build_cc"
4461   BUILD_CC="$withval"
4462 else
4463   for ac_prog in gcc cc cl
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$BUILD_CC"; then
4473   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_BUILD_CC="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 BUILD_CC=$ac_cv_prog_BUILD_CC
4489 if test -n "$BUILD_CC"; then
4490   echo "$as_me:4490: result: $BUILD_CC" >&5
4491 echo "${ECHO_T}$BUILD_CC" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$BUILD_CC" && break
4498 done
4499
4500 fi;
4501         echo "$as_me:4501: checking for native build C compiler" >&5
4502 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4503         echo "$as_me:4503: result: $BUILD_CC" >&5
4504 echo "${ECHO_T}$BUILD_CC" >&6
4505
4506         echo "$as_me:4506: checking for native build C preprocessor" >&5
4507 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4508
4509 # Check whether --with-build-cpp or --without-build-cpp was given.
4510 if test "${with_build_cpp+set}" = set; then
4511   withval="$with_build_cpp"
4512   BUILD_CPP="$withval"
4513 else
4514   BUILD_CPP='${BUILD_CC} -E'
4515 fi;
4516         echo "$as_me:4516: result: $BUILD_CPP" >&5
4517 echo "${ECHO_T}$BUILD_CPP" >&6
4518
4519         echo "$as_me:4519: checking for native build C flags" >&5
4520 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4521
4522 # Check whether --with-build-cflags or --without-build-cflags was given.
4523 if test "${with_build_cflags+set}" = set; then
4524   withval="$with_build_cflags"
4525   BUILD_CFLAGS="$withval"
4526 fi;
4527         echo "$as_me:4527: result: $BUILD_CFLAGS" >&5
4528 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4529
4530         echo "$as_me:4530: checking for native build C preprocessor-flags" >&5
4531 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4532
4533 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4534 if test "${with_build_cppflags+set}" = set; then
4535   withval="$with_build_cppflags"
4536   BUILD_CPPFLAGS="$withval"
4537 fi;
4538         echo "$as_me:4538: result: $BUILD_CPPFLAGS" >&5
4539 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4540
4541         echo "$as_me:4541: checking for native build linker-flags" >&5
4542 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4543
4544 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4545 if test "${with_build_ldflags+set}" = set; then
4546   withval="$with_build_ldflags"
4547   BUILD_LDFLAGS="$withval"
4548 fi;
4549         echo "$as_me:4549: result: $BUILD_LDFLAGS" >&5
4550 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4551
4552         echo "$as_me:4552: checking for native build linker-libraries" >&5
4553 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4554
4555 # Check whether --with-build-libs or --without-build-libs was given.
4556 if test "${with_build_libs+set}" = set; then
4557   withval="$with_build_libs"
4558   BUILD_LIBS="$withval"
4559 fi;
4560         echo "$as_me:4560: result: $BUILD_LIBS" >&5
4561 echo "${ECHO_T}$BUILD_LIBS" >&6
4562
4563         # this assumes we're on Unix.
4564         BUILD_EXEEXT=
4565         BUILD_OBJEXT=o
4566
4567         : ${BUILD_CC:='${CC}'}
4568
4569         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4570                 { { echo "$as_me:4570: error: Cross-build requires two compilers.
4571 Use --with-build-cc to specify the native compiler." >&5
4572 echo "$as_me: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576
4577 else
4578         : ${BUILD_CC:='${CC}'}
4579         : ${BUILD_CPP:='${CPP}'}
4580         : ${BUILD_CFLAGS:='${CFLAGS}'}
4581         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4582         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4583         : ${BUILD_LIBS:='${LIBS}'}
4584         : ${BUILD_EXEEXT:='$x'}
4585         : ${BUILD_OBJEXT:='o'}
4586 fi
4587
4588 ###############################################################################
4589
4590 ### Options to allow the user to specify the set of libraries which are used.
4591 ### Use "--without-normal --with-shared" to allow the default model to be
4592 ### shared, for example.
4593 cf_list_models=""
4594
4595 echo "$as_me:4595: checking if libtool -version-number should be used" >&5
4596 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4597
4598 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4599 if test "${enable_libtool_version+set}" = set; then
4600   enableval="$enable_libtool_version"
4601   test "$enableval" != no && enableval=yes
4602   if test "$enableval" != "yes" ; then
4603     cf_libtool_version=no
4604   else
4605     cf_libtool_version=yes
4606   fi
4607 else
4608   enableval=yes
4609   cf_libtool_version=yes
4610
4611 fi;
4612 echo "$as_me:4612: result: $cf_libtool_version" >&5
4613 echo "${ECHO_T}$cf_libtool_version" >&6
4614
4615 if test "$cf_libtool_version" = yes ; then
4616         LIBTOOL_VERSION="-version-number"
4617 else
4618         LIBTOOL_VERSION="-version-info"
4619 fi
4620
4621 LIBTOOL=
4622
4623 # common library maintenance symbols that are convenient for libtool scripts:
4624 LIB_CREATE='${AR} -cr'
4625 LIB_OBJECT='${OBJECTS}'
4626 LIB_SUFFIX=.a
4627 LIB_PREP="$RANLIB"
4628
4629 # symbols used to prop libtool up to enable it to determine what it should be
4630 # doing:
4631 LIB_CLEAN=
4632 LIB_COMPILE=
4633 LIB_LINK='${CC}'
4634 LIB_INSTALL=
4635 LIB_UNINSTALL=
4636
4637 echo "$as_me:4637: checking if you want to build libraries with libtool" >&5
4638 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4639
4640 # Check whether --with-libtool or --without-libtool was given.
4641 if test "${with_libtool+set}" = set; then
4642   withval="$with_libtool"
4643   with_libtool=$withval
4644 else
4645   with_libtool=no
4646 fi;
4647 echo "$as_me:4647: result: $with_libtool" >&5
4648 echo "${ECHO_T}$with_libtool" >&6
4649 if test "$with_libtool" != "no"; then
4650
4651         if test "$with_libtool" != "yes" ; then
4652
4653 if test "x$prefix" != xNONE; then
4654   cf_path_syntax="$prefix"
4655 else
4656   cf_path_syntax="$ac_default_prefix"
4657 fi
4658
4659 case ".$with_libtool" in #(vi
4660 .\$\(*\)*|.\'*\'*) #(vi
4661   ;;
4662 ..|./*|.\\*) #(vi
4663   ;;
4664 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4665   ;;
4666 .\${*prefix}*) #(vi
4667   eval with_libtool="$with_libtool"
4668   case ".$with_libtool" in #(vi
4669   .NONE/*)
4670     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671     ;;
4672   esac
4673   ;; #(vi
4674 .no|.NONE/*)
4675   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4676   ;;
4677 *)
4678   { { echo "$as_me:4678: error: expected a pathname, not \"$with_libtool\"" >&5
4679 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4680    { (exit 1); exit 1; }; }
4681   ;;
4682 esac
4683
4684                 LIBTOOL=$with_libtool
4685         else
4686                 # Extract the first word of "libtool", so it can be a program name with args.
4687 set dummy libtool; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   case $LIBTOOL in
4694   [\\/]* | ?:[\\/]*)
4695   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4696   ;;
4697   *)
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   if $as_executable_p "$ac_dir/$ac_word"; then
4704    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4705    echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706    break
4707 fi
4708 done
4709
4710   ;;
4711 esac
4712 fi
4713 LIBTOOL=$ac_cv_path_LIBTOOL
4714
4715 if test -n "$LIBTOOL"; then
4716   echo "$as_me:4716: result: $LIBTOOL" >&5
4717 echo "${ECHO_T}$LIBTOOL" >&6
4718 else
4719   echo "$as_me:4719: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723         fi
4724         if test -z "$LIBTOOL" ; then
4725                 { { echo "$as_me:4725: error: Cannot find libtool" >&5
4726 echo "$as_me: error: Cannot find libtool" >&2;}
4727    { (exit 1); exit 1; }; }
4728         fi
4729         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4730         LIB_OBJECT='${OBJECTS:.o=.lo}'
4731         LIB_SUFFIX=.la
4732         LIB_CLEAN='${LIBTOOL} --mode=clean'
4733         LIB_COMPILE='${LIBTOOL} --mode=compile'
4734         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4735         LIB_INSTALL='${LIBTOOL} --mode=install'
4736         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4737         LIB_PREP=:
4738
4739         # Show the version of libtool
4740         echo "$as_me:4740: checking version of libtool" >&5
4741 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4742
4743         # Save the version in a cache variable - this is not entirely a good
4744         # thing, but the version string from libtool is very ugly, and for
4745         # bug reports it might be useful to have the original string. "("
4746         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4747         echo "$as_me:4747: result: $cf_cv_libtool_version" >&5
4748 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4749         if test -z "$cf_cv_libtool_version" ; then
4750                 { { echo "$as_me:4750: error: This is not GNU libtool" >&5
4751 echo "$as_me: error: This is not GNU libtool" >&2;}
4752    { (exit 1); exit 1; }; }
4753         fi
4754
4755         # special hack to add -no-undefined (which libtool should do for itself)
4756         LT_UNDEF=
4757         case "$cf_cv_system_name" in #(vi
4758         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4759                 LT_UNDEF=-no-undefined
4760                 ;;
4761         esac
4762
4763         # special hack to add --tag option for C++ compiler
4764         case $cf_cv_libtool_version in #(vi
4765         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4766                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4767                 LIBTOOL="$LIBTOOL --tag=CC"
4768                 ;;
4769         *)
4770                 LIBTOOL_CXX="$LIBTOOL"
4771                 ;;
4772         esac
4773 else
4774         LIBTOOL=""
4775         LIBTOOL_CXX=""
4776 fi
4777
4778 test -z "$LIBTOOL" && ECHO_LT=
4779
4780 if test "$with_libtool" != "no" ; then
4781
4782 cf_list_models="$cf_list_models libtool"
4783
4784 else
4785
4786 echo "$as_me:4786: checking if you want to build shared libraries" >&5
4787 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4788
4789 # Check whether --with-shared or --without-shared was given.
4790 if test "${with_shared+set}" = set; then
4791   withval="$with_shared"
4792   with_shared=$withval
4793 else
4794   with_shared=no
4795 fi;
4796 echo "$as_me:4796: result: $with_shared" >&5
4797 echo "${ECHO_T}$with_shared" >&6
4798 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4799
4800 echo "$as_me:4800: checking if you want to build static libraries" >&5
4801 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-normal or --without-normal was given.
4804 if test "${with_normal+set}" = set; then
4805   withval="$with_normal"
4806   with_normal=$withval
4807 else
4808   with_normal=yes
4809 fi;
4810 echo "$as_me:4810: result: $with_normal" >&5
4811 echo "${ECHO_T}$with_normal" >&6
4812 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4813
4814 echo "$as_me:4814: checking if you want to build debug libraries" >&5
4815 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-debug or --without-debug was given.
4818 if test "${with_debug+set}" = set; then
4819   withval="$with_debug"
4820   with_debug=$withval
4821 else
4822   with_debug=yes
4823 fi;
4824 echo "$as_me:4824: result: $with_debug" >&5
4825 echo "${ECHO_T}$with_debug" >&6
4826 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4827
4828 echo "$as_me:4828: checking if you want to build profiling libraries" >&5
4829 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4830
4831 # Check whether --with-profile or --without-profile was given.
4832 if test "${with_profile+set}" = set; then
4833   withval="$with_profile"
4834   with_profile=$withval
4835 else
4836   with_profile=no
4837 fi;
4838 echo "$as_me:4838: result: $with_profile" >&5
4839 echo "${ECHO_T}$with_profile" >&6
4840 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4841
4842 fi
4843
4844 ###############################################################################
4845
4846 echo "$as_me:4846: checking for specified models" >&5
4847 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4848 test -z "$cf_list_models" && cf_list_models=normal
4849 test "$with_libtool" != "no" && cf_list_models=libtool
4850 echo "$as_me:4850: result: $cf_list_models" >&5
4851 echo "${ECHO_T}$cf_list_models" >&6
4852
4853 ### Use the first model as the default, and save its suffix for use in building
4854 ### up test-applications.
4855 echo "$as_me:4855: checking for default model" >&5
4856 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4857 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4858 echo "$as_me:4858: result: $DFT_LWR_MODEL" >&5
4859 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4860
4861 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4862
4863 TICS_NAME=tic
4864
4865 TINFO_NAME=tinfo
4866
4867 LIB_NAME=ncurses
4868
4869 LIB_DIR=../lib
4870 LIB_2ND=../../lib
4871
4872         case $cf_cv_system_name in #(vi
4873         OS/2*|os2*) #(vi
4874         LIB_PREFIX=''
4875         ;;
4876         *)      LIB_PREFIX='lib'
4877         ;;
4878         esac
4879 cf_prefix=$LIB_PREFIX
4880
4881 LIB_PREFIX=$cf_prefix
4882
4883 LIB_SUFFIX=
4884
4885 ###############################################################################
4886
4887 echo "$as_me:4887: checking if you want to build a separate terminfo library" >&5
4888 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4889
4890 # Check whether --with-termlib or --without-termlib was given.
4891 if test "${with_termlib+set}" = set; then
4892   withval="$with_termlib"
4893   with_termlib=$withval
4894 else
4895   with_termlib=no
4896 fi;
4897 echo "$as_me:4897: result: $with_termlib" >&5
4898 echo "${ECHO_T}$with_termlib" >&6
4899
4900 echo "$as_me:4900: checking if you want to build a separate tic library" >&5
4901 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4902
4903 # Check whether --with-ticlib or --without-ticlib was given.
4904 if test "${with_ticlib+set}" = set; then
4905   withval="$with_ticlib"
4906   with_ticlib=$withval
4907 else
4908   with_ticlib=no
4909 fi;
4910 echo "$as_me:4910: result: $with_ticlib" >&5
4911 echo "${ECHO_T}$with_ticlib" >&6
4912
4913 ### Checks for special libraries, must be done up-front.
4914 SHLIB_LIST=""
4915
4916 echo "$as_me:4916: checking if you want to link with the GPM mouse library" >&5
4917 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4918
4919 # Check whether --with-gpm or --without-gpm was given.
4920 if test "${with_gpm+set}" = set; then
4921   withval="$with_gpm"
4922   with_gpm=$withval
4923 else
4924   with_gpm=maybe
4925 fi;
4926 echo "$as_me:4926: result: $with_gpm" >&5
4927 echo "${ECHO_T}$with_gpm" >&6
4928
4929 if test "$with_gpm" != no ; then
4930         echo "$as_me:4930: checking for gpm.h" >&5
4931 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4932 if test "${ac_cv_header_gpm_h+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 #line 4936 "configure"
4937 #include "confdefs.h"
4938 #include <gpm.h>
4939 _ACEOF
4940 if { (eval echo "$as_me:4940: \"$ac_cpp conftest.$ac_ext\"") >&5
4941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4942   ac_status=$?
4943   egrep -v '^ *\+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null; then
4948   if test -s conftest.err; then
4949     ac_cpp_err=$ac_c_preproc_warn_flag
4950   else
4951     ac_cpp_err=
4952   fi
4953 else
4954   ac_cpp_err=yes
4955 fi
4956 if test -z "$ac_cpp_err"; then
4957   ac_cv_header_gpm_h=yes
4958 else
4959   echo "$as_me: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   ac_cv_header_gpm_h=no
4962 fi
4963 rm -f conftest.err conftest.$ac_ext
4964 fi
4965 echo "$as_me:4965: result: $ac_cv_header_gpm_h" >&5
4966 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4967 if test $ac_cv_header_gpm_h = yes; then
4968
4969                 cat >>confdefs.h <<\EOF
4970 #define HAVE_GPM_H 1
4971 EOF
4972
4973                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4974                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing assuming we really have GPM library ..." 1>&5
4977
4978                         cat >>confdefs.h <<\EOF
4979 #define HAVE_LIBGPM 1
4980 EOF
4981
4982                 else
4983                         echo "$as_me:4983: checking for Gpm_Open in -lgpm" >&5
4984 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4985 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   ac_check_lib_save_LIBS=$LIBS
4989 LIBS="-lgpm  $LIBS"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 #ifdef __cplusplus
4996 extern "C"
4997 #endif
4998 /* We use char because int might match the return type of a gcc2
4999    builtin and then its argument prototype would still apply.  */
5000 char Gpm_Open ();
5001 int
5002 main ()
5003 {
5004 Gpm_Open ();
5005   ;
5006   return 0;
5007 }
5008 _ACEOF
5009 rm -f conftest.$ac_objext conftest$ac_exeext
5010 if { (eval echo "$as_me:5010: \"$ac_link\"") >&5
5011   (eval $ac_link) 2>&5
5012   ac_status=$?
5013   echo "$as_me:5013: \$? = $ac_status" >&5
5014   (exit $ac_status); } &&
5015          { ac_try='test -s conftest$ac_exeext'
5016   { (eval echo "$as_me:5016: \"$ac_try\"") >&5
5017   (eval $ac_try) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); }; }; then
5021   ac_cv_lib_gpm_Gpm_Open=yes
5022 else
5023   echo "$as_me: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 ac_cv_lib_gpm_Gpm_Open=no
5026 fi
5027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5028 LIBS=$ac_check_lib_save_LIBS
5029 fi
5030 echo "$as_me:5030: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5031 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5032 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5033   :
5034 else
5035
5036                                 { { echo "$as_me:5036: error: Cannot link with GPM library" >&5
5037 echo "$as_me: error: Cannot link with GPM library" >&2;}
5038    { (exit 1); exit 1; }; }
5039                 fi
5040                 with_gpm=yes
5041
5042 fi
5043
5044 else
5045
5046                 test "$with_gpm" != maybe && { echo "$as_me:5046: WARNING: Cannot find GPM header" >&5
5047 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5048                 with_gpm=no
5049
5050 fi
5051
5052 fi
5053
5054 if test "$with_gpm" != no ; then
5055         echo "$as_me:5055: checking if you want to load GPM dynamically" >&5
5056 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5057
5058 # Check whether --with-dlsym or --without-dlsym was given.
5059 if test "${with_dlsym+set}" = set; then
5060   withval="$with_dlsym"
5061   with_dlsym=$withval
5062 else
5063   with_dlsym=yes
5064 fi;
5065         echo "$as_me:5065: result: $with_dlsym" >&5
5066 echo "${ECHO_T}$with_dlsym" >&6
5067         if test "$with_dlsym" = yes ; then
5068
5069 cf_have_dlsym=no
5070 echo "$as_me:5070: checking for dlsym" >&5
5071 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5072 if test "${ac_cv_func_dlsym+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   cat >conftest.$ac_ext <<_ACEOF
5076 #line 5076 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char dlsym (); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 #ifdef __cplusplus
5083 extern "C"
5084 #endif
5085 /* We use char because int might match the return type of a gcc2
5086    builtin and then its argument prototype would still apply.  */
5087 char dlsym ();
5088 char (*f) ();
5089
5090 int
5091 main ()
5092 {
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5097 choke me
5098 #else
5099 f = dlsym;
5100 #endif
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); } &&
5112          { ac_try='test -s conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118   ac_cv_func_dlsym=yes
5119 else
5120   echo "$as_me: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 ac_cv_func_dlsym=no
5123 fi
5124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5125 fi
5126 echo "$as_me:5126: result: $ac_cv_func_dlsym" >&5
5127 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5128 if test $ac_cv_func_dlsym = yes; then
5129   cf_have_dlsym=yes
5130 else
5131
5132 cf_have_libdl=no
5133 echo "$as_me:5133: checking for dlsym in -ldl" >&5
5134 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5135 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   ac_check_lib_save_LIBS=$LIBS
5139 LIBS="-ldl  $LIBS"
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 #ifdef __cplusplus
5146 extern "C"
5147 #endif
5148 /* We use char because int might match the return type of a gcc2
5149    builtin and then its argument prototype would still apply.  */
5150 char dlsym ();
5151 int
5152 main ()
5153 {
5154 dlsym ();
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161   (eval $ac_link) 2>&5
5162   ac_status=$?
5163   echo "$as_me:5163: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -s conftest$ac_exeext'
5166   { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5167   (eval $ac_try) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); }; }; then
5171   ac_cv_lib_dl_dlsym=yes
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175 ac_cv_lib_dl_dlsym=no
5176 fi
5177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5178 LIBS=$ac_check_lib_save_LIBS
5179 fi
5180 echo "$as_me:5180: result: $ac_cv_lib_dl_dlsym" >&5
5181 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5182 if test $ac_cv_lib_dl_dlsym = yes; then
5183
5184         cf_have_dlsym=yes
5185         cf_have_libdl=yes
5186 fi
5187
5188 fi
5189
5190 if test "$cf_have_dlsym" = yes ; then
5191         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5192
5193         echo "$as_me:5193: checking whether able to link to dl*() functions" >&5
5194 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5195         cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198 #include <dlfcn.h>
5199 int
5200 main ()
5201 {
5202
5203                 void *obj;
5204                 if ((obj = dlopen("filename", 0)) != 0) {
5205                         if (dlsym(obj, "symbolname") == 0) {
5206                         dlclose(obj);
5207                         }
5208                 }
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225
5226                 cat >>confdefs.h <<\EOF
5227 #define HAVE_LIBDL 1
5228 EOF
5229
5230 else
5231   echo "$as_me: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233
5234                 { { echo "$as_me:5234: error: Cannot link test program for libdl" >&5
5235 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5236    { (exit 1); exit 1; }; }
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         echo "$as_me:5239: result: ok" >&5
5240 echo "${ECHO_T}ok" >&6
5241 else
5242         { { echo "$as_me:5242: error: Cannot find dlsym function" >&5
5243 echo "$as_me: error: Cannot find dlsym function" >&2;}
5244    { (exit 1); exit 1; }; }
5245 fi
5246
5247                 if test "$with_gpm" != yes ; then
5248                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5249
5250 echo "${as_me:-configure}:5250: testing assuming soname for gpm is $with_gpm ..." 1>&5
5251
5252                         cf_cv_gpm_soname="$with_gpm"
5253                 else
5254
5255 echo "$as_me:5255: checking for soname of gpm library" >&5
5256 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5257 if test "${cf_cv_gpm_soname+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260
5261 cf_cv_gpm_soname=unknown
5262 if test "$cross_compiling" != yes ; then
5263 cat >conftest.$ac_ext <<CF_EOF
5264 #include <gpm.h>
5265 int main()
5266 {
5267 if (Gpm_Open(0,0)) Gpm_Close();
5268         ${cf_cv_main_return:-return}(0);
5269 }
5270 CF_EOF
5271 cf_save_LIBS="$LIBS"
5272         LIBS="-lgpm $LIBS"
5273         if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274   (eval $ac_compile) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); } ; then
5278                 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } ; then
5283                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5284                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5285                 fi
5286         fi
5287 rm -rf conftest*
5288 LIBS="$cf_save_LIBS"
5289 fi
5290
5291 fi
5292 echo "$as_me:5292: result: $cf_cv_gpm_soname" >&5
5293 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5294
5295                 fi
5296                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5297 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5298 EOF
5299
5300                 SHLIB_LIST="-ldl $SHLIB_LIST"
5301         else
5302                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5303                 TEST_LIBS="-lgpm $TEST_LIBS"
5304         fi
5305         cat >>confdefs.h <<\EOF
5306 #define HAVE_LIBGPM 1
5307 EOF
5308
5309 echo "$as_me:5309: checking for Gpm_Wgetch in -lgpm" >&5
5310 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5311 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5312   echo $ECHO_N "(cached) $ECHO_C" >&6
5313 else
5314   ac_check_lib_save_LIBS=$LIBS
5315 LIBS="-lgpm  $LIBS"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char Gpm_Wgetch ();
5327 int
5328 main ()
5329 {
5330 Gpm_Wgetch ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:5339: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_gpm_Gpm_Wgetch=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 ac_cv_lib_gpm_Gpm_Wgetch=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:5356: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5357 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5358 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5359
5360 echo "$as_me:5360: checking if GPM is weakly bound to curses library" >&5
5361 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5362 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366 cf_cv_check_gpm_wgetch=unknown
5367 if test "$cross_compiling" != yes ; then
5368
5369 cat >conftest.$ac_ext <<CF_EOF
5370 #include <gpm.h>
5371 int main()
5372 {
5373         Gpm_Wgetch();
5374         ${cf_cv_main_return:-return}(0);
5375 }
5376 CF_EOF
5377
5378         cf_save_LIBS="$LIBS"
5379         # This only works if we can look at the symbol table.  If a shared
5380         # library is stripped for install, we cannot use that.  So we're forced
5381         # to rely on the static library, noting that some packagers may not
5382         # include it.
5383         LIBS="-static -lgpm -dynamic $LIBS"
5384         if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
5385   (eval $ac_compile) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); } ; then
5389                 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } ; then
5394                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5395                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5396                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5397                 fi
5398         fi
5399         rm -rf conftest*
5400         LIBS="$cf_save_LIBS"
5401 fi
5402
5403 fi
5404 echo "$as_me:5404: result: $cf_cv_check_gpm_wgetch" >&5
5405 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5406
5407 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5408         { echo "$as_me:5408: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5409 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5410 fi
5411
5412 fi
5413
5414 fi
5415
5416 # not everyone has "test -c"
5417 if test -c /dev/sysmouse 2>/dev/null ; then
5418 echo "$as_me:5418: checking if you want to use sysmouse" >&5
5419 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5420
5421 # Check whether --with-sysmouse or --without-sysmouse was given.
5422 if test "${with_sysmouse+set}" = set; then
5423   withval="$with_sysmouse"
5424   cf_with_sysmouse=$withval
5425 else
5426   cf_with_sysmouse=maybe
5427 fi;
5428         if test "$cf_with_sysmouse" != no ; then
5429         cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 #include <osreldate.h>
5434 #if (__FreeBSD_version >= 400017)
5435 #include <sys/consio.h>
5436 #include <sys/fbio.h>
5437 #else
5438 #include <machine/console.h>
5439 #endif
5440
5441 int
5442 main ()
5443 {
5444
5445         struct mouse_info the_mouse;
5446         ioctl(0, CONS_MOUSECTL, &the_mouse);
5447
5448   ;
5449   return 0;
5450 }
5451 _ACEOF
5452 rm -f conftest.$ac_objext
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454   (eval $ac_compile) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -s conftest.$ac_objext'
5459   { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460   (eval $ac_try) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); }; }; then
5464   cf_with_sysmouse=yes
5465 else
5466   echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 cf_with_sysmouse=no
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471         fi
5472 echo "$as_me:5472: result: $cf_with_sysmouse" >&5
5473 echo "${ECHO_T}$cf_with_sysmouse" >&6
5474 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_SYSMOUSE 1
5476 EOF
5477
5478 fi
5479
5480 if test X"$CC_G_OPT" = X"" ; then
5481         CC_G_OPT='-g'
5482         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5483 fi
5484
5485 if test X"$CXX_G_OPT" = X"" ; then
5486         CXX_G_OPT='-g'
5487         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5488 fi
5489
5490 echo "$as_me:5490: checking for default loader flags" >&5
5491 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5492 case $DFT_LWR_MODEL in
5493 libtool) LD_MODEL=''   ;;
5494 normal)  LD_MODEL=''   ;;
5495 debug)   LD_MODEL=$CC_G_OPT ;;
5496 profile) LD_MODEL='-pg';;
5497 shared)  LD_MODEL=''   ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_MODEL" >&5
5500 echo "${ECHO_T}$LD_MODEL" >&6
5501
5502 case $DFT_LWR_MODEL in
5503 shared)
5504
5505 echo "$as_me:5505: checking if rpath option should be used" >&5
5506 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5507
5508 # Check whether --enable-rpath or --disable-rpath was given.
5509 if test "${enable_rpath+set}" = set; then
5510   enableval="$enable_rpath"
5511   cf_cv_enable_rpath=$enableval
5512 else
5513   cf_cv_enable_rpath=no
5514 fi;
5515 echo "$as_me:5515: result: $cf_cv_enable_rpath" >&5
5516 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5517
5518 echo "$as_me:5518: checking if shared libraries should be relinked during install" >&5
5519 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5520
5521 # Check whether --enable-relink or --disable-relink was given.
5522 if test "${enable_relink+set}" = set; then
5523   enableval="$enable_relink"
5524   cf_cv_do_relink=$enableval
5525 else
5526   cf_cv_do_relink=yes
5527 fi;
5528 echo "$as_me:5528: result: $cf_cv_do_relink" >&5
5529 echo "${ECHO_T}$cf_cv_do_relink" >&6
5530         ;;
5531 esac
5532
5533 LD_RPATH_OPT=
5534 echo "$as_me:5534: checking for an rpath option" >&5
5535 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5536 case $cf_cv_system_name in #(vi
5537 irix*) #(vi
5538         if test "$GCC" = yes; then
5539                 LD_RPATH_OPT="-Wl,-rpath,"
5540         else
5541                 LD_RPATH_OPT="-rpath "
5542         fi
5543         ;;
5544 linux*|gnu*|k*bsd*-gnu) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 openbsd[2-9].*|mirbsd*) #(vi
5548         LD_RPATH_OPT="-Wl,-rpath,"
5549         ;;
5550 dragonfly*|freebsd*) #(vi
5551         LD_RPATH_OPT="-rpath "
5552         ;;
5553 netbsd*) #(vi
5554         LD_RPATH_OPT="-Wl,-rpath,"
5555         ;;
5556 osf*|mls+*) #(vi
5557         LD_RPATH_OPT="-rpath "
5558         ;;
5559 solaris2*) #(vi
5560         LD_RPATH_OPT="-R"
5561         ;;
5562 *)
5563         ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_RPATH_OPT" >&5
5566 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5567
5568 case "x$LD_RPATH_OPT" in #(vi
5569 x-R*)
5570         echo "$as_me:5570: checking if we need a space after rpath option" >&5
5571 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5572         cf_save_LIBS="$LIBS"
5573         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5574         cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577
5578 int
5579 main ()
5580 {
5581
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   cf_rpath_space=no
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 cf_rpath_space=yes
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605         LIBS="$cf_save_LIBS"
5606         echo "$as_me:5606: result: $cf_rpath_space" >&5
5607 echo "${ECHO_T}$cf_rpath_space" >&6
5608         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5609         ;;
5610 esac
5611
5612         LOCAL_LDFLAGS=
5613         LOCAL_LDFLAGS2=
5614         LD_SHARED_OPTS=
5615         INSTALL_LIB="-m 644"
5616
5617         cf_cv_do_symlinks=no
5618         cf_ld_rpath_opt=
5619         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5620
5621         echo "$as_me:5621: checking if release/abi version should be used for shared libs" >&5
5622 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5623
5624 # Check whether --with-shlib-version or --without-shlib-version was given.
5625 if test "${with_shlib_version+set}" = set; then
5626   withval="$with_shlib_version"
5627   test -z "$withval" && withval=auto
5628         case $withval in #(vi
5629         yes) #(vi
5630                 cf_cv_shlib_version=auto
5631                 ;;
5632         rel|abi|auto|no) #(vi
5633                 cf_cv_shlib_version=$withval
5634                 ;;
5635         *)
5636                 { { echo "$as_me:5636: error: option value must be one of: rel, abi, auto or no" >&5
5637 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 ;;
5640         esac
5641
5642 else
5643   cf_cv_shlib_version=auto
5644 fi;
5645         echo "$as_me:5645: result: $cf_cv_shlib_version" >&5
5646 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5647
5648         cf_cv_rm_so_locs=no
5649
5650         # Some less-capable ports of gcc support only -fpic
5651         CC_SHARED_OPTS=
5652         if test "$GCC" = yes
5653         then
5654                 echo "$as_me:5654: checking which $CC option to use" >&5
5655 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5656                 cf_save_CFLAGS="$CFLAGS"
5657                 for CC_SHARED_OPTS in -fPIC -fpic ''
5658                 do
5659                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5660                         cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5663 #include <stdio.h>
5664 int
5665 main ()
5666 {
5667 int x = 1
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest.$ac_objext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   break
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 fi
5689 rm -f conftest.$ac_objext conftest.$ac_ext
5690                 done
5691                 echo "$as_me:5691: result: $CC_SHARED_OPTS" >&5
5692 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5693                 CFLAGS="$cf_save_CFLAGS"
5694         fi
5695
5696         cf_cv_shlib_version_infix=no
5697
5698         case $cf_cv_system_name in #(vi
5699         aix4.3-9*|aix[5-7]*) #(vi
5700                 if test "$GCC" = yes; then
5701                         CC_SHARED_OPTS=
5702                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5703                 else
5704                         # CC_SHARED_OPTS='-qpic=large -G'
5705                         # perhaps "-bM:SRE -bnoentry -bexpall"
5706                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5707                 fi
5708                 ;;
5709         beos*) #(vi
5710                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5711                 ;;
5712         cygwin*) #(vi
5713                 CC_SHARED_OPTS=
5714                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5715                 cf_cv_shlib_version=cygdll
5716                 cf_cv_shlib_version_infix=cygdll
5717                 cat >mk_shared_lib.sh <<-CF_EOF
5718                 #!/bin/sh
5719                 SHARED_LIB=\$1
5720                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5721                 shift
5722                 cat <<-EOF
5723                 Linking shared library
5724                 ** SHARED_LIB \$SHARED_LIB
5725                 ** IMPORT_LIB \$IMPORT_LIB
5726 EOF
5727                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5728 CF_EOF
5729                 chmod +x mk_shared_lib.sh
5730                 ;;
5731         darwin*) #(vi
5732                 EXTRA_CFLAGS="-no-cpp-precomp"
5733                 CC_SHARED_OPTS="-dynamic"
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5735                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5736                 cf_cv_shlib_version_infix=yes
5737                 echo "$as_me:5737: checking if ld -search_paths_first works" >&5
5738 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5739 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742
5743                         cf_save_LDFLAGS=$LDFLAGS
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                         cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748
5749 int
5750 main ()
5751 {
5752 int i;
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext conftest$ac_exeext
5758 if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
5759   (eval $ac_link) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ldflags_search_paths_first=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_cv_ldflags_search_paths_first=no
5774 fi
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776                                 LDFLAGS=$cf_save_LDFLAGS
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ldflags_search_paths_first" >&5
5779 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5780                 if test $cf_cv_ldflags_search_paths_first = yes; then
5781                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5782                 fi
5783                 ;;
5784         hpux*) #(vi
5785                 # (tested with gcc 2.7.2 -- I don't have c89)
5786                 if test "$GCC" = yes; then
5787                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5788                 else
5789                         CC_SHARED_OPTS='+Z'
5790                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5791                 fi
5792                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5793                 # HP-UX shared libraries must be executable, and should be
5794                 # readonly to exploit a quirk in the memory manager.
5795                 INSTALL_LIB="-m 555"
5796                 ;;
5797         interix*)
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 if test "$cf_cv_shlib_version" = rel; then
5800                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5801                 else
5802                         cf_shared_soname='`basename `'
5803                 fi
5804                 CC_SHARED_OPTS=
5805                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5806                 ;;
5807         irix*) #(vi
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5810                 fi
5811                 # tested with IRIX 5.2 and 'cc'.
5812                 if test "$GCC" != yes; then
5813                         CC_SHARED_OPTS='-KPIC'
5814                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5815                 else
5816                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5817                 fi
5818                 cf_cv_rm_so_locs=yes
5819                 ;;
5820         linux*|gnu*|k*bsd*-gnu) #(vi
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                 fi
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828
5829         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830         if test "$cf_cv_shlib_version" = rel; then
5831                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5832         else
5833                 cf_cv_shared_soname='`basename $@`'
5834         fi
5835
5836                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5837                 ;;
5838         openbsd[2-9].*|mirbsd*) #(vi
5839                 if test "$DFT_LWR_MODEL" = "shared" ; then
5840                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5841                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5842                 fi
5843                 if test "$cf_cv_enable_rpath" = yes ; then
5844                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5845                 fi
5846                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5847
5848         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5849         if test "$cf_cv_shlib_version" = rel; then
5850                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5851         else
5852                 cf_cv_shared_soname='`basename $@`'
5853         fi
5854
5855                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5856                 ;;
5857         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5858                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5859                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5860                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5861                 ;;
5862         dragonfly*|freebsd*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5865                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5866                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869
5870         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5871         if test "$cf_cv_shlib_version" = rel; then
5872                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5873         else
5874                 cf_cv_shared_soname='`basename $@`'
5875         fi
5876
5877                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5878                 ;;
5879         netbsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                         if test "$cf_cv_shlib_version" = auto; then
5886                         if test -f /usr/libexec/ld.elf_so; then
5887                                 cf_cv_shlib_version=abi
5888                         else
5889                                 cf_cv_shlib_version=rel
5890                         fi
5891                         fi
5892
5893         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5894         if test "$cf_cv_shlib_version" = rel; then
5895                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5896         else
5897                 cf_cv_shared_soname='`basename $@`'
5898         fi
5899
5900                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5901                 else
5902                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5903                 fi
5904                 ;;
5905         osf*|mls+*) #(vi
5906                 # tested with OSF/1 V3.2 and 'cc'
5907                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5908                 # link with shared libs).
5909                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5910                 case $host_os in #(vi
5911                 osf4*)
5912                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5913                         ;;
5914                 esac
5915                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5916                 if test "$DFT_LWR_MODEL" = "shared" ; then
5917                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5918                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5919                 fi
5920                 cf_cv_rm_so_locs=yes
5921                 ;;
5922         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5923                 # tested with osr5.0.5
5924                 if test "$GCC" != yes; then
5925                         CC_SHARED_OPTS='-belf -KPIC'
5926                 fi
5927                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         # only way is to set LD_RUN_PATH but no switch for it
5930                         RUN_PATH=$libdir
5931                 fi
5932                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5933                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5934                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5935                 ;;
5936         sunos4*) #(vi
5937                 # tested with SunOS 4.1.1 and gcc 2.7.0
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                 fi
5941                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5943                 ;;
5944         solaris2*) #(vi
5945                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5946                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5947                 if test "$DFT_LWR_MODEL" = "shared" ; then
5948                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 if test "$GCC" != yes; then
5963                         cf_save_CFLAGS="$CFLAGS"
5964                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5965                         do
5966                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5967                                 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #include <stdio.h>
5971 int
5972 main ()
5973 {
5974 printf("Hello\n");
5975   ;
5976   return 0;
5977 }
5978 _ACEOF
5979 rm -f conftest.$ac_objext
5980 if { (eval echo "$as_me:5980: \"$ac_compile\"") >&5
5981   (eval $ac_compile) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); } &&
5985          { ac_try='test -s conftest.$ac_objext'
5986   { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5987   (eval $ac_try) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); }; }; then
5991   break
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 fi
5996 rm -f conftest.$ac_objext conftest.$ac_ext
5997                         done
5998                         CFLAGS="$cf_save_CFLAGS"
5999                         CC_SHARED_OPTS=$cf_shared_opts
6000                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6001                 else
6002                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6003                 fi
6004                 ;;
6005         sysv5uw7*|unix_sv*) #(vi
6006                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6007                 if test "$GCC" != yes; then
6008                         CC_SHARED_OPTS='-KPIC'
6009                 fi
6010                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6011                 ;;
6012         *)
6013                 CC_SHARED_OPTS='unknown'
6014                 MK_SHARED_LIB='echo unknown'
6015                 ;;
6016         esac
6017
6018         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6019         case "$cf_cv_shlib_version" in #(vi
6020         rel|abi)
6021                 case "$MK_SHARED_LIB" in #(vi
6022                 *'-o $@') #(vi
6023                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6024                         ;;
6025                 *)
6026                         { echo "$as_me:6026: WARNING: ignored --with-shlib-version" >&5
6027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6028                         ;;
6029                 esac
6030                 ;;
6031         esac
6032
6033         # RPATH_LIST is a colon-separated list of directories
6034         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6035         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6036
6037 if test "$CC_SHARED_OPTS" = "unknown"; then
6038         for model in $cf_list_models; do
6039                 if test "$model" = "shared"; then
6040                         { { echo "$as_me:6040: error: Shared libraries are not supported in this version" >&5
6041 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6042    { (exit 1); exit 1; }; }
6043                 fi
6044         done
6045 fi
6046
6047 ### If we're building with rpath, try to link non-standard libs that way too.
6048 if test "$DFT_LWR_MODEL" = "shared"; then
6049
6050 echo "$as_me:6050: checking if rpath-hack should be disabled" >&5
6051 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6052
6053 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6054 if test "${enable_rpath_hack+set}" = set; then
6055   enableval="$enable_rpath_hack"
6056   test "$enableval" != no && enableval=yes
6057   if test "$enableval" != "yes" ; then
6058     cf_disable_rpath_hack=yes
6059   else
6060     cf_disable_rpath_hack=no
6061   fi
6062 else
6063   enableval=yes
6064   cf_disable_rpath_hack=no
6065
6066 fi;
6067 echo "$as_me:6067: result: $cf_disable_rpath_hack" >&5
6068 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6069 if test "$cf_disable_rpath_hack" = no ; then
6070
6071 echo "$as_me:6071: checking for updated LDFLAGS" >&5
6072 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6073 if test -n "$LD_RPATH_OPT" ; then
6074         echo "$as_me:6074: result: maybe" >&5
6075 echo "${ECHO_T}maybe" >&6
6076
6077         for ac_prog in ldd
6078 do
6079   # Extract the first word of "$ac_prog", so it can be a program name with args.
6080 set dummy $ac_prog; ac_word=$2
6081 echo "$as_me:6081: checking for $ac_word" >&5
6082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6083 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6084   echo $ECHO_N "(cached) $ECHO_C" >&6
6085 else
6086   if test -n "$cf_ldd_prog"; then
6087   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6088 else
6089   ac_save_IFS=$IFS; IFS=$ac_path_separator
6090 ac_dummy="$PATH"
6091 for ac_dir in $ac_dummy; do
6092   IFS=$ac_save_IFS
6093   test -z "$ac_dir" && ac_dir=.
6094   $as_executable_p "$ac_dir/$ac_word" || continue
6095 ac_cv_prog_cf_ldd_prog="$ac_prog"
6096 echo "$as_me:6096: found $ac_dir/$ac_word" >&5
6097 break
6098 done
6099
6100 fi
6101 fi
6102 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6103 if test -n "$cf_ldd_prog"; then
6104   echo "$as_me:6104: result: $cf_ldd_prog" >&5
6105 echo "${ECHO_T}$cf_ldd_prog" >&6
6106 else
6107   echo "$as_me:6107: result: no" >&5
6108 echo "${ECHO_T}no" >&6
6109 fi
6110
6111   test -n "$cf_ldd_prog" && break
6112 done
6113 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6114
6115         cf_rpath_list="/usr/lib /lib"
6116         if test "$cf_ldd_prog" != no
6117         then
6118                 cf_rpath_oops=
6119
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main ()
6126 {
6127 printf("Hello");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6145                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152                 # If we passed the link-test, but get a "not found" on a given library,
6153                 # this could be due to inept reconfiguration of gcc to make it only
6154                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6155                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6156                 # /usr/local libraries.
6157                 if test -n "$cf_rpath_oops"
6158                 then
6159                         for cf_rpath_src in $cf_rpath_oops
6160                         do
6161                                 for cf_rpath_dir in \
6162                                         /usr/local \
6163                                         /usr/pkg \
6164                                         /opt/sfw
6165                                 do
6166                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6167                                         then
6168                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6169
6170 echo "${as_me:-configure}:6170: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6171
6172                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6173                                                 break
6174                                         fi
6175                                 done
6176                         done
6177                 fi
6178         fi
6179
6180         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6187
6188 cf_rpath_dst=
6189 for cf_rpath_src in $LDFLAGS
6190 do
6191         case $cf_rpath_src in #(vi
6192         -L*) #(vi
6193
6194                 # check if this refers to a directory which we will ignore
6195                 cf_rpath_skip=no
6196                 if test -n "$cf_rpath_list"
6197                 then
6198                         for cf_rpath_item in $cf_rpath_list
6199                         do
6200                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6201                                 then
6202                                         cf_rpath_skip=yes
6203                                         break
6204                                 fi
6205                         done
6206                 fi
6207
6208                 if test "$cf_rpath_skip" = no
6209                 then
6210                         # transform the option
6211                         if test "$LD_RPATH_OPT" = "-R " ; then
6212                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6213                         else
6214                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6215                         fi
6216
6217                         # if we have not already added this, add it now
6218                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6219                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6220                         then
6221                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6222
6223 echo "${as_me:-configure}:6223: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6224
6225                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6226                         fi
6227                 fi
6228                 ;;
6229         esac
6230         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6231 done
6232 LDFLAGS=$cf_rpath_dst
6233
6234 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LIBS $LIBS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LIBS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LIBS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LIBS $LIBS ..." 1>&5
6291
6292         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6295
6296 fi
6297
6298 fi
6299
6300 fi
6301
6302 ###############################################################################
6303
6304 ###     use option --disable-overwrite to leave out the link to -lcurses
6305 echo "$as_me:6305: checking if you wish to install ncurses overwriting curses" >&5
6306 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6307
6308 # Check whether --enable-overwrite or --disable-overwrite was given.
6309 if test "${enable_overwrite+set}" = set; then
6310   enableval="$enable_overwrite"
6311   with_overwrite=$enableval
6312 else
6313   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6314 fi;
6315 echo "$as_me:6315: result: $with_overwrite" >&5
6316 echo "${ECHO_T}$with_overwrite" >&6
6317
6318 echo "$as_me:6318: checking if external terminfo-database is used" >&5
6319 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6320
6321 # Check whether --enable-database or --disable-database was given.
6322 if test "${enable_database+set}" = set; then
6323   enableval="$enable_database"
6324   use_database=$enableval
6325 else
6326   use_database=yes
6327 fi;
6328 echo "$as_me:6328: result: $use_database" >&5
6329 echo "${ECHO_T}$use_database" >&6
6330
6331 case $host_os in #(vi
6332 os2*) #(vi
6333         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6334         ;;
6335 *) #(vi
6336         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6337         ;;
6338 esac
6339
6340 if test "$use_database" != no ; then
6341         cat >>confdefs.h <<\EOF
6342 #define USE_DATABASE 1
6343 EOF
6344
6345         echo "$as_me:6345: checking which terminfo source-file will be installed" >&5
6346 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6347
6348 # Check whether --with-database or --without-database was given.
6349 if test "${with_database+set}" = set; then
6350   withval="$with_database"
6351   TERMINFO_SRC=$withval
6352 fi;
6353         echo "$as_me:6353: result: $TERMINFO_SRC" >&5
6354 echo "${ECHO_T}$TERMINFO_SRC" >&6
6355
6356         echo "$as_me:6356: checking whether to use hashed database instead of directory/tree" >&5
6357 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6358
6359 # Check whether --with-hashed-db or --without-hashed-db was given.
6360 if test "${with_hashed_db+set}" = set; then
6361   withval="$with_hashed_db"
6362
6363 else
6364   with_hashed_db=no
6365 fi;
6366         echo "$as_me:6366: result: $with_hashed_db" >&5
6367 echo "${ECHO_T}$with_hashed_db" >&6
6368 else
6369         with_hashed_db=no
6370 fi
6371
6372 echo "$as_me:6372: checking for list of fallback descriptions" >&5
6373 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6374
6375 # Check whether --with-fallbacks or --without-fallbacks was given.
6376 if test "${with_fallbacks+set}" = set; then
6377   withval="$with_fallbacks"
6378   with_fallback=$withval
6379 else
6380   with_fallback=
6381 fi;
6382 echo "$as_me:6382: result: $with_fallback" >&5
6383 echo "${ECHO_T}$with_fallback" >&6
6384 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6385
6386 echo "$as_me:6386: checking if you want modern xterm or antique" >&5
6387 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6388
6389 # Check whether --with-xterm-new or --without-xterm-new was given.
6390 if test "${with_xterm_new+set}" = set; then
6391   withval="$with_xterm_new"
6392   with_xterm_new=$withval
6393 else
6394   with_xterm_new=yes
6395 fi;
6396 case $with_xterm_new in
6397 no)     with_xterm_new=xterm-old;;
6398 *)      with_xterm_new=xterm-new;;
6399 esac
6400 echo "$as_me:6400: result: $with_xterm_new" >&5
6401 echo "${ECHO_T}$with_xterm_new" >&6
6402 WHICH_XTERM=$with_xterm_new
6403
6404 MAKE_TERMINFO=
6405 if test "$use_database" = no ; then
6406         TERMINFO="${datadir}/terminfo"
6407         MAKE_TERMINFO="#"
6408 else
6409
6410 echo "$as_me:6410: checking for list of terminfo directories" >&5
6411 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6412
6413         case $cf_cv_system_name in
6414         os2*)   PATH_SEPARATOR=';'  ;;
6415         *)      PATH_SEPARATOR=':'  ;;
6416         esac
6417
6418 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6419 if test "${with_terminfo_dirs+set}" = set; then
6420   withval="$with_terminfo_dirs"
6421
6422 else
6423   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6424 fi;
6425 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6426 cf_dst_path=
6427 for cf_src_path in $withval
6428 do
6429
6430 if test "x$prefix" != xNONE; then
6431   cf_path_syntax="$prefix"
6432 else
6433   cf_path_syntax="$ac_default_prefix"
6434 fi
6435
6436 case ".$cf_src_path" in #(vi
6437 .\$\(*\)*|.\'*\'*) #(vi
6438   ;;
6439 ..|./*|.\\*) #(vi
6440   ;;
6441 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6442   ;;
6443 .\${*prefix}*) #(vi
6444   eval cf_src_path="$cf_src_path"
6445   case ".$cf_src_path" in #(vi
6446   .NONE/*)
6447     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6448     ;;
6449   esac
6450   ;; #(vi
6451 .no|.NONE/*)
6452   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6453   ;;
6454 *)
6455   { { echo "$as_me:6455: error: expected a pathname, not \"$cf_src_path\"" >&5
6456 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6457    { (exit 1); exit 1; }; }
6458   ;;
6459 esac
6460
6461   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6462   cf_dst_path="${cf_dst_path}${cf_src_path}"
6463 done
6464 IFS="$ac_save_ifs"
6465
6466 eval 'TERMINFO_DIRS="$cf_dst_path"'
6467
6468 echo "$as_me:6468: result: $TERMINFO_DIRS" >&5
6469 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6470 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6471 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6472 EOF
6473
6474 echo "$as_me:6474: checking for default terminfo directory" >&5
6475 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6476
6477 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6478 if test "${with_default_terminfo_dir+set}" = set; then
6479   withval="$with_default_terminfo_dir"
6480
6481 else
6482   withval="${TERMINFO:-${datadir}/terminfo}"
6483 fi; if test -n "${datadir}/terminfo" ; then
6484
6485 if test "x$prefix" != xNONE; then
6486   cf_path_syntax="$prefix"
6487 else
6488   cf_path_syntax="$ac_default_prefix"
6489 fi
6490
6491 case ".$withval" in #(vi
6492 .\$\(*\)*|.\'*\'*) #(vi
6493   ;;
6494 ..|./*|.\\*) #(vi
6495   ;;
6496 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6497   ;;
6498 .\${*prefix}*) #(vi
6499   eval withval="$withval"
6500   case ".$withval" in #(vi
6501   .NONE/*)
6502     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6503     ;;
6504   esac
6505   ;; #(vi
6506 .no|.NONE/*)
6507   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6508   ;;
6509 *)
6510   { { echo "$as_me:6510: error: expected a pathname, not \"$withval\"" >&5
6511 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6512    { (exit 1); exit 1; }; }
6513   ;;
6514 esac
6515
6516 fi
6517 TERMINFO="$withval"
6518
6519 echo "$as_me:6519: result: $TERMINFO" >&5
6520 echo "${ECHO_T}$TERMINFO" >&6
6521 cat >>confdefs.h <<EOF
6522 #define TERMINFO "$TERMINFO"
6523 EOF
6524
6525 fi
6526
6527 ###     use option --disable-big-core to make tic run on small machines
6528 ###     We need 4Mb, check if we can allocate 50% more than that.
6529 echo "$as_me:6529: checking if big-core option selected" >&5
6530 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6531
6532 # Check whether --enable-big-core or --disable-big-core was given.
6533 if test "${enable_big_core+set}" = set; then
6534   enableval="$enable_big_core"
6535   with_big_core=$enableval
6536 else
6537   if test "$cross_compiling" = yes; then
6538   with_big_core=no
6539 else
6540   cat >conftest.$ac_ext <<_ACEOF
6541 #line 6541 "configure"
6542 #include "confdefs.h"
6543
6544 #include <stdlib.h>
6545 #include <string.h>
6546 int main() {
6547         unsigned long n = 6000000L;
6548         char *s = malloc(n);
6549         if (s != 0)
6550                 s[0] = s[n-1] = 0;
6551         ${cf_cv_main_return:-return}(s == 0);
6552 }
6553 _ACEOF
6554 rm -f conftest$ac_exeext
6555 if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
6556   (eval $ac_link) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6560   { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6561   (eval $ac_try) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); }; }; then
6565   with_big_core=yes
6566 else
6567   echo "$as_me: program exited with status $ac_status" >&5
6568 echo "$as_me: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 with_big_core=no
6571 fi
6572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6573 fi
6574 fi;
6575 echo "$as_me:6575: result: $with_big_core" >&5
6576 echo "${ECHO_T}$with_big_core" >&6
6577 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6578 #define HAVE_BIG_CORE 1
6579 EOF
6580
6581 ### ISO C only guarantees 512-char strings, we have tables which load faster
6582 ### when constructed using "big" strings.  More than the C compiler, the awk
6583 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6584 echo "$as_me:6584: checking if big-strings option selected" >&5
6585 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6586
6587 # Check whether --enable-big-strings or --disable-big-strings was given.
6588 if test "${enable_big_strings+set}" = set; then
6589   enableval="$enable_big_strings"
6590   with_big_strings=$enableval
6591 else
6592
6593         case x$AWK in #(vi
6594         x)
6595                 eval with_big_strings=no
6596                 ;;
6597         *) #(vi
6598                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6599                         | $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
6600                         eval with_big_strings=yes
6601                 else
6602                         eval with_big_strings=no
6603                 fi
6604                 ;;
6605         esac
6606
6607 fi;
6608 echo "$as_me:6608: result: $with_big_strings" >&5
6609 echo "${ECHO_T}$with_big_strings" >&6
6610
6611 USE_BIG_STRINGS=0
6612 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6613
6614 ###     use option --enable-termcap to compile in the termcap fallback support
6615 echo "$as_me:6615: checking if you want termcap-fallback support" >&5
6616 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6617
6618 # Check whether --enable-termcap or --disable-termcap was given.
6619 if test "${enable_termcap+set}" = set; then
6620   enableval="$enable_termcap"
6621   with_termcap=$enableval
6622 else
6623   with_termcap=no
6624 fi;
6625 echo "$as_me:6625: result: $with_termcap" >&5
6626 echo "${ECHO_T}$with_termcap" >&6
6627
6628 if test "$with_termcap" != "yes" ; then
6629         if test "$use_database" = no ; then
6630                 if test -z "$with_fallback" ; then
6631                         { { echo "$as_me:6631: error: You have disabled the database w/o specifying fallbacks" >&5
6632 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6633    { (exit 1); exit 1; }; }
6634                 fi
6635         fi
6636         cat >>confdefs.h <<\EOF
6637 #define PURE_TERMINFO 1
6638 EOF
6639
6640 else
6641
6642 if test "$with_ticlib" != no ; then
6643         { { echo "$as_me:6643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6644 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6645    { (exit 1); exit 1; }; }
6646 fi
6647
6648 cat >>confdefs.h <<\EOF
6649 #define USE_TERMCAP 1
6650 EOF
6651
6652 echo "$as_me:6652: checking for list of termcap files" >&5
6653 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6654
6655 # Check whether --with-termpath or --without-termpath was given.
6656 if test "${with_termpath+set}" = set; then
6657   withval="$with_termpath"
6658
6659 else
6660   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6661 fi;
6662 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6663 cf_dst_path=
6664 for cf_src_path in $withval
6665 do
6666
6667 if test "x$prefix" != xNONE; then
6668   cf_path_syntax="$prefix"
6669 else
6670   cf_path_syntax="$ac_default_prefix"
6671 fi
6672
6673 case ".$cf_src_path" in #(vi
6674 .\$\(*\)*|.\'*\'*) #(vi
6675   ;;
6676 ..|./*|.\\*) #(vi
6677   ;;
6678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6679   ;;
6680 .\${*prefix}*) #(vi
6681   eval cf_src_path="$cf_src_path"
6682   case ".$cf_src_path" in #(vi
6683   .NONE/*)
6684     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6685     ;;
6686   esac
6687   ;; #(vi
6688 .no|.NONE/*)
6689   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6690   ;;
6691 *)
6692   { { echo "$as_me:6692: error: expected a pathname, not \"$cf_src_path\"" >&5
6693 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6694    { (exit 1); exit 1; }; }
6695   ;;
6696 esac
6697
6698   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6699   cf_dst_path="${cf_dst_path}${cf_src_path}"
6700 done
6701 IFS="$ac_save_ifs"
6702
6703 eval 'TERMPATH="$cf_dst_path"'
6704
6705 echo "$as_me:6705: result: $TERMPATH" >&5
6706 echo "${ECHO_T}$TERMPATH" >&6
6707 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6708 #define TERMPATH "$TERMPATH"
6709 EOF
6710
6711 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6712 echo "$as_me:6712: checking if fast termcap-loader is needed" >&5
6713 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6714
6715 # Check whether --enable-getcap or --disable-getcap was given.
6716 if test "${enable_getcap+set}" = set; then
6717   enableval="$enable_getcap"
6718   with_getcap=$enableval
6719 else
6720   with_getcap=no
6721 fi;
6722 echo "$as_me:6722: result: $with_getcap" >&5
6723 echo "${ECHO_T}$with_getcap" >&6
6724 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6725 #define USE_GETCAP 1
6726 EOF
6727
6728 echo "$as_me:6728: checking if translated termcaps will be cached in ~/.terminfo" >&5
6729 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6730
6731 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6732 if test "${enable_getcap_cache+set}" = set; then
6733   enableval="$enable_getcap_cache"
6734   with_getcap_cache=$enableval
6735 else
6736   with_getcap_cache=no
6737 fi;
6738 echo "$as_me:6738: result: $with_getcap_cache" >&5
6739 echo "${ECHO_T}$with_getcap_cache" >&6
6740 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6741 #define USE_GETCAP_CACHE 1
6742 EOF
6743
6744 fi
6745
6746 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6747 echo "$as_me:6747: checking if ~/.terminfo is wanted" >&5
6748 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6749
6750 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6751 if test "${enable_home_terminfo+set}" = set; then
6752   enableval="$enable_home_terminfo"
6753   with_home_terminfo=$enableval
6754 else
6755   with_home_terminfo=yes
6756 fi;
6757 echo "$as_me:6757: result: $with_home_terminfo" >&5
6758 echo "${ECHO_T}$with_home_terminfo" >&6
6759 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6760 #define USE_HOME_TERMINFO 1
6761 EOF
6762
6763 echo "$as_me:6763: checking if you want to use restricted environment when running as root" >&5
6764 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6765
6766 # Check whether --enable-root-environ or --disable-root-environ was given.
6767 if test "${enable_root_environ+set}" = set; then
6768   enableval="$enable_root_environ"
6769   with_root_environ=$enableval
6770 else
6771   with_root_environ=yes
6772 fi;
6773 echo "$as_me:6773: result: $with_root_environ" >&5
6774 echo "${ECHO_T}$with_root_environ" >&6
6775 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6776 #define USE_ROOT_ENVIRON 1
6777 EOF
6778
6779 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6780 ###   to reduce storage requirements for the terminfo database.
6781
6782 for ac_func in \
6783         remove \
6784         unlink
6785 do
6786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6787 echo "$as_me:6787: checking for $ac_func" >&5
6788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6789 if eval "test \"\${$as_ac_var+set}\" = set"; then
6790   echo $ECHO_N "(cached) $ECHO_C" >&6
6791 else
6792   cat >conftest.$ac_ext <<_ACEOF
6793 #line 6793 "configure"
6794 #include "confdefs.h"
6795 /* System header to define __stub macros and hopefully few prototypes,
6796     which can conflict with char $ac_func (); below.  */
6797 #include <assert.h>
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 #ifdef __cplusplus
6800 extern "C"
6801 #endif
6802 /* We use char because int might match the return type of a gcc2
6803    builtin and then its argument prototype would still apply.  */
6804 char $ac_func ();
6805 char (*f) ();
6806
6807 int
6808 main ()
6809 {
6810 /* The GNU C library defines this for functions which it implements
6811     to always fail with ENOSYS.  Some functions are actually named
6812     something starting with __ and the normal name is an alias.  */
6813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6814 choke me
6815 #else
6816 f = $ac_func;
6817 #endif
6818
6819   ;
6820   return 0;
6821 }
6822 _ACEOF
6823 rm -f conftest.$ac_objext conftest$ac_exeext
6824 if { (eval echo "$as_me:6824: \"$ac_link\"") >&5
6825   (eval $ac_link) 2>&5
6826   ac_status=$?
6827   echo "$as_me:6827: \$? = $ac_status" >&5
6828   (exit $ac_status); } &&
6829          { ac_try='test -s conftest$ac_exeext'
6830   { (eval echo "$as_me:6830: \"$ac_try\"") >&5
6831   (eval $ac_try) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); }; }; then
6835   eval "$as_ac_var=yes"
6836 else
6837   echo "$as_me: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 eval "$as_ac_var=no"
6840 fi
6841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6842 fi
6843 echo "$as_me:6843: result: `eval echo '${'$as_ac_var'}'`" >&5
6844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6845 if test `eval echo '${'$as_ac_var'}'` = yes; then
6846   cat >>confdefs.h <<EOF
6847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6848 EOF
6849
6850 fi
6851 done
6852
6853 if test "$cross_compiling" = yes ; then
6854
6855 for ac_func in \
6856                 link \
6857                 symlink
6858 do
6859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6860 echo "$as_me:6860: checking for $ac_func" >&5
6861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6862 if eval "test \"\${$as_ac_var+set}\" = set"; then
6863   echo $ECHO_N "(cached) $ECHO_C" >&6
6864 else
6865   cat >conftest.$ac_ext <<_ACEOF
6866 #line 6866 "configure"
6867 #include "confdefs.h"
6868 /* System header to define __stub macros and hopefully few prototypes,
6869     which can conflict with char $ac_func (); below.  */
6870 #include <assert.h>
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 #ifdef __cplusplus
6873 extern "C"
6874 #endif
6875 /* We use char because int might match the return type of a gcc2
6876    builtin and then its argument prototype would still apply.  */
6877 char $ac_func ();
6878 char (*f) ();
6879
6880 int
6881 main ()
6882 {
6883 /* The GNU C library defines this for functions which it implements
6884     to always fail with ENOSYS.  Some functions are actually named
6885     something starting with __ and the normal name is an alias.  */
6886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6887 choke me
6888 #else
6889 f = $ac_func;
6890 #endif
6891
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   eval "$as_ac_var=yes"
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 eval "$as_ac_var=no"
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 fi
6916 echo "$as_me:6916: result: `eval echo '${'$as_ac_var'}'`" >&5
6917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6918 if test `eval echo '${'$as_ac_var'}'` = yes; then
6919   cat >>confdefs.h <<EOF
6920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 EOF
6922
6923 fi
6924 done
6925
6926 else
6927         echo "$as_me:6927: checking if link/symlink functions work" >&5
6928 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6929 if test "${cf_cv_link_funcs+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932
6933                 cf_cv_link_funcs=
6934                 for cf_func in link symlink ; do
6935                         if test "$cross_compiling" = yes; then
6936
6937                         eval 'ac_cv_func_'$cf_func'=error'
6938 else
6939   cat >conftest.$ac_ext <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6942
6943 #include <sys/types.h>
6944 #include <sys/stat.h>
6945 #ifdef HAVE_UNISTD_H
6946 #include <unistd.h>
6947 #endif
6948 int main()
6949 {
6950         int fail = 0;
6951         char *src = "config.log";
6952         char *dst = "conftest.chk";
6953         struct stat src_sb;
6954         struct stat dst_sb;
6955
6956         stat(src, &src_sb);
6957         fail = ($cf_func("config.log", "conftest.chk") < 0)
6958             || (stat(dst, &dst_sb) < 0)
6959             || (dst_sb.st_mtime != src_sb.st_mtime);
6960 #ifdef HAVE_UNLINK
6961         unlink(dst);
6962 #else
6963         remove(dst);
6964 #endif
6965         ${cf_cv_main_return:-return} (fail);
6966 }
6967
6968 _ACEOF
6969 rm -f conftest$ac_exeext
6970 if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
6971   (eval $ac_link) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6975   { (eval echo "$as_me:6975: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980
6981                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6982                         eval 'ac_cv_func_'$cf_func'=yes'
6983 else
6984   echo "$as_me: program exited with status $ac_status" >&5
6985 echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987
6988                         eval 'ac_cv_func_'$cf_func'=no'
6989 fi
6990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6991 fi
6992                 done
6993                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_link_funcs" >&5
6997 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6998         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6999 #define HAVE_LINK 1
7000 EOF
7001
7002         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7003 #define HAVE_SYMLINK 1
7004 EOF
7005
7006 fi
7007
7008 with_links=no
7009 with_symlinks=no
7010
7011 # soft links (symbolic links) are useful for some systems where hard links do
7012 # not work, or to make it simpler to copy terminfo trees around.
7013 if test "$ac_cv_func_symlink" = yes ; then
7014     echo "$as_me:7014: checking if tic should use symbolic links" >&5
7015 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7016
7017 # Check whether --enable-symlinks or --disable-symlinks was given.
7018 if test "${enable_symlinks+set}" = set; then
7019   enableval="$enable_symlinks"
7020   with_symlinks=$enableval
7021 else
7022   with_symlinks=no
7023 fi;
7024     echo "$as_me:7024: result: $with_symlinks" >&5
7025 echo "${ECHO_T}$with_symlinks" >&6
7026 fi
7027
7028 # If we have hard links and did not choose to use soft links instead, there is
7029 # no reason to make this choice optional - use the hard links.
7030 if test "$with_symlinks" = no ; then
7031     echo "$as_me:7031: checking if tic should use hard links" >&5
7032 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7033     if test "$ac_cv_func_link" = yes ; then
7034         with_links=yes
7035     else
7036         with_links=no
7037     fi
7038     echo "$as_me:7038: result: $with_links" >&5
7039 echo "${ECHO_T}$with_links" >&6
7040 fi
7041
7042 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7043 #define USE_LINKS 1
7044 EOF
7045
7046 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7047 #define USE_SYMLINKS 1
7048 EOF
7049
7050 ###   use option --enable-broken-linker to force on use of broken-linker support
7051 echo "$as_me:7051: checking if you want broken-linker support code" >&5
7052 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7053
7054 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7055 if test "${enable_broken_linker+set}" = set; then
7056   enableval="$enable_broken_linker"
7057   with_broken_linker=$enableval
7058 else
7059   with_broken_linker=${BROKEN_LINKER:-no}
7060 fi;
7061 echo "$as_me:7061: result: $with_broken_linker" >&5
7062 echo "${ECHO_T}$with_broken_linker" >&6
7063
7064 BROKEN_LINKER=0
7065 if test "$with_broken_linker" = yes ; then
7066         cat >>confdefs.h <<\EOF
7067 #define BROKEN_LINKER 1
7068 EOF
7069
7070         BROKEN_LINKER=1
7071 elif test "$DFT_LWR_MODEL" = shared ; then
7072         case $cf_cv_system_name in #(vi
7073         cygwin*)
7074                 cat >>confdefs.h <<\EOF
7075 #define BROKEN_LINKER 1
7076 EOF
7077
7078                 BROKEN_LINKER=1
7079                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7080
7081 echo "${as_me:-configure}:7081: testing cygwin linker is broken anyway ..." 1>&5
7082
7083                 ;;
7084         esac
7085 fi
7086
7087 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7088 echo "$as_me:7088: checking if tputs should process BSD-style prefix padding" >&5
7089 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7090
7091 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7092 if test "${enable_bsdpad+set}" = set; then
7093   enableval="$enable_bsdpad"
7094   with_bsdpad=$enableval
7095 else
7096   with_bsdpad=no
7097 fi;
7098 echo "$as_me:7098: result: $with_bsdpad" >&5
7099 echo "${ECHO_T}$with_bsdpad" >&6
7100 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7101 #define BSD_TPUTS 1
7102 EOF
7103
7104 ###   use option --enable-widec to turn on use of wide-character support
7105 NCURSES_CH_T=chtype
7106 NCURSES_LIBUTF8=0
7107
7108 NEED_WCHAR_H=0
7109 NCURSES_MBSTATE_T=0
7110 NCURSES_WCHAR_T=0
7111 NCURSES_WINT_T=0
7112
7113 # Check to define _XOPEN_SOURCE "automatically"
7114
7115 cf_XOPEN_SOURCE=500
7116 cf_POSIX_C_SOURCE=199506L
7117 cf_xopen_source=
7118
7119 case $host_os in #(vi
7120 aix[4-7]*) #(vi
7121         cf_xopen_source="-D_ALL_SOURCE"
7122         ;;
7123 cygwin) #(vi
7124         cf_XOPEN_SOURCE=600
7125         ;;
7126 darwin[0-8].*) #(vi
7127         cf_xopen_source="-D_APPLE_C_SOURCE"
7128         ;;
7129 darwin*) #(vi
7130         cf_xopen_source="-D_DARWIN_C_SOURCE"
7131         ;;
7132 freebsd*|dragonfly*) #(vi
7133         # 5.x headers associate
7134         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7135         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7136         cf_POSIX_C_SOURCE=200112L
7137         cf_XOPEN_SOURCE=600
7138         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7139         ;;
7140 hpux11*) #(vi
7141         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7142         ;;
7143 hpux*) #(vi
7144         cf_xopen_source="-D_HPUX_SOURCE"
7145         ;;
7146 irix[56].*) #(vi
7147         cf_xopen_source="-D_SGI_SOURCE"
7148         ;;
7149 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7150
7151 echo "$as_me:7151: checking if we must define _GNU_SOURCE" >&5
7152 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7153 if test "${cf_cv_gnu_source+set}" = set; then
7154   echo $ECHO_N "(cached) $ECHO_C" >&6
7155 else
7156
7157 cat >conftest.$ac_ext <<_ACEOF
7158 #line 7158 "configure"
7159 #include "confdefs.h"
7160 #include <sys/types.h>
7161 int
7162 main ()
7163 {
7164
7165 #ifndef _XOPEN_SOURCE
7166 make an error
7167 #endif
7168   ;
7169   return 0;
7170 }
7171 _ACEOF
7172 rm -f conftest.$ac_objext
7173 if { (eval echo "$as_me:7173: \"$ac_compile\"") >&5
7174   (eval $ac_compile) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } &&
7178          { ac_try='test -s conftest.$ac_objext'
7179   { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180   (eval $ac_try) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); }; }; then
7184   cf_cv_gnu_source=no
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 cf_save="$CPPFLAGS"
7189          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7190          cat >conftest.$ac_ext <<_ACEOF
7191 #line 7191 "configure"
7192 #include "confdefs.h"
7193 #include <sys/types.h>
7194 int
7195 main ()
7196 {
7197
7198 #ifdef _XOPEN_SOURCE
7199 make an error
7200 #endif
7201   ;
7202   return 0;
7203 }
7204 _ACEOF
7205 rm -f conftest.$ac_objext
7206 if { (eval echo "$as_me:7206: \"$ac_compile\"") >&5
7207   (eval $ac_compile) 2>&5
7208   ac_status=$?
7209   echo "$as_me:7209: \$? = $ac_status" >&5
7210   (exit $ac_status); } &&
7211          { ac_try='test -s conftest.$ac_objext'
7212   { (eval echo "$as_me:7212: \"$ac_try\"") >&5
7213   (eval $ac_try) 2>&5
7214   ac_status=$?
7215   echo "$as_me:7215: \$? = $ac_status" >&5
7216   (exit $ac_status); }; }; then
7217   cf_cv_gnu_source=no
7218 else
7219   echo "$as_me: failed program was:" >&5
7220 cat conftest.$ac_ext >&5
7221 cf_cv_gnu_source=yes
7222 fi
7223 rm -f conftest.$ac_objext conftest.$ac_ext
7224         CPPFLAGS="$cf_save"
7225
7226 fi
7227 rm -f conftest.$ac_objext conftest.$ac_ext
7228
7229 fi
7230 echo "$as_me:7230: result: $cf_cv_gnu_source" >&5
7231 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7232 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7233
7234         ;;
7235 mirbsd*) #(vi
7236         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7237         ;;
7238 netbsd*) #(vi
7239         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7240         ;;
7241 openbsd*) #(vi
7242         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7243         ;;
7244 osf[45]*) #(vi
7245         cf_xopen_source="-D_OSF_SOURCE"
7246         ;;
7247 nto-qnx*) #(vi
7248         cf_xopen_source="-D_QNX_SOURCE"
7249         ;;
7250 sco*) #(vi
7251         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7252         ;;
7253 solaris2.*) #(vi
7254         cf_xopen_source="-D__EXTENSIONS__"
7255         ;;
7256 *)
7257
7258 echo "$as_me:7258: checking if we should define _XOPEN_SOURCE" >&5
7259 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7260 if test "${cf_cv_xopen_source+set}" = set; then
7261   echo $ECHO_N "(cached) $ECHO_C" >&6
7262 else
7263
7264         cat >conftest.$ac_ext <<_ACEOF
7265 #line 7265 "configure"
7266 #include "confdefs.h"
7267
7268 #include <stdlib.h>
7269 #include <string.h>
7270 #include <sys/types.h>
7271
7272 int
7273 main ()
7274 {
7275
7276 #ifndef _XOPEN_SOURCE
7277 make an error
7278 #endif
7279   ;
7280   return 0;
7281 }
7282 _ACEOF
7283 rm -f conftest.$ac_objext
7284 if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5
7285   (eval $ac_compile) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); } &&
7289          { ac_try='test -s conftest.$ac_objext'
7290   { (eval echo "$as_me:7290: \"$ac_try\"") >&5
7291   (eval $ac_try) 2>&5
7292   ac_status=$?
7293   echo "$as_me:7293: \$? = $ac_status" >&5
7294   (exit $ac_status); }; }; then
7295   cf_cv_xopen_source=no
7296 else
7297   echo "$as_me: failed program was:" >&5
7298 cat conftest.$ac_ext >&5
7299 cf_save="$CPPFLAGS"
7300          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7301          cat >conftest.$ac_ext <<_ACEOF
7302 #line 7302 "configure"
7303 #include "confdefs.h"
7304
7305 #include <stdlib.h>
7306 #include <string.h>
7307 #include <sys/types.h>
7308
7309 int
7310 main ()
7311 {
7312
7313 #ifdef _XOPEN_SOURCE
7314 make an error
7315 #endif
7316   ;
7317   return 0;
7318 }
7319 _ACEOF
7320 rm -f conftest.$ac_objext
7321 if { (eval echo "$as_me:7321: \"$ac_compile\"") >&5
7322   (eval $ac_compile) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); } &&
7326          { ac_try='test -s conftest.$ac_objext'
7327   { (eval echo "$as_me:7327: \"$ac_try\"") >&5
7328   (eval $ac_try) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); }; }; then
7332   cf_cv_xopen_source=no
7333 else
7334   echo "$as_me: failed program was:" >&5
7335 cat conftest.$ac_ext >&5
7336 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7337 fi
7338 rm -f conftest.$ac_objext conftest.$ac_ext
7339         CPPFLAGS="$cf_save"
7340
7341 fi
7342 rm -f conftest.$ac_objext conftest.$ac_ext
7343
7344 fi
7345 echo "$as_me:7345: result: $cf_cv_xopen_source" >&5
7346 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7347
7348 if test "$cf_cv_xopen_source" != no ; then
7349
7350 CFLAGS=`echo "$CFLAGS" | \
7351         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7352                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7353
7354 CPPFLAGS=`echo "$CPPFLAGS" | \
7355         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7356                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7357
7358         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7359
7360 cf_fix_cppflags=no
7361 cf_new_cflags=
7362 cf_new_cppflags=
7363 cf_new_extra_cppflags=
7364
7365 for cf_add_cflags in $cf_temp_xopen_source
7366 do
7367 case $cf_fix_cppflags in
7368 no)
7369         case $cf_add_cflags in #(vi
7370         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7371                 case $cf_add_cflags in
7372                 -D*)
7373                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7374
7375                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7376                                 && test -z "${cf_tst_cflags}" \
7377                                 && cf_fix_cppflags=yes
7378
7379                         if test $cf_fix_cppflags = yes ; then
7380                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7381                                 continue
7382                         elif test "${cf_tst_cflags}" = "\"'" ; then
7383                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7384                                 continue
7385                         fi
7386                         ;;
7387                 esac
7388                 case "$CPPFLAGS" in
7389                 *$cf_add_cflags) #(vi
7390                         ;;
7391                 *) #(vi
7392                         case $cf_add_cflags in #(vi
7393                         -D*)
7394                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7395
7396 CPPFLAGS=`echo "$CPPFLAGS" | \
7397         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7398                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7399
7400                                 ;;
7401                         esac
7402                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7403                         ;;
7404                 esac
7405                 ;;
7406         *)
7407                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7408                 ;;
7409         esac
7410         ;;
7411 yes)
7412         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7413
7414         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7415
7416         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7417                 && test -z "${cf_tst_cflags}" \
7418                 && cf_fix_cppflags=no
7419         ;;
7420 esac
7421 done
7422
7423 if test -n "$cf_new_cflags" ; then
7424
7425         CFLAGS="$CFLAGS $cf_new_cflags"
7426 fi
7427
7428 if test -n "$cf_new_cppflags" ; then
7429
7430         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7431 fi
7432
7433 if test -n "$cf_new_extra_cppflags" ; then
7434
7435         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7436 fi
7437
7438 fi
7439
7440 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7441
7442 cf_save_CFLAGS="$CFLAGS"
7443 cf_save_CPPFLAGS="$CPPFLAGS"
7444
7445 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7446         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7447                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7448
7449 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7450         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7451                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7452
7453 echo "$as_me:7453: checking if we should define _POSIX_C_SOURCE" >&5
7454 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7455 if test "${cf_cv_posix_c_source+set}" = set; then
7456   echo $ECHO_N "(cached) $ECHO_C" >&6
7457 else
7458
7459 echo "${as_me:-configure}:7459: testing if the symbol is already defined go no further ..." 1>&5
7460
7461         cat >conftest.$ac_ext <<_ACEOF
7462 #line 7462 "configure"
7463 #include "confdefs.h"
7464 #include <sys/types.h>
7465 int
7466 main ()
7467 {
7468
7469 #ifndef _POSIX_C_SOURCE
7470 make an error
7471 #endif
7472   ;
7473   return 0;
7474 }
7475 _ACEOF
7476 rm -f conftest.$ac_objext
7477 if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5
7478   (eval $ac_compile) 2>&5
7479   ac_status=$?
7480   echo "$as_me:7480: \$? = $ac_status" >&5
7481   (exit $ac_status); } &&
7482          { ac_try='test -s conftest.$ac_objext'
7483   { (eval echo "$as_me:7483: \"$ac_try\"") >&5
7484   (eval $ac_try) 2>&5
7485   ac_status=$?
7486   echo "$as_me:7486: \$? = $ac_status" >&5
7487   (exit $ac_status); }; }; then
7488   cf_cv_posix_c_source=no
7489 else
7490   echo "$as_me: failed program was:" >&5
7491 cat conftest.$ac_ext >&5
7492 cf_want_posix_source=no
7493          case .$cf_POSIX_C_SOURCE in #(vi
7494          .[12]??*) #(vi
7495                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7496                 ;;
7497          .2) #(vi
7498                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7499                 cf_want_posix_source=yes
7500                 ;;
7501          .*)
7502                 cf_want_posix_source=yes
7503                 ;;
7504          esac
7505          if test "$cf_want_posix_source" = yes ; then
7506                 cat >conftest.$ac_ext <<_ACEOF
7507 #line 7507 "configure"
7508 #include "confdefs.h"
7509 #include <sys/types.h>
7510 int
7511 main ()
7512 {
7513
7514 #ifdef _POSIX_SOURCE
7515 make an error
7516 #endif
7517   ;
7518   return 0;
7519 }
7520 _ACEOF
7521 rm -f conftest.$ac_objext
7522 if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
7523   (eval $ac_compile) 2>&5
7524   ac_status=$?
7525   echo "$as_me:7525: \$? = $ac_status" >&5
7526   (exit $ac_status); } &&
7527          { ac_try='test -s conftest.$ac_objext'
7528   { (eval echo "$as_me:7528: \"$ac_try\"") >&5
7529   (eval $ac_try) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit $ac_status); }; }; then
7533   :
7534 else
7535   echo "$as_me: failed program was:" >&5
7536 cat conftest.$ac_ext >&5
7537 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7538 fi
7539 rm -f conftest.$ac_objext conftest.$ac_ext
7540          fi
7541
7542 echo "${as_me:-configure}:7542: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7543
7544          CFLAGS="$cf_trim_CFLAGS"
7545          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7546
7547 echo "${as_me:-configure}:7547: testing if the second compile does not leave our definition intact error ..." 1>&5
7548
7549          cat >conftest.$ac_ext <<_ACEOF
7550 #line 7550 "configure"
7551 #include "confdefs.h"
7552 #include <sys/types.h>
7553 int
7554 main ()
7555 {
7556
7557 #ifndef _POSIX_C_SOURCE
7558 make an error
7559 #endif
7560   ;
7561   return 0;
7562 }
7563 _ACEOF
7564 rm -f conftest.$ac_objext
7565 if { (eval echo "$as_me:7565: \"$ac_compile\"") >&5
7566   (eval $ac_compile) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); } &&
7570          { ac_try='test -s conftest.$ac_objext'
7571   { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7572   (eval $ac_try) 2>&5
7573   ac_status=$?
7574   echo "$as_me:7574: \$? = $ac_status" >&5
7575   (exit $ac_status); }; }; then
7576   :
7577 else
7578   echo "$as_me: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 cf_cv_posix_c_source=no
7581 fi
7582 rm -f conftest.$ac_objext conftest.$ac_ext
7583          CFLAGS="$cf_save_CFLAGS"
7584          CPPFLAGS="$cf_save_CPPFLAGS"
7585
7586 fi
7587 rm -f conftest.$ac_objext conftest.$ac_ext
7588
7589 fi
7590 echo "$as_me:7590: result: $cf_cv_posix_c_source" >&5
7591 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7592
7593 if test "$cf_cv_posix_c_source" != no ; then
7594         CFLAGS="$cf_trim_CFLAGS"
7595         CPPFLAGS="$cf_trim_CPPFLAGS"
7596
7597 cf_fix_cppflags=no
7598 cf_new_cflags=
7599 cf_new_cppflags=
7600 cf_new_extra_cppflags=
7601
7602 for cf_add_cflags in $cf_cv_posix_c_source
7603 do
7604 case $cf_fix_cppflags in
7605 no)
7606         case $cf_add_cflags in #(vi
7607         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7608                 case $cf_add_cflags in
7609                 -D*)
7610                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7611
7612                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7613                                 && test -z "${cf_tst_cflags}" \
7614                                 && cf_fix_cppflags=yes
7615
7616                         if test $cf_fix_cppflags = yes ; then
7617                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7618                                 continue
7619                         elif test "${cf_tst_cflags}" = "\"'" ; then
7620                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7621                                 continue
7622                         fi
7623                         ;;
7624                 esac
7625                 case "$CPPFLAGS" in
7626                 *$cf_add_cflags) #(vi
7627                         ;;
7628                 *) #(vi
7629                         case $cf_add_cflags in #(vi
7630                         -D*)
7631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7632
7633 CPPFLAGS=`echo "$CPPFLAGS" | \
7634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7636
7637                                 ;;
7638                         esac
7639                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7640                         ;;
7641                 esac
7642                 ;;
7643         *)
7644                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7645                 ;;
7646         esac
7647         ;;
7648 yes)
7649         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7650
7651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7652
7653         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7654                 && test -z "${cf_tst_cflags}" \
7655                 && cf_fix_cppflags=no
7656         ;;
7657 esac
7658 done
7659
7660 if test -n "$cf_new_cflags" ; then
7661
7662         CFLAGS="$CFLAGS $cf_new_cflags"
7663 fi
7664
7665 if test -n "$cf_new_cppflags" ; then
7666
7667         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7668 fi
7669
7670 if test -n "$cf_new_extra_cppflags" ; then
7671
7672         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7673 fi
7674
7675 fi
7676
7677         ;;
7678 esac
7679
7680 if test -n "$cf_xopen_source" ; then
7681
7682 cf_fix_cppflags=no
7683 cf_new_cflags=
7684 cf_new_cppflags=
7685 cf_new_extra_cppflags=
7686
7687 for cf_add_cflags in $cf_xopen_source
7688 do
7689 case $cf_fix_cppflags in
7690 no)
7691         case $cf_add_cflags in #(vi
7692         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7693                 case $cf_add_cflags in
7694                 -D*)
7695                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7696
7697                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7698                                 && test -z "${cf_tst_cflags}" \
7699                                 && cf_fix_cppflags=yes
7700
7701                         if test $cf_fix_cppflags = yes ; then
7702                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7703                                 continue
7704                         elif test "${cf_tst_cflags}" = "\"'" ; then
7705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7706                                 continue
7707                         fi
7708                         ;;
7709                 esac
7710                 case "$CPPFLAGS" in
7711                 *$cf_add_cflags) #(vi
7712                         ;;
7713                 *) #(vi
7714                         case $cf_add_cflags in #(vi
7715                         -D*)
7716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7717
7718 CPPFLAGS=`echo "$CPPFLAGS" | \
7719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7721
7722                                 ;;
7723                         esac
7724                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7725                         ;;
7726                 esac
7727                 ;;
7728         *)
7729                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7730                 ;;
7731         esac
7732         ;;
7733 yes)
7734         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7735
7736         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7737
7738         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7739                 && test -z "${cf_tst_cflags}" \
7740                 && cf_fix_cppflags=no
7741         ;;
7742 esac
7743 done
7744
7745 if test -n "$cf_new_cflags" ; then
7746
7747         CFLAGS="$CFLAGS $cf_new_cflags"
7748 fi
7749
7750 if test -n "$cf_new_cppflags" ; then
7751
7752         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7753 fi
7754
7755 if test -n "$cf_new_extra_cppflags" ; then
7756
7757         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7758 fi
7759
7760 fi
7761
7762 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7763         echo "$as_me:7763: checking if _XOPEN_SOURCE really is set" >&5
7764 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7765         cat >conftest.$ac_ext <<_ACEOF
7766 #line 7766 "configure"
7767 #include "confdefs.h"
7768 #include <stdlib.h>
7769 int
7770 main ()
7771 {
7772
7773 #ifndef _XOPEN_SOURCE
7774 make an error
7775 #endif
7776   ;
7777   return 0;
7778 }
7779 _ACEOF
7780 rm -f conftest.$ac_objext
7781 if { (eval echo "$as_me:7781: \"$ac_compile\"") >&5
7782   (eval $ac_compile) 2>&5
7783   ac_status=$?
7784   echo "$as_me:7784: \$? = $ac_status" >&5
7785   (exit $ac_status); } &&
7786          { ac_try='test -s conftest.$ac_objext'
7787   { (eval echo "$as_me:7787: \"$ac_try\"") >&5
7788   (eval $ac_try) 2>&5
7789   ac_status=$?
7790   echo "$as_me:7790: \$? = $ac_status" >&5
7791   (exit $ac_status); }; }; then
7792   cf_XOPEN_SOURCE_set=yes
7793 else
7794   echo "$as_me: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7796 cf_XOPEN_SOURCE_set=no
7797 fi
7798 rm -f conftest.$ac_objext conftest.$ac_ext
7799         echo "$as_me:7799: result: $cf_XOPEN_SOURCE_set" >&5
7800 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7801         if test $cf_XOPEN_SOURCE_set = yes
7802         then
7803                 cat >conftest.$ac_ext <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7806 #include <stdlib.h>
7807 int
7808 main ()
7809 {
7810
7811 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7812 make an error
7813 #endif
7814   ;
7815   return 0;
7816 }
7817 _ACEOF
7818 rm -f conftest.$ac_objext
7819 if { (eval echo "$as_me:7819: \"$ac_compile\"") >&5
7820   (eval $ac_compile) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); } &&
7824          { ac_try='test -s conftest.$ac_objext'
7825   { (eval echo "$as_me:7825: \"$ac_try\"") >&5
7826   (eval $ac_try) 2>&5
7827   ac_status=$?
7828   echo "$as_me:7828: \$? = $ac_status" >&5
7829   (exit $ac_status); }; }; then
7830   cf_XOPEN_SOURCE_set_ok=yes
7831 else
7832   echo "$as_me: failed program was:" >&5
7833 cat conftest.$ac_ext >&5
7834 cf_XOPEN_SOURCE_set_ok=no
7835 fi
7836 rm -f conftest.$ac_objext conftest.$ac_ext
7837                 if test $cf_XOPEN_SOURCE_set_ok = no
7838                 then
7839                         { echo "$as_me:7839: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7840 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7841                 fi
7842         else
7843
7844 echo "$as_me:7844: checking if we should define _XOPEN_SOURCE" >&5
7845 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7846 if test "${cf_cv_xopen_source+set}" = set; then
7847   echo $ECHO_N "(cached) $ECHO_C" >&6
7848 else
7849
7850         cat >conftest.$ac_ext <<_ACEOF
7851 #line 7851 "configure"
7852 #include "confdefs.h"
7853
7854 #include <stdlib.h>
7855 #include <string.h>
7856 #include <sys/types.h>
7857
7858 int
7859 main ()
7860 {
7861
7862 #ifndef _XOPEN_SOURCE
7863 make an error
7864 #endif
7865   ;
7866   return 0;
7867 }
7868 _ACEOF
7869 rm -f conftest.$ac_objext
7870 if { (eval echo "$as_me:7870: \"$ac_compile\"") >&5
7871   (eval $ac_compile) 2>&5
7872   ac_status=$?
7873   echo "$as_me:7873: \$? = $ac_status" >&5
7874   (exit $ac_status); } &&
7875          { ac_try='test -s conftest.$ac_objext'
7876   { (eval echo "$as_me:7876: \"$ac_try\"") >&5
7877   (eval $ac_try) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit $ac_status); }; }; then
7881   cf_cv_xopen_source=no
7882 else
7883   echo "$as_me: failed program was:" >&5
7884 cat conftest.$ac_ext >&5
7885 cf_save="$CPPFLAGS"
7886          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7887          cat >conftest.$ac_ext <<_ACEOF
7888 #line 7888 "configure"
7889 #include "confdefs.h"
7890
7891 #include <stdlib.h>
7892 #include <string.h>
7893 #include <sys/types.h>
7894
7895 int
7896 main ()
7897 {
7898
7899 #ifdef _XOPEN_SOURCE
7900 make an error
7901 #endif
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908   (eval $ac_compile) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest.$ac_objext'
7913   { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:7916: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   cf_cv_xopen_source=no
7919 else
7920   echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7923 fi
7924 rm -f conftest.$ac_objext conftest.$ac_ext
7925         CPPFLAGS="$cf_save"
7926
7927 fi
7928 rm -f conftest.$ac_objext conftest.$ac_ext
7929
7930 fi
7931 echo "$as_me:7931: result: $cf_cv_xopen_source" >&5
7932 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7933
7934 if test "$cf_cv_xopen_source" != no ; then
7935
7936 CFLAGS=`echo "$CFLAGS" | \
7937         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7938                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7939
7940 CPPFLAGS=`echo "$CPPFLAGS" | \
7941         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7942                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7943
7944         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7945
7946 cf_fix_cppflags=no
7947 cf_new_cflags=
7948 cf_new_cppflags=
7949 cf_new_extra_cppflags=
7950
7951 for cf_add_cflags in $cf_temp_xopen_source
7952 do
7953 case $cf_fix_cppflags in
7954 no)
7955         case $cf_add_cflags in #(vi
7956         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7957                 case $cf_add_cflags in
7958                 -D*)
7959                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7960
7961                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7962                                 && test -z "${cf_tst_cflags}" \
7963                                 && cf_fix_cppflags=yes
7964
7965                         if test $cf_fix_cppflags = yes ; then
7966                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7967                                 continue
7968                         elif test "${cf_tst_cflags}" = "\"'" ; then
7969                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7970                                 continue
7971                         fi
7972                         ;;
7973                 esac
7974                 case "$CPPFLAGS" in
7975                 *$cf_add_cflags) #(vi
7976                         ;;
7977                 *) #(vi
7978                         case $cf_add_cflags in #(vi
7979                         -D*)
7980                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7981
7982 CPPFLAGS=`echo "$CPPFLAGS" | \
7983         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7984                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7985
7986                                 ;;
7987                         esac
7988                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7989                         ;;
7990                 esac
7991                 ;;
7992         *)
7993                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7994                 ;;
7995         esac
7996         ;;
7997 yes)
7998         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7999
8000         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8001
8002         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8003                 && test -z "${cf_tst_cflags}" \
8004                 && cf_fix_cppflags=no
8005         ;;
8006 esac
8007 done
8008
8009 if test -n "$cf_new_cflags" ; then
8010
8011         CFLAGS="$CFLAGS $cf_new_cflags"
8012 fi
8013
8014 if test -n "$cf_new_cppflags" ; then
8015
8016         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8017 fi
8018
8019 if test -n "$cf_new_extra_cppflags" ; then
8020
8021         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8022 fi
8023
8024 fi
8025
8026         fi
8027 fi
8028
8029 # Work around breakage on OS X
8030
8031 echo "$as_me:8031: checking if SIGWINCH is defined" >&5
8032 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8033 if test "${cf_cv_define_sigwinch+set}" = set; then
8034   echo $ECHO_N "(cached) $ECHO_C" >&6
8035 else
8036
8037         cat >conftest.$ac_ext <<_ACEOF
8038 #line 8038 "configure"
8039 #include "confdefs.h"
8040
8041 #include <sys/types.h>
8042 #include <sys/signal.h>
8043
8044 int
8045 main ()
8046 {
8047 int x = SIGWINCH
8048   ;
8049   return 0;
8050 }
8051 _ACEOF
8052 rm -f conftest.$ac_objext
8053 if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
8054   (eval $ac_compile) 2>&5
8055   ac_status=$?
8056   echo "$as_me:8056: \$? = $ac_status" >&5
8057   (exit $ac_status); } &&
8058          { ac_try='test -s conftest.$ac_objext'
8059   { (eval echo "$as_me:8059: \"$ac_try\"") >&5
8060   (eval $ac_try) 2>&5
8061   ac_status=$?
8062   echo "$as_me:8062: \$? = $ac_status" >&5
8063   (exit $ac_status); }; }; then
8064   cf_cv_define_sigwinch=yes
8065 else
8066   echo "$as_me: failed program was:" >&5
8067 cat conftest.$ac_ext >&5
8068 cat >conftest.$ac_ext <<_ACEOF
8069 #line 8069 "configure"
8070 #include "confdefs.h"
8071
8072 #undef _XOPEN_SOURCE
8073 #undef _POSIX_SOURCE
8074 #undef _POSIX_C_SOURCE
8075 #include <sys/types.h>
8076 #include <sys/signal.h>
8077
8078 int
8079 main ()
8080 {
8081 int x = SIGWINCH
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_cv_define_sigwinch=maybe
8099 else
8100   echo "$as_me: failed program was:" >&5
8101 cat conftest.$ac_ext >&5
8102 cf_cv_define_sigwinch=no
8103 fi
8104 rm -f conftest.$ac_objext conftest.$ac_ext
8105
8106 fi
8107 rm -f conftest.$ac_objext conftest.$ac_ext
8108
8109 fi
8110 echo "$as_me:8110: result: $cf_cv_define_sigwinch" >&5
8111 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8112
8113 if test "$cf_cv_define_sigwinch" = maybe ; then
8114 echo "$as_me:8114: checking for actual SIGWINCH definition" >&5
8115 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8116 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8117   echo $ECHO_N "(cached) $ECHO_C" >&6
8118 else
8119
8120 cf_cv_fixup_sigwinch=unknown
8121 cf_sigwinch=32
8122 while test $cf_sigwinch != 1
8123 do
8124         cat >conftest.$ac_ext <<_ACEOF
8125 #line 8125 "configure"
8126 #include "confdefs.h"
8127
8128 #undef _XOPEN_SOURCE
8129 #undef _POSIX_SOURCE
8130 #undef _POSIX_C_SOURCE
8131 #include <sys/types.h>
8132 #include <sys/signal.h>
8133
8134 int
8135 main ()
8136 {
8137
8138 #if SIGWINCH != $cf_sigwinch
8139 make an error
8140 #endif
8141 int x = SIGWINCH
8142   ;
8143   return 0;
8144 }
8145 _ACEOF
8146 rm -f conftest.$ac_objext
8147 if { (eval echo "$as_me:8147: \"$ac_compile\"") >&5
8148   (eval $ac_compile) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); } &&
8152          { ac_try='test -s conftest.$ac_objext'
8153   { (eval echo "$as_me:8153: \"$ac_try\"") >&5
8154   (eval $ac_try) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); }; }; then
8158   cf_cv_fixup_sigwinch=$cf_sigwinch
8159          break
8160 else
8161   echo "$as_me: failed program was:" >&5
8162 cat conftest.$ac_ext >&5
8163 fi
8164 rm -f conftest.$ac_objext conftest.$ac_ext
8165
8166 cf_sigwinch=`expr $cf_sigwinch - 1`
8167 done
8168
8169 fi
8170 echo "$as_me:8170: result: $cf_cv_fixup_sigwinch" >&5
8171 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8172
8173         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8174                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8175         fi
8176 fi
8177
8178 # Checks for CODESET support.
8179
8180   echo "$as_me:8180: checking for nl_langinfo and CODESET" >&5
8181 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8182 if test "${am_cv_langinfo_codeset+set}" = set; then
8183   echo $ECHO_N "(cached) $ECHO_C" >&6
8184 else
8185   cat >conftest.$ac_ext <<_ACEOF
8186 #line 8186 "configure"
8187 #include "confdefs.h"
8188 #include <langinfo.h>
8189 int
8190 main ()
8191 {
8192 char* cs = nl_langinfo(CODESET);
8193   ;
8194   return 0;
8195 }
8196 _ACEOF
8197 rm -f conftest.$ac_objext conftest$ac_exeext
8198 if { (eval echo "$as_me:8198: \"$ac_link\"") >&5
8199   (eval $ac_link) 2>&5
8200   ac_status=$?
8201   echo "$as_me:8201: \$? = $ac_status" >&5
8202   (exit $ac_status); } &&
8203          { ac_try='test -s conftest$ac_exeext'
8204   { (eval echo "$as_me:8204: \"$ac_try\"") >&5
8205   (eval $ac_try) 2>&5
8206   ac_status=$?
8207   echo "$as_me:8207: \$? = $ac_status" >&5
8208   (exit $ac_status); }; }; then
8209   am_cv_langinfo_codeset=yes
8210 else
8211   echo "$as_me: failed program was:" >&5
8212 cat conftest.$ac_ext >&5
8213 am_cv_langinfo_codeset=no
8214 fi
8215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8216
8217 fi
8218 echo "$as_me:8218: result: $am_cv_langinfo_codeset" >&5
8219 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8220   if test $am_cv_langinfo_codeset = yes; then
8221
8222 cat >>confdefs.h <<\EOF
8223 #define HAVE_LANGINFO_CODESET 1
8224 EOF
8225
8226   fi
8227
8228 # use these variables to work around a defect in gcc's fixincludes.
8229 NCURSES_OK_WCHAR_T=
8230 NCURSES_OK_WINT_T=
8231
8232 echo "$as_me:8232: checking if you want wide-character code" >&5
8233 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8234
8235 # Check whether --enable-widec or --disable-widec was given.
8236 if test "${enable_widec+set}" = set; then
8237   enableval="$enable_widec"
8238   with_widec=$enableval
8239 else
8240   with_widec=no
8241 fi;
8242 echo "$as_me:8242: result: $with_widec" >&5
8243 echo "${ECHO_T}$with_widec" >&6
8244 if test "$with_widec" = yes ; then
8245         LIB_SUFFIX="w${LIB_SUFFIX}"
8246         cat >>confdefs.h <<\EOF
8247 #define USE_WIDEC_SUPPORT 1
8248 EOF
8249
8250         cat >>confdefs.h <<\EOF
8251 #define NCURSES_WIDECHAR 1
8252 EOF
8253
8254 echo "$as_me:8254: checking if wchar.h can be used as is" >&5
8255 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8256 if test "${cf_cv_wchar_h_okay+set}" = set; then
8257   echo $ECHO_N "(cached) $ECHO_C" >&6
8258 else
8259
8260 cat >conftest.$ac_ext <<_ACEOF
8261 #line 8261 "configure"
8262 #include "confdefs.h"
8263
8264 #include <stdlib.h>
8265 #include <wchar.h>
8266
8267 int
8268 main ()
8269 {
8270
8271         wint_t foo = 0;
8272         int bar = iswpunct(foo)
8273   ;
8274   return 0;
8275 }
8276 _ACEOF
8277 rm -f conftest.$ac_objext
8278 if { (eval echo "$as_me:8278: \"$ac_compile\"") >&5
8279   (eval $ac_compile) 2>&5
8280   ac_status=$?
8281   echo "$as_me:8281: \$? = $ac_status" >&5
8282   (exit $ac_status); } &&
8283          { ac_try='test -s conftest.$ac_objext'
8284   { (eval echo "$as_me:8284: \"$ac_try\"") >&5
8285   (eval $ac_try) 2>&5
8286   ac_status=$?
8287   echo "$as_me:8287: \$? = $ac_status" >&5
8288   (exit $ac_status); }; }; then
8289   cf_cv_wchar_h_okay=yes
8290 else
8291   echo "$as_me: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
8293 cf_cv_wchar_h_okay=no
8294 fi
8295 rm -f conftest.$ac_objext conftest.$ac_ext
8296 fi
8297 echo "$as_me:8297: result: $cf_cv_wchar_h_okay" >&5
8298 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8299
8300 if test $cf_cv_wchar_h_okay = no
8301 then
8302
8303 echo "$as_me:8303: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8304 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8305 cat >conftest.$ac_ext <<_ACEOF
8306 #line 8306 "configure"
8307 #include "confdefs.h"
8308 #include <sys/types.h>
8309
8310 int
8311 main ()
8312 {
8313
8314 #ifndef _XOPEN_SOURCE_EXTENDED
8315 make an error
8316 #endif
8317   ;
8318   return 0;
8319 }
8320 _ACEOF
8321 rm -f conftest.$ac_objext
8322 if { (eval echo "$as_me:8322: \"$ac_compile\"") >&5
8323   (eval $ac_compile) 2>&5
8324   ac_status=$?
8325   echo "$as_me:8325: \$? = $ac_status" >&5
8326   (exit $ac_status); } &&
8327          { ac_try='test -s conftest.$ac_objext'
8328   { (eval echo "$as_me:8328: \"$ac_try\"") >&5
8329   (eval $ac_try) 2>&5
8330   ac_status=$?
8331   echo "$as_me:8331: \$? = $ac_status" >&5
8332   (exit $ac_status); }; }; then
8333   cf_result=no
8334 else
8335   echo "$as_me: failed program was:" >&5
8336 cat conftest.$ac_ext >&5
8337 cf_result=yes
8338 fi
8339 rm -f conftest.$ac_objext conftest.$ac_ext
8340 echo "$as_me:8340: result: $cf_result" >&5
8341 echo "${ECHO_T}$cf_result" >&6
8342
8343 if test "$cf_result" = yes ; then
8344         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8345 elif test "x" != "x" ; then
8346         echo "$as_me:8346: checking checking for compatible value versus " >&5
8347 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8348         cat >conftest.$ac_ext <<_ACEOF
8349 #line 8349 "configure"
8350 #include "confdefs.h"
8351 #include <sys/types.h>
8352
8353 int
8354 main ()
8355 {
8356
8357 #if _XOPEN_SOURCE_EXTENDED- < 0
8358 make an error
8359 #endif
8360   ;
8361   return 0;
8362 }
8363 _ACEOF
8364 rm -f conftest.$ac_objext
8365 if { (eval echo "$as_me:8365: \"$ac_compile\"") >&5
8366   (eval $ac_compile) 2>&5
8367   ac_status=$?
8368   echo "$as_me:8368: \$? = $ac_status" >&5
8369   (exit $ac_status); } &&
8370          { ac_try='test -s conftest.$ac_objext'
8371   { (eval echo "$as_me:8371: \"$ac_try\"") >&5
8372   (eval $ac_try) 2>&5
8373   ac_status=$?
8374   echo "$as_me:8374: \$? = $ac_status" >&5
8375   (exit $ac_status); }; }; then
8376   cf_result=yes
8377 else
8378   echo "$as_me: failed program was:" >&5
8379 cat conftest.$ac_ext >&5
8380 cf_result=no
8381 fi
8382 rm -f conftest.$ac_objext conftest.$ac_ext
8383         echo "$as_me:8383: result: $cf_result" >&5
8384 echo "${ECHO_T}$cf_result" >&6
8385         if test "$cf_result" = no ; then
8386                 # perhaps we can override it - try...
8387                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8388         fi
8389 fi
8390
8391 fi
8392
8393         # with_overwrite=no
8394         NCURSES_CH_T=cchar_t
8395
8396 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8397 do
8398 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8399 echo "$as_me:8399: checking for $ac_func" >&5
8400 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8401 if eval "test \"\${$as_ac_var+set}\" = set"; then
8402   echo $ECHO_N "(cached) $ECHO_C" >&6
8403 else
8404   cat >conftest.$ac_ext <<_ACEOF
8405 #line 8405 "configure"
8406 #include "confdefs.h"
8407 /* System header to define __stub macros and hopefully few prototypes,
8408     which can conflict with char $ac_func (); below.  */
8409 #include <assert.h>
8410 /* Override any gcc2 internal prototype to avoid an error.  */
8411 #ifdef __cplusplus
8412 extern "C"
8413 #endif
8414 /* We use char because int might match the return type of a gcc2
8415    builtin and then its argument prototype would still apply.  */
8416 char $ac_func ();
8417 char (*f) ();
8418
8419 int
8420 main ()
8421 {
8422 /* The GNU C library defines this for functions which it implements
8423     to always fail with ENOSYS.  Some functions are actually named
8424     something starting with __ and the normal name is an alias.  */
8425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8426 choke me
8427 #else
8428 f = $ac_func;
8429 #endif
8430
8431   ;
8432   return 0;
8433 }
8434 _ACEOF
8435 rm -f conftest.$ac_objext conftest$ac_exeext
8436 if { (eval echo "$as_me:8436: \"$ac_link\"") >&5
8437   (eval $ac_link) 2>&5
8438   ac_status=$?
8439   echo "$as_me:8439: \$? = $ac_status" >&5
8440   (exit $ac_status); } &&
8441          { ac_try='test -s conftest$ac_exeext'
8442   { (eval echo "$as_me:8442: \"$ac_try\"") >&5
8443   (eval $ac_try) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit $ac_status); }; }; then
8447   eval "$as_ac_var=yes"
8448 else
8449   echo "$as_me: failed program was:" >&5
8450 cat conftest.$ac_ext >&5
8451 eval "$as_ac_var=no"
8452 fi
8453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8454 fi
8455 echo "$as_me:8455: result: `eval echo '${'$as_ac_var'}'`" >&5
8456 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8457 if test `eval echo '${'$as_ac_var'}'` = yes; then
8458   cat >>confdefs.h <<EOF
8459 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8460 EOF
8461
8462 fi
8463 done
8464
8465         if test "$ac_cv_func_putwc" != yes ; then
8466
8467 echo "$as_me:8467: checking for multibyte character support" >&5
8468 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8469 if test "${cf_cv_utf8_lib+set}" = set; then
8470   echo $ECHO_N "(cached) $ECHO_C" >&6
8471 else
8472
8473         cf_save_LIBS="$LIBS"
8474         cat >conftest.$ac_ext <<_ACEOF
8475 #line 8475 "configure"
8476 #include "confdefs.h"
8477
8478 #include <stdlib.h>
8479 int
8480 main ()
8481 {
8482 putwc(0,0);
8483   ;
8484   return 0;
8485 }
8486 _ACEOF
8487 rm -f conftest.$ac_objext conftest$ac_exeext
8488 if { (eval echo "$as_me:8488: \"$ac_link\"") >&5
8489   (eval $ac_link) 2>&5
8490   ac_status=$?
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); } &&
8493          { ac_try='test -s conftest$ac_exeext'
8494   { (eval echo "$as_me:8494: \"$ac_try\"") >&5
8495   (eval $ac_try) 2>&5
8496   ac_status=$?
8497   echo "$as_me:8497: \$? = $ac_status" >&5
8498   (exit $ac_status); }; }; then
8499   cf_cv_utf8_lib=yes
8500 else
8501   echo "$as_me: failed program was:" >&5
8502 cat conftest.$ac_ext >&5
8503
8504 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8505 # will be set on completion of the AC_TRY_LINK below.
8506 cf_cv_header_path_utf8=
8507 cf_cv_library_path_utf8=
8508
8509 echo "${as_me:-configure}:8509: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8510
8511 cf_save_LIBS="$LIBS"
8512
8513 cat >conftest.$ac_ext <<_ACEOF
8514 #line 8514 "configure"
8515 #include "confdefs.h"
8516
8517 #include <libutf8.h>
8518 int
8519 main ()
8520 {
8521 putwc(0,0);
8522   ;
8523   return 0;
8524 }
8525 _ACEOF
8526 rm -f conftest.$ac_objext conftest$ac_exeext
8527 if { (eval echo "$as_me:8527: \"$ac_link\"") >&5
8528   (eval $ac_link) 2>&5
8529   ac_status=$?
8530   echo "$as_me:8530: \$? = $ac_status" >&5
8531   (exit $ac_status); } &&
8532          { ac_try='test -s conftest$ac_exeext'
8533   { (eval echo "$as_me:8533: \"$ac_try\"") >&5
8534   (eval $ac_try) 2>&5
8535   ac_status=$?
8536   echo "$as_me:8536: \$? = $ac_status" >&5
8537   (exit $ac_status); }; }; then
8538
8539         cf_cv_find_linkage_utf8=yes
8540         cf_cv_header_path_utf8=/usr/include
8541         cf_cv_library_path_utf8=/usr/lib
8542
8543 else
8544   echo "$as_me: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8546
8547 LIBS="-lutf8  $cf_save_LIBS"
8548
8549 cat >conftest.$ac_ext <<_ACEOF
8550 #line 8550 "configure"
8551 #include "confdefs.h"
8552
8553 #include <libutf8.h>
8554 int
8555 main ()
8556 {
8557 putwc(0,0);
8558   ;
8559   return 0;
8560 }
8561 _ACEOF
8562 rm -f conftest.$ac_objext conftest$ac_exeext
8563 if { (eval echo "$as_me:8563: \"$ac_link\"") >&5
8564   (eval $ac_link) 2>&5
8565   ac_status=$?
8566   echo "$as_me:8566: \$? = $ac_status" >&5
8567   (exit $ac_status); } &&
8568          { ac_try='test -s conftest$ac_exeext'
8569   { (eval echo "$as_me:8569: \"$ac_try\"") >&5
8570   (eval $ac_try) 2>&5
8571   ac_status=$?
8572   echo "$as_me:8572: \$? = $ac_status" >&5
8573   (exit $ac_status); }; }; then
8574
8575         cf_cv_find_linkage_utf8=yes
8576         cf_cv_header_path_utf8=/usr/include
8577         cf_cv_library_path_utf8=/usr/lib
8578         cf_cv_library_file_utf8="-lutf8"
8579
8580 else
8581   echo "$as_me: failed program was:" >&5
8582 cat conftest.$ac_ext >&5
8583
8584         cf_cv_find_linkage_utf8=no
8585         LIBS="$cf_save_LIBS"
8586
8587     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8588
8589 echo "${as_me:-configure}:8589: testing find linkage for utf8 library ..." 1>&5
8590
8591 echo "${as_me:-configure}:8591: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8592
8593     cf_save_CPPFLAGS="$CPPFLAGS"
8594     cf_test_CPPFLAGS="$CPPFLAGS"
8595
8596 cf_search=
8597
8598 # collect the current set of include-directories from compiler flags
8599 cf_header_path_list=""
8600 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8601         for cf_header_path in $CPPFLAGS $CFLAGS
8602         do
8603                 case $cf_header_path in #(vi
8604                 -I*)
8605                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8606
8607 test "$cf_header_path" != "NONE" && \
8608 test -d "$cf_header_path" && \
8609  {
8610         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8611         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8612         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8613         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8614         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8615         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8616 }
8617
8618                         cf_header_path_list="$cf_header_path_list $cf_search"
8619                         ;;
8620                 esac
8621         done
8622 fi
8623
8624 # add the variations for the package we are looking for
8625
8626 cf_search=
8627
8628 test "/usr" != "$prefix" && \
8629 test -d "/usr" && \
8630 (test $prefix = NONE || test "/usr" != "$prefix") && {
8631         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8632         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8633         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8634         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8635         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8636         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8637 }
8638
8639 test "$prefix" != "NONE" && \
8640 test -d "$prefix" && \
8641  {
8642         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8643         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8644         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8645         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8646         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8647         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8648 }
8649
8650 test "/usr/local" != "$prefix" && \
8651 test -d "/usr/local" && \
8652 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8653         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8654         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8655         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8656         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8657         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8658         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8659 }
8660
8661 test "/opt" != "$prefix" && \
8662 test -d "/opt" && \
8663 (test $prefix = NONE || test "/opt" != "$prefix") && {
8664         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8665         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8666         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8667         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8668         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8669         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8670 }
8671
8672 test "$HOME" != "$prefix" && \
8673 test -d "$HOME" && \
8674 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8675         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8676         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8677         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8678         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8679         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8680         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8681 }
8682
8683 test "$includedir" != NONE && \
8684 test "$includedir" != "/usr/include" && \
8685 test -d "$includedir" && {
8686         test -d $includedir &&    cf_search="$cf_search $includedir"
8687         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8688 }
8689
8690 test "$oldincludedir" != NONE && \
8691 test "$oldincludedir" != "/usr/include" && \
8692 test -d "$oldincludedir" && {
8693         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8694         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8695 }
8696
8697 cf_search="$cf_search $cf_header_path_list"
8698
8699     for cf_cv_header_path_utf8 in $cf_search
8700     do
8701       if test -d $cf_cv_header_path_utf8 ; then
8702         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8703
8704 echo "${as_me:-configure}:8704: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8705
8706         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8707         cat >conftest.$ac_ext <<_ACEOF
8708 #line 8708 "configure"
8709 #include "confdefs.h"
8710
8711 #include <libutf8.h>
8712 int
8713 main ()
8714 {
8715 putwc(0,0);
8716   ;
8717   return 0;
8718 }
8719 _ACEOF
8720 rm -f conftest.$ac_objext
8721 if { (eval echo "$as_me:8721: \"$ac_compile\"") >&5
8722   (eval $ac_compile) 2>&5
8723   ac_status=$?
8724   echo "$as_me:8724: \$? = $ac_status" >&5
8725   (exit $ac_status); } &&
8726          { ac_try='test -s conftest.$ac_objext'
8727   { (eval echo "$as_me:8727: \"$ac_try\"") >&5
8728   (eval $ac_try) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); }; }; then
8732
8733             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8734
8735 echo "${as_me:-configure}:8735: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8736
8737             cf_cv_find_linkage_utf8=maybe
8738             cf_test_CPPFLAGS="$CPPFLAGS"
8739             break
8740 else
8741   echo "$as_me: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743
8744             CPPFLAGS="$cf_save_CPPFLAGS"
8745
8746 fi
8747 rm -f conftest.$ac_objext conftest.$ac_ext
8748       fi
8749     done
8750
8751     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8752
8753 echo "${as_me:-configure}:8753: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8754
8755       cf_save_LIBS="$LIBS"
8756       cf_save_LDFLAGS="$LDFLAGS"
8757
8758       if test "$cf_cv_find_linkage_utf8" != yes ; then
8759
8760 cf_search=
8761 cf_library_path_list=""
8762 if test -n "${LDFLAGS}${LIBS}" ; then
8763         for cf_library_path in $LDFLAGS $LIBS
8764         do
8765                 case $cf_library_path in #(vi
8766                 -L*)
8767                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8768
8769 test "$cf_library_path" != "NONE" && \
8770 test -d "$cf_library_path" && \
8771  {
8772         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8773         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8774         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8775         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8776         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8777         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8778 }
8779
8780                         cf_library_path_list="$cf_library_path_list $cf_search"
8781                         ;;
8782                 esac
8783         done
8784 fi
8785
8786 cf_search=
8787
8788 test "/usr" != "$prefix" && \
8789 test -d "/usr" && \
8790 (test $prefix = NONE || test "/usr" != "$prefix") && {
8791         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8792         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8793         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8794         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8795         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8796         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8797 }
8798
8799 test "$prefix" != "NONE" && \
8800 test -d "$prefix" && \
8801  {
8802         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8803         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8804         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8805         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8806         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8807         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8808 }
8809
8810 test "/usr/local" != "$prefix" && \
8811 test -d "/usr/local" && \
8812 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8813         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8814         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8815         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8816         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8817         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8818         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8819 }
8820
8821 test "/opt" != "$prefix" && \
8822 test -d "/opt" && \
8823 (test $prefix = NONE || test "/opt" != "$prefix") && {
8824         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8825         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8826         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8827         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8828         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8829         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8830 }
8831
8832 test "$HOME" != "$prefix" && \
8833 test -d "$HOME" && \
8834 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8835         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8836         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8837         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8838         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8839         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8840         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8841 }
8842
8843 cf_search="$cf_library_path_list $cf_search"
8844
8845         for cf_cv_library_path_utf8 in $cf_search
8846         do
8847           if test -d $cf_cv_library_path_utf8 ; then
8848             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8849
8850 echo "${as_me:-configure}:8850: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8851
8852             CPPFLAGS="$cf_test_CPPFLAGS"
8853             LIBS="-lutf8  $cf_save_LIBS"
8854             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8855             cat >conftest.$ac_ext <<_ACEOF
8856 #line 8856 "configure"
8857 #include "confdefs.h"
8858
8859 #include <libutf8.h>
8860 int
8861 main ()
8862 {
8863 putwc(0,0);
8864   ;
8865   return 0;
8866 }
8867 _ACEOF
8868 rm -f conftest.$ac_objext conftest$ac_exeext
8869 if { (eval echo "$as_me:8869: \"$ac_link\"") >&5
8870   (eval $ac_link) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); } &&
8874          { ac_try='test -s conftest$ac_exeext'
8875   { (eval echo "$as_me:8875: \"$ac_try\"") >&5
8876   (eval $ac_try) 2>&5
8877   ac_status=$?
8878   echo "$as_me:8878: \$? = $ac_status" >&5
8879   (exit $ac_status); }; }; then
8880
8881                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8882
8883 echo "${as_me:-configure}:8883: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8884
8885                 cf_cv_find_linkage_utf8=yes
8886                 cf_cv_library_file_utf8="-lutf8"
8887                 break
8888 else
8889   echo "$as_me: failed program was:" >&5
8890 cat conftest.$ac_ext >&5
8891
8892                 CPPFLAGS="$cf_save_CPPFLAGS"
8893                 LIBS="$cf_save_LIBS"
8894                 LDFLAGS="$cf_save_LDFLAGS"
8895
8896 fi
8897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8898           fi
8899         done
8900         CPPFLAGS="$cf_save_CPPFLAGS"
8901         LDFLAGS="$cf_save_LDFLAGS"
8902       fi
8903
8904     else
8905       cf_cv_find_linkage_utf8=no
8906     fi
8907
8908 fi
8909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8910
8911 fi
8912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8913
8914 LIBS="$cf_save_LIBS"
8915
8916 if test "$cf_cv_find_linkage_utf8" = yes ; then
8917 cf_cv_utf8_lib=add-on
8918 else
8919 cf_cv_utf8_lib=no
8920 fi
8921
8922 fi
8923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924 fi
8925 echo "$as_me:8925: result: $cf_cv_utf8_lib" >&5
8926 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8927
8928 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8929 # ncurses/ncursesw:
8930 if test "$cf_cv_utf8_lib" = "add-on" ; then
8931         cat >>confdefs.h <<\EOF
8932 #define HAVE_LIBUTF8_H 1
8933 EOF
8934
8935 if test -n "$cf_cv_header_path_utf8" ; then
8936   for cf_add_incdir in $cf_cv_header_path_utf8
8937   do
8938         while test $cf_add_incdir != /usr/include
8939         do
8940           if test -d $cf_add_incdir
8941           then
8942                 cf_have_incdir=no
8943                 if test -n "$CFLAGS$CPPFLAGS" ; then
8944                   # a loop is needed to ensure we can add subdirs of existing dirs
8945                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8946                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8947                           cf_have_incdir=yes; break
8948                         fi
8949                   done
8950                 fi
8951
8952                 if test "$cf_have_incdir" = no ; then
8953                   if test "$cf_add_incdir" = /usr/local/include ; then
8954                         if test "$GCC" = yes
8955                         then
8956                           cf_save_CPPFLAGS=$CPPFLAGS
8957                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8958                           cat >conftest.$ac_ext <<_ACEOF
8959 #line 8959 "configure"
8960 #include "confdefs.h"
8961 #include <stdio.h>
8962 int
8963 main ()
8964 {
8965 printf("Hello")
8966   ;
8967   return 0;
8968 }
8969 _ACEOF
8970 rm -f conftest.$ac_objext
8971 if { (eval echo "$as_me:8971: \"$ac_compile\"") >&5
8972   (eval $ac_compile) 2>&5
8973   ac_status=$?
8974   echo "$as_me:8974: \$? = $ac_status" >&5
8975   (exit $ac_status); } &&
8976          { ac_try='test -s conftest.$ac_objext'
8977   { (eval echo "$as_me:8977: \"$ac_try\"") >&5
8978   (eval $ac_try) 2>&5
8979   ac_status=$?
8980   echo "$as_me:8980: \$? = $ac_status" >&5
8981   (exit $ac_status); }; }; then
8982   :
8983 else
8984   echo "$as_me: failed program was:" >&5
8985 cat conftest.$ac_ext >&5
8986 cf_have_incdir=yes
8987 fi
8988 rm -f conftest.$ac_objext conftest.$ac_ext
8989                           CPPFLAGS=$cf_save_CPPFLAGS
8990                         fi
8991                   fi
8992                 fi
8993
8994                 if test "$cf_have_incdir" = no ; then
8995                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8996
8997 echo "${as_me:-configure}:8997: testing adding $cf_add_incdir to include-path ..." 1>&5
8998
8999                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9000
9001                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9002                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9003                   cf_add_incdir="$cf_top_incdir"
9004                 else
9005                   break
9006                 fi
9007           fi
9008         done
9009   done
9010 fi
9011
9012 if test -n "$cf_cv_library_path_utf8" ; then
9013   for cf_add_libdir in $cf_cv_library_path_utf8
9014   do
9015     if test $cf_add_libdir = /usr/lib ; then
9016       :
9017     elif test -d $cf_add_libdir
9018     then
9019       cf_have_libdir=no
9020       if test -n "$LDFLAGS$LIBS" ; then
9021         # a loop is needed to ensure we can add subdirs of existing dirs
9022         for cf_test_libdir in $LDFLAGS $LIBS ; do
9023           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9024             cf_have_libdir=yes; break
9025           fi
9026         done
9027       fi
9028       if test "$cf_have_libdir" = no ; then
9029         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9030
9031 echo "${as_me:-configure}:9031: testing adding $cf_add_libdir to library-path ..." 1>&5
9032
9033         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9034       fi
9035     fi
9036   done
9037 fi
9038
9039         LIBS="$cf_cv_library_file_utf8 $LIBS"
9040 fi
9041
9042                 if test "$cf_cv_utf8_lib" != no ; then
9043                         NCURSES_LIBUTF8=1
9044                 fi
9045         fi
9046
9047 # This is needed on Tru64 5.0 to declare mbstate_t
9048 echo "$as_me:9048: checking if we must include wchar.h to declare mbstate_t" >&5
9049 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9050 if test "${cf_cv_mbstate_t+set}" = set; then
9051   echo $ECHO_N "(cached) $ECHO_C" >&6
9052 else
9053
9054 cat >conftest.$ac_ext <<_ACEOF
9055 #line 9055 "configure"
9056 #include "confdefs.h"
9057
9058 #include <stdlib.h>
9059 #include <stdarg.h>
9060 #include <stdio.h>
9061 #ifdef HAVE_LIBUTF8_H
9062 #include <libutf8.h>
9063 #endif
9064 int
9065 main ()
9066 {
9067 mbstate_t state
9068   ;
9069   return 0;
9070 }
9071 _ACEOF
9072 rm -f conftest.$ac_objext
9073 if { (eval echo "$as_me:9073: \"$ac_compile\"") >&5
9074   (eval $ac_compile) 2>&5
9075   ac_status=$?
9076   echo "$as_me:9076: \$? = $ac_status" >&5
9077   (exit $ac_status); } &&
9078          { ac_try='test -s conftest.$ac_objext'
9079   { (eval echo "$as_me:9079: \"$ac_try\"") >&5
9080   (eval $ac_try) 2>&5
9081   ac_status=$?
9082   echo "$as_me:9082: \$? = $ac_status" >&5
9083   (exit $ac_status); }; }; then
9084   cf_cv_mbstate_t=no
9085 else
9086   echo "$as_me: failed program was:" >&5
9087 cat conftest.$ac_ext >&5
9088 cat >conftest.$ac_ext <<_ACEOF
9089 #line 9089 "configure"
9090 #include "confdefs.h"
9091
9092 #include <stdlib.h>
9093 #include <stdarg.h>
9094 #include <stdio.h>
9095 #include <wchar.h>
9096 #ifdef HAVE_LIBUTF8_H
9097 #include <libutf8.h>
9098 #endif
9099 int
9100 main ()
9101 {
9102 mbstate_t value
9103   ;
9104   return 0;
9105 }
9106 _ACEOF
9107 rm -f conftest.$ac_objext
9108 if { (eval echo "$as_me:9108: \"$ac_compile\"") >&5
9109   (eval $ac_compile) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); } &&
9113          { ac_try='test -s conftest.$ac_objext'
9114   { (eval echo "$as_me:9114: \"$ac_try\"") >&5
9115   (eval $ac_try) 2>&5
9116   ac_status=$?
9117   echo "$as_me:9117: \$? = $ac_status" >&5
9118   (exit $ac_status); }; }; then
9119   cf_cv_mbstate_t=yes
9120 else
9121   echo "$as_me: failed program was:" >&5
9122 cat conftest.$ac_ext >&5
9123 cf_cv_mbstate_t=unknown
9124 fi
9125 rm -f conftest.$ac_objext conftest.$ac_ext
9126 fi
9127 rm -f conftest.$ac_objext conftest.$ac_ext
9128 fi
9129 echo "$as_me:9129: result: $cf_cv_mbstate_t" >&5
9130 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9131
9132 if test "$cf_cv_mbstate_t" = yes ; then
9133         cat >>confdefs.h <<\EOF
9134 #define NEED_WCHAR_H 1
9135 EOF
9136
9137         NEED_WCHAR_H=1
9138 fi
9139
9140 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9141 if test "$cf_cv_mbstate_t" = unknown ; then
9142         NCURSES_MBSTATE_T=1
9143 fi
9144
9145 # This is needed on Tru64 5.0 to declare wchar_t
9146 echo "$as_me:9146: checking if we must include wchar.h to declare wchar_t" >&5
9147 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9148 if test "${cf_cv_wchar_t+set}" = set; then
9149   echo $ECHO_N "(cached) $ECHO_C" >&6
9150 else
9151
9152 cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155
9156 #include <stdlib.h>
9157 #include <stdarg.h>
9158 #include <stdio.h>
9159 #ifdef HAVE_LIBUTF8_H
9160 #include <libutf8.h>
9161 #endif
9162 int
9163 main ()
9164 {
9165 wchar_t state
9166   ;
9167   return 0;
9168 }
9169 _ACEOF
9170 rm -f conftest.$ac_objext
9171 if { (eval echo "$as_me:9171: \"$ac_compile\"") >&5
9172   (eval $ac_compile) 2>&5
9173   ac_status=$?
9174   echo "$as_me:9174: \$? = $ac_status" >&5
9175   (exit $ac_status); } &&
9176          { ac_try='test -s conftest.$ac_objext'
9177   { (eval echo "$as_me:9177: \"$ac_try\"") >&5
9178   (eval $ac_try) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit $ac_status); }; }; then
9182   cf_cv_wchar_t=no
9183 else
9184   echo "$as_me: failed program was:" >&5
9185 cat conftest.$ac_ext >&5
9186 cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189
9190 #include <stdlib.h>
9191 #include <stdarg.h>
9192 #include <stdio.h>
9193 #include <wchar.h>
9194 #ifdef HAVE_LIBUTF8_H
9195 #include <libutf8.h>
9196 #endif
9197 int
9198 main ()
9199 {
9200 wchar_t value
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext
9206 if { (eval echo "$as_me:9206: \"$ac_compile\"") >&5
9207   (eval $ac_compile) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest.$ac_objext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   cf_cv_wchar_t=yes
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 cf_cv_wchar_t=unknown
9222 fi
9223 rm -f conftest.$ac_objext conftest.$ac_ext
9224 fi
9225 rm -f conftest.$ac_objext conftest.$ac_ext
9226 fi
9227 echo "$as_me:9227: result: $cf_cv_wchar_t" >&5
9228 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9229
9230 if test "$cf_cv_wchar_t" = yes ; then
9231         cat >>confdefs.h <<\EOF
9232 #define NEED_WCHAR_H 1
9233 EOF
9234
9235         NEED_WCHAR_H=1
9236 fi
9237
9238 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9239 if test "$cf_cv_wchar_t" = unknown ; then
9240         NCURSES_WCHAR_T=1
9241 fi
9242
9243 # if we find wchar_t in either place, use substitution to provide a fallback.
9244 if test "$cf_cv_wchar_t" != unknown ; then
9245         NCURSES_OK_WCHAR_T=1
9246 fi
9247
9248 # This is needed on Tru64 5.0 to declare wint_t
9249 echo "$as_me:9249: checking if we must include wchar.h to declare wint_t" >&5
9250 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9251 if test "${cf_cv_wint_t+set}" = set; then
9252   echo $ECHO_N "(cached) $ECHO_C" >&6
9253 else
9254
9255 cat >conftest.$ac_ext <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258
9259 #include <stdlib.h>
9260 #include <stdarg.h>
9261 #include <stdio.h>
9262 #ifdef HAVE_LIBUTF8_H
9263 #include <libutf8.h>
9264 #endif
9265 int
9266 main ()
9267 {
9268 wint_t state
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   cf_cv_wint_t=no
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 cat >conftest.$ac_ext <<_ACEOF
9290 #line 9290 "configure"
9291 #include "confdefs.h"
9292
9293 #include <stdlib.h>
9294 #include <stdarg.h>
9295 #include <stdio.h>
9296 #include <wchar.h>
9297 #ifdef HAVE_LIBUTF8_H
9298 #include <libutf8.h>
9299 #endif
9300 int
9301 main ()
9302 {
9303 wint_t value
9304   ;
9305   return 0;
9306 }
9307 _ACEOF
9308 rm -f conftest.$ac_objext
9309 if { (eval echo "$as_me:9309: \"$ac_compile\"") >&5
9310   (eval $ac_compile) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); } &&
9314          { ac_try='test -s conftest.$ac_objext'
9315   { (eval echo "$as_me:9315: \"$ac_try\"") >&5
9316   (eval $ac_try) 2>&5
9317   ac_status=$?
9318   echo "$as_me:9318: \$? = $ac_status" >&5
9319   (exit $ac_status); }; }; then
9320   cf_cv_wint_t=yes
9321 else
9322   echo "$as_me: failed program was:" >&5
9323 cat conftest.$ac_ext >&5
9324 cf_cv_wint_t=unknown
9325 fi
9326 rm -f conftest.$ac_objext conftest.$ac_ext
9327 fi
9328 rm -f conftest.$ac_objext conftest.$ac_ext
9329 fi
9330 echo "$as_me:9330: result: $cf_cv_wint_t" >&5
9331 echo "${ECHO_T}$cf_cv_wint_t" >&6
9332
9333 if test "$cf_cv_wint_t" = yes ; then
9334         cat >>confdefs.h <<\EOF
9335 #define NEED_WCHAR_H 1
9336 EOF
9337
9338         NEED_WCHAR_H=1
9339 fi
9340
9341 # if we do not find wint_t in either place, use substitution to provide a fallback.
9342 if test "$cf_cv_wint_t" = unknown ; then
9343         NCURSES_WINT_T=1
9344 fi
9345
9346 # if we find wint_t in either place, use substitution to provide a fallback.
9347 if test "$cf_cv_wint_t" != unknown ; then
9348         NCURSES_OK_WINT_T=1
9349 fi
9350
9351         if test "$NCURSES_MBSTATE_T" != 0; then
9352                 cat >>confdefs.h <<\EOF
9353 #define NEED_MBSTATE_T_DEF 1
9354 EOF
9355
9356         fi
9357 fi
9358
9359 ###   use option --disable-lp64 to allow long chtype
9360 case $cf_cv_abi_version in
9361 [345]*)
9362         default_with_lp64=no
9363         ;;
9364 *)
9365         default_with_lp64=yes
9366         ;;
9367 esac
9368
9369 echo "$as_me:9369: checking whether to enable _LP64 definition in curses.h" >&5
9370 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9371
9372 # Check whether --enable-lp64 or --disable-lp64 was given.
9373 if test "${enable_lp64+set}" = set; then
9374   enableval="$enable_lp64"
9375   with_lp64=$enableval
9376 else
9377   with_lp64=$default_with_lp64
9378 fi;
9379 echo "$as_me:9379: result: $with_lp64" >&5
9380 echo "${ECHO_T}$with_lp64" >&6
9381
9382 if test "$with_lp64" = yes ; then
9383         cf_cv_enable_lp64=1
9384 else
9385         cf_cv_enable_lp64=0
9386 fi
9387
9388 # Check whether --enable-largefile or --disable-largefile was given.
9389 if test "${enable_largefile+set}" = set; then
9390   enableval="$enable_largefile"
9391
9392 fi;
9393 if test "$enable_largefile" != no; then
9394
9395   echo "$as_me:9395: checking for special C compiler options needed for large files" >&5
9396 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9397 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9398   echo $ECHO_N "(cached) $ECHO_C" >&6
9399 else
9400   ac_cv_sys_largefile_CC=no
9401      if test "$GCC" != yes; then
9402        ac_save_CC=$CC
9403        while :; do
9404          # IRIX 6.2 and later do not support large files by default,
9405          # so use the C compiler's -n32 option if that helps.
9406          cat >conftest.$ac_ext <<_ACEOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409 #include <sys/types.h>
9410  /* Check that off_t can represent 2**63 - 1 correctly.
9411     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9412     since some C++ compilers masquerading as C compilers
9413     incorrectly reject 9223372036854775807.  */
9414 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9415   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9416                        && LARGE_OFF_T % 2147483647 == 1)
9417                       ? 1 : -1];
9418 int
9419 main ()
9420 {
9421
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426          rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   break
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 fi
9443 rm -f conftest.$ac_objext
9444          CC="$CC -n32"
9445          rm -f conftest.$ac_objext
9446 if { (eval echo "$as_me:9446: \"$ac_compile\"") >&5
9447   (eval $ac_compile) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); } &&
9451          { ac_try='test -s conftest.$ac_objext'
9452   { (eval echo "$as_me:9452: \"$ac_try\"") >&5
9453   (eval $ac_try) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); }; }; then
9457   ac_cv_sys_largefile_CC=' -n32'; break
9458 else
9459   echo "$as_me: failed program was:" >&5
9460 cat conftest.$ac_ext >&5
9461 fi
9462 rm -f conftest.$ac_objext
9463          break
9464        done
9465        CC=$ac_save_CC
9466        rm -f conftest.$ac_ext
9467     fi
9468 fi
9469 echo "$as_me:9469: result: $ac_cv_sys_largefile_CC" >&5
9470 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9471   if test "$ac_cv_sys_largefile_CC" != no; then
9472     CC=$CC$ac_cv_sys_largefile_CC
9473   fi
9474
9475   echo "$as_me:9475: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9476 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9477 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9478   echo $ECHO_N "(cached) $ECHO_C" >&6
9479 else
9480   while :; do
9481   ac_cv_sys_file_offset_bits=no
9482   cat >conftest.$ac_ext <<_ACEOF
9483 #line 9483 "configure"
9484 #include "confdefs.h"
9485 #include <sys/types.h>
9486  /* Check that off_t can represent 2**63 - 1 correctly.
9487     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9488     since some C++ compilers masquerading as C compilers
9489     incorrectly reject 9223372036854775807.  */
9490 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9491   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9492                        && LARGE_OFF_T % 2147483647 == 1)
9493                       ? 1 : -1];
9494 int
9495 main ()
9496 {
9497
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext
9503 if { (eval echo "$as_me:9503: \"$ac_compile\"") >&5
9504   (eval $ac_compile) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest.$ac_objext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514   break
9515 else
9516   echo "$as_me: failed program was:" >&5
9517 cat conftest.$ac_ext >&5
9518 fi
9519 rm -f conftest.$ac_objext conftest.$ac_ext
9520   cat >conftest.$ac_ext <<_ACEOF
9521 #line 9521 "configure"
9522 #include "confdefs.h"
9523 #define _FILE_OFFSET_BITS 64
9524 #include <sys/types.h>
9525  /* Check that off_t can represent 2**63 - 1 correctly.
9526     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9527     since some C++ compilers masquerading as C compilers
9528     incorrectly reject 9223372036854775807.  */
9529 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9530   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9531                        && LARGE_OFF_T % 2147483647 == 1)
9532                       ? 1 : -1];
9533 int
9534 main ()
9535 {
9536
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   ac_cv_sys_file_offset_bits=64; break
9554 else
9555   echo "$as_me: failed program was:" >&5
9556 cat conftest.$ac_ext >&5
9557 fi
9558 rm -f conftest.$ac_objext conftest.$ac_ext
9559   break
9560 done
9561 fi
9562 echo "$as_me:9562: result: $ac_cv_sys_file_offset_bits" >&5
9563 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9564 if test "$ac_cv_sys_file_offset_bits" != no; then
9565
9566 cat >>confdefs.h <<EOF
9567 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9568 EOF
9569
9570 fi
9571 rm -rf conftest*
9572   echo "$as_me:9572: checking for _LARGE_FILES value needed for large files" >&5
9573 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9574 if test "${ac_cv_sys_large_files+set}" = set; then
9575   echo $ECHO_N "(cached) $ECHO_C" >&6
9576 else
9577   while :; do
9578   ac_cv_sys_large_files=no
9579   cat >conftest.$ac_ext <<_ACEOF
9580 #line 9580 "configure"
9581 #include "confdefs.h"
9582 #include <sys/types.h>
9583  /* Check that off_t can represent 2**63 - 1 correctly.
9584     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9585     since some C++ compilers masquerading as C compilers
9586     incorrectly reject 9223372036854775807.  */
9587 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9588   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9589                        && LARGE_OFF_T % 2147483647 == 1)
9590                       ? 1 : -1];
9591 int
9592 main ()
9593 {
9594
9595   ;
9596   return 0;
9597 }
9598 _ACEOF
9599 rm -f conftest.$ac_objext
9600 if { (eval echo "$as_me:9600: \"$ac_compile\"") >&5
9601   (eval $ac_compile) 2>&5
9602   ac_status=$?
9603   echo "$as_me:9603: \$? = $ac_status" >&5
9604   (exit $ac_status); } &&
9605          { ac_try='test -s conftest.$ac_objext'
9606   { (eval echo "$as_me:9606: \"$ac_try\"") >&5
9607   (eval $ac_try) 2>&5
9608   ac_status=$?
9609   echo "$as_me:9609: \$? = $ac_status" >&5
9610   (exit $ac_status); }; }; then
9611   break
9612 else
9613   echo "$as_me: failed program was:" >&5
9614 cat conftest.$ac_ext >&5
9615 fi
9616 rm -f conftest.$ac_objext conftest.$ac_ext
9617   cat >conftest.$ac_ext <<_ACEOF
9618 #line 9618 "configure"
9619 #include "confdefs.h"
9620 #define _LARGE_FILES 1
9621 #include <sys/types.h>
9622  /* Check that off_t can represent 2**63 - 1 correctly.
9623     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9624     since some C++ compilers masquerading as C compilers
9625     incorrectly reject 9223372036854775807.  */
9626 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9627   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9628                        && LARGE_OFF_T % 2147483647 == 1)
9629                       ? 1 : -1];
9630 int
9631 main ()
9632 {
9633
9634   ;
9635   return 0;
9636 }
9637 _ACEOF
9638 rm -f conftest.$ac_objext
9639 if { (eval echo "$as_me:9639: \"$ac_compile\"") >&5
9640   (eval $ac_compile) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); } &&
9644          { ac_try='test -s conftest.$ac_objext'
9645   { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9646   (eval $ac_try) 2>&5
9647   ac_status=$?
9648   echo "$as_me:9648: \$? = $ac_status" >&5
9649   (exit $ac_status); }; }; then
9650   ac_cv_sys_large_files=1; break
9651 else
9652   echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 fi
9655 rm -f conftest.$ac_objext conftest.$ac_ext
9656   break
9657 done
9658 fi
9659 echo "$as_me:9659: result: $ac_cv_sys_large_files" >&5
9660 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9661 if test "$ac_cv_sys_large_files" != no; then
9662
9663 cat >>confdefs.h <<EOF
9664 #define _LARGE_FILES $ac_cv_sys_large_files
9665 EOF
9666
9667 fi
9668 rm -rf conftest*
9669 fi
9670
9671     if test "$enable_largefile" != no ; then
9672         echo "$as_me:9672: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9673 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9674 if test "${ac_cv_sys_largefile_source+set}" = set; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   while :; do
9678   ac_cv_sys_largefile_source=no
9679   cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9682 #include <stdio.h>
9683 int
9684 main ()
9685 {
9686 return !fseeko;
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext
9692 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693   (eval $ac_compile) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest.$ac_objext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   break
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 fi
9708 rm -f conftest.$ac_objext conftest.$ac_ext
9709   cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712 #define _LARGEFILE_SOURCE 1
9713 #include <stdio.h>
9714 int
9715 main ()
9716 {
9717 return !fseeko;
9718   ;
9719   return 0;
9720 }
9721 _ACEOF
9722 rm -f conftest.$ac_objext
9723 if { (eval echo "$as_me:9723: \"$ac_compile\"") >&5
9724   (eval $ac_compile) 2>&5
9725   ac_status=$?
9726   echo "$as_me:9726: \$? = $ac_status" >&5
9727   (exit $ac_status); } &&
9728          { ac_try='test -s conftest.$ac_objext'
9729   { (eval echo "$as_me:9729: \"$ac_try\"") >&5
9730   (eval $ac_try) 2>&5
9731   ac_status=$?
9732   echo "$as_me:9732: \$? = $ac_status" >&5
9733   (exit $ac_status); }; }; then
9734   ac_cv_sys_largefile_source=1; break
9735 else
9736   echo "$as_me: failed program was:" >&5
9737 cat conftest.$ac_ext >&5
9738 fi
9739 rm -f conftest.$ac_objext conftest.$ac_ext
9740   break
9741 done
9742 fi
9743 echo "$as_me:9743: result: $ac_cv_sys_largefile_source" >&5
9744 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9745 if test "$ac_cv_sys_largefile_source" != no; then
9746
9747 cat >>confdefs.h <<EOF
9748 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9749 EOF
9750
9751 fi
9752 rm -rf conftest*
9753
9754 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9755 # in glibc 2.1.3, but that breaks too many other things.
9756 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9757 echo "$as_me:9757: checking for fseeko" >&5
9758 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9759 if test "${ac_cv_func_fseeko+set}" = set; then
9760   echo $ECHO_N "(cached) $ECHO_C" >&6
9761 else
9762   cat >conftest.$ac_ext <<_ACEOF
9763 #line 9763 "configure"
9764 #include "confdefs.h"
9765 #include <stdio.h>
9766 int
9767 main ()
9768 {
9769 return fseeko && fseeko (stdin, 0, 0);
9770   ;
9771   return 0;
9772 }
9773 _ACEOF
9774 rm -f conftest.$ac_objext conftest$ac_exeext
9775 if { (eval echo "$as_me:9775: \"$ac_link\"") >&5
9776   (eval $ac_link) 2>&5
9777   ac_status=$?
9778   echo "$as_me:9778: \$? = $ac_status" >&5
9779   (exit $ac_status); } &&
9780          { ac_try='test -s conftest$ac_exeext'
9781   { (eval echo "$as_me:9781: \"$ac_try\"") >&5
9782   (eval $ac_try) 2>&5
9783   ac_status=$?
9784   echo "$as_me:9784: \$? = $ac_status" >&5
9785   (exit $ac_status); }; }; then
9786   ac_cv_func_fseeko=yes
9787 else
9788   echo "$as_me: failed program was:" >&5
9789 cat conftest.$ac_ext >&5
9790 ac_cv_func_fseeko=no
9791 fi
9792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9793 fi
9794 echo "$as_me:9794: result: $ac_cv_func_fseeko" >&5
9795 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9796 if test $ac_cv_func_fseeko = yes; then
9797
9798 cat >>confdefs.h <<\EOF
9799 #define HAVE_FSEEKO 1
9800 EOF
9801
9802 fi
9803
9804         # Normally we would collect these definitions in the config.h,
9805         # but (like _XOPEN_SOURCE), some environments rely on having these
9806         # defined before any of the system headers are included.  Another
9807         # case comes up with C++, e.g., on AIX the compiler compiles the
9808         # header files by themselves before looking at the body files it is
9809         # told to compile.  For ncurses, those header files do not include
9810         # the config.h
9811         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9812         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9813         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9814
9815         echo "$as_me:9815: checking whether to use struct dirent64" >&5
9816 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9817 if test "${cf_cv_struct_dirent64+set}" = set; then
9818   echo $ECHO_N "(cached) $ECHO_C" >&6
9819 else
9820
9821                 cat >conftest.$ac_ext <<_ACEOF
9822 #line 9822 "configure"
9823 #include "confdefs.h"
9824
9825 #include <sys/types.h>
9826 #include <dirent.h>
9827
9828 int
9829 main ()
9830 {
9831
9832                 /* if transitional largefile support is setup, this is true */
9833                 extern struct dirent64 * readdir(DIR *);
9834                 struct dirent64 *x = readdir((DIR *)0);
9835                 struct dirent *y = readdir((DIR *)0);
9836                 int z = x - y;
9837
9838   ;
9839   return 0;
9840 }
9841 _ACEOF
9842 rm -f conftest.$ac_objext
9843 if { (eval echo "$as_me:9843: \"$ac_compile\"") >&5
9844   (eval $ac_compile) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); } &&
9848          { ac_try='test -s conftest.$ac_objext'
9849   { (eval echo "$as_me:9849: \"$ac_try\"") >&5
9850   (eval $ac_try) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); }; }; then
9854   cf_cv_struct_dirent64=yes
9855 else
9856   echo "$as_me: failed program was:" >&5
9857 cat conftest.$ac_ext >&5
9858 cf_cv_struct_dirent64=no
9859 fi
9860 rm -f conftest.$ac_objext conftest.$ac_ext
9861
9862 fi
9863 echo "$as_me:9863: result: $cf_cv_struct_dirent64" >&5
9864 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9865         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9866 #define HAVE_STRUCT_DIRENT64 1
9867 EOF
9868
9869     fi
9870
9871 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9872 echo "$as_me:9872: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9873 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9874
9875 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9876 if test "${enable_tparm_varargs+set}" = set; then
9877   enableval="$enable_tparm_varargs"
9878   with_tparm_varargs=$enableval
9879 else
9880   with_tparm_varargs=yes
9881 fi;
9882 echo "$as_me:9882: result: $with_tparm_varargs" >&5
9883 echo "${ECHO_T}$with_tparm_varargs" >&6
9884 NCURSES_TPARM_VARARGS=0
9885 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9886
9887 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9888 if test "$with_ticlib" != no ; then
9889 echo "$as_me:9889: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9890 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9891
9892 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9893 if test "${enable_tic_depends+set}" = set; then
9894   enableval="$enable_tic_depends"
9895   with_tic_depends=$enableval
9896 else
9897   with_tic_depends=yes
9898 fi;
9899 echo "$as_me:9899: result: $with_tic_depends" >&5
9900 echo "${ECHO_T}$with_tic_depends" >&6
9901 else
9902         with_tic_depends=no
9903 fi
9904
9905 ###   use option --with-bool to override bool's type
9906 echo "$as_me:9906: checking for type of bool" >&5
9907 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9908
9909 # Check whether --with-bool or --without-bool was given.
9910 if test "${with_bool+set}" = set; then
9911   withval="$with_bool"
9912   NCURSES_BOOL="$withval"
9913 else
9914   NCURSES_BOOL=auto
9915 fi;
9916 echo "$as_me:9916: result: $NCURSES_BOOL" >&5
9917 echo "${ECHO_T}$NCURSES_BOOL" >&6
9918
9919 echo "$as_me:9919: checking for alternate terminal capabilities file" >&5
9920 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9921
9922 # Check whether --with-caps or --without-caps was given.
9923 if test "${with_caps+set}" = set; then
9924   withval="$with_caps"
9925   TERMINFO_CAPS=Caps.$withval
9926 else
9927   TERMINFO_CAPS=Caps
9928 fi;
9929 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9930 echo "$as_me:9930: result: $TERMINFO_CAPS" >&5
9931 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9932
9933 ###   use option --with-chtype to override chtype's type
9934 echo "$as_me:9934: checking for type of chtype" >&5
9935 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9936
9937 # Check whether --with-chtype or --without-chtype was given.
9938 if test "${with_chtype+set}" = set; then
9939   withval="$with_chtype"
9940   NCURSES_CHTYPE="$withval"
9941 else
9942   NCURSES_CHTYPE=auto
9943 fi;
9944 echo "$as_me:9944: result: $NCURSES_CHTYPE" >&5
9945 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9946
9947 ###   use option --with-ospeed to override ospeed's type
9948 echo "$as_me:9948: checking for type of ospeed" >&5
9949 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9950
9951 # Check whether --with-ospeed or --without-ospeed was given.
9952 if test "${with_ospeed+set}" = set; then
9953   withval="$with_ospeed"
9954   NCURSES_OSPEED="$withval"
9955 else
9956   NCURSES_OSPEED=short
9957 fi;
9958 echo "$as_me:9958: result: $NCURSES_OSPEED" >&5
9959 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9960
9961 ###   use option --with-mmask-t to override mmask_t's type
9962 echo "$as_me:9962: checking for type of mmask_t" >&5
9963 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9964
9965 # Check whether --with-mmask-t or --without-mmask-t was given.
9966 if test "${with_mmask_t+set}" = set; then
9967   withval="$with_mmask_t"
9968   NCURSES_MMASK_T="$withval"
9969 else
9970   NCURSES_MMASK_T=auto
9971 fi;
9972 echo "$as_me:9972: result: $NCURSES_MMASK_T" >&5
9973 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9974
9975 ###   use option --with-ccharw-max to override CCHARW_MAX size
9976 echo "$as_me:9976: checking for size CCHARW_MAX" >&5
9977 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9978
9979 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9980 if test "${with_ccharw_max+set}" = set; then
9981   withval="$with_ccharw_max"
9982   NCURSES_CCHARW_MAX="$withval"
9983 else
9984   NCURSES_CCHARW_MAX=5
9985 fi;
9986 echo "$as_me:9986: result: $NCURSES_CCHARW_MAX" >&5
9987 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9988
9989 ### Enable compiling-in rcs id's
9990 echo "$as_me:9990: checking if RCS identifiers should be compiled-in" >&5
9991 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9992
9993 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9994 if test "${with_rcs_ids+set}" = set; then
9995   withval="$with_rcs_ids"
9996   with_rcs_ids=$withval
9997 else
9998   with_rcs_ids=no
9999 fi;
10000 echo "$as_me:10000: result: $with_rcs_ids" >&5
10001 echo "${ECHO_T}$with_rcs_ids" >&6
10002 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10003 #define USE_RCS_IDS 1
10004 EOF
10005
10006 ###############################################################################
10007
10008 echo "$as_me:10008: checking format of man-pages" >&5
10009 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10010
10011 # Check whether --with-manpage-format or --without-manpage-format was given.
10012 if test "${with_manpage_format+set}" = set; then
10013   withval="$with_manpage_format"
10014   MANPAGE_FORMAT=$withval
10015 else
10016   MANPAGE_FORMAT=unknown
10017 fi;
10018
10019 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10020 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10021
10022 cf_unknown=
10023
10024 case $MANPAGE_FORMAT in
10025 unknown)
10026   if test -z "$MANPATH" ; then
10027     MANPATH="/usr/man:/usr/share/man"
10028   fi
10029
10030   # look for the 'date' man-page (it's most likely to be installed!)
10031   MANPAGE_FORMAT=
10032   cf_preform=no
10033   cf_catonly=yes
10034   cf_example=date
10035
10036   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10037   for cf_dir in $MANPATH; do
10038     test -z "$cf_dir" && cf_dir=/usr/man
10039     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
10040     do
10041       cf_test=`echo $cf_name | sed -e 's/*//'`
10042       if test "x$cf_test" = "x$cf_name" ; then
10043
10044         case "$cf_name" in
10045         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10046         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10047         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10048         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10049         esac
10050
10051         case "$cf_name" in
10052         $cf_dir/man*)
10053           cf_catonly=no
10054           ;;
10055         $cf_dir/cat*)
10056           cf_preform=yes
10057           ;;
10058         esac
10059         break
10060       fi
10061
10062       # if we found a match in either man* or cat*, stop looking
10063       if test -n "$MANPAGE_FORMAT" ; then
10064         cf_found=no
10065         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10066         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10067         case "$cf_name" in
10068         $cf_dir/cat*)
10069           cf_found=yes
10070           ;;
10071         esac
10072         test $cf_found=yes && break
10073       fi
10074     done
10075     # only check the first directory in $MANPATH where we find manpages
10076     if test -n "$MANPAGE_FORMAT" ; then
10077        break
10078     fi
10079   done
10080   # if we did not find the example, just assume it is normal
10081   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10082   IFS="$ac_save_ifs"
10083   ;;
10084 *)
10085   for cf_option in $MANPAGE_FORMAT; do
10086      case $cf_option in #(vi
10087      gzip|compress|BSDI|normal|formatted|catonly)
10088        ;;
10089      *)
10090        cf_unknown="$cf_unknown $cf_option"
10091        ;;
10092      esac
10093   done
10094   ;;
10095 esac
10096
10097 echo "$as_me:10097: result: $MANPAGE_FORMAT" >&5
10098 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10099 if test -n "$cf_unknown" ; then
10100   { echo "$as_me:10100: WARNING: Unexpected manpage-format $cf_unknown" >&5
10101 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10102 fi
10103
10104 echo "$as_me:10104: checking for manpage renaming" >&5
10105 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10106
10107 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10108 if test "${with_manpage_renames+set}" = set; then
10109   withval="$with_manpage_renames"
10110   MANPAGE_RENAMES=$withval
10111 else
10112   MANPAGE_RENAMES=yes
10113 fi;
10114
10115 case ".$MANPAGE_RENAMES" in #(vi
10116 .no) #(vi
10117   ;;
10118 .|.yes)
10119   # Debian 'man' program?
10120   if test -f /etc/debian_version ; then
10121     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10122   else
10123     MANPAGE_RENAMES=no
10124   fi
10125   ;;
10126 esac
10127
10128 if test "$MANPAGE_RENAMES" != no ; then
10129   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10130     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10131   elif test ! -f $MANPAGE_RENAMES ; then
10132     { { echo "$as_me:10132: error: not a filename: $MANPAGE_RENAMES" >&5
10133 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10134    { (exit 1); exit 1; }; }
10135   fi
10136
10137   test ! -d man && mkdir man
10138
10139   # Construct a sed-script to perform renaming within man-pages
10140   if test -n "$MANPAGE_RENAMES" ; then
10141     test ! -d man && mkdir man
10142     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10143   fi
10144 fi
10145
10146 echo "$as_me:10146: result: $MANPAGE_RENAMES" >&5
10147 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10148
10149 echo "$as_me:10149: checking if manpage aliases will be installed" >&5
10150 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10151
10152 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10153 if test "${with_manpage_aliases+set}" = set; then
10154   withval="$with_manpage_aliases"
10155   MANPAGE_ALIASES=$withval
10156 else
10157   MANPAGE_ALIASES=yes
10158 fi;
10159
10160 echo "$as_me:10160: result: $MANPAGE_ALIASES" >&5
10161 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10162
10163 case "x$LN_S" in #(vi
10164 xln*) #(vi
10165         cf_use_symlinks=yes
10166         ;;
10167 *)
10168         cf_use_symlinks=no
10169         ;;
10170 esac
10171
10172 MANPAGE_SYMLINKS=no
10173 if test "$MANPAGE_ALIASES" = yes ; then
10174 echo "$as_me:10174: checking if manpage symlinks should be used" >&5
10175 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10176
10177 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10178 if test "${with_manpage_symlinks+set}" = set; then
10179   withval="$with_manpage_symlinks"
10180   MANPAGE_SYMLINKS=$withval
10181 else
10182   MANPAGE_SYMLINKS=$cf_use_symlinks
10183 fi;
10184
10185 if test "$$cf_use_symlinks" = no; then
10186 if test "$MANPAGE_SYMLINKS" = yes ; then
10187         { echo "$as_me:10187: WARNING: cannot make symlinks" >&5
10188 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10189         MANPAGE_SYMLINKS=no
10190 fi
10191 fi
10192
10193 echo "$as_me:10193: result: $MANPAGE_SYMLINKS" >&5
10194 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10195 fi
10196
10197 echo "$as_me:10197: checking for manpage tbl" >&5
10198 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10199
10200 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10201 if test "${with_manpage_tbl+set}" = set; then
10202   withval="$with_manpage_tbl"
10203   MANPAGE_TBL=$withval
10204 else
10205   MANPAGE_TBL=no
10206 fi;
10207
10208 echo "$as_me:10208: result: $MANPAGE_TBL" >&5
10209 echo "${ECHO_T}$MANPAGE_TBL" >&6
10210
10211   if test "$prefix" = "NONE" ; then
10212      cf_prefix="$ac_default_prefix"
10213   else
10214      cf_prefix="$prefix"
10215   fi
10216
10217   case "$MANPAGE_FORMAT" in # (vi
10218   *catonly*) # (vi
10219     cf_format=yes
10220     cf_inboth=no
10221     ;;
10222   *formatted*) # (vi
10223     cf_format=yes
10224     cf_inboth=yes
10225     ;;
10226   *)
10227     cf_format=no
10228     cf_inboth=no
10229     ;;
10230   esac
10231
10232 test ! -d man && mkdir man
10233
10234 cf_so_strip=
10235 cf_compress=
10236 case "$MANPAGE_FORMAT" in #(vi
10237 *compress*) #(vi
10238         cf_so_strip="Z"
10239         cf_compress=compress
10240   ;;
10241 *gzip*)
10242         cf_so_strip="gz"
10243         cf_compress=gzip
10244   ;;
10245 esac
10246
10247 cf_edit_man=./edit_man.sh
10248 cf_man_alias=`pwd`/man_alias.sed
10249
10250 cat >$cf_edit_man <<CF_EOF
10251 #! /bin/sh
10252 # this script is generated by the configure-script CF_MAN_PAGES macro.
10253
10254 prefix="$cf_prefix"
10255 datadir="$datadir"
10256
10257 NCURSES_MAJOR="$NCURSES_MAJOR"
10258 NCURSES_MINOR="$NCURSES_MINOR"
10259 NCURSES_PATCH="$NCURSES_PATCH"
10260
10261 NCURSES_OSPEED="$NCURSES_OSPEED"
10262 TERMINFO="$TERMINFO"
10263
10264 INSTALL="$INSTALL"
10265 INSTALL_DATA="$INSTALL_DATA"
10266
10267 transform="$program_transform_name"
10268
10269 TMP=\${TMPDIR:=/tmp}/man\$\$
10270 trap "rm -f \$TMP" 0 1 2 5 15
10271
10272 form=\$1
10273 shift || exit 1
10274
10275 verb=\$1
10276 shift || exit 1
10277
10278 mandir=\$1
10279 shift || exit 1
10280
10281 srcdir=\$1
10282 top_srcdir=\$srcdir/..
10283 shift || exit 1
10284
10285 if test "\$form" = normal ; then
10286         if test "$cf_format" = yes ; then
10287         if test "$cf_inboth" = no ; then
10288                 sh \$0 format \$verb \$mandir \$srcdir \$*
10289                 exit $?
10290         fi
10291         fi
10292         cf_subdir=\$mandir/man
10293         cf_tables=$MANPAGE_TBL
10294 else
10295         cf_subdir=\$mandir/cat
10296         cf_tables=yes
10297 fi
10298
10299 # process the list of source-files
10300 for i in \$* ; do
10301 case \$i in #(vi
10302 *.orig|*.rej) ;; #(vi
10303 *.[0-9]*)
10304         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10305         if test \$verb = installing ; then
10306         if test ! -d \$cf_subdir\${section} ; then
10307                 mkdir -p \$cf_subdir\$section
10308         fi
10309         fi
10310
10311         # replace variables in man page
10312         if test ! -f $cf_man_alias ; then
10313 cat >>$cf_man_alias <<-CF_EOF2
10314                 s,@DATADIR@,\$datadir,g
10315                 s,@TERMINFO@,\$TERMINFO,g
10316                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10317                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10318                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10319                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10320 CF_EOF
10321
10322         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10323         do
10324                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10325                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10326 cat >>$cf_edit_man <<-CF_EOF
10327                 s,@$cf_NAME@,$cf_name,g
10328 CF_EOF
10329         done
10330
10331 cat >>$cf_edit_man <<CF_EOF
10332 CF_EOF2
10333                 echo "...made $cf_man_alias"
10334         fi
10335
10336         aliases=
10337         cf_source=\`basename \$i\`
10338         inalias=\$cf_source
10339         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10340         if test ! -f \$inalias ; then
10341                 echo .. skipped \$cf_source
10342                 continue
10343         fi
10344 CF_EOF
10345
10346 if test "$MANPAGE_ALIASES" != no ; then
10347 cat >>$cf_edit_man <<CF_EOF
10348         nCurses=ignore.3x
10349         test $with_curses_h = yes && nCurses=ncurses.3x
10350         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10351 CF_EOF
10352 fi
10353
10354 if test "$MANPAGE_RENAMES" = no ; then
10355 cat >>$cf_edit_man <<CF_EOF
10356         # perform program transformations for section 1 man pages
10357         if test \$section = 1 ; then
10358                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10359         else
10360                 cf_target=\$cf_subdir\${section}/\$cf_source
10361         fi
10362 CF_EOF
10363 else
10364 cat >>$cf_edit_man <<CF_EOF
10365         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10366         if test -z "\$cf_target" ; then
10367                 echo '? missing rename for '\$cf_source
10368                 cf_target="\$cf_source"
10369         fi
10370         cf_target="\$cf_subdir\${section}/\${cf_target}"
10371
10372 CF_EOF
10373 fi
10374
10375 cat >>$cf_edit_man <<CF_EOF
10376         sed     -f $cf_man_alias \\
10377 CF_EOF
10378
10379 if test -f $MANPAGE_RENAMES ; then
10380 cat >>$cf_edit_man <<CF_EOF
10381                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10382 CF_EOF
10383 else
10384 cat >>$cf_edit_man <<CF_EOF
10385                 < \$i >\$TMP
10386 CF_EOF
10387 fi
10388
10389 cat >>$cf_edit_man <<CF_EOF
10390 if test \$cf_tables = yes ; then
10391         tbl \$TMP >\$TMP.out
10392         mv \$TMP.out \$TMP
10393 fi
10394 CF_EOF
10395
10396 if test $with_overwrite != yes ; then
10397 cat >>$cf_edit_man <<CF_EOF
10398         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10399         mv \$TMP.out \$TMP
10400 CF_EOF
10401 fi
10402
10403 if test $with_curses_h != yes ; then
10404 cat >>$cf_edit_man <<CF_EOF
10405         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10406         mv \$TMP.out \$TMP
10407 CF_EOF
10408 fi
10409
10410 cat >>$cf_edit_man <<CF_EOF
10411         if test \$form = format ; then
10412                 nroff -man \$TMP >\$TMP.out
10413                 mv \$TMP.out \$TMP
10414         fi
10415 CF_EOF
10416
10417 if test -n "$cf_compress" ; then
10418 cat >>$cf_edit_man <<CF_EOF
10419         if test \$verb = installing ; then
10420         if ( $cf_compress -f \$TMP )
10421         then
10422                 mv \$TMP.$cf_so_strip \$TMP
10423         fi
10424         fi
10425         cf_target="\$cf_target.$cf_so_strip"
10426 CF_EOF
10427 fi
10428
10429 case "$MANPAGE_FORMAT" in #(vi
10430 *BSDI*)
10431 cat >>$cf_edit_man <<CF_EOF
10432         if test \$form = format ; then
10433                 # BSDI installs only .0 suffixes in the cat directories
10434                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10435         fi
10436 CF_EOF
10437   ;;
10438 esac
10439
10440 cat >>$cf_edit_man <<CF_EOF
10441         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10442         if test \$verb = installing ; then
10443                 echo \$verb \$cf_target
10444                 \$INSTALL_DATA \$TMP \$cf_target
10445                 test -d \$cf_subdir\${section} &&
10446                 test -n "\$aliases" && (
10447                         cd \$cf_subdir\${section} && (
10448                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10449                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10450                                 cf_target=\`basename \$cf_target\`
10451                                 for cf_alias in \$aliases
10452                                 do
10453                                         if test \$section = 1 ; then
10454                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10455                                         fi
10456
10457                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10458                                                 if test -f \$cf_alias\${suffix} ; then
10459                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10460                                                         then
10461                                                                 continue
10462                                                         fi
10463                                                 fi
10464                                                 echo .. \$verb alias \$cf_alias\${suffix}
10465 CF_EOF
10466 case "x$LN_S" in #(vi
10467 *-f) #(vi
10468 cat >>$cf_edit_man <<CF_EOF
10469                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10470 CF_EOF
10471         ;;
10472 *)
10473 cat >>$cf_edit_man <<CF_EOF
10474                                                 rm -f \$cf_alias\${suffix}
10475                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10476 CF_EOF
10477         ;;
10478 esac
10479 cat >>$cf_edit_man <<CF_EOF
10480                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10481                                                 echo ".so \$cf_source" >\$TMP
10482 CF_EOF
10483 if test -n "$cf_compress" ; then
10484 cat >>$cf_edit_man <<CF_EOF
10485                                                 if test -n "$cf_so_strip" ; then
10486                                                         $cf_compress -f \$TMP
10487                                                         mv \$TMP.$cf_so_strip \$TMP
10488                                                 fi
10489 CF_EOF
10490 fi
10491 cat >>$cf_edit_man <<CF_EOF
10492                                                 echo .. \$verb alias \$cf_alias\${suffix}
10493                                                 rm -f \$cf_alias\${suffix}
10494                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10495                                         fi
10496                                 done
10497                         )
10498                 )
10499         elif test \$verb = removing ; then
10500                 test -f \$cf_target && (
10501                         echo \$verb \$cf_target
10502                         rm -f \$cf_target
10503                 )
10504                 test -d \$cf_subdir\${section} &&
10505                 test -n "\$aliases" && (
10506                         cd \$cf_subdir\${section} && (
10507                                 for cf_alias in \$aliases
10508                                 do
10509                                         if test \$section = 1 ; then
10510                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10511                                         fi
10512
10513                                         echo .. \$verb alias \$cf_alias\${suffix}
10514                                         rm -f \$cf_alias\${suffix}
10515                                 done
10516                         )
10517                 )
10518         else
10519 #               echo ".hy 0"
10520                 cat \$TMP
10521         fi
10522         ;;
10523 esac
10524 done
10525
10526 if test $cf_inboth = yes ; then
10527 if test \$form != format ; then
10528         sh \$0 format \$verb \$mandir \$srcdir \$*
10529 fi
10530 fi
10531
10532 exit 0
10533 CF_EOF
10534 chmod 755 $cf_edit_man
10535
10536 ###############################################################################
10537
10538 ### Note that some functions (such as const) are normally disabled anyway.
10539 echo "$as_me:10539: checking if you want to build with function extensions" >&5
10540 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10541
10542 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10543 if test "${enable_ext_funcs+set}" = set; then
10544   enableval="$enable_ext_funcs"
10545   with_ext_funcs=$enableval
10546 else
10547   with_ext_funcs=yes
10548 fi;
10549 echo "$as_me:10549: result: $with_ext_funcs" >&5
10550 echo "${ECHO_T}$with_ext_funcs" >&6
10551 if test "$with_ext_funcs" = yes ; then
10552         NCURSES_EXT_FUNCS=1
10553         cat >>confdefs.h <<\EOF
10554 #define HAVE_ASSUME_DEFAULT_COLORS 1
10555 EOF
10556
10557         cat >>confdefs.h <<\EOF
10558 #define HAVE_CURSES_VERSION 1
10559 EOF
10560
10561         cat >>confdefs.h <<\EOF
10562 #define HAVE_HAS_KEY 1
10563 EOF
10564
10565         cat >>confdefs.h <<\EOF
10566 #define HAVE_RESIZETERM 1
10567 EOF
10568
10569         cat >>confdefs.h <<\EOF
10570 #define HAVE_RESIZE_TERM 1
10571 EOF
10572
10573         cat >>confdefs.h <<\EOF
10574 #define HAVE_TERM_ENTRY_H 1
10575 EOF
10576
10577         cat >>confdefs.h <<\EOF
10578 #define HAVE_USE_DEFAULT_COLORS 1
10579 EOF
10580
10581         cat >>confdefs.h <<\EOF
10582 #define HAVE_USE_SCREEN 1
10583 EOF
10584
10585         cat >>confdefs.h <<\EOF
10586 #define HAVE_USE_WINDOW 1
10587 EOF
10588
10589         cat >>confdefs.h <<\EOF
10590 #define HAVE_WRESIZE 1
10591 EOF
10592
10593         cat >>confdefs.h <<\EOF
10594 #define NCURSES_EXT_FUNCS 1
10595 EOF
10596
10597         GENERATED_EXT_FUNCS=generated
10598 else
10599         NCURSES_EXT_FUNCS=0
10600         GENERATED_EXT_FUNCS=
10601 fi
10602
10603 echo "$as_me:10603: checking if you want to build with experimental SCREEN extensions" >&5
10604 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10605
10606 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10607 if test "${enable_sp_funcs+set}" = set; then
10608   enableval="$enable_sp_funcs"
10609   with_sp_funcs=$enableval
10610 else
10611   with_sp_funcs=no
10612 fi;
10613 echo "$as_me:10613: result: $with_sp_funcs" >&5
10614 echo "${ECHO_T}$with_sp_funcs" >&6
10615 if test "$with_sp_funcs" = yes ; then
10616         NCURSES_SP_FUNCS=1
10617         cat >>confdefs.h <<\EOF
10618 #define NCURSES_SP_FUNCS 1
10619 EOF
10620
10621         GENERATED_SP_FUNCS=generated
10622 else
10623         NCURSES_SP_FUNCS=0
10624         GENERATED_SP_FUNCS=
10625 fi
10626
10627 echo "$as_me:10627: checking if you want to build with experimental terminal-driver" >&5
10628 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10629
10630 # Check whether --enable-term-driver or --disable-term-driver was given.
10631 if test "${enable_term_driver+set}" = set; then
10632   enableval="$enable_term_driver"
10633   with_term_driver=$enableval
10634 else
10635   with_term_driver=no
10636 fi;
10637 echo "$as_me:10637: result: $with_term_driver" >&5
10638 echo "${ECHO_T}$with_term_driver" >&6
10639 if test "$with_term_driver" = yes ; then
10640         cat >>confdefs.h <<\EOF
10641 #define USE_TERM_DRIVER 1
10642 EOF
10643
10644         if test "$with_sp_funcs" != yes ; then
10645                 { { echo "$as_me:10645: error: The term-driver option relies upon sp-funcs" >&5
10646 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10647    { (exit 1); exit 1; }; }
10648         fi
10649 fi
10650
10651 ###   use option --enable-const to turn on use of const beyond that in XSI.
10652 echo "$as_me:10652: checking for extended use of const keyword" >&5
10653 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10654
10655 # Check whether --enable-const or --disable-const was given.
10656 if test "${enable_const+set}" = set; then
10657   enableval="$enable_const"
10658   with_ext_const=$enableval
10659 else
10660   with_ext_const=no
10661 fi;
10662 echo "$as_me:10662: result: $with_ext_const" >&5
10663 echo "${ECHO_T}$with_ext_const" >&6
10664 NCURSES_CONST='/*nothing*/'
10665 if test "$with_ext_const" = yes ; then
10666         NCURSES_CONST=const
10667 fi
10668
10669 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10670 echo "$as_me:10670: checking if you want to use extended colors" >&5
10671 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10672
10673 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10674 if test "${enable_ext_colors+set}" = set; then
10675   enableval="$enable_ext_colors"
10676   with_ext_colors=$enableval
10677 else
10678   with_ext_colors=no
10679 fi;
10680 echo "$as_me:10680: result: $with_ext_colors" >&5
10681 echo "${ECHO_T}$with_ext_colors" >&6
10682 NCURSES_EXT_COLORS=0
10683 if test "$with_ext_colors" = yes ; then
10684         if test "$with_widec" != yes ; then
10685                 { { echo "$as_me:10685: error: This option applies only to wide-character library" >&5
10686 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10687    { (exit 1); exit 1; }; }
10688         else
10689                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10690
10691 if test "${with_abi_version+set}" != set; then
10692         case $cf_cv_rel_version in
10693         5.*)
10694                 cf_cv_rel_version=6.0
10695                 cf_cv_abi_version=6
10696                 { echo "$as_me:10696: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10697 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10698                 ;;
10699         esac
10700 fi
10701
10702         fi
10703         NCURSES_EXT_COLORS=1
10704         cat >>confdefs.h <<\EOF
10705 #define NCURSES_EXT_COLORS 1
10706 EOF
10707
10708 fi
10709
10710 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10711 echo "$as_me:10711: checking if you want to use extended mouse encoding" >&5
10712 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10713
10714 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10715 if test "${enable_ext_mouse+set}" = set; then
10716   enableval="$enable_ext_mouse"
10717   with_ext_mouse=$enableval
10718 else
10719   with_ext_mouse=no
10720 fi;
10721 echo "$as_me:10721: result: $with_ext_mouse" >&5
10722 echo "${ECHO_T}$with_ext_mouse" >&6
10723 NCURSES_MOUSE_VERSION=1
10724 if test "$with_ext_mouse" = yes ; then
10725         NCURSES_MOUSE_VERSION=2
10726
10727 if test "${with_abi_version+set}" != set; then
10728         case $cf_cv_rel_version in
10729         5.*)
10730                 cf_cv_rel_version=6.0
10731                 cf_cv_abi_version=6
10732                 { echo "$as_me:10732: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10733 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10734                 ;;
10735         esac
10736 fi
10737
10738 fi
10739
10740 echo "$as_me:10740: checking if you want \$NCURSES_NO_PADDING code" >&5
10741 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10742
10743 # Check whether --enable-no-padding or --disable-no-padding was given.
10744 if test "${enable_no_padding+set}" = set; then
10745   enableval="$enable_no_padding"
10746   with_no_padding=$enableval
10747 else
10748   with_no_padding=$with_ext_funcs
10749 fi;
10750 echo "$as_me:10750: result: $with_no_padding" >&5
10751 echo "${ECHO_T}$with_no_padding" >&6
10752 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10753 #define NCURSES_NO_PADDING 1
10754 EOF
10755
10756 echo "$as_me:10756: checking for ANSI C header files" >&5
10757 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10758 if test "${ac_cv_header_stdc+set}" = set; then
10759   echo $ECHO_N "(cached) $ECHO_C" >&6
10760 else
10761   cat >conftest.$ac_ext <<_ACEOF
10762 #line 10762 "configure"
10763 #include "confdefs.h"
10764 #include <stdlib.h>
10765 #include <stdarg.h>
10766 #include <string.h>
10767 #include <float.h>
10768
10769 _ACEOF
10770 if { (eval echo "$as_me:10770: \"$ac_cpp conftest.$ac_ext\"") >&5
10771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10772   ac_status=$?
10773   egrep -v '^ *\+' conftest.er1 >conftest.err
10774   rm -f conftest.er1
10775   cat conftest.err >&5
10776   echo "$as_me:10776: \$? = $ac_status" >&5
10777   (exit $ac_status); } >/dev/null; then
10778   if test -s conftest.err; then
10779     ac_cpp_err=$ac_c_preproc_warn_flag
10780   else
10781     ac_cpp_err=
10782   fi
10783 else
10784   ac_cpp_err=yes
10785 fi
10786 if test -z "$ac_cpp_err"; then
10787   ac_cv_header_stdc=yes
10788 else
10789   echo "$as_me: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   ac_cv_header_stdc=no
10792 fi
10793 rm -f conftest.err conftest.$ac_ext
10794
10795 if test $ac_cv_header_stdc = yes; then
10796   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10797   cat >conftest.$ac_ext <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800 #include <string.h>
10801
10802 _ACEOF
10803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10804   egrep "memchr" >/dev/null 2>&1; then
10805   :
10806 else
10807   ac_cv_header_stdc=no
10808 fi
10809 rm -rf conftest*
10810
10811 fi
10812
10813 if test $ac_cv_header_stdc = yes; then
10814   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10815   cat >conftest.$ac_ext <<_ACEOF
10816 #line 10816 "configure"
10817 #include "confdefs.h"
10818 #include <stdlib.h>
10819
10820 _ACEOF
10821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10822   egrep "free" >/dev/null 2>&1; then
10823   :
10824 else
10825   ac_cv_header_stdc=no
10826 fi
10827 rm -rf conftest*
10828
10829 fi
10830
10831 if test $ac_cv_header_stdc = yes; then
10832   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10833   if test "$cross_compiling" = yes; then
10834   :
10835 else
10836   cat >conftest.$ac_ext <<_ACEOF
10837 #line 10837 "configure"
10838 #include "confdefs.h"
10839 #include <ctype.h>
10840 #if ((' ' & 0x0FF) == 0x020)
10841 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10842 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10843 #else
10844 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10845                      || ('j' <= (c) && (c) <= 'r') \
10846                      || ('s' <= (c) && (c) <= 'z'))
10847 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10848 #endif
10849
10850 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10851 int
10852 main ()
10853 {
10854   int i;
10855   for (i = 0; i < 256; i++)
10856     if (XOR (islower (i), ISLOWER (i))
10857         || toupper (i) != TOUPPER (i))
10858       $ac_main_return(2);
10859   $ac_main_return (0);
10860 }
10861 _ACEOF
10862 rm -f conftest$ac_exeext
10863 if { (eval echo "$as_me:10863: \"$ac_link\"") >&5
10864   (eval $ac_link) 2>&5
10865   ac_status=$?
10866   echo "$as_me:10866: \$? = $ac_status" >&5
10867   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10868   { (eval echo "$as_me:10868: \"$ac_try\"") >&5
10869   (eval $ac_try) 2>&5
10870   ac_status=$?
10871   echo "$as_me:10871: \$? = $ac_status" >&5
10872   (exit $ac_status); }; }; then
10873   :
10874 else
10875   echo "$as_me: program exited with status $ac_status" >&5
10876 echo "$as_me: failed program was:" >&5
10877 cat conftest.$ac_ext >&5
10878 ac_cv_header_stdc=no
10879 fi
10880 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10881 fi
10882 fi
10883 fi
10884 echo "$as_me:10884: result: $ac_cv_header_stdc" >&5
10885 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10886 if test $ac_cv_header_stdc = yes; then
10887
10888 cat >>confdefs.h <<\EOF
10889 #define STDC_HEADERS 1
10890 EOF
10891
10892 fi
10893
10894 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10895
10896 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10897                   inttypes.h stdint.h unistd.h
10898 do
10899 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10900 echo "$as_me:10900: checking for $ac_header" >&5
10901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10903   echo $ECHO_N "(cached) $ECHO_C" >&6
10904 else
10905   cat >conftest.$ac_ext <<_ACEOF
10906 #line 10906 "configure"
10907 #include "confdefs.h"
10908 $ac_includes_default
10909 #include <$ac_header>
10910 _ACEOF
10911 rm -f conftest.$ac_objext
10912 if { (eval echo "$as_me:10912: \"$ac_compile\"") >&5
10913   (eval $ac_compile) 2>&5
10914   ac_status=$?
10915   echo "$as_me:10915: \$? = $ac_status" >&5
10916   (exit $ac_status); } &&
10917          { ac_try='test -s conftest.$ac_objext'
10918   { (eval echo "$as_me:10918: \"$ac_try\"") >&5
10919   (eval $ac_try) 2>&5
10920   ac_status=$?
10921   echo "$as_me:10921: \$? = $ac_status" >&5
10922   (exit $ac_status); }; }; then
10923   eval "$as_ac_Header=yes"
10924 else
10925   echo "$as_me: failed program was:" >&5
10926 cat conftest.$ac_ext >&5
10927 eval "$as_ac_Header=no"
10928 fi
10929 rm -f conftest.$ac_objext conftest.$ac_ext
10930 fi
10931 echo "$as_me:10931: result: `eval echo '${'$as_ac_Header'}'`" >&5
10932 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10933 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10934   cat >>confdefs.h <<EOF
10935 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10936 EOF
10937
10938 fi
10939 done
10940
10941 echo "$as_me:10941: checking for signed char" >&5
10942 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10943 if test "${ac_cv_type_signed_char+set}" = set; then
10944   echo $ECHO_N "(cached) $ECHO_C" >&6
10945 else
10946   cat >conftest.$ac_ext <<_ACEOF
10947 #line 10947 "configure"
10948 #include "confdefs.h"
10949 $ac_includes_default
10950 int
10951 main ()
10952 {
10953 if ((signed char *) 0)
10954   return 0;
10955 if (sizeof (signed char))
10956   return 0;
10957   ;
10958   return 0;
10959 }
10960 _ACEOF
10961 rm -f conftest.$ac_objext
10962 if { (eval echo "$as_me:10962: \"$ac_compile\"") >&5
10963   (eval $ac_compile) 2>&5
10964   ac_status=$?
10965   echo "$as_me:10965: \$? = $ac_status" >&5
10966   (exit $ac_status); } &&
10967          { ac_try='test -s conftest.$ac_objext'
10968   { (eval echo "$as_me:10968: \"$ac_try\"") >&5
10969   (eval $ac_try) 2>&5
10970   ac_status=$?
10971   echo "$as_me:10971: \$? = $ac_status" >&5
10972   (exit $ac_status); }; }; then
10973   ac_cv_type_signed_char=yes
10974 else
10975   echo "$as_me: failed program was:" >&5
10976 cat conftest.$ac_ext >&5
10977 ac_cv_type_signed_char=no
10978 fi
10979 rm -f conftest.$ac_objext conftest.$ac_ext
10980 fi
10981 echo "$as_me:10981: result: $ac_cv_type_signed_char" >&5
10982 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10983
10984 echo "$as_me:10984: checking size of signed char" >&5
10985 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10986 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10987   echo $ECHO_N "(cached) $ECHO_C" >&6
10988 else
10989   if test "$ac_cv_type_signed_char" = yes; then
10990   if test "$cross_compiling" = yes; then
10991   # Depending upon the size, compute the lo and hi bounds.
10992 cat >conftest.$ac_ext <<_ACEOF
10993 #line 10993 "configure"
10994 #include "confdefs.h"
10995 $ac_includes_default
10996 int
10997 main ()
10998 {
10999 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11000   ;
11001   return 0;
11002 }
11003 _ACEOF
11004 rm -f conftest.$ac_objext
11005 if { (eval echo "$as_me:11005: \"$ac_compile\"") >&5
11006   (eval $ac_compile) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); } &&
11010          { ac_try='test -s conftest.$ac_objext'
11011   { (eval echo "$as_me:11011: \"$ac_try\"") >&5
11012   (eval $ac_try) 2>&5
11013   ac_status=$?
11014   echo "$as_me:11014: \$? = $ac_status" >&5
11015   (exit $ac_status); }; }; then
11016   ac_lo=0 ac_mid=0
11017   while :; do
11018     cat >conftest.$ac_ext <<_ACEOF
11019 #line 11019 "configure"
11020 #include "confdefs.h"
11021 $ac_includes_default
11022 int
11023 main ()
11024 {
11025 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11026   ;
11027   return 0;
11028 }
11029 _ACEOF
11030 rm -f conftest.$ac_objext
11031 if { (eval echo "$as_me:11031: \"$ac_compile\"") >&5
11032   (eval $ac_compile) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); } &&
11036          { ac_try='test -s conftest.$ac_objext'
11037   { (eval echo "$as_me:11037: \"$ac_try\"") >&5
11038   (eval $ac_try) 2>&5
11039   ac_status=$?
11040   echo "$as_me:11040: \$? = $ac_status" >&5
11041   (exit $ac_status); }; }; then
11042   ac_hi=$ac_mid; break
11043 else
11044   echo "$as_me: failed program was:" >&5
11045 cat conftest.$ac_ext >&5
11046 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11047 fi
11048 rm -f conftest.$ac_objext conftest.$ac_ext
11049   done
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 cat conftest.$ac_ext >&5
11053 ac_hi=-1 ac_mid=-1
11054   while :; do
11055     cat >conftest.$ac_ext <<_ACEOF
11056 #line 11056 "configure"
11057 #include "confdefs.h"
11058 $ac_includes_default
11059 int
11060 main ()
11061 {
11062 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11063   ;
11064   return 0;
11065 }
11066 _ACEOF
11067 rm -f conftest.$ac_objext
11068 if { (eval echo "$as_me:11068: \"$ac_compile\"") >&5
11069   (eval $ac_compile) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); } &&
11073          { ac_try='test -s conftest.$ac_objext'
11074   { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075   (eval $ac_try) 2>&5
11076   ac_status=$?
11077   echo "$as_me:11077: \$? = $ac_status" >&5
11078   (exit $ac_status); }; }; then
11079   ac_lo=$ac_mid; break
11080 else
11081   echo "$as_me: failed program was:" >&5
11082 cat conftest.$ac_ext >&5
11083 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11084 fi
11085 rm -f conftest.$ac_objext conftest.$ac_ext
11086   done
11087 fi
11088 rm -f conftest.$ac_objext conftest.$ac_ext
11089 # Binary search between lo and hi bounds.
11090 while test "x$ac_lo" != "x$ac_hi"; do
11091   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11092   cat >conftest.$ac_ext <<_ACEOF
11093 #line 11093 "configure"
11094 #include "confdefs.h"
11095 $ac_includes_default
11096 int
11097 main ()
11098 {
11099 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11100   ;
11101   return 0;
11102 }
11103 _ACEOF
11104 rm -f conftest.$ac_objext
11105 if { (eval echo "$as_me:11105: \"$ac_compile\"") >&5
11106   (eval $ac_compile) 2>&5
11107   ac_status=$?
11108   echo "$as_me:11108: \$? = $ac_status" >&5
11109   (exit $ac_status); } &&
11110          { ac_try='test -s conftest.$ac_objext'
11111   { (eval echo "$as_me:11111: \"$ac_try\"") >&5
11112   (eval $ac_try) 2>&5
11113   ac_status=$?
11114   echo "$as_me:11114: \$? = $ac_status" >&5
11115   (exit $ac_status); }; }; then
11116   ac_hi=$ac_mid
11117 else
11118   echo "$as_me: failed program was:" >&5
11119 cat conftest.$ac_ext >&5
11120 ac_lo=`expr $ac_mid + 1`
11121 fi
11122 rm -f conftest.$ac_objext conftest.$ac_ext
11123 done
11124 ac_cv_sizeof_signed_char=$ac_lo
11125 else
11126   if test "$cross_compiling" = yes; then
11127   { { echo "$as_me:11127: error: cannot run test program while cross compiling" >&5
11128 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11129    { (exit 1); exit 1; }; }
11130 else
11131   cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134 $ac_includes_default
11135 int
11136 main ()
11137 {
11138 FILE *f = fopen ("conftest.val", "w");
11139 if (!f)
11140   $ac_main_return (1);
11141 fprintf (f, "%d", (sizeof (signed char)));
11142 fclose (f);
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 rm -f conftest$ac_exeext
11148 if { (eval echo "$as_me:11148: \"$ac_link\"") >&5
11149   (eval $ac_link) 2>&5
11150   ac_status=$?
11151   echo "$as_me:11151: \$? = $ac_status" >&5
11152   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11153   { (eval echo "$as_me:11153: \"$ac_try\"") >&5
11154   (eval $ac_try) 2>&5
11155   ac_status=$?
11156   echo "$as_me:11156: \$? = $ac_status" >&5
11157   (exit $ac_status); }; }; then
11158   ac_cv_sizeof_signed_char=`cat conftest.val`
11159 else
11160   echo "$as_me: program exited with status $ac_status" >&5
11161 echo "$as_me: failed program was:" >&5
11162 cat conftest.$ac_ext >&5
11163 fi
11164 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11165 fi
11166 fi
11167 rm -f conftest.val
11168 else
11169   ac_cv_sizeof_signed_char=0
11170 fi
11171 fi
11172 echo "$as_me:11172: result: $ac_cv_sizeof_signed_char" >&5
11173 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11174 cat >>confdefs.h <<EOF
11175 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11176 EOF
11177
11178 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11179         NCURSES_SBOOL="signed char"
11180 else
11181         NCURSES_SBOOL="char"
11182 fi
11183 echo "$as_me:11183: checking if you want to use signed Boolean array in term.h" >&5
11184 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11185
11186 # Check whether --enable-signed-char or --disable-signed-char was given.
11187 if test "${enable_signed_char+set}" = set; then
11188   enableval="$enable_signed_char"
11189   with_signed_char=$enableval
11190 else
11191   with_signed_char=no
11192 fi;
11193 echo "$as_me:11193: result: $with_signed_char" >&5
11194 echo "${ECHO_T}$with_signed_char" >&6
11195 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11196
11197 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11198 echo "$as_me:11198: checking if you want SIGWINCH handler" >&5
11199 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11200
11201 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11202 if test "${enable_sigwinch+set}" = set; then
11203   enableval="$enable_sigwinch"
11204   with_sigwinch=$enableval
11205 else
11206   with_sigwinch=$with_ext_funcs
11207 fi;
11208 echo "$as_me:11208: result: $with_sigwinch" >&5
11209 echo "${ECHO_T}$with_sigwinch" >&6
11210 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11211 #define USE_SIGWINCH 1
11212 EOF
11213
11214 ###   use option --enable-tcap-names to allow user to define new capabilities
11215 echo "$as_me:11215: checking if you want user-definable terminal capabilities like termcap" >&5
11216 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11217
11218 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11219 if test "${enable_tcap_names+set}" = set; then
11220   enableval="$enable_tcap_names"
11221   with_tcap_names=$enableval
11222 else
11223   with_tcap_names=$with_ext_funcs
11224 fi;
11225 echo "$as_me:11225: result: $with_tcap_names" >&5
11226 echo "${ECHO_T}$with_tcap_names" >&6
11227 NCURSES_XNAMES=0
11228 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11229
11230 ###############################################################################
11231 # These options are relatively safe to experiment with.
11232
11233 echo "$as_me:11233: checking if you want all development code" >&5
11234 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11235
11236 # Check whether --with-develop or --without-develop was given.
11237 if test "${with_develop+set}" = set; then
11238   withval="$with_develop"
11239   with_develop=$withval
11240 else
11241   with_develop=no
11242 fi;
11243 echo "$as_me:11243: result: $with_develop" >&5
11244 echo "${ECHO_T}$with_develop" >&6
11245
11246 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11247 echo "$as_me:11247: checking if you want hard-tabs code" >&5
11248 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11249
11250 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11251 if test "${enable_hard_tabs+set}" = set; then
11252   enableval="$enable_hard_tabs"
11253
11254 else
11255   enable_hard_tabs=$with_develop
11256 fi;
11257 echo "$as_me:11257: result: $enable_hard_tabs" >&5
11258 echo "${ECHO_T}$enable_hard_tabs" >&6
11259 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11260 #define USE_HARD_TABS 1
11261 EOF
11262
11263 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11264 echo "$as_me:11264: checking if you want limited support for xmc" >&5
11265 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11266
11267 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11268 if test "${enable_xmc_glitch+set}" = set; then
11269   enableval="$enable_xmc_glitch"
11270
11271 else
11272   enable_xmc_glitch=$with_develop
11273 fi;
11274 echo "$as_me:11274: result: $enable_xmc_glitch" >&5
11275 echo "${ECHO_T}$enable_xmc_glitch" >&6
11276 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11277 #define USE_XMC_SUPPORT 1
11278 EOF
11279
11280 ###############################################################################
11281 # These are just experimental, probably should not be in a package:
11282
11283 echo "$as_me:11283: checking if you do not want to assume colors are white-on-black" >&5
11284 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11285
11286 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11287 if test "${enable_assumed_color+set}" = set; then
11288   enableval="$enable_assumed_color"
11289   with_assumed_color=$enableval
11290 else
11291   with_assumed_color=yes
11292 fi;
11293 echo "$as_me:11293: result: $with_assumed_color" >&5
11294 echo "${ECHO_T}$with_assumed_color" >&6
11295 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11296 #define USE_ASSUMED_COLOR 1
11297 EOF
11298
11299 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11300 echo "$as_me:11300: checking if you want hashmap scrolling-optimization code" >&5
11301 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11302
11303 # Check whether --enable-hashmap or --disable-hashmap was given.
11304 if test "${enable_hashmap+set}" = set; then
11305   enableval="$enable_hashmap"
11306   with_hashmap=$enableval
11307 else
11308   with_hashmap=yes
11309 fi;
11310 echo "$as_me:11310: result: $with_hashmap" >&5
11311 echo "${ECHO_T}$with_hashmap" >&6
11312 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11313 #define USE_HASHMAP 1
11314 EOF
11315
11316 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11317 echo "$as_me:11317: checking if you want colorfgbg code" >&5
11318 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11319
11320 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11321 if test "${enable_colorfgbg+set}" = set; then
11322   enableval="$enable_colorfgbg"
11323   with_colorfgbg=$enableval
11324 else
11325   with_colorfgbg=no
11326 fi;
11327 echo "$as_me:11327: result: $with_colorfgbg" >&5
11328 echo "${ECHO_T}$with_colorfgbg" >&6
11329 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11330 #define USE_COLORFGBG 1
11331 EOF
11332
11333 ###   use option --enable-interop to turn on use of bindings used for interop
11334 echo "$as_me:11334: checking if you want interop bindings" >&5
11335 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11336
11337 # Check whether --enable-interop or --disable-interop was given.
11338 if test "${enable_interop+set}" = set; then
11339   enableval="$enable_interop"
11340   with_exp_interop=$enableval
11341 else
11342   with_exp_interop=no
11343 fi;
11344 echo "$as_me:11344: result: $with_exp_interop" >&5
11345 echo "${ECHO_T}$with_exp_interop" >&6
11346
11347 NCURSES_INTEROP_FUNCS=0
11348 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11349
11350 # This is still experimental (20080329), but should ultimately be moved to
11351 # the script-block --with-normal, etc.
11352
11353 echo "$as_me:11353: checking if you want to link with the pthread library" >&5
11354 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11355
11356 # Check whether --with-pthread or --without-pthread was given.
11357 if test "${with_pthread+set}" = set; then
11358   withval="$with_pthread"
11359   with_pthread=$withval
11360 else
11361   with_pthread=no
11362 fi;
11363 echo "$as_me:11363: result: $with_pthread" >&5
11364 echo "${ECHO_T}$with_pthread" >&6
11365
11366 if test "$with_pthread" != no ; then
11367     echo "$as_me:11367: checking for pthread.h" >&5
11368 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11369 if test "${ac_cv_header_pthread_h+set}" = set; then
11370   echo $ECHO_N "(cached) $ECHO_C" >&6
11371 else
11372   cat >conftest.$ac_ext <<_ACEOF
11373 #line 11373 "configure"
11374 #include "confdefs.h"
11375 #include <pthread.h>
11376 _ACEOF
11377 if { (eval echo "$as_me:11377: \"$ac_cpp conftest.$ac_ext\"") >&5
11378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11379   ac_status=$?
11380   egrep -v '^ *\+' conftest.er1 >conftest.err
11381   rm -f conftest.er1
11382   cat conftest.err >&5
11383   echo "$as_me:11383: \$? = $ac_status" >&5
11384   (exit $ac_status); } >/dev/null; then
11385   if test -s conftest.err; then
11386     ac_cpp_err=$ac_c_preproc_warn_flag
11387   else
11388     ac_cpp_err=
11389   fi
11390 else
11391   ac_cpp_err=yes
11392 fi
11393 if test -z "$ac_cpp_err"; then
11394   ac_cv_header_pthread_h=yes
11395 else
11396   echo "$as_me: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   ac_cv_header_pthread_h=no
11399 fi
11400 rm -f conftest.err conftest.$ac_ext
11401 fi
11402 echo "$as_me:11402: result: $ac_cv_header_pthread_h" >&5
11403 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11404 if test $ac_cv_header_pthread_h = yes; then
11405
11406         cat >>confdefs.h <<\EOF
11407 #define HAVE_PTHREADS_H 1
11408 EOF
11409
11410         echo "$as_me:11410: checking if we can link with the pthread library" >&5
11411 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
11412         cf_save_LIBS="$LIBS"
11413         LIBS="-lpthread $LIBS"
11414         cat >conftest.$ac_ext <<_ACEOF
11415 #line 11415 "configure"
11416 #include "confdefs.h"
11417
11418 #include <pthread.h>
11419
11420 int
11421 main ()
11422 {
11423
11424         int rc = pthread_create(0,0,0,0);
11425
11426   ;
11427   return 0;
11428 }
11429 _ACEOF
11430 rm -f conftest.$ac_objext conftest$ac_exeext
11431 if { (eval echo "$as_me:11431: \"$ac_link\"") >&5
11432   (eval $ac_link) 2>&5
11433   ac_status=$?
11434   echo "$as_me:11434: \$? = $ac_status" >&5
11435   (exit $ac_status); } &&
11436          { ac_try='test -s conftest$ac_exeext'
11437   { (eval echo "$as_me:11437: \"$ac_try\"") >&5
11438   (eval $ac_try) 2>&5
11439   ac_status=$?
11440   echo "$as_me:11440: \$? = $ac_status" >&5
11441   (exit $ac_status); }; }; then
11442   with_pthread=yes
11443 else
11444   echo "$as_me: failed program was:" >&5
11445 cat conftest.$ac_ext >&5
11446 with_pthread=no
11447 fi
11448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11449         LIBS="$cf_save_LIBS"
11450         echo "$as_me:11450: result: $with_pthread" >&5
11451 echo "${ECHO_T}$with_pthread" >&6
11452
11453         if test "$with_pthread" = yes ; then
11454             LIBS="-lpthread $LIBS"
11455             cat >>confdefs.h <<\EOF
11456 #define HAVE_LIBPTHREADS 1
11457 EOF
11458
11459         else
11460             { { echo "$as_me:11460: error: Cannot link with pthread library" >&5
11461 echo "$as_me: error: Cannot link with pthread library" >&2;}
11462    { (exit 1); exit 1; }; }
11463         fi
11464
11465 fi
11466
11467 fi
11468
11469 if test "x$with_pthread" != xno; then
11470         echo "$as_me:11470: checking for pthread_kill" >&5
11471 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11472 if test "${ac_cv_func_pthread_kill+set}" = set; then
11473   echo $ECHO_N "(cached) $ECHO_C" >&6
11474 else
11475   cat >conftest.$ac_ext <<_ACEOF
11476 #line 11476 "configure"
11477 #include "confdefs.h"
11478 /* System header to define __stub macros and hopefully few prototypes,
11479     which can conflict with char pthread_kill (); below.  */
11480 #include <assert.h>
11481 /* Override any gcc2 internal prototype to avoid an error.  */
11482 #ifdef __cplusplus
11483 extern "C"
11484 #endif
11485 /* We use char because int might match the return type of a gcc2
11486    builtin and then its argument prototype would still apply.  */
11487 char pthread_kill ();
11488 char (*f) ();
11489
11490 int
11491 main ()
11492 {
11493 /* The GNU C library defines this for functions which it implements
11494     to always fail with ENOSYS.  Some functions are actually named
11495     something starting with __ and the normal name is an alias.  */
11496 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11497 choke me
11498 #else
11499 f = pthread_kill;
11500 #endif
11501
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 rm -f conftest.$ac_objext conftest$ac_exeext
11507 if { (eval echo "$as_me:11507: \"$ac_link\"") >&5
11508   (eval $ac_link) 2>&5
11509   ac_status=$?
11510   echo "$as_me:11510: \$? = $ac_status" >&5
11511   (exit $ac_status); } &&
11512          { ac_try='test -s conftest$ac_exeext'
11513   { (eval echo "$as_me:11513: \"$ac_try\"") >&5
11514   (eval $ac_try) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit $ac_status); }; }; then
11518   ac_cv_func_pthread_kill=yes
11519 else
11520   echo "$as_me: failed program was:" >&5
11521 cat conftest.$ac_ext >&5
11522 ac_cv_func_pthread_kill=no
11523 fi
11524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11525 fi
11526 echo "$as_me:11526: result: $ac_cv_func_pthread_kill" >&5
11527 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11528 if test $ac_cv_func_pthread_kill = yes; then
11529
11530                 echo "$as_me:11530: checking if you want to allow EINTR in wgetch with pthreads" >&5
11531 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11532
11533 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11534 if test "${enable_pthreads_eintr+set}" = set; then
11535   enableval="$enable_pthreads_eintr"
11536   use_pthreads_eintr=$enableval
11537 else
11538   use_pthreads_eintr=no
11539 fi;
11540                 echo "$as_me:11540: result: $use_pthreads_eintr" >&5
11541 echo "${ECHO_T}$use_pthreads_eintr" >&6
11542                 if test $use_pthreads_eintr = yes ; then
11543                         cat >>confdefs.h <<\EOF
11544 #define USE_PTHREADS_EINTR 1
11545 EOF
11546
11547                 fi
11548 fi
11549
11550         echo "$as_me:11550: checking if you want to use weak-symbols for pthreads" >&5
11551 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11552
11553 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11554 if test "${enable_weak_symbols+set}" = set; then
11555   enableval="$enable_weak_symbols"
11556   use_weak_symbols=$enableval
11557 else
11558   use_weak_symbols=no
11559 fi;
11560         echo "$as_me:11560: result: $use_weak_symbols" >&5
11561 echo "${ECHO_T}$use_weak_symbols" >&6
11562         if test "$use_weak_symbols" = yes ; then
11563
11564 echo "$as_me:11564: checking if $CC supports weak symbols" >&5
11565 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11566 if test "${cf_cv_weak_symbols+set}" = set; then
11567   echo $ECHO_N "(cached) $ECHO_C" >&6
11568 else
11569
11570 cat >conftest.$ac_ext <<_ACEOF
11571 #line 11571 "configure"
11572 #include "confdefs.h"
11573
11574 #include <stdio.h>
11575 int
11576 main ()
11577 {
11578
11579 #if defined(__GNUC__)
11580 #  if defined __USE_ISOC99
11581 #    define _cat_pragma(exp)    _Pragma(#exp)
11582 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11583 #  else
11584 #    define _weak_pragma(exp)
11585 #  endif
11586 #  define _declare(name)        __extension__ extern __typeof__(name) name
11587 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11588 #endif
11589
11590 weak_symbol(fopen);
11591
11592   ;
11593   return 0;
11594 }
11595 _ACEOF
11596 rm -f conftest.$ac_objext
11597 if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
11598   (eval $ac_compile) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); } &&
11602          { ac_try='test -s conftest.$ac_objext'
11603   { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604   (eval $ac_try) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit $ac_status); }; }; then
11608   cf_cv_weak_symbols=yes
11609 else
11610   echo "$as_me: failed program was:" >&5
11611 cat conftest.$ac_ext >&5
11612 cf_cv_weak_symbols=no
11613 fi
11614 rm -f conftest.$ac_objext conftest.$ac_ext
11615
11616 fi
11617 echo "$as_me:11617: result: $cf_cv_weak_symbols" >&5
11618 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11619
11620         else
11621                 cf_cv_weak_symbols=no
11622         fi
11623
11624         if test $cf_cv_weak_symbols = yes ; then
11625                 cat >>confdefs.h <<\EOF
11626 #define USE_WEAK_SYMBOLS 1
11627 EOF
11628
11629         fi
11630 fi
11631
11632 PTHREAD=
11633 if test "$with_pthread" = "yes" ; then
11634     cat >>confdefs.h <<\EOF
11635 #define USE_PTHREADS 1
11636 EOF
11637
11638     enable_reentrant=yes
11639     if test $cf_cv_weak_symbols = yes ; then
11640         PTHREAD=-lpthread
11641     fi
11642 fi
11643
11644 # Reentrant code has to be opaque; there's little advantage to making ncurses
11645 # opaque outside of that, so there is no --enable-opaque option.  We can use
11646 # this option without --with-pthreads, but this will be always set for
11647 # pthreads.
11648 echo "$as_me:11648: checking if you want experimental reentrant code" >&5
11649 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11650
11651 # Check whether --enable-reentrant or --disable-reentrant was given.
11652 if test "${enable_reentrant+set}" = set; then
11653   enableval="$enable_reentrant"
11654   with_reentrant=$enableval
11655 else
11656   with_reentrant=no
11657 fi;
11658 echo "$as_me:11658: result: $with_reentrant" >&5
11659 echo "${ECHO_T}$with_reentrant" >&6
11660 if test "$with_reentrant" = yes ; then
11661         cf_cv_enable_reentrant=1
11662         cf_cv_enable_opaque="NCURSES_INTERNALS"
11663         NCURSES_OPAQUE=1
11664         NCURSES_SIZE_T=int
11665         if test $cf_cv_weak_symbols = yes ; then
11666
11667 # remove pthread library from $LIBS
11668 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11669
11670                 TEST_LIBS="-lpthread $TEST_LIBS"
11671                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11672         else
11673                 LIB_SUFFIX="t${LIB_SUFFIX}"
11674         fi
11675         cat >>confdefs.h <<\EOF
11676 #define USE_REENTRANT 1
11677 EOF
11678
11679 if test "${with_abi_version+set}" != set; then
11680         case $cf_cv_rel_version in
11681         5.*)
11682                 cf_cv_rel_version=6.0
11683                 cf_cv_abi_version=6
11684                 { echo "$as_me:11684: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11685 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11686                 ;;
11687         esac
11688 fi
11689
11690 else
11691         cf_cv_enable_reentrant=0
11692         cf_cv_enable_opaque="NCURSES_OPAQUE"
11693         NCURSES_OPAQUE=0
11694         NCURSES_SIZE_T=short
11695 fi
11696
11697 ### Allow using a different wrap-prefix
11698 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11699         echo "$as_me:11699: checking for prefix used to wrap public variables" >&5
11700 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11701
11702 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11703 if test "${with_wrap_prefix+set}" = set; then
11704   withval="$with_wrap_prefix"
11705   NCURSES_WRAP_PREFIX=$withval
11706 else
11707   NCURSES_WRAP_PREFIX=_nc_
11708 fi;
11709         echo "$as_me:11709: result: $NCURSES_WRAP_PREFIX" >&5
11710 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11711 else
11712         NCURSES_WRAP_PREFIX=_nc_
11713 fi
11714
11715 cat >>confdefs.h <<EOF
11716 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11717 EOF
11718
11719 echo "$as_me:11719: checking if you want experimental safe-sprintf code" >&5
11720 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11721
11722 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11723 if test "${enable_safe_sprintf+set}" = set; then
11724   enableval="$enable_safe_sprintf"
11725   with_safe_sprintf=$enableval
11726 else
11727   with_safe_sprintf=no
11728 fi;
11729 echo "$as_me:11729: result: $with_safe_sprintf" >&5
11730 echo "${ECHO_T}$with_safe_sprintf" >&6
11731 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11732 #define USE_SAFE_SPRINTF 1
11733 EOF
11734
11735 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11736 # when hashmap is used scroll hints are useless
11737 if test "$with_hashmap" = no ; then
11738 echo "$as_me:11738: checking if you want to experiment without scrolling-hints code" >&5
11739 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11740
11741 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11742 if test "${enable_scroll_hints+set}" = set; then
11743   enableval="$enable_scroll_hints"
11744   with_scroll_hints=$enableval
11745 else
11746   with_scroll_hints=yes
11747 fi;
11748 echo "$as_me:11748: result: $with_scroll_hints" >&5
11749 echo "${ECHO_T}$with_scroll_hints" >&6
11750 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11751 #define USE_SCROLL_HINTS 1
11752 EOF
11753
11754 fi
11755
11756 echo "$as_me:11756: checking if you want experimental wgetch-events code" >&5
11757 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11758
11759 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11760 if test "${enable_wgetch_events+set}" = set; then
11761   enableval="$enable_wgetch_events"
11762   with_wgetch_events=$enableval
11763 else
11764   with_wgetch_events=no
11765 fi;
11766 echo "$as_me:11766: result: $with_wgetch_events" >&5
11767 echo "${ECHO_T}$with_wgetch_events" >&6
11768 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11769 #define NCURSES_WGETCH_EVENTS 1
11770 EOF
11771
11772 ###############################################################################
11773
11774 ###     use option --disable-echo to suppress full display compiling commands
11775 echo "$as_me:11775: checking if you want to display full commands during build" >&5
11776 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11777
11778 # Check whether --enable-echo or --disable-echo was given.
11779 if test "${enable_echo+set}" = set; then
11780   enableval="$enable_echo"
11781   with_echo=$enableval
11782 else
11783   with_echo=yes
11784 fi;
11785 if test "$with_echo" = yes; then
11786         ECHO_LINK=
11787 else
11788         ECHO_LINK='@ echo linking $@ ... ;'
11789         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11790         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11791 fi
11792 echo "$as_me:11792: result: $with_echo" >&5
11793 echo "${ECHO_T}$with_echo" >&6
11794
11795 ###     use option --enable-warnings to turn on all gcc warnings
11796 echo "$as_me:11796: checking if you want to see compiler warnings" >&5
11797 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11798
11799 # Check whether --enable-warnings or --disable-warnings was given.
11800 if test "${enable_warnings+set}" = set; then
11801   enableval="$enable_warnings"
11802   with_warnings=$enableval
11803 fi;
11804 echo "$as_me:11804: result: $with_warnings" >&5
11805 echo "${ECHO_T}$with_warnings" >&6
11806
11807 if test "x$with_warnings" = "xyes"; then
11808
11809         ADAFLAGS="$ADAFLAGS -gnatg"
11810
11811 INTEL_COMPILER=no
11812
11813 if test "$GCC" = yes ; then
11814         case $host_os in
11815         linux*|gnu*)
11816                 echo "$as_me:11816: checking if this is really Intel C compiler" >&5
11817 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11818                 cf_save_CFLAGS="$CFLAGS"
11819                 CFLAGS="$CFLAGS -no-gcc"
11820                 cat >conftest.$ac_ext <<_ACEOF
11821 #line 11821 "configure"
11822 #include "confdefs.h"
11823
11824 int
11825 main ()
11826 {
11827
11828 #ifdef __INTEL_COMPILER
11829 #else
11830 make an error
11831 #endif
11832
11833   ;
11834   return 0;
11835 }
11836 _ACEOF
11837 rm -f conftest.$ac_objext
11838 if { (eval echo "$as_me:11838: \"$ac_compile\"") >&5
11839   (eval $ac_compile) 2>&5
11840   ac_status=$?
11841   echo "$as_me:11841: \$? = $ac_status" >&5
11842   (exit $ac_status); } &&
11843          { ac_try='test -s conftest.$ac_objext'
11844   { (eval echo "$as_me:11844: \"$ac_try\"") >&5
11845   (eval $ac_try) 2>&5
11846   ac_status=$?
11847   echo "$as_me:11847: \$? = $ac_status" >&5
11848   (exit $ac_status); }; }; then
11849   INTEL_COMPILER=yes
11850 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11851
11852 else
11853   echo "$as_me: failed program was:" >&5
11854 cat conftest.$ac_ext >&5
11855 fi
11856 rm -f conftest.$ac_objext conftest.$ac_ext
11857                 CFLAGS="$cf_save_CFLAGS"
11858                 echo "$as_me:11858: result: $INTEL_COMPILER" >&5
11859 echo "${ECHO_T}$INTEL_COMPILER" >&6
11860                 ;;
11861         esac
11862 fi
11863
11864 cat > conftest.$ac_ext <<EOF
11865 #line 11865 "${as_me:-configure}"
11866 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11867 EOF
11868
11869 if test "$INTEL_COMPILER" = yes
11870 then
11871 # The "-wdXXX" options suppress warnings:
11872 # remark #1419: external declaration in primary source file
11873 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11874 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11875 # remark #193: zero used for undefined preprocessing identifier
11876 # remark #593: variable "curs_sb_left_arrow" was set but never used
11877 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11878 # remark #869: parameter "tw" was never referenced
11879 # remark #981: operands are evaluated in unspecified order
11880 # warning #279: controlling expression is constant
11881
11882         { echo "$as_me:11882: checking for $CC warning options..." >&5
11883 echo "$as_me: checking for $CC warning options..." >&6;}
11884         cf_save_CFLAGS="$CFLAGS"
11885         EXTRA_CFLAGS="-Wall"
11886         for cf_opt in \
11887                 wd1419 \
11888                 wd1683 \
11889                 wd1684 \
11890                 wd193 \
11891                 wd593 \
11892                 wd279 \
11893                 wd810 \
11894                 wd869 \
11895                 wd981
11896         do
11897                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11898                 if { (eval echo "$as_me:11898: \"$ac_compile\"") >&5
11899   (eval $ac_compile) 2>&5
11900   ac_status=$?
11901   echo "$as_me:11901: \$? = $ac_status" >&5
11902   (exit $ac_status); }; then
11903                         test -n "$verbose" && echo "$as_me:11903: result: ... -$cf_opt" >&5
11904 echo "${ECHO_T}... -$cf_opt" >&6
11905                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11906                 fi
11907         done
11908         CFLAGS="$cf_save_CFLAGS"
11909
11910 elif test "$GCC" = yes
11911 then
11912         { echo "$as_me:11912: checking for $CC warning options..." >&5
11913 echo "$as_me: checking for $CC warning options..." >&6;}
11914         cf_save_CFLAGS="$CFLAGS"
11915         EXTRA_CFLAGS=
11916         cf_warn_CONST=""
11917         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11918         for cf_opt in W Wall \
11919                 Wbad-function-cast \
11920                 Wcast-align \
11921                 Wcast-qual \
11922                 Winline \
11923                 Wmissing-declarations \
11924                 Wmissing-prototypes \
11925                 Wnested-externs \
11926                 Wpointer-arith \
11927                 Wshadow \
11928                 Wstrict-prototypes \
11929                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11930         do
11931                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11932                 if { (eval echo "$as_me:11932: \"$ac_compile\"") >&5
11933   (eval $ac_compile) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; then
11937                         test -n "$verbose" && echo "$as_me:11937: result: ... -$cf_opt" >&5
11938 echo "${ECHO_T}... -$cf_opt" >&6
11939                         case $cf_opt in #(vi
11940                         Wcast-qual) #(vi
11941                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11942                                 ;;
11943                         Winline) #(vi
11944                                 case $GCC_VERSION in
11945                                 [34].*)
11946                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11947
11948 echo "${as_me:-configure}:11948: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11949
11950                                         continue;;
11951                                 esac
11952                                 ;;
11953                         esac
11954                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11955                 fi
11956         done
11957         CFLAGS="$cf_save_CFLAGS"
11958 fi
11959 rm -rf conftest*
11960
11961         if test "$cf_with_cxx" = yes ; then
11962
11963 INTEL_CPLUSPLUS=no
11964
11965 if test "$GCC" = yes ; then
11966         case $host_os in
11967         linux*|gnu*)
11968                 echo "$as_me:11968: checking if this is really Intel C++ compiler" >&5
11969 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11970                 cf_save_CFLAGS="$CXXFLAGS"
11971                 CXXFLAGS="$CXXFLAGS -no-gcc"
11972                 cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975
11976 int
11977 main ()
11978 {
11979
11980 #ifdef __INTEL_COMPILER
11981 #else
11982 make an error
11983 #endif
11984
11985   ;
11986   return 0;
11987 }
11988 _ACEOF
11989 rm -f conftest.$ac_objext
11990 if { (eval echo "$as_me:11990: \"$ac_compile\"") >&5
11991   (eval $ac_compile) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); } &&
11995          { ac_try='test -s conftest.$ac_objext'
11996   { (eval echo "$as_me:11996: \"$ac_try\"") >&5
11997   (eval $ac_try) 2>&5
11998   ac_status=$?
11999   echo "$as_me:11999: \$? = $ac_status" >&5
12000   (exit $ac_status); }; }; then
12001   INTEL_CPLUSPLUS=yes
12002 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12003
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat conftest.$ac_ext >&5
12007 fi
12008 rm -f conftest.$ac_objext conftest.$ac_ext
12009                 CXXFLAGS="$cf_save_CFLAGS"
12010                 echo "$as_me:12010: result: $INTEL_CPLUSPLUS" >&5
12011 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12012                 ;;
12013         esac
12014 fi
12015
12016 ac_ext=cc
12017 ac_cpp='$CXXCPP $CPPFLAGS'
12018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12021 ac_main_return=return
12022
12023 cat > conftest.$ac_ext <<EOF
12024 #line 12024 "configure"
12025 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12026 EOF
12027
12028 if test "$INTEL_CPLUSPLUS" = yes
12029 then
12030 # The "-wdXXX" options suppress warnings:
12031 # remark #1419: external declaration in primary source file
12032 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12033 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12034 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12035 # remark #193: zero used for undefined preprocessing identifier
12036 # remark #593: variable "curs_sb_left_arrow" was set but never used
12037 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12038 # remark #869: parameter "tw" was never referenced
12039 # remark #981: operands are evaluated in unspecified order
12040 # warning #269: invalid format string conversion
12041
12042         { echo "$as_me:12042: checking for $CC warning options..." >&5
12043 echo "$as_me: checking for $CC warning options..." >&6;}
12044         cf_save_CXXFLAGS="$CXXFLAGS"
12045         EXTRA_CXXFLAGS="-Wall"
12046         for cf_opt in \
12047                 wd1419 \
12048                 wd1682 \
12049                 wd1683 \
12050                 wd1684 \
12051                 wd193 \
12052                 wd279 \
12053                 wd593 \
12054                 wd810 \
12055                 wd869 \
12056                 wd981
12057         do
12058                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12059                 if { (eval echo "$as_me:12059: \"$ac_compile\"") >&5
12060   (eval $ac_compile) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); }; then
12064                         test -n "$verbose" && echo "$as_me:12064: result: ... -$cf_opt" >&5
12065 echo "${ECHO_T}... -$cf_opt" >&6
12066                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12067                 fi
12068         done
12069         CXXFLAGS="$cf_save_CXXFLAGS"
12070
12071 elif test "$GXX" = yes
12072 then
12073         { echo "$as_me:12073: checking for $CXX warning options..." >&5
12074 echo "$as_me: checking for $CXX warning options..." >&6;}
12075         cf_save_CXXFLAGS="$CXXFLAGS"
12076         EXTRA_CXXFLAGS="-W -Wall"
12077         cf_gxx_extra_warnings=""
12078         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12079         case "$GCC_VERSION" in
12080         [1-2].*)
12081                 ;;
12082         *)
12083                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12084                 ;;
12085         esac
12086         for cf_opt in \
12087                 Wabi \
12088                 fabi-version=0 \
12089                 Woverloaded-virtual \
12090                 Wsign-promo \
12091                 Wsynth \
12092                 Wold-style-cast \
12093                 Wcast-align \
12094                 Wcast-qual \
12095                 Wmissing-prototypes \
12096                 Wpointer-arith \
12097                 Wshadow \
12098                 Wstrict-prototypes \
12099                 Wundef $cf_gxx_extra_warnings Wno-unused
12100         do
12101                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12102                 if { (eval echo "$as_me:12102: \"$ac_compile\"") >&5
12103   (eval $ac_compile) 2>&5
12104   ac_status=$?
12105   echo "$as_me:12105: \$? = $ac_status" >&5
12106   (exit $ac_status); }; then
12107                         test -n "$verbose" && echo "$as_me:12107: result: ... -$cf_opt" >&5
12108 echo "${ECHO_T}... -$cf_opt" >&6
12109                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12110                 else
12111                         test -n "$verbose" && echo "$as_me:12111: result: ... no -$cf_opt" >&5
12112 echo "${ECHO_T}... no -$cf_opt" >&6
12113                 fi
12114         done
12115         CXXFLAGS="$cf_save_CXXFLAGS"
12116 fi
12117
12118 rm -rf conftest*
12119 ac_ext=c
12120 ac_cpp='$CPP $CPPFLAGS'
12121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12124 ac_main_return=return
12125
12126         fi
12127 fi
12128
12129 if test "$GCC" = yes
12130 then
12131 cat > conftest.i <<EOF
12132 #ifndef GCC_PRINTF
12133 #define GCC_PRINTF 0
12134 #endif
12135 #ifndef GCC_SCANF
12136 #define GCC_SCANF 0
12137 #endif
12138 #ifndef GCC_NORETURN
12139 #define GCC_NORETURN /* nothing */
12140 #endif
12141 #ifndef GCC_UNUSED
12142 #define GCC_UNUSED /* nothing */
12143 #endif
12144 EOF
12145 if test "$GCC" = yes
12146 then
12147         { echo "$as_me:12147: checking for $CC __attribute__ directives..." >&5
12148 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12149 cat > conftest.$ac_ext <<EOF
12150 #line 12150 "${as_me:-configure}"
12151 #include "confdefs.h"
12152 #include "conftest.h"
12153 #include "conftest.i"
12154 #if     GCC_PRINTF
12155 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12156 #else
12157 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12158 #endif
12159 #if     GCC_SCANF
12160 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12161 #else
12162 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12163 #endif
12164 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12165 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12166 extern void foo(void) GCC_NORETURN;
12167 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12168 EOF
12169         cf_printf_attribute=no
12170         cf_scanf_attribute=no
12171         for cf_attribute in scanf printf unused noreturn
12172         do
12173
12174 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12175
12176                 cf_directive="__attribute__(($cf_attribute))"
12177                 echo "checking for $CC $cf_directive" 1>&5
12178
12179                 case $cf_attribute in #(vi
12180                 printf) #(vi
12181                         cf_printf_attribute=yes
12182                         cat >conftest.h <<EOF
12183 #define GCC_$cf_ATTRIBUTE 1
12184 EOF
12185                         ;;
12186                 scanf) #(vi
12187                         cf_scanf_attribute=yes
12188                         cat >conftest.h <<EOF
12189 #define GCC_$cf_ATTRIBUTE 1
12190 EOF
12191                         ;;
12192                 *) #(vi
12193                         cat >conftest.h <<EOF
12194 #define GCC_$cf_ATTRIBUTE $cf_directive
12195 EOF
12196                         ;;
12197                 esac
12198
12199                 if { (eval echo "$as_me:12199: \"$ac_compile\"") >&5
12200   (eval $ac_compile) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); }; then
12204                         test -n "$verbose" && echo "$as_me:12204: result: ... $cf_attribute" >&5
12205 echo "${ECHO_T}... $cf_attribute" >&6
12206                         cat conftest.h >>confdefs.h
12207                         case $cf_attribute in #(vi
12208                         printf) #(vi
12209                                 if test "$cf_printf_attribute" = no ; then
12210                                         cat >>confdefs.h <<EOF
12211 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12212 EOF
12213                                 else
12214                                         cat >>confdefs.h <<EOF
12215 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12216 EOF
12217                                 fi
12218                                 ;;
12219                         scanf) #(vi
12220                                 if test "$cf_scanf_attribute" = no ; then
12221                                         cat >>confdefs.h <<EOF
12222 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12223 EOF
12224                                 else
12225                                         cat >>confdefs.h <<EOF
12226 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12227 EOF
12228                                 fi
12229                                 ;;
12230                         esac
12231                 fi
12232         done
12233 else
12234         fgrep define conftest.i >>confdefs.h
12235 fi
12236 rm -rf conftest*
12237 fi
12238
12239 ###     use option --enable-assertions to turn on generation of assertion code
12240 echo "$as_me:12240: checking if you want to enable runtime assertions" >&5
12241 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12242
12243 # Check whether --enable-assertions or --disable-assertions was given.
12244 if test "${enable_assertions+set}" = set; then
12245   enableval="$enable_assertions"
12246   with_assertions=$enableval
12247 else
12248   with_assertions=no
12249 fi;
12250 echo "$as_me:12250: result: $with_assertions" >&5
12251 echo "${ECHO_T}$with_assertions" >&6
12252 if test -n "$GCC"
12253 then
12254         if test "$with_assertions" = no
12255         then
12256                 cat >>confdefs.h <<\EOF
12257 #define NDEBUG 1
12258 EOF
12259
12260                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12261         else
12262
12263         ADAFLAGS="$ADAFLAGS -gnata"
12264
12265         fi
12266 fi
12267
12268 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12269
12270 echo "$as_me:12270: checking if you want to use dmalloc for testing" >&5
12271 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12272
12273 # Check whether --with-dmalloc or --without-dmalloc was given.
12274 if test "${with_dmalloc+set}" = set; then
12275   withval="$with_dmalloc"
12276   cat >>confdefs.h <<\EOF
12277 #define USE_DMALLOC 1
12278 EOF
12279
12280         : ${with_cflags:=-g}
12281         : ${with_no_leaks:=yes}
12282          with_dmalloc=yes
12283 else
12284   with_dmalloc=
12285 fi;
12286 echo "$as_me:12286: result: ${with_dmalloc:-no}" >&5
12287 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12288
12289 case .$with_cflags in #(vi
12290 .*-g*)
12291         case .$CFLAGS in #(vi
12292         .*-g*) #(vi
12293                 ;;
12294         *)
12295
12296 cf_fix_cppflags=no
12297 cf_new_cflags=
12298 cf_new_cppflags=
12299 cf_new_extra_cppflags=
12300
12301 for cf_add_cflags in -g
12302 do
12303 case $cf_fix_cppflags in
12304 no)
12305         case $cf_add_cflags in #(vi
12306         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12307                 case $cf_add_cflags in
12308                 -D*)
12309                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12310
12311                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12312                                 && test -z "${cf_tst_cflags}" \
12313                                 && cf_fix_cppflags=yes
12314
12315                         if test $cf_fix_cppflags = yes ; then
12316                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12317                                 continue
12318                         elif test "${cf_tst_cflags}" = "\"'" ; then
12319                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12320                                 continue
12321                         fi
12322                         ;;
12323                 esac
12324                 case "$CPPFLAGS" in
12325                 *$cf_add_cflags) #(vi
12326                         ;;
12327                 *) #(vi
12328                         case $cf_add_cflags in #(vi
12329                         -D*)
12330                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12331
12332 CPPFLAGS=`echo "$CPPFLAGS" | \
12333         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12334                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12335
12336                                 ;;
12337                         esac
12338                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12339                         ;;
12340                 esac
12341                 ;;
12342         *)
12343                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12344                 ;;
12345         esac
12346         ;;
12347 yes)
12348         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12349
12350         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12351
12352         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12353                 && test -z "${cf_tst_cflags}" \
12354                 && cf_fix_cppflags=no
12355         ;;
12356 esac
12357 done
12358
12359 if test -n "$cf_new_cflags" ; then
12360
12361         CFLAGS="$CFLAGS $cf_new_cflags"
12362 fi
12363
12364 if test -n "$cf_new_cppflags" ; then
12365
12366         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12367 fi
12368
12369 if test -n "$cf_new_extra_cppflags" ; then
12370
12371         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12372 fi
12373
12374                 ;;
12375         esac
12376         ;;
12377 esac
12378
12379 if test "$with_dmalloc" = yes ; then
12380         echo "$as_me:12380: checking for dmalloc.h" >&5
12381 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12382 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12383   echo $ECHO_N "(cached) $ECHO_C" >&6
12384 else
12385   cat >conftest.$ac_ext <<_ACEOF
12386 #line 12386 "configure"
12387 #include "confdefs.h"
12388 #include <dmalloc.h>
12389 _ACEOF
12390 if { (eval echo "$as_me:12390: \"$ac_cpp conftest.$ac_ext\"") >&5
12391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12392   ac_status=$?
12393   egrep -v '^ *\+' conftest.er1 >conftest.err
12394   rm -f conftest.er1
12395   cat conftest.err >&5
12396   echo "$as_me:12396: \$? = $ac_status" >&5
12397   (exit $ac_status); } >/dev/null; then
12398   if test -s conftest.err; then
12399     ac_cpp_err=$ac_c_preproc_warn_flag
12400   else
12401     ac_cpp_err=
12402   fi
12403 else
12404   ac_cpp_err=yes
12405 fi
12406 if test -z "$ac_cpp_err"; then
12407   ac_cv_header_dmalloc_h=yes
12408 else
12409   echo "$as_me: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   ac_cv_header_dmalloc_h=no
12412 fi
12413 rm -f conftest.err conftest.$ac_ext
12414 fi
12415 echo "$as_me:12415: result: $ac_cv_header_dmalloc_h" >&5
12416 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12417 if test $ac_cv_header_dmalloc_h = yes; then
12418
12419 echo "$as_me:12419: checking for dmalloc_debug in -ldmalloc" >&5
12420 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12421 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12422   echo $ECHO_N "(cached) $ECHO_C" >&6
12423 else
12424   ac_check_lib_save_LIBS=$LIBS
12425 LIBS="-ldmalloc  $LIBS"
12426 cat >conftest.$ac_ext <<_ACEOF
12427 #line 12427 "configure"
12428 #include "confdefs.h"
12429
12430 /* Override any gcc2 internal prototype to avoid an error.  */
12431 #ifdef __cplusplus
12432 extern "C"
12433 #endif
12434 /* We use char because int might match the return type of a gcc2
12435    builtin and then its argument prototype would still apply.  */
12436 char dmalloc_debug ();
12437 int
12438 main ()
12439 {
12440 dmalloc_debug ();
12441   ;
12442   return 0;
12443 }
12444 _ACEOF
12445 rm -f conftest.$ac_objext conftest$ac_exeext
12446 if { (eval echo "$as_me:12446: \"$ac_link\"") >&5
12447   (eval $ac_link) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit $ac_status); } &&
12451          { ac_try='test -s conftest$ac_exeext'
12452   { (eval echo "$as_me:12452: \"$ac_try\"") >&5
12453   (eval $ac_try) 2>&5
12454   ac_status=$?
12455   echo "$as_me:12455: \$? = $ac_status" >&5
12456   (exit $ac_status); }; }; then
12457   ac_cv_lib_dmalloc_dmalloc_debug=yes
12458 else
12459   echo "$as_me: failed program was:" >&5
12460 cat conftest.$ac_ext >&5
12461 ac_cv_lib_dmalloc_dmalloc_debug=no
12462 fi
12463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12464 LIBS=$ac_check_lib_save_LIBS
12465 fi
12466 echo "$as_me:12466: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12467 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12468 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12469   cat >>confdefs.h <<EOF
12470 #define HAVE_LIBDMALLOC 1
12471 EOF
12472
12473   LIBS="-ldmalloc $LIBS"
12474
12475 fi
12476
12477 fi
12478
12479 fi
12480
12481 echo "$as_me:12481: checking if you want to use dbmalloc for testing" >&5
12482 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12483
12484 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12485 if test "${with_dbmalloc+set}" = set; then
12486   withval="$with_dbmalloc"
12487   cat >>confdefs.h <<\EOF
12488 #define USE_DBMALLOC 1
12489 EOF
12490
12491         : ${with_cflags:=-g}
12492         : ${with_no_leaks:=yes}
12493          with_dbmalloc=yes
12494 else
12495   with_dbmalloc=
12496 fi;
12497 echo "$as_me:12497: result: ${with_dbmalloc:-no}" >&5
12498 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12499
12500 case .$with_cflags in #(vi
12501 .*-g*)
12502         case .$CFLAGS in #(vi
12503         .*-g*) #(vi
12504                 ;;
12505         *)
12506
12507 cf_fix_cppflags=no
12508 cf_new_cflags=
12509 cf_new_cppflags=
12510 cf_new_extra_cppflags=
12511
12512 for cf_add_cflags in -g
12513 do
12514 case $cf_fix_cppflags in
12515 no)
12516         case $cf_add_cflags in #(vi
12517         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12518                 case $cf_add_cflags in
12519                 -D*)
12520                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12521
12522                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12523                                 && test -z "${cf_tst_cflags}" \
12524                                 && cf_fix_cppflags=yes
12525
12526                         if test $cf_fix_cppflags = yes ; then
12527                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12528                                 continue
12529                         elif test "${cf_tst_cflags}" = "\"'" ; then
12530                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12531                                 continue
12532                         fi
12533                         ;;
12534                 esac
12535                 case "$CPPFLAGS" in
12536                 *$cf_add_cflags) #(vi
12537                         ;;
12538                 *) #(vi
12539                         case $cf_add_cflags in #(vi
12540                         -D*)
12541                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12542
12543 CPPFLAGS=`echo "$CPPFLAGS" | \
12544         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12545                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12546
12547                                 ;;
12548                         esac
12549                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12550                         ;;
12551                 esac
12552                 ;;
12553         *)
12554                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12555                 ;;
12556         esac
12557         ;;
12558 yes)
12559         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12560
12561         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12562
12563         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12564                 && test -z "${cf_tst_cflags}" \
12565                 && cf_fix_cppflags=no
12566         ;;
12567 esac
12568 done
12569
12570 if test -n "$cf_new_cflags" ; then
12571
12572         CFLAGS="$CFLAGS $cf_new_cflags"
12573 fi
12574
12575 if test -n "$cf_new_cppflags" ; then
12576
12577         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12578 fi
12579
12580 if test -n "$cf_new_extra_cppflags" ; then
12581
12582         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12583 fi
12584
12585                 ;;
12586         esac
12587         ;;
12588 esac
12589
12590 if test "$with_dbmalloc" = yes ; then
12591         echo "$as_me:12591: checking for dbmalloc.h" >&5
12592 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12593 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12594   echo $ECHO_N "(cached) $ECHO_C" >&6
12595 else
12596   cat >conftest.$ac_ext <<_ACEOF
12597 #line 12597 "configure"
12598 #include "confdefs.h"
12599 #include <dbmalloc.h>
12600 _ACEOF
12601 if { (eval echo "$as_me:12601: \"$ac_cpp conftest.$ac_ext\"") >&5
12602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12603   ac_status=$?
12604   egrep -v '^ *\+' conftest.er1 >conftest.err
12605   rm -f conftest.er1
12606   cat conftest.err >&5
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit $ac_status); } >/dev/null; then
12609   if test -s conftest.err; then
12610     ac_cpp_err=$ac_c_preproc_warn_flag
12611   else
12612     ac_cpp_err=
12613   fi
12614 else
12615   ac_cpp_err=yes
12616 fi
12617 if test -z "$ac_cpp_err"; then
12618   ac_cv_header_dbmalloc_h=yes
12619 else
12620   echo "$as_me: failed program was:" >&5
12621   cat conftest.$ac_ext >&5
12622   ac_cv_header_dbmalloc_h=no
12623 fi
12624 rm -f conftest.err conftest.$ac_ext
12625 fi
12626 echo "$as_me:12626: result: $ac_cv_header_dbmalloc_h" >&5
12627 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12628 if test $ac_cv_header_dbmalloc_h = yes; then
12629
12630 echo "$as_me:12630: checking for debug_malloc in -ldbmalloc" >&5
12631 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12632 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12633   echo $ECHO_N "(cached) $ECHO_C" >&6
12634 else
12635   ac_check_lib_save_LIBS=$LIBS
12636 LIBS="-ldbmalloc  $LIBS"
12637 cat >conftest.$ac_ext <<_ACEOF
12638 #line 12638 "configure"
12639 #include "confdefs.h"
12640
12641 /* Override any gcc2 internal prototype to avoid an error.  */
12642 #ifdef __cplusplus
12643 extern "C"
12644 #endif
12645 /* We use char because int might match the return type of a gcc2
12646    builtin and then its argument prototype would still apply.  */
12647 char debug_malloc ();
12648 int
12649 main ()
12650 {
12651 debug_malloc ();
12652   ;
12653   return 0;
12654 }
12655 _ACEOF
12656 rm -f conftest.$ac_objext conftest$ac_exeext
12657 if { (eval echo "$as_me:12657: \"$ac_link\"") >&5
12658   (eval $ac_link) 2>&5
12659   ac_status=$?
12660   echo "$as_me:12660: \$? = $ac_status" >&5
12661   (exit $ac_status); } &&
12662          { ac_try='test -s conftest$ac_exeext'
12663   { (eval echo "$as_me:12663: \"$ac_try\"") >&5
12664   (eval $ac_try) 2>&5
12665   ac_status=$?
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit $ac_status); }; }; then
12668   ac_cv_lib_dbmalloc_debug_malloc=yes
12669 else
12670   echo "$as_me: failed program was:" >&5
12671 cat conftest.$ac_ext >&5
12672 ac_cv_lib_dbmalloc_debug_malloc=no
12673 fi
12674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12675 LIBS=$ac_check_lib_save_LIBS
12676 fi
12677 echo "$as_me:12677: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12678 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12679 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12680   cat >>confdefs.h <<EOF
12681 #define HAVE_LIBDBMALLOC 1
12682 EOF
12683
12684   LIBS="-ldbmalloc $LIBS"
12685
12686 fi
12687
12688 fi
12689
12690 fi
12691
12692 echo "$as_me:12692: checking if you want to use valgrind for testing" >&5
12693 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12694
12695 # Check whether --with-valgrind or --without-valgrind was given.
12696 if test "${with_valgrind+set}" = set; then
12697   withval="$with_valgrind"
12698   cat >>confdefs.h <<\EOF
12699 #define USE_VALGRIND 1
12700 EOF
12701
12702         : ${with_cflags:=-g}
12703         : ${with_no_leaks:=yes}
12704          with_valgrind=yes
12705 else
12706   with_valgrind=
12707 fi;
12708 echo "$as_me:12708: result: ${with_valgrind:-no}" >&5
12709 echo "${ECHO_T}${with_valgrind:-no}" >&6
12710
12711 case .$with_cflags in #(vi
12712 .*-g*)
12713         case .$CFLAGS in #(vi
12714         .*-g*) #(vi
12715                 ;;
12716         *)
12717
12718 cf_fix_cppflags=no
12719 cf_new_cflags=
12720 cf_new_cppflags=
12721 cf_new_extra_cppflags=
12722
12723 for cf_add_cflags in -g
12724 do
12725 case $cf_fix_cppflags in
12726 no)
12727         case $cf_add_cflags in #(vi
12728         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12729                 case $cf_add_cflags in
12730                 -D*)
12731                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12732
12733                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12734                                 && test -z "${cf_tst_cflags}" \
12735                                 && cf_fix_cppflags=yes
12736
12737                         if test $cf_fix_cppflags = yes ; then
12738                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12739                                 continue
12740                         elif test "${cf_tst_cflags}" = "\"'" ; then
12741                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12742                                 continue
12743                         fi
12744                         ;;
12745                 esac
12746                 case "$CPPFLAGS" in
12747                 *$cf_add_cflags) #(vi
12748                         ;;
12749                 *) #(vi
12750                         case $cf_add_cflags in #(vi
12751                         -D*)
12752                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12753
12754 CPPFLAGS=`echo "$CPPFLAGS" | \
12755         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12756                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12757
12758                                 ;;
12759                         esac
12760                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12761                         ;;
12762                 esac
12763                 ;;
12764         *)
12765                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12766                 ;;
12767         esac
12768         ;;
12769 yes)
12770         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12771
12772         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12773
12774         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12775                 && test -z "${cf_tst_cflags}" \
12776                 && cf_fix_cppflags=no
12777         ;;
12778 esac
12779 done
12780
12781 if test -n "$cf_new_cflags" ; then
12782
12783         CFLAGS="$CFLAGS $cf_new_cflags"
12784 fi
12785
12786 if test -n "$cf_new_cppflags" ; then
12787
12788         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12789 fi
12790
12791 if test -n "$cf_new_extra_cppflags" ; then
12792
12793         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12794 fi
12795
12796                 ;;
12797         esac
12798         ;;
12799 esac
12800
12801 echo "$as_me:12801: checking if you want to perform memory-leak testing" >&5
12802 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12803
12804 # Check whether --enable-leaks or --disable-leaks was given.
12805 if test "${enable_leaks+set}" = set; then
12806   enableval="$enable_leaks"
12807   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12808 else
12809   : ${with_no_leaks:=no}
12810 fi;
12811 echo "$as_me:12811: result: $with_no_leaks" >&5
12812 echo "${ECHO_T}$with_no_leaks" >&6
12813
12814 if test "$with_no_leaks" = yes ; then
12815         cat >>confdefs.h <<\EOF
12816 #define NO_LEAKS 1
12817 EOF
12818
12819         cat >>confdefs.h <<\EOF
12820 #define YY_NO_LEAKS 1
12821 EOF
12822
12823 fi
12824
12825 cat >>confdefs.h <<\EOF
12826 #define HAVE_NC_ALLOC_H 1
12827 EOF
12828
12829 ###     use option --enable-expanded to generate certain macros as functions
12830
12831 # Check whether --enable-expanded or --disable-expanded was given.
12832 if test "${enable_expanded+set}" = set; then
12833   enableval="$enable_expanded"
12834   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12835 #define NCURSES_EXPANDED 1
12836 EOF
12837
12838 fi;
12839
12840 ###     use option --disable-macros to suppress macros in favor of functions
12841
12842 # Check whether --enable-macros or --disable-macros was given.
12843 if test "${enable_macros+set}" = set; then
12844   enableval="$enable_macros"
12845   test "$enableval" = no && cat >>confdefs.h <<\EOF
12846 #define NCURSES_NOMACROS 1
12847 EOF
12848
12849 fi;
12850
12851 # Normally we only add trace() to the debug-library.  Allow this to be
12852 # extended to all models of the ncurses library:
12853 cf_all_traces=no
12854 case "$CFLAGS $CPPFLAGS" in
12855 *-DTRACE*)
12856         cf_all_traces=yes
12857         ;;
12858 esac
12859
12860 echo "$as_me:12860: checking whether to add trace feature to all models" >&5
12861 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12862
12863 # Check whether --with-trace or --without-trace was given.
12864 if test "${with_trace+set}" = set; then
12865   withval="$with_trace"
12866   cf_with_trace=$withval
12867 else
12868   cf_with_trace=$cf_all_traces
12869 fi;
12870 echo "$as_me:12870: result: $cf_with_trace" >&5
12871 echo "${ECHO_T}$cf_with_trace" >&6
12872
12873 if test "$cf_with_trace" = yes ; then
12874         LIB_TRACING=all
12875         ADA_TRACE=TRUE
12876
12877 cf_fix_cppflags=no
12878 cf_new_cflags=
12879 cf_new_cppflags=
12880 cf_new_extra_cppflags=
12881
12882 for cf_add_cflags in -DTRACE
12883 do
12884 case $cf_fix_cppflags in
12885 no)
12886         case $cf_add_cflags in #(vi
12887         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12888                 case $cf_add_cflags in
12889                 -D*)
12890                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12891
12892                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12893                                 && test -z "${cf_tst_cflags}" \
12894                                 && cf_fix_cppflags=yes
12895
12896                         if test $cf_fix_cppflags = yes ; then
12897                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12898                                 continue
12899                         elif test "${cf_tst_cflags}" = "\"'" ; then
12900                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12901                                 continue
12902                         fi
12903                         ;;
12904                 esac
12905                 case "$CPPFLAGS" in
12906                 *$cf_add_cflags) #(vi
12907                         ;;
12908                 *) #(vi
12909                         case $cf_add_cflags in #(vi
12910                         -D*)
12911                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12912
12913 CPPFLAGS=`echo "$CPPFLAGS" | \
12914         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12915                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12916
12917                                 ;;
12918                         esac
12919                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12920                         ;;
12921                 esac
12922                 ;;
12923         *)
12924                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12925                 ;;
12926         esac
12927         ;;
12928 yes)
12929         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12930
12931         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12932
12933         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12934                 && test -z "${cf_tst_cflags}" \
12935                 && cf_fix_cppflags=no
12936         ;;
12937 esac
12938 done
12939
12940 if test -n "$cf_new_cflags" ; then
12941
12942         CFLAGS="$CFLAGS $cf_new_cflags"
12943 fi
12944
12945 if test -n "$cf_new_cppflags" ; then
12946
12947         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12948 fi
12949
12950 if test -n "$cf_new_extra_cppflags" ; then
12951
12952         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12953 fi
12954
12955 else
12956         LIB_TRACING=DEBUG
12957         ADA_TRACE=FALSE
12958 fi
12959
12960 ###     Checks for libraries.
12961 case $cf_cv_system_name in #(vi
12962 *mingw32*) #(vi
12963         ;;
12964 *)
12965 echo "$as_me:12965: checking for gettimeofday" >&5
12966 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12967 if test "${ac_cv_func_gettimeofday+set}" = set; then
12968   echo $ECHO_N "(cached) $ECHO_C" >&6
12969 else
12970   cat >conftest.$ac_ext <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973 /* System header to define __stub macros and hopefully few prototypes,
12974     which can conflict with char gettimeofday (); below.  */
12975 #include <assert.h>
12976 /* Override any gcc2 internal prototype to avoid an error.  */
12977 #ifdef __cplusplus
12978 extern "C"
12979 #endif
12980 /* We use char because int might match the return type of a gcc2
12981    builtin and then its argument prototype would still apply.  */
12982 char gettimeofday ();
12983 char (*f) ();
12984
12985 int
12986 main ()
12987 {
12988 /* The GNU C library defines this for functions which it implements
12989     to always fail with ENOSYS.  Some functions are actually named
12990     something starting with __ and the normal name is an alias.  */
12991 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12992 choke me
12993 #else
12994 f = gettimeofday;
12995 #endif
12996
12997   ;
12998   return 0;
12999 }
13000 _ACEOF
13001 rm -f conftest.$ac_objext conftest$ac_exeext
13002 if { (eval echo "$as_me:13002: \"$ac_link\"") >&5
13003   (eval $ac_link) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); } &&
13007          { ac_try='test -s conftest$ac_exeext'
13008   { (eval echo "$as_me:13008: \"$ac_try\"") >&5
13009   (eval $ac_try) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); }; }; then
13013   ac_cv_func_gettimeofday=yes
13014 else
13015   echo "$as_me: failed program was:" >&5
13016 cat conftest.$ac_ext >&5
13017 ac_cv_func_gettimeofday=no
13018 fi
13019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13020 fi
13021 echo "$as_me:13021: result: $ac_cv_func_gettimeofday" >&5
13022 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13023 if test $ac_cv_func_gettimeofday = yes; then
13024   cat >>confdefs.h <<\EOF
13025 #define HAVE_GETTIMEOFDAY 1
13026 EOF
13027
13028 else
13029
13030 echo "$as_me:13030: checking for gettimeofday in -lbsd" >&5
13031 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13032 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13033   echo $ECHO_N "(cached) $ECHO_C" >&6
13034 else
13035   ac_check_lib_save_LIBS=$LIBS
13036 LIBS="-lbsd  $LIBS"
13037 cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040
13041 /* Override any gcc2 internal prototype to avoid an error.  */
13042 #ifdef __cplusplus
13043 extern "C"
13044 #endif
13045 /* We use char because int might match the return type of a gcc2
13046    builtin and then its argument prototype would still apply.  */
13047 char gettimeofday ();
13048 int
13049 main ()
13050 {
13051 gettimeofday ();
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f conftest.$ac_objext conftest$ac_exeext
13057 if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit $ac_status); } &&
13062          { ac_try='test -s conftest$ac_exeext'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit $ac_status); }; }; then
13068   ac_cv_lib_bsd_gettimeofday=yes
13069 else
13070   echo "$as_me: failed program was:" >&5
13071 cat conftest.$ac_ext >&5
13072 ac_cv_lib_bsd_gettimeofday=no
13073 fi
13074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13075 LIBS=$ac_check_lib_save_LIBS
13076 fi
13077 echo "$as_me:13077: result: $ac_cv_lib_bsd_gettimeofday" >&5
13078 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13079 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13080   cat >>confdefs.h <<\EOF
13081 #define HAVE_GETTIMEOFDAY 1
13082 EOF
13083
13084         LIBS="-lbsd $LIBS"
13085 fi
13086
13087 fi
13088         ;;
13089 esac
13090
13091 echo "$as_me:13091: checking if -lm needed for math functions" >&5
13092 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13093 if test "${cf_cv_need_libm+set}" = set; then
13094   echo $ECHO_N "(cached) $ECHO_C" >&6
13095 else
13096
13097         cat >conftest.$ac_ext <<_ACEOF
13098 #line 13098 "configure"
13099 #include "confdefs.h"
13100
13101         #include <stdio.h>
13102         #include <math.h>
13103
13104 int
13105 main ()
13106 {
13107 double x = rand(); printf("result = %g\n", sin(x))
13108   ;
13109   return 0;
13110 }
13111 _ACEOF
13112 rm -f conftest.$ac_objext conftest$ac_exeext
13113 if { (eval echo "$as_me:13113: \"$ac_link\"") >&5
13114   (eval $ac_link) 2>&5
13115   ac_status=$?
13116   echo "$as_me:13116: \$? = $ac_status" >&5
13117   (exit $ac_status); } &&
13118          { ac_try='test -s conftest$ac_exeext'
13119   { (eval echo "$as_me:13119: \"$ac_try\"") >&5
13120   (eval $ac_try) 2>&5
13121   ac_status=$?
13122   echo "$as_me:13122: \$? = $ac_status" >&5
13123   (exit $ac_status); }; }; then
13124   cf_cv_need_libm=no
13125 else
13126   echo "$as_me: failed program was:" >&5
13127 cat conftest.$ac_ext >&5
13128 cf_cv_need_libm=yes
13129 fi
13130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13131 fi
13132 echo "$as_me:13132: result: $cf_cv_need_libm" >&5
13133 echo "${ECHO_T}$cf_cv_need_libm" >&6
13134 if test "$cf_cv_need_libm" = yes
13135 then
13136 MATH_LIB=-lm
13137 fi
13138
13139 ###     Checks for header files.
13140 echo "$as_me:13140: checking for ANSI C header files" >&5
13141 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13142 if test "${ac_cv_header_stdc+set}" = set; then
13143   echo $ECHO_N "(cached) $ECHO_C" >&6
13144 else
13145   cat >conftest.$ac_ext <<_ACEOF
13146 #line 13146 "configure"
13147 #include "confdefs.h"
13148 #include <stdlib.h>
13149 #include <stdarg.h>
13150 #include <string.h>
13151 #include <float.h>
13152
13153 _ACEOF
13154 if { (eval echo "$as_me:13154: \"$ac_cpp conftest.$ac_ext\"") >&5
13155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13156   ac_status=$?
13157   egrep -v '^ *\+' conftest.er1 >conftest.err
13158   rm -f conftest.er1
13159   cat conftest.err >&5
13160   echo "$as_me:13160: \$? = $ac_status" >&5
13161   (exit $ac_status); } >/dev/null; then
13162   if test -s conftest.err; then
13163     ac_cpp_err=$ac_c_preproc_warn_flag
13164   else
13165     ac_cpp_err=
13166   fi
13167 else
13168   ac_cpp_err=yes
13169 fi
13170 if test -z "$ac_cpp_err"; then
13171   ac_cv_header_stdc=yes
13172 else
13173   echo "$as_me: failed program was:" >&5
13174   cat conftest.$ac_ext >&5
13175   ac_cv_header_stdc=no
13176 fi
13177 rm -f conftest.err conftest.$ac_ext
13178
13179 if test $ac_cv_header_stdc = yes; then
13180   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13181   cat >conftest.$ac_ext <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184 #include <string.h>
13185
13186 _ACEOF
13187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13188   egrep "memchr" >/dev/null 2>&1; then
13189   :
13190 else
13191   ac_cv_header_stdc=no
13192 fi
13193 rm -rf conftest*
13194
13195 fi
13196
13197 if test $ac_cv_header_stdc = yes; then
13198   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13199   cat >conftest.$ac_ext <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13202 #include <stdlib.h>
13203
13204 _ACEOF
13205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13206   egrep "free" >/dev/null 2>&1; then
13207   :
13208 else
13209   ac_cv_header_stdc=no
13210 fi
13211 rm -rf conftest*
13212
13213 fi
13214
13215 if test $ac_cv_header_stdc = yes; then
13216   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13217   if test "$cross_compiling" = yes; then
13218   :
13219 else
13220   cat >conftest.$ac_ext <<_ACEOF
13221 #line 13221 "configure"
13222 #include "confdefs.h"
13223 #include <ctype.h>
13224 #if ((' ' & 0x0FF) == 0x020)
13225 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13226 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13227 #else
13228 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13229                      || ('j' <= (c) && (c) <= 'r') \
13230                      || ('s' <= (c) && (c) <= 'z'))
13231 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13232 #endif
13233
13234 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13235 int
13236 main ()
13237 {
13238   int i;
13239   for (i = 0; i < 256; i++)
13240     if (XOR (islower (i), ISLOWER (i))
13241         || toupper (i) != TOUPPER (i))
13242       $ac_main_return(2);
13243   $ac_main_return (0);
13244 }
13245 _ACEOF
13246 rm -f conftest$ac_exeext
13247 if { (eval echo "$as_me:13247: \"$ac_link\"") >&5
13248   (eval $ac_link) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13252   { (eval echo "$as_me:13252: \"$ac_try\"") >&5
13253   (eval $ac_try) 2>&5
13254   ac_status=$?
13255   echo "$as_me:13255: \$? = $ac_status" >&5
13256   (exit $ac_status); }; }; then
13257   :
13258 else
13259   echo "$as_me: program exited with status $ac_status" >&5
13260 echo "$as_me: failed program was:" >&5
13261 cat conftest.$ac_ext >&5
13262 ac_cv_header_stdc=no
13263 fi
13264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13265 fi
13266 fi
13267 fi
13268 echo "$as_me:13268: result: $ac_cv_header_stdc" >&5
13269 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13270 if test $ac_cv_header_stdc = yes; then
13271
13272 cat >>confdefs.h <<\EOF
13273 #define STDC_HEADERS 1
13274 EOF
13275
13276 fi
13277
13278 ac_header_dirent=no
13279 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13280   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13281 echo "$as_me:13281: checking for $ac_hdr that defines DIR" >&5
13282 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13284   echo $ECHO_N "(cached) $ECHO_C" >&6
13285 else
13286   cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13289 #include <sys/types.h>
13290 #include <$ac_hdr>
13291
13292 int
13293 main ()
13294 {
13295 if ((DIR *) 0)
13296 return 0;
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext
13302 if { (eval echo "$as_me:13302: \"$ac_compile\"") >&5
13303   (eval $ac_compile) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); } &&
13307          { ac_try='test -s conftest.$ac_objext'
13308   { (eval echo "$as_me:13308: \"$ac_try\"") >&5
13309   (eval $ac_try) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; }; then
13313   eval "$as_ac_Header=yes"
13314 else
13315   echo "$as_me: failed program was:" >&5
13316 cat conftest.$ac_ext >&5
13317 eval "$as_ac_Header=no"
13318 fi
13319 rm -f conftest.$ac_objext conftest.$ac_ext
13320 fi
13321 echo "$as_me:13321: result: `eval echo '${'$as_ac_Header'}'`" >&5
13322 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13323 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13324   cat >>confdefs.h <<EOF
13325 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13326 EOF
13327
13328 ac_header_dirent=$ac_hdr; break
13329 fi
13330
13331 done
13332 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13333 if test $ac_header_dirent = dirent.h; then
13334   echo "$as_me:13334: checking for opendir in -ldir" >&5
13335 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13336 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13337   echo $ECHO_N "(cached) $ECHO_C" >&6
13338 else
13339   ac_check_lib_save_LIBS=$LIBS
13340 LIBS="-ldir  $LIBS"
13341 cat >conftest.$ac_ext <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13344
13345 /* Override any gcc2 internal prototype to avoid an error.  */
13346 #ifdef __cplusplus
13347 extern "C"
13348 #endif
13349 /* We use char because int might match the return type of a gcc2
13350    builtin and then its argument prototype would still apply.  */
13351 char opendir ();
13352 int
13353 main ()
13354 {
13355 opendir ();
13356   ;
13357   return 0;
13358 }
13359 _ACEOF
13360 rm -f conftest.$ac_objext conftest$ac_exeext
13361 if { (eval echo "$as_me:13361: \"$ac_link\"") >&5
13362   (eval $ac_link) 2>&5
13363   ac_status=$?
13364   echo "$as_me:13364: \$? = $ac_status" >&5
13365   (exit $ac_status); } &&
13366          { ac_try='test -s conftest$ac_exeext'
13367   { (eval echo "$as_me:13367: \"$ac_try\"") >&5
13368   (eval $ac_try) 2>&5
13369   ac_status=$?
13370   echo "$as_me:13370: \$? = $ac_status" >&5
13371   (exit $ac_status); }; }; then
13372   ac_cv_lib_dir_opendir=yes
13373 else
13374   echo "$as_me: failed program was:" >&5
13375 cat conftest.$ac_ext >&5
13376 ac_cv_lib_dir_opendir=no
13377 fi
13378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13379 LIBS=$ac_check_lib_save_LIBS
13380 fi
13381 echo "$as_me:13381: result: $ac_cv_lib_dir_opendir" >&5
13382 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13383 if test $ac_cv_lib_dir_opendir = yes; then
13384   LIBS="$LIBS -ldir"
13385 fi
13386
13387 else
13388   echo "$as_me:13388: checking for opendir in -lx" >&5
13389 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13390 if test "${ac_cv_lib_x_opendir+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393   ac_check_lib_save_LIBS=$LIBS
13394 LIBS="-lx  $LIBS"
13395 cat >conftest.$ac_ext <<_ACEOF
13396 #line 13396 "configure"
13397 #include "confdefs.h"
13398
13399 /* Override any gcc2 internal prototype to avoid an error.  */
13400 #ifdef __cplusplus
13401 extern "C"
13402 #endif
13403 /* We use char because int might match the return type of a gcc2
13404    builtin and then its argument prototype would still apply.  */
13405 char opendir ();
13406 int
13407 main ()
13408 {
13409 opendir ();
13410   ;
13411   return 0;
13412 }
13413 _ACEOF
13414 rm -f conftest.$ac_objext conftest$ac_exeext
13415 if { (eval echo "$as_me:13415: \"$ac_link\"") >&5
13416   (eval $ac_link) 2>&5
13417   ac_status=$?
13418   echo "$as_me:13418: \$? = $ac_status" >&5
13419   (exit $ac_status); } &&
13420          { ac_try='test -s conftest$ac_exeext'
13421   { (eval echo "$as_me:13421: \"$ac_try\"") >&5
13422   (eval $ac_try) 2>&5
13423   ac_status=$?
13424   echo "$as_me:13424: \$? = $ac_status" >&5
13425   (exit $ac_status); }; }; then
13426   ac_cv_lib_x_opendir=yes
13427 else
13428   echo "$as_me: failed program was:" >&5
13429 cat conftest.$ac_ext >&5
13430 ac_cv_lib_x_opendir=no
13431 fi
13432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13433 LIBS=$ac_check_lib_save_LIBS
13434 fi
13435 echo "$as_me:13435: result: $ac_cv_lib_x_opendir" >&5
13436 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13437 if test $ac_cv_lib_x_opendir = yes; then
13438   LIBS="$LIBS -lx"
13439 fi
13440
13441 fi
13442
13443 echo "$as_me:13443: checking whether time.h and sys/time.h may both be included" >&5
13444 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13445 if test "${ac_cv_header_time+set}" = set; then
13446   echo $ECHO_N "(cached) $ECHO_C" >&6
13447 else
13448   cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451 #include <sys/types.h>
13452 #include <sys/time.h>
13453 #include <time.h>
13454
13455 int
13456 main ()
13457 {
13458 if ((struct tm *) 0)
13459 return 0;
13460   ;
13461   return 0;
13462 }
13463 _ACEOF
13464 rm -f conftest.$ac_objext
13465 if { (eval echo "$as_me:13465: \"$ac_compile\"") >&5
13466   (eval $ac_compile) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); } &&
13470          { ac_try='test -s conftest.$ac_objext'
13471   { (eval echo "$as_me:13471: \"$ac_try\"") >&5
13472   (eval $ac_try) 2>&5
13473   ac_status=$?
13474   echo "$as_me:13474: \$? = $ac_status" >&5
13475   (exit $ac_status); }; }; then
13476   ac_cv_header_time=yes
13477 else
13478   echo "$as_me: failed program was:" >&5
13479 cat conftest.$ac_ext >&5
13480 ac_cv_header_time=no
13481 fi
13482 rm -f conftest.$ac_objext conftest.$ac_ext
13483 fi
13484 echo "$as_me:13484: result: $ac_cv_header_time" >&5
13485 echo "${ECHO_T}$ac_cv_header_time" >&6
13486 if test $ac_cv_header_time = yes; then
13487
13488 cat >>confdefs.h <<\EOF
13489 #define TIME_WITH_SYS_TIME 1
13490 EOF
13491
13492 fi
13493
13494 cf_regex_func=no
13495
13496 cf_regex_libs="regex re"
13497 case $host_os in #(vi
13498 mingw*)
13499         cf_regex_libs="regex.dll $cf_regex_libs"
13500         ;;
13501 esac
13502
13503 echo "$as_me:13503: checking for regcomp" >&5
13504 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13505 if test "${ac_cv_func_regcomp+set}" = set; then
13506   echo $ECHO_N "(cached) $ECHO_C" >&6
13507 else
13508   cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511 /* System header to define __stub macros and hopefully few prototypes,
13512     which can conflict with char regcomp (); below.  */
13513 #include <assert.h>
13514 /* Override any gcc2 internal prototype to avoid an error.  */
13515 #ifdef __cplusplus
13516 extern "C"
13517 #endif
13518 /* We use char because int might match the return type of a gcc2
13519    builtin and then its argument prototype would still apply.  */
13520 char regcomp ();
13521 char (*f) ();
13522
13523 int
13524 main ()
13525 {
13526 /* The GNU C library defines this for functions which it implements
13527     to always fail with ENOSYS.  Some functions are actually named
13528     something starting with __ and the normal name is an alias.  */
13529 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13530 choke me
13531 #else
13532 f = regcomp;
13533 #endif
13534
13535   ;
13536   return 0;
13537 }
13538 _ACEOF
13539 rm -f conftest.$ac_objext conftest$ac_exeext
13540 if { (eval echo "$as_me:13540: \"$ac_link\"") >&5
13541   (eval $ac_link) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit $ac_status); } &&
13545          { ac_try='test -s conftest$ac_exeext'
13546   { (eval echo "$as_me:13546: \"$ac_try\"") >&5
13547   (eval $ac_try) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit $ac_status); }; }; then
13551   ac_cv_func_regcomp=yes
13552 else
13553   echo "$as_me: failed program was:" >&5
13554 cat conftest.$ac_ext >&5
13555 ac_cv_func_regcomp=no
13556 fi
13557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13558 fi
13559 echo "$as_me:13559: result: $ac_cv_func_regcomp" >&5
13560 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13561 if test $ac_cv_func_regcomp = yes; then
13562   cf_regex_func=regcomp
13563 else
13564
13565         for cf_regex_lib in $cf_regex_libs
13566         do
13567                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13568 echo "$as_me:13568: checking for regcomp in -l$cf_regex_lib" >&5
13569 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13570 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13571   echo $ECHO_N "(cached) $ECHO_C" >&6
13572 else
13573   ac_check_lib_save_LIBS=$LIBS
13574 LIBS="-l$cf_regex_lib  $LIBS"
13575 cat >conftest.$ac_ext <<_ACEOF
13576 #line 13576 "configure"
13577 #include "confdefs.h"
13578
13579 /* Override any gcc2 internal prototype to avoid an error.  */
13580 #ifdef __cplusplus
13581 extern "C"
13582 #endif
13583 /* We use char because int might match the return type of a gcc2
13584    builtin and then its argument prototype would still apply.  */
13585 char regcomp ();
13586 int
13587 main ()
13588 {
13589 regcomp ();
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext conftest$ac_exeext
13595 if { (eval echo "$as_me:13595: \"$ac_link\"") >&5
13596   (eval $ac_link) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest$ac_exeext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606   eval "$as_ac_Lib=yes"
13607 else
13608   echo "$as_me: failed program was:" >&5
13609 cat conftest.$ac_ext >&5
13610 eval "$as_ac_Lib=no"
13611 fi
13612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13613 LIBS=$ac_check_lib_save_LIBS
13614 fi
13615 echo "$as_me:13615: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13616 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13617 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13618
13619                                 LIBS="-l$cf_regex_lib $LIBS"
13620                                 cf_regex_func=regcomp
13621                                 break
13622 fi
13623
13624         done
13625
13626 fi
13627
13628 if test "$cf_regex_func" = no ; then
13629         echo "$as_me:13629: checking for compile" >&5
13630 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13631 if test "${ac_cv_func_compile+set}" = set; then
13632   echo $ECHO_N "(cached) $ECHO_C" >&6
13633 else
13634   cat >conftest.$ac_ext <<_ACEOF
13635 #line 13635 "configure"
13636 #include "confdefs.h"
13637 /* System header to define __stub macros and hopefully few prototypes,
13638     which can conflict with char compile (); below.  */
13639 #include <assert.h>
13640 /* Override any gcc2 internal prototype to avoid an error.  */
13641 #ifdef __cplusplus
13642 extern "C"
13643 #endif
13644 /* We use char because int might match the return type of a gcc2
13645    builtin and then its argument prototype would still apply.  */
13646 char compile ();
13647 char (*f) ();
13648
13649 int
13650 main ()
13651 {
13652 /* The GNU C library defines this for functions which it implements
13653     to always fail with ENOSYS.  Some functions are actually named
13654     something starting with __ and the normal name is an alias.  */
13655 #if defined (__stub_compile) || defined (__stub___compile)
13656 choke me
13657 #else
13658 f = compile;
13659 #endif
13660
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 rm -f conftest.$ac_objext conftest$ac_exeext
13666 if { (eval echo "$as_me:13666: \"$ac_link\"") >&5
13667   (eval $ac_link) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); } &&
13671          { ac_try='test -s conftest$ac_exeext'
13672   { (eval echo "$as_me:13672: \"$ac_try\"") >&5
13673   (eval $ac_try) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); }; }; then
13677   ac_cv_func_compile=yes
13678 else
13679   echo "$as_me: failed program was:" >&5
13680 cat conftest.$ac_ext >&5
13681 ac_cv_func_compile=no
13682 fi
13683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13684 fi
13685 echo "$as_me:13685: result: $ac_cv_func_compile" >&5
13686 echo "${ECHO_T}$ac_cv_func_compile" >&6
13687 if test $ac_cv_func_compile = yes; then
13688   cf_regex_func=compile
13689 else
13690
13691                 echo "$as_me:13691: checking for compile in -lgen" >&5
13692 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13693 if test "${ac_cv_lib_gen_compile+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   ac_check_lib_save_LIBS=$LIBS
13697 LIBS="-lgen  $LIBS"
13698 cat >conftest.$ac_ext <<_ACEOF
13699 #line 13699 "configure"
13700 #include "confdefs.h"
13701
13702 /* Override any gcc2 internal prototype to avoid an error.  */
13703 #ifdef __cplusplus
13704 extern "C"
13705 #endif
13706 /* We use char because int might match the return type of a gcc2
13707    builtin and then its argument prototype would still apply.  */
13708 char compile ();
13709 int
13710 main ()
13711 {
13712 compile ();
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 rm -f conftest.$ac_objext conftest$ac_exeext
13718 if { (eval echo "$as_me:13718: \"$ac_link\"") >&5
13719   (eval $ac_link) 2>&5
13720   ac_status=$?
13721   echo "$as_me:13721: \$? = $ac_status" >&5
13722   (exit $ac_status); } &&
13723          { ac_try='test -s conftest$ac_exeext'
13724   { (eval echo "$as_me:13724: \"$ac_try\"") >&5
13725   (eval $ac_try) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); }; }; then
13729   ac_cv_lib_gen_compile=yes
13730 else
13731   echo "$as_me: failed program was:" >&5
13732 cat conftest.$ac_ext >&5
13733 ac_cv_lib_gen_compile=no
13734 fi
13735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13736 LIBS=$ac_check_lib_save_LIBS
13737 fi
13738 echo "$as_me:13738: result: $ac_cv_lib_gen_compile" >&5
13739 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13740 if test $ac_cv_lib_gen_compile = yes; then
13741
13742                                 LIBS="-lgen $LIBS"
13743                                 cf_regex_func=compile
13744 fi
13745
13746 fi
13747
13748 fi
13749
13750 if test "$cf_regex_func" = no ; then
13751         { echo "$as_me:13751: WARNING: cannot find regular expression library" >&5
13752 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13753 fi
13754
13755 echo "$as_me:13755: checking for regular-expression headers" >&5
13756 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13757 if test "${cf_cv_regex_hdrs+set}" = set; then
13758   echo $ECHO_N "(cached) $ECHO_C" >&6
13759 else
13760
13761 cf_cv_regex_hdrs=no
13762 case $cf_regex_func in #(vi
13763 compile) #(vi
13764         for cf_regex_hdr in regexp.h regexpr.h
13765         do
13766                 cat >conftest.$ac_ext <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769 #include <$cf_regex_hdr>
13770 int
13771 main ()
13772 {
13773
13774                         char *p = compile("", "", "", 0);
13775                         int x = step("", "");
13776
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f conftest.$ac_objext conftest$ac_exeext
13782 if { (eval echo "$as_me:13782: \"$ac_link\"") >&5
13783   (eval $ac_link) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit $ac_status); } &&
13787          { ac_try='test -s conftest$ac_exeext'
13788   { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit $ac_status); }; }; then
13793
13794                         cf_cv_regex_hdrs=$cf_regex_hdr
13795                         break
13796
13797 else
13798   echo "$as_me: failed program was:" >&5
13799 cat conftest.$ac_ext >&5
13800 fi
13801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13802         done
13803         ;;
13804 *)
13805         for cf_regex_hdr in regex.h
13806         do
13807                 cat >conftest.$ac_ext <<_ACEOF
13808 #line 13808 "configure"
13809 #include "confdefs.h"
13810 #include <sys/types.h>
13811 #include <$cf_regex_hdr>
13812 int
13813 main ()
13814 {
13815
13816                         regex_t *p;
13817                         int x = regcomp(p, "", 0);
13818                         int y = regexec(p, "", 0, 0, 0);
13819                         regfree(p);
13820
13821   ;
13822   return 0;
13823 }
13824 _ACEOF
13825 rm -f conftest.$ac_objext conftest$ac_exeext
13826 if { (eval echo "$as_me:13826: \"$ac_link\"") >&5
13827   (eval $ac_link) 2>&5
13828   ac_status=$?
13829   echo "$as_me:13829: \$? = $ac_status" >&5
13830   (exit $ac_status); } &&
13831          { ac_try='test -s conftest$ac_exeext'
13832   { (eval echo "$as_me:13832: \"$ac_try\"") >&5
13833   (eval $ac_try) 2>&5
13834   ac_status=$?
13835   echo "$as_me:13835: \$? = $ac_status" >&5
13836   (exit $ac_status); }; }; then
13837
13838                         cf_cv_regex_hdrs=$cf_regex_hdr
13839                         break
13840
13841 else
13842   echo "$as_me: failed program was:" >&5
13843 cat conftest.$ac_ext >&5
13844 fi
13845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13846         done
13847         ;;
13848 esac
13849
13850 fi
13851 echo "$as_me:13851: result: $cf_cv_regex_hdrs" >&5
13852 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13853
13854 case $cf_cv_regex_hdrs in #(vi
13855     no)        { echo "$as_me:13855: WARNING: no regular expression header found" >&5
13856 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13857     regex.h)   cat >>confdefs.h <<\EOF
13858 #define HAVE_REGEX_H_FUNCS 1
13859 EOF
13860  ;; #(vi
13861     regexp.h)  cat >>confdefs.h <<\EOF
13862 #define HAVE_REGEXP_H_FUNCS 1
13863 EOF
13864  ;; #(vi
13865     regexpr.h) cat >>confdefs.h <<\EOF
13866 #define HAVE_REGEXPR_H_FUNCS 1
13867 EOF
13868  ;;
13869 esac
13870
13871 for ac_header in \
13872 fcntl.h \
13873 getopt.h \
13874 limits.h \
13875 locale.h \
13876 math.h \
13877 poll.h \
13878 sys/bsdtypes.h \
13879 sys/ioctl.h \
13880 sys/param.h \
13881 sys/poll.h \
13882 sys/select.h \
13883 sys/time.h \
13884 sys/times.h \
13885 ttyent.h \
13886 unistd.h \
13887 wctype.h \
13888
13889 do
13890 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13891 echo "$as_me:13891: checking for $ac_header" >&5
13892 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13893 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13894   echo $ECHO_N "(cached) $ECHO_C" >&6
13895 else
13896   cat >conftest.$ac_ext <<_ACEOF
13897 #line 13897 "configure"
13898 #include "confdefs.h"
13899 #include <$ac_header>
13900 _ACEOF
13901 if { (eval echo "$as_me:13901: \"$ac_cpp conftest.$ac_ext\"") >&5
13902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13903   ac_status=$?
13904   egrep -v '^ *\+' conftest.er1 >conftest.err
13905   rm -f conftest.er1
13906   cat conftest.err >&5
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); } >/dev/null; then
13909   if test -s conftest.err; then
13910     ac_cpp_err=$ac_c_preproc_warn_flag
13911   else
13912     ac_cpp_err=
13913   fi
13914 else
13915   ac_cpp_err=yes
13916 fi
13917 if test -z "$ac_cpp_err"; then
13918   eval "$as_ac_Header=yes"
13919 else
13920   echo "$as_me: failed program was:" >&5
13921   cat conftest.$ac_ext >&5
13922   eval "$as_ac_Header=no"
13923 fi
13924 rm -f conftest.err conftest.$ac_ext
13925 fi
13926 echo "$as_me:13926: result: `eval echo '${'$as_ac_Header'}'`" >&5
13927 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13928 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13929   cat >>confdefs.h <<EOF
13930 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13931 EOF
13932
13933 fi
13934 done
13935
13936 for ac_header in unistd.h getopt.h
13937 do
13938 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13939 echo "$as_me:13939: checking for $ac_header" >&5
13940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13942   echo $ECHO_N "(cached) $ECHO_C" >&6
13943 else
13944   cat >conftest.$ac_ext <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13947 #include <$ac_header>
13948 _ACEOF
13949 if { (eval echo "$as_me:13949: \"$ac_cpp conftest.$ac_ext\"") >&5
13950   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13951   ac_status=$?
13952   egrep -v '^ *\+' conftest.er1 >conftest.err
13953   rm -f conftest.er1
13954   cat conftest.err >&5
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); } >/dev/null; then
13957   if test -s conftest.err; then
13958     ac_cpp_err=$ac_c_preproc_warn_flag
13959   else
13960     ac_cpp_err=
13961   fi
13962 else
13963   ac_cpp_err=yes
13964 fi
13965 if test -z "$ac_cpp_err"; then
13966   eval "$as_ac_Header=yes"
13967 else
13968   echo "$as_me: failed program was:" >&5
13969   cat conftest.$ac_ext >&5
13970   eval "$as_ac_Header=no"
13971 fi
13972 rm -f conftest.err conftest.$ac_ext
13973 fi
13974 echo "$as_me:13974: result: `eval echo '${'$as_ac_Header'}'`" >&5
13975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13977   cat >>confdefs.h <<EOF
13978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13979 EOF
13980
13981 fi
13982 done
13983
13984 echo "$as_me:13984: checking for header declaring getopt variables" >&5
13985 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13986 if test "${cf_cv_getopt_header+set}" = set; then
13987   echo $ECHO_N "(cached) $ECHO_C" >&6
13988 else
13989
13990 cf_cv_getopt_header=none
13991 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13992 do
13993 cat >conftest.$ac_ext <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13996
13997 #include <$cf_header>
13998 int
13999 main ()
14000 {
14001 int x = optind; char *y = optarg
14002   ;
14003   return 0;
14004 }
14005 _ACEOF
14006 rm -f conftest.$ac_objext
14007 if { (eval echo "$as_me:14007: \"$ac_compile\"") >&5
14008   (eval $ac_compile) 2>&5
14009   ac_status=$?
14010   echo "$as_me:14010: \$? = $ac_status" >&5
14011   (exit $ac_status); } &&
14012          { ac_try='test -s conftest.$ac_objext'
14013   { (eval echo "$as_me:14013: \"$ac_try\"") >&5
14014   (eval $ac_try) 2>&5
14015   ac_status=$?
14016   echo "$as_me:14016: \$? = $ac_status" >&5
14017   (exit $ac_status); }; }; then
14018   cf_cv_getopt_header=$cf_header
14019  break
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat conftest.$ac_ext >&5
14023 fi
14024 rm -f conftest.$ac_objext conftest.$ac_ext
14025 done
14026
14027 fi
14028 echo "$as_me:14028: result: $cf_cv_getopt_header" >&5
14029 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14030 if test $cf_cv_getopt_header != none ; then
14031         cat >>confdefs.h <<\EOF
14032 #define HAVE_GETOPT_HEADER 1
14033 EOF
14034
14035 fi
14036
14037 # check for ISC (this may also define _POSIX_SOURCE)
14038 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14039 if test "$ISC" = yes ; then
14040
14041 echo "$as_me:14041: checking for main in -lcposix" >&5
14042 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14043 if test "${ac_cv_lib_cposix_main+set}" = set; then
14044   echo $ECHO_N "(cached) $ECHO_C" >&6
14045 else
14046   ac_check_lib_save_LIBS=$LIBS
14047 LIBS="-lcposix  $LIBS"
14048 cat >conftest.$ac_ext <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051
14052 int
14053 main ()
14054 {
14055 main ();
14056   ;
14057   return 0;
14058 }
14059 _ACEOF
14060 rm -f conftest.$ac_objext conftest$ac_exeext
14061 if { (eval echo "$as_me:14061: \"$ac_link\"") >&5
14062   (eval $ac_link) 2>&5
14063   ac_status=$?
14064   echo "$as_me:14064: \$? = $ac_status" >&5
14065   (exit $ac_status); } &&
14066          { ac_try='test -s conftest$ac_exeext'
14067   { (eval echo "$as_me:14067: \"$ac_try\"") >&5
14068   (eval $ac_try) 2>&5
14069   ac_status=$?
14070   echo "$as_me:14070: \$? = $ac_status" >&5
14071   (exit $ac_status); }; }; then
14072   ac_cv_lib_cposix_main=yes
14073 else
14074   echo "$as_me: failed program was:" >&5
14075 cat conftest.$ac_ext >&5
14076 ac_cv_lib_cposix_main=no
14077 fi
14078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14079 LIBS=$ac_check_lib_save_LIBS
14080 fi
14081 echo "$as_me:14081: result: $ac_cv_lib_cposix_main" >&5
14082 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14083 if test $ac_cv_lib_cposix_main = yes; then
14084   cat >>confdefs.h <<EOF
14085 #define HAVE_LIBCPOSIX 1
14086 EOF
14087
14088   LIBS="-lcposix $LIBS"
14089
14090 fi
14091
14092         echo "$as_me:14092: checking for bzero in -linet" >&5
14093 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14094 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14095   echo $ECHO_N "(cached) $ECHO_C" >&6
14096 else
14097   ac_check_lib_save_LIBS=$LIBS
14098 LIBS="-linet  $LIBS"
14099 cat >conftest.$ac_ext <<_ACEOF
14100 #line 14100 "configure"
14101 #include "confdefs.h"
14102
14103 /* Override any gcc2 internal prototype to avoid an error.  */
14104 #ifdef __cplusplus
14105 extern "C"
14106 #endif
14107 /* We use char because int might match the return type of a gcc2
14108    builtin and then its argument prototype would still apply.  */
14109 char bzero ();
14110 int
14111 main ()
14112 {
14113 bzero ();
14114   ;
14115   return 0;
14116 }
14117 _ACEOF
14118 rm -f conftest.$ac_objext conftest$ac_exeext
14119 if { (eval echo "$as_me:14119: \"$ac_link\"") >&5
14120   (eval $ac_link) 2>&5
14121   ac_status=$?
14122   echo "$as_me:14122: \$? = $ac_status" >&5
14123   (exit $ac_status); } &&
14124          { ac_try='test -s conftest$ac_exeext'
14125   { (eval echo "$as_me:14125: \"$ac_try\"") >&5
14126   (eval $ac_try) 2>&5
14127   ac_status=$?
14128   echo "$as_me:14128: \$? = $ac_status" >&5
14129   (exit $ac_status); }; }; then
14130   ac_cv_lib_inet_bzero=yes
14131 else
14132   echo "$as_me: failed program was:" >&5
14133 cat conftest.$ac_ext >&5
14134 ac_cv_lib_inet_bzero=no
14135 fi
14136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14137 LIBS=$ac_check_lib_save_LIBS
14138 fi
14139 echo "$as_me:14139: result: $ac_cv_lib_inet_bzero" >&5
14140 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14141 if test $ac_cv_lib_inet_bzero = yes; then
14142   LIBS="-linet $LIBS"
14143 fi
14144 fi
14145
14146 echo "$as_me:14146: checking if sys/time.h works with sys/select.h" >&5
14147 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14148 if test "${cf_cv_sys_time_select+set}" = set; then
14149   echo $ECHO_N "(cached) $ECHO_C" >&6
14150 else
14151
14152 cat >conftest.$ac_ext <<_ACEOF
14153 #line 14153 "configure"
14154 #include "confdefs.h"
14155
14156 #include <sys/types.h>
14157 #ifdef HAVE_SYS_TIME_H
14158 #include <sys/time.h>
14159 #endif
14160 #ifdef HAVE_SYS_SELECT_H
14161 #include <sys/select.h>
14162 #endif
14163
14164 int
14165 main ()
14166 {
14167
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 rm -f conftest.$ac_objext
14173 if { (eval echo "$as_me:14173: \"$ac_compile\"") >&5
14174   (eval $ac_compile) 2>&5
14175   ac_status=$?
14176   echo "$as_me:14176: \$? = $ac_status" >&5
14177   (exit $ac_status); } &&
14178          { ac_try='test -s conftest.$ac_objext'
14179   { (eval echo "$as_me:14179: \"$ac_try\"") >&5
14180   (eval $ac_try) 2>&5
14181   ac_status=$?
14182   echo "$as_me:14182: \$? = $ac_status" >&5
14183   (exit $ac_status); }; }; then
14184   cf_cv_sys_time_select=yes
14185 else
14186   echo "$as_me: failed program was:" >&5
14187 cat conftest.$ac_ext >&5
14188 cf_cv_sys_time_select=no
14189 fi
14190 rm -f conftest.$ac_objext conftest.$ac_ext
14191
14192 fi
14193
14194 echo "$as_me:14194: result: $cf_cv_sys_time_select" >&5
14195 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14196 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14197 #define HAVE_SYS_TIME_SELECT 1
14198 EOF
14199
14200 ###     checks for compiler characteristics
14201 ac_ext=c
14202 ac_cpp='$CPP $CPPFLAGS'
14203 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14204 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14205 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14206 ac_main_return=return
14207
14208 echo "$as_me:14208: checking for $CC option to accept ANSI C" >&5
14209 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14210 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14211   echo $ECHO_N "(cached) $ECHO_C" >&6
14212 else
14213   ac_cv_prog_cc_stdc=no
14214 ac_save_CC=$CC
14215 cat >conftest.$ac_ext <<_ACEOF
14216 #line 14216 "configure"
14217 #include "confdefs.h"
14218 #include <stdarg.h>
14219 #include <stdio.h>
14220 #include <sys/types.h>
14221 #include <sys/stat.h>
14222 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14223 struct buf { int x; };
14224 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14225 static char *e (p, i)
14226      char **p;
14227      int i;
14228 {
14229   return p[i];
14230 }
14231 static char *f (char * (*g) (char **, int), char **p, ...)
14232 {
14233   char *s;
14234   va_list v;
14235   va_start (v,p);
14236   s = g (p, va_arg (v,int));
14237   va_end (v);
14238   return s;
14239 }
14240 int test (int i, double x);
14241 struct s1 {int (*f) (int a);};
14242 struct s2 {int (*f) (double a);};
14243 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14244 int argc;
14245 char **argv;
14246 int
14247 main ()
14248 {
14249 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14250   ;
14251   return 0;
14252 }
14253 _ACEOF
14254 # Don't try gcc -ansi; that turns off useful extensions and
14255 # breaks some systems' header files.
14256 # AIX                   -qlanglvl=ansi
14257 # Ultrix and OSF/1      -std1
14258 # HP-UX 10.20 and later -Ae
14259 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14260 # SVR4                  -Xc -D__EXTENSIONS__
14261 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14262 do
14263   CC="$ac_save_CC $ac_arg"
14264   rm -f conftest.$ac_objext
14265 if { (eval echo "$as_me:14265: \"$ac_compile\"") >&5
14266   (eval $ac_compile) 2>&5
14267   ac_status=$?
14268   echo "$as_me:14268: \$? = $ac_status" >&5
14269   (exit $ac_status); } &&
14270          { ac_try='test -s conftest.$ac_objext'
14271   { (eval echo "$as_me:14271: \"$ac_try\"") >&5
14272   (eval $ac_try) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); }; }; then
14276   ac_cv_prog_cc_stdc=$ac_arg
14277 break
14278 else
14279   echo "$as_me: failed program was:" >&5
14280 cat conftest.$ac_ext >&5
14281 fi
14282 rm -f conftest.$ac_objext
14283 done
14284 rm -f conftest.$ac_ext conftest.$ac_objext
14285 CC=$ac_save_CC
14286
14287 fi
14288
14289 case "x$ac_cv_prog_cc_stdc" in
14290   x|xno)
14291     echo "$as_me:14291: result: none needed" >&5
14292 echo "${ECHO_T}none needed" >&6 ;;
14293   *)
14294     echo "$as_me:14294: result: $ac_cv_prog_cc_stdc" >&5
14295 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14296     CC="$CC $ac_cv_prog_cc_stdc" ;;
14297 esac
14298
14299 echo "$as_me:14299: checking for an ANSI C-conforming const" >&5
14300 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14301 if test "${ac_cv_c_const+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304   cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307
14308 int
14309 main ()
14310 {
14311 /* FIXME: Include the comments suggested by Paul. */
14312 #ifndef __cplusplus
14313   /* Ultrix mips cc rejects this.  */
14314   typedef int charset[2];
14315   const charset x;
14316   /* SunOS 4.1.1 cc rejects this.  */
14317   char const *const *ccp;
14318   char **p;
14319   /* NEC SVR4.0.2 mips cc rejects this.  */
14320   struct point {int x, y;};
14321   static struct point const zero = {0,0};
14322   /* AIX XL C 1.02.0.0 rejects this.
14323      It does not let you subtract one const X* pointer from another in
14324      an arm of an if-expression whose if-part is not a constant
14325      expression */
14326   const char *g = "string";
14327   ccp = &g + (g ? g-g : 0);
14328   /* HPUX 7.0 cc rejects these. */
14329   ++ccp;
14330   p = (char**) ccp;
14331   ccp = (char const *const *) p;
14332   { /* SCO 3.2v4 cc rejects this.  */
14333     char *t;
14334     char const *s = 0 ? (char *) 0 : (char const *) 0;
14335
14336     *t++ = 0;
14337   }
14338   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14339     int x[] = {25, 17};
14340     const int *foo = &x[0];
14341     ++foo;
14342   }
14343   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14344     typedef const int *iptr;
14345     iptr p = 0;
14346     ++p;
14347   }
14348   { /* AIX XL C 1.02.0.0 rejects this saying
14349        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14350     struct s { int j; const int *ap[3]; };
14351     struct s *b; b->j = 5;
14352   }
14353   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14354     const int foo = 10;
14355   }
14356 #endif
14357
14358   ;
14359   return 0;
14360 }
14361 _ACEOF
14362 rm -f conftest.$ac_objext
14363 if { (eval echo "$as_me:14363: \"$ac_compile\"") >&5
14364   (eval $ac_compile) 2>&5
14365   ac_status=$?
14366   echo "$as_me:14366: \$? = $ac_status" >&5
14367   (exit $ac_status); } &&
14368          { ac_try='test -s conftest.$ac_objext'
14369   { (eval echo "$as_me:14369: \"$ac_try\"") >&5
14370   (eval $ac_try) 2>&5
14371   ac_status=$?
14372   echo "$as_me:14372: \$? = $ac_status" >&5
14373   (exit $ac_status); }; }; then
14374   ac_cv_c_const=yes
14375 else
14376   echo "$as_me: failed program was:" >&5
14377 cat conftest.$ac_ext >&5
14378 ac_cv_c_const=no
14379 fi
14380 rm -f conftest.$ac_objext conftest.$ac_ext
14381 fi
14382 echo "$as_me:14382: result: $ac_cv_c_const" >&5
14383 echo "${ECHO_T}$ac_cv_c_const" >&6
14384 if test $ac_cv_c_const = no; then
14385
14386 cat >>confdefs.h <<\EOF
14387 #define const
14388 EOF
14389
14390 fi
14391
14392 echo "$as_me:14392: checking for inline" >&5
14393 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14394 if test "${ac_cv_c_inline+set}" = set; then
14395   echo $ECHO_N "(cached) $ECHO_C" >&6
14396 else
14397   ac_cv_c_inline=no
14398 for ac_kw in inline __inline__ __inline; do
14399   cat >conftest.$ac_ext <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14402 #ifndef __cplusplus
14403 static $ac_kw int static_foo () {return 0; }
14404 $ac_kw int foo () {return 0; }
14405 #endif
14406
14407 _ACEOF
14408 rm -f conftest.$ac_objext
14409 if { (eval echo "$as_me:14409: \"$ac_compile\"") >&5
14410   (eval $ac_compile) 2>&5
14411   ac_status=$?
14412   echo "$as_me:14412: \$? = $ac_status" >&5
14413   (exit $ac_status); } &&
14414          { ac_try='test -s conftest.$ac_objext'
14415   { (eval echo "$as_me:14415: \"$ac_try\"") >&5
14416   (eval $ac_try) 2>&5
14417   ac_status=$?
14418   echo "$as_me:14418: \$? = $ac_status" >&5
14419   (exit $ac_status); }; }; then
14420   ac_cv_c_inline=$ac_kw; break
14421 else
14422   echo "$as_me: failed program was:" >&5
14423 cat conftest.$ac_ext >&5
14424 fi
14425 rm -f conftest.$ac_objext conftest.$ac_ext
14426 done
14427
14428 fi
14429 echo "$as_me:14429: result: $ac_cv_c_inline" >&5
14430 echo "${ECHO_T}$ac_cv_c_inline" >&6
14431 case $ac_cv_c_inline in
14432   inline | yes) ;;
14433   no)
14434 cat >>confdefs.h <<\EOF
14435 #define inline
14436 EOF
14437  ;;
14438   *)  cat >>confdefs.h <<EOF
14439 #define inline $ac_cv_c_inline
14440 EOF
14441  ;;
14442 esac
14443
14444 NCURSES_INLINE=
14445 if test "$ac_cv_c_inline" != no ; then
14446   NCURSES_INLINE=inline
14447   if test "$INTEL_COMPILER" = yes
14448   then
14449     :
14450   elif test "$GCC" = yes
14451   then
14452     echo "$as_me:14452: checking if $CC supports options to tune inlining" >&5
14453 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14454 if test "${cf_cv_gcc_inline+set}" = set; then
14455   echo $ECHO_N "(cached) $ECHO_C" >&6
14456 else
14457
14458       cf_save_CFLAGS=$CFLAGS
14459       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14460       cat >conftest.$ac_ext <<_ACEOF
14461 #line 14461 "configure"
14462 #include "confdefs.h"
14463 inline int foo(void) { return 1; }
14464 int
14465 main ()
14466 {
14467 ${cf_cv_main_return:-return} foo()
14468   ;
14469   return 0;
14470 }
14471 _ACEOF
14472 rm -f conftest.$ac_objext
14473 if { (eval echo "$as_me:14473: \"$ac_compile\"") >&5
14474   (eval $ac_compile) 2>&5
14475   ac_status=$?
14476   echo "$as_me:14476: \$? = $ac_status" >&5
14477   (exit $ac_status); } &&
14478          { ac_try='test -s conftest.$ac_objext'
14479   { (eval echo "$as_me:14479: \"$ac_try\"") >&5
14480   (eval $ac_try) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); }; }; then
14484   cf_cv_gcc_inline=yes
14485 else
14486   echo "$as_me: failed program was:" >&5
14487 cat conftest.$ac_ext >&5
14488 cf_cv_gcc_inline=no
14489 fi
14490 rm -f conftest.$ac_objext conftest.$ac_ext
14491       CFLAGS=$cf_save_CFLAGS
14492
14493 fi
14494 echo "$as_me:14494: result: $cf_cv_gcc_inline" >&5
14495 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14496     if test "$cf_cv_gcc_inline" = yes ; then
14497
14498 cf_fix_cppflags=no
14499 cf_new_cflags=
14500 cf_new_cppflags=
14501 cf_new_extra_cppflags=
14502
14503 for cf_add_cflags in --param max-inline-insns-single=1200
14504 do
14505 case $cf_fix_cppflags in
14506 no)
14507         case $cf_add_cflags in #(vi
14508         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14509                 case $cf_add_cflags in
14510                 -D*)
14511                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14512
14513                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14514                                 && test -z "${cf_tst_cflags}" \
14515                                 && cf_fix_cppflags=yes
14516
14517                         if test $cf_fix_cppflags = yes ; then
14518                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14519                                 continue
14520                         elif test "${cf_tst_cflags}" = "\"'" ; then
14521                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14522                                 continue
14523                         fi
14524                         ;;
14525                 esac
14526                 case "$CPPFLAGS" in
14527                 *$cf_add_cflags) #(vi
14528                         ;;
14529                 *) #(vi
14530                         case $cf_add_cflags in #(vi
14531                         -D*)
14532                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14533
14534 CPPFLAGS=`echo "$CPPFLAGS" | \
14535         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14536                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14537
14538                                 ;;
14539                         esac
14540                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14541                         ;;
14542                 esac
14543                 ;;
14544         *)
14545                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14546                 ;;
14547         esac
14548         ;;
14549 yes)
14550         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14551
14552         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14553
14554         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14555                 && test -z "${cf_tst_cflags}" \
14556                 && cf_fix_cppflags=no
14557         ;;
14558 esac
14559 done
14560
14561 if test -n "$cf_new_cflags" ; then
14562
14563         CFLAGS="$CFLAGS $cf_new_cflags"
14564 fi
14565
14566 if test -n "$cf_new_cppflags" ; then
14567
14568         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14569 fi
14570
14571 if test -n "$cf_new_extra_cppflags" ; then
14572
14573         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14574 fi
14575
14576     fi
14577   fi
14578 fi
14579
14580 echo "$as_me:14580: checking for signal global datatype" >&5
14581 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14582 if test "${cf_cv_sig_atomic_t+set}" = set; then
14583   echo $ECHO_N "(cached) $ECHO_C" >&6
14584 else
14585
14586         for cf_type in \
14587                 "volatile sig_atomic_t" \
14588                 "sig_atomic_t" \
14589                 "int"
14590         do
14591         cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594
14595 #include <sys/types.h>
14596 #include <signal.h>
14597 #include <stdio.h>
14598
14599 extern $cf_type x;
14600 $cf_type x;
14601 static void handler(int sig)
14602 {
14603         x = 5;
14604 }
14605 int
14606 main ()
14607 {
14608 signal(SIGINT, handler);
14609                  x = 1
14610   ;
14611   return 0;
14612 }
14613 _ACEOF
14614 rm -f conftest.$ac_objext
14615 if { (eval echo "$as_me:14615: \"$ac_compile\"") >&5
14616   (eval $ac_compile) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); } &&
14620          { ac_try='test -s conftest.$ac_objext'
14621   { (eval echo "$as_me:14621: \"$ac_try\"") >&5
14622   (eval $ac_try) 2>&5
14623   ac_status=$?
14624   echo "$as_me:14624: \$? = $ac_status" >&5
14625   (exit $ac_status); }; }; then
14626   cf_cv_sig_atomic_t=$cf_type
14627 else
14628   echo "$as_me: failed program was:" >&5
14629 cat conftest.$ac_ext >&5
14630 cf_cv_sig_atomic_t=no
14631 fi
14632 rm -f conftest.$ac_objext conftest.$ac_ext
14633                 test "$cf_cv_sig_atomic_t" != no && break
14634         done
14635
14636 fi
14637
14638 echo "$as_me:14638: result: $cf_cv_sig_atomic_t" >&5
14639 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14640 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14641 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14642 EOF
14643
14644 if test $NCURSES_CHTYPE = auto ; then
14645
14646 echo "$as_me:14646: checking for type of chtype" >&5
14647 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14648 if test "${cf_cv_typeof_chtype+set}" = set; then
14649   echo $ECHO_N "(cached) $ECHO_C" >&6
14650 else
14651
14652                 if test "$cross_compiling" = yes; then
14653   cf_cv_typeof_chtype=long
14654 else
14655   cat >conftest.$ac_ext <<_ACEOF
14656 #line 14656 "configure"
14657 #include "confdefs.h"
14658
14659 #define WANT_BITS 31
14660 #include <stdio.h>
14661 int main()
14662 {
14663         FILE *fp = fopen("cf_test.out", "w");
14664         if (fp != 0) {
14665                 char *result = "long";
14666                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14667                         int n;
14668                         unsigned int x, y;
14669                         for (n = 0; n < WANT_BITS; n++) {
14670                                 x = (1 << n);
14671                                 y = (x >> n);
14672                                 if (y != 1 || x == 0) {
14673                                         x = 0;
14674                                         break;
14675                                 }
14676                         }
14677                         /*
14678                          * If x is nonzero, an int is big enough for the bits
14679                          * that we want.
14680                          */
14681                         result = (x != 0) ? "int" : "long";
14682                 }
14683                 fputs(result, fp);
14684                 fclose(fp);
14685         }
14686         ${cf_cv_main_return:-return}(0);
14687 }
14688
14689 _ACEOF
14690 rm -f conftest$ac_exeext
14691 if { (eval echo "$as_me:14691: \"$ac_link\"") >&5
14692   (eval $ac_link) 2>&5
14693   ac_status=$?
14694   echo "$as_me:14694: \$? = $ac_status" >&5
14695   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14696   { (eval echo "$as_me:14696: \"$ac_try\"") >&5
14697   (eval $ac_try) 2>&5
14698   ac_status=$?
14699   echo "$as_me:14699: \$? = $ac_status" >&5
14700   (exit $ac_status); }; }; then
14701   cf_cv_typeof_chtype=`cat cf_test.out`
14702 else
14703   echo "$as_me: program exited with status $ac_status" >&5
14704 echo "$as_me: failed program was:" >&5
14705 cat conftest.$ac_ext >&5
14706 cf_cv_typeof_chtype=long
14707 fi
14708 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14709 fi
14710                 rm -f cf_test.out
14711
14712 fi
14713
14714 echo "$as_me:14714: result: $cf_cv_typeof_chtype" >&5
14715 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14716
14717 cat >>confdefs.h <<EOF
14718 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14719 EOF
14720
14721 else
14722         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14723 fi
14724 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14725
14726 echo "$as_me:14726: checking if unsigned literals are legal" >&5
14727 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14728 if test "${cf_cv_unsigned_literals+set}" = set; then
14729   echo $ECHO_N "(cached) $ECHO_C" >&6
14730 else
14731
14732         cat >conftest.$ac_ext <<_ACEOF
14733 #line 14733 "configure"
14734 #include "confdefs.h"
14735
14736 int
14737 main ()
14738 {
14739 long x = 1L + 1UL + 1U + 1
14740   ;
14741   return 0;
14742 }
14743 _ACEOF
14744 rm -f conftest.$ac_objext
14745 if { (eval echo "$as_me:14745: \"$ac_compile\"") >&5
14746   (eval $ac_compile) 2>&5
14747   ac_status=$?
14748   echo "$as_me:14748: \$? = $ac_status" >&5
14749   (exit $ac_status); } &&
14750          { ac_try='test -s conftest.$ac_objext'
14751   { (eval echo "$as_me:14751: \"$ac_try\"") >&5
14752   (eval $ac_try) 2>&5
14753   ac_status=$?
14754   echo "$as_me:14754: \$? = $ac_status" >&5
14755   (exit $ac_status); }; }; then
14756   cf_cv_unsigned_literals=yes
14757 else
14758   echo "$as_me: failed program was:" >&5
14759 cat conftest.$ac_ext >&5
14760 cf_cv_unsigned_literals=no
14761 fi
14762 rm -f conftest.$ac_objext conftest.$ac_ext
14763
14764 fi
14765
14766 echo "$as_me:14766: result: $cf_cv_unsigned_literals" >&5
14767 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14768
14769 cf_cv_1UL="1"
14770 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14771 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14772
14773 if test $NCURSES_MMASK_T = auto ; then
14774         cf_cv_typeof_mmask_t=long
14775 else
14776         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14777 fi
14778 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14779
14780 ###     Checks for external-data
14781
14782 echo "$as_me:14782: checking if external errno is declared" >&5
14783 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14784 if test "${cf_cv_dcl_errno+set}" = set; then
14785   echo $ECHO_N "(cached) $ECHO_C" >&6
14786 else
14787
14788     cat >conftest.$ac_ext <<_ACEOF
14789 #line 14789 "configure"
14790 #include "confdefs.h"
14791
14792 #ifdef HAVE_STDLIB_H
14793 #include <stdlib.h>
14794 #endif
14795 #include <stdio.h>
14796 #include <sys/types.h>
14797 #include <errno.h>
14798 int
14799 main ()
14800 {
14801 int x = (int) errno
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 rm -f conftest.$ac_objext
14807 if { (eval echo "$as_me:14807: \"$ac_compile\"") >&5
14808   (eval $ac_compile) 2>&5
14809   ac_status=$?
14810   echo "$as_me:14810: \$? = $ac_status" >&5
14811   (exit $ac_status); } &&
14812          { ac_try='test -s conftest.$ac_objext'
14813   { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814   (eval $ac_try) 2>&5
14815   ac_status=$?
14816   echo "$as_me:14816: \$? = $ac_status" >&5
14817   (exit $ac_status); }; }; then
14818   cf_cv_dcl_errno=yes
14819 else
14820   echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14822 cf_cv_dcl_errno=no
14823 fi
14824 rm -f conftest.$ac_objext conftest.$ac_ext
14825
14826 fi
14827 echo "$as_me:14827: result: $cf_cv_dcl_errno" >&5
14828 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14829
14830 if test "$cf_cv_dcl_errno" = no ; then
14831
14832 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14833
14834     cat >>confdefs.h <<EOF
14835 #define $cf_result 1
14836 EOF
14837
14838 fi
14839
14840 # It's possible (for near-UNIX clones) that the data doesn't exist
14841
14842 echo "$as_me:14842: checking if external errno exists" >&5
14843 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14844 if test "${cf_cv_have_errno+set}" = set; then
14845   echo $ECHO_N "(cached) $ECHO_C" >&6
14846 else
14847
14848     cat >conftest.$ac_ext <<_ACEOF
14849 #line 14849 "configure"
14850 #include "confdefs.h"
14851
14852 #undef errno
14853 extern int errno;
14854
14855 int
14856 main ()
14857 {
14858 errno = 2
14859   ;
14860   return 0;
14861 }
14862 _ACEOF
14863 rm -f conftest.$ac_objext conftest$ac_exeext
14864 if { (eval echo "$as_me:14864: \"$ac_link\"") >&5
14865   (eval $ac_link) 2>&5
14866   ac_status=$?
14867   echo "$as_me:14867: \$? = $ac_status" >&5
14868   (exit $ac_status); } &&
14869          { ac_try='test -s conftest$ac_exeext'
14870   { (eval echo "$as_me:14870: \"$ac_try\"") >&5
14871   (eval $ac_try) 2>&5
14872   ac_status=$?
14873   echo "$as_me:14873: \$? = $ac_status" >&5
14874   (exit $ac_status); }; }; then
14875   cf_cv_have_errno=yes
14876 else
14877   echo "$as_me: failed program was:" >&5
14878 cat conftest.$ac_ext >&5
14879 cf_cv_have_errno=no
14880 fi
14881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14882
14883 fi
14884 echo "$as_me:14884: result: $cf_cv_have_errno" >&5
14885 echo "${ECHO_T}$cf_cv_have_errno" >&6
14886
14887 if test "$cf_cv_have_errno" = yes ; then
14888
14889 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14890
14891     cat >>confdefs.h <<EOF
14892 #define $cf_result 1
14893 EOF
14894
14895 fi
14896
14897 echo "$as_me:14897: checking if data-only library module links" >&5
14898 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14899 if test "${cf_cv_link_dataonly+set}" = set; then
14900   echo $ECHO_N "(cached) $ECHO_C" >&6
14901 else
14902
14903         rm -f conftest.a
14904         cat >conftest.$ac_ext <<EOF
14905 #line 14905 "configure"
14906 int     testdata[3] = { 123, 456, 789 };
14907 EOF
14908         if { (eval echo "$as_me:14908: \"$ac_compile\"") >&5
14909   (eval $ac_compile) 2>&5
14910   ac_status=$?
14911   echo "$as_me:14911: \$? = $ac_status" >&5
14912   (exit $ac_status); } ; then
14913                 mv conftest.o data.o && \
14914                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14915         fi
14916         rm -f conftest.$ac_ext data.o
14917         cat >conftest.$ac_ext <<EOF
14918 #line 14918 "configure"
14919 int     testfunc()
14920 {
14921 #if defined(NeXT)
14922         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14923 #else
14924         extern int testdata[3];
14925         return testdata[0] == 123
14926            &&  testdata[1] == 456
14927            &&  testdata[2] == 789;
14928 #endif
14929 }
14930 EOF
14931         if { (eval echo "$as_me:14931: \"$ac_compile\"") >&5
14932   (eval $ac_compile) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); }; then
14936                 mv conftest.o func.o && \
14937                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14938         fi
14939         rm -f conftest.$ac_ext func.o
14940         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14941         cf_saveLIBS="$LIBS"
14942         LIBS="conftest.a $LIBS"
14943         if test "$cross_compiling" = yes; then
14944   cf_cv_link_dataonly=unknown
14945 else
14946   cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14949
14950         int main()
14951         {
14952                 extern int testfunc();
14953                 ${cf_cv_main_return:-return} (!testfunc());
14954         }
14955
14956 _ACEOF
14957 rm -f conftest$ac_exeext
14958 if { (eval echo "$as_me:14958: \"$ac_link\"") >&5
14959   (eval $ac_link) 2>&5
14960   ac_status=$?
14961   echo "$as_me:14961: \$? = $ac_status" >&5
14962   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14963   { (eval echo "$as_me:14963: \"$ac_try\"") >&5
14964   (eval $ac_try) 2>&5
14965   ac_status=$?
14966   echo "$as_me:14966: \$? = $ac_status" >&5
14967   (exit $ac_status); }; }; then
14968   cf_cv_link_dataonly=yes
14969 else
14970   echo "$as_me: program exited with status $ac_status" >&5
14971 echo "$as_me: failed program was:" >&5
14972 cat conftest.$ac_ext >&5
14973 cf_cv_link_dataonly=no
14974 fi
14975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14976 fi
14977         LIBS="$cf_saveLIBS"
14978
14979 fi
14980
14981 echo "$as_me:14981: result: $cf_cv_link_dataonly" >&5
14982 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14983
14984 if test "$cf_cv_link_dataonly" = no ; then
14985         cat >>confdefs.h <<\EOF
14986 #define BROKEN_LINKER 1
14987 EOF
14988
14989         BROKEN_LINKER=1
14990 fi
14991
14992 ###     Checks for library functions.
14993
14994 for ac_func in \
14995 getcwd \
14996 getegid \
14997 geteuid \
14998 getttynam \
14999 issetugid \
15000 poll \
15001 remove \
15002 select \
15003 setbuf \
15004 setbuffer \
15005 setvbuf \
15006 sigaction \
15007 sigvec \
15008 strdup \
15009 strstr \
15010 tcgetpgrp \
15011 times \
15012 vsnprintf \
15013
15014 do
15015 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15016 echo "$as_me:15016: checking for $ac_func" >&5
15017 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15018 if eval "test \"\${$as_ac_var+set}\" = set"; then
15019   echo $ECHO_N "(cached) $ECHO_C" >&6
15020 else
15021   cat >conftest.$ac_ext <<_ACEOF
15022 #line 15022 "configure"
15023 #include "confdefs.h"
15024 /* System header to define __stub macros and hopefully few prototypes,
15025     which can conflict with char $ac_func (); below.  */
15026 #include <assert.h>
15027 /* Override any gcc2 internal prototype to avoid an error.  */
15028 #ifdef __cplusplus
15029 extern "C"
15030 #endif
15031 /* We use char because int might match the return type of a gcc2
15032    builtin and then its argument prototype would still apply.  */
15033 char $ac_func ();
15034 char (*f) ();
15035
15036 int
15037 main ()
15038 {
15039 /* The GNU C library defines this for functions which it implements
15040     to always fail with ENOSYS.  Some functions are actually named
15041     something starting with __ and the normal name is an alias.  */
15042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15043 choke me
15044 #else
15045 f = $ac_func;
15046 #endif
15047
15048   ;
15049   return 0;
15050 }
15051 _ACEOF
15052 rm -f conftest.$ac_objext conftest$ac_exeext
15053 if { (eval echo "$as_me:15053: \"$ac_link\"") >&5
15054   (eval $ac_link) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); } &&
15058          { ac_try='test -s conftest$ac_exeext'
15059   { (eval echo "$as_me:15059: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); }; }; then
15064   eval "$as_ac_var=yes"
15065 else
15066   echo "$as_me: failed program was:" >&5
15067 cat conftest.$ac_ext >&5
15068 eval "$as_ac_var=no"
15069 fi
15070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15071 fi
15072 echo "$as_me:15072: result: `eval echo '${'$as_ac_var'}'`" >&5
15073 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15074 if test `eval echo '${'$as_ac_var'}'` = yes; then
15075   cat >>confdefs.h <<EOF
15076 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15077 EOF
15078
15079 fi
15080 done
15081
15082 if test "$with_getcap" = "yes" ; then
15083
15084 echo "$as_me:15084: checking for terminal-capability database functions" >&5
15085 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15086 if test "${cf_cv_cgetent+set}" = set; then
15087   echo $ECHO_N "(cached) $ECHO_C" >&6
15088 else
15089
15090 cat >conftest.$ac_ext <<_ACEOF
15091 #line 15091 "configure"
15092 #include "confdefs.h"
15093
15094 #include <stdlib.h>
15095 int
15096 main ()
15097 {
15098
15099         char temp[128];
15100         char *buf = temp;
15101         char *db_array = temp;
15102         cgetent(&buf, &db_array, "vt100");
15103         cgetcap(buf, "tc", '=');
15104         cgetmatch(buf, "tc");
15105
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 rm -f conftest.$ac_objext conftest$ac_exeext
15111 if { (eval echo "$as_me:15111: \"$ac_link\"") >&5
15112   (eval $ac_link) 2>&5
15113   ac_status=$?
15114   echo "$as_me:15114: \$? = $ac_status" >&5
15115   (exit $ac_status); } &&
15116          { ac_try='test -s conftest$ac_exeext'
15117   { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118   (eval $ac_try) 2>&5
15119   ac_status=$?
15120   echo "$as_me:15120: \$? = $ac_status" >&5
15121   (exit $ac_status); }; }; then
15122   cf_cv_cgetent=yes
15123 else
15124   echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 cf_cv_cgetent=no
15127 fi
15128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15129
15130 fi
15131 echo "$as_me:15131: result: $cf_cv_cgetent" >&5
15132 echo "${ECHO_T}$cf_cv_cgetent" >&6
15133
15134 if test "$cf_cv_cgetent" = yes
15135 then
15136         cat >>confdefs.h <<\EOF
15137 #define HAVE_BSD_CGETENT 1
15138 EOF
15139
15140 echo "$as_me:15140: checking if cgetent uses const parameter" >&5
15141 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15142 if test "${cf_cv_cgetent_const+set}" = set; then
15143   echo $ECHO_N "(cached) $ECHO_C" >&6
15144 else
15145
15146 cat >conftest.$ac_ext <<_ACEOF
15147 #line 15147 "configure"
15148 #include "confdefs.h"
15149
15150 #include <stdlib.h>
15151 int
15152 main ()
15153 {
15154
15155         char temp[128];
15156         char *buf = temp;
15157 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15158         const char *db_array = temp;
15159         cgetent(&buf, &db_array, "vt100");
15160 #endif
15161         cgetcap(buf, "tc", '=');
15162         cgetmatch(buf, "tc");
15163
15164   ;
15165   return 0;
15166 }
15167 _ACEOF
15168 rm -f conftest.$ac_objext conftest$ac_exeext
15169 if { (eval echo "$as_me:15169: \"$ac_link\"") >&5
15170   (eval $ac_link) 2>&5
15171   ac_status=$?
15172   echo "$as_me:15172: \$? = $ac_status" >&5
15173   (exit $ac_status); } &&
15174          { ac_try='test -s conftest$ac_exeext'
15175   { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176   (eval $ac_try) 2>&5
15177   ac_status=$?
15178   echo "$as_me:15178: \$? = $ac_status" >&5
15179   (exit $ac_status); }; }; then
15180   cf_cv_cgetent_const=yes
15181 else
15182   echo "$as_me: failed program was:" >&5
15183 cat conftest.$ac_ext >&5
15184 cf_cv_cgetent_const=no
15185 fi
15186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15187
15188 fi
15189 echo "$as_me:15189: result: $cf_cv_cgetent_const" >&5
15190 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15191         if test "$cf_cv_cgetent_const" = yes
15192         then
15193                 cat >>confdefs.h <<EOF
15194 #define CGETENT_CONST const
15195 EOF
15196
15197         fi
15198 fi
15199
15200 fi
15201
15202 echo "$as_me:15202: checking for isascii" >&5
15203 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15204 if test "${cf_cv_have_isascii+set}" = set; then
15205   echo $ECHO_N "(cached) $ECHO_C" >&6
15206 else
15207
15208         cat >conftest.$ac_ext <<_ACEOF
15209 #line 15209 "configure"
15210 #include "confdefs.h"
15211 #include <ctype.h>
15212 int
15213 main ()
15214 {
15215 int x = isascii(' ')
15216   ;
15217   return 0;
15218 }
15219 _ACEOF
15220 rm -f conftest.$ac_objext conftest$ac_exeext
15221 if { (eval echo "$as_me:15221: \"$ac_link\"") >&5
15222   (eval $ac_link) 2>&5
15223   ac_status=$?
15224   echo "$as_me:15224: \$? = $ac_status" >&5
15225   (exit $ac_status); } &&
15226          { ac_try='test -s conftest$ac_exeext'
15227   { (eval echo "$as_me:15227: \"$ac_try\"") >&5
15228   (eval $ac_try) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); }; }; then
15232   cf_cv_have_isascii=yes
15233 else
15234   echo "$as_me: failed program was:" >&5
15235 cat conftest.$ac_ext >&5
15236 cf_cv_have_isascii=no
15237 fi
15238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15239
15240 fi
15241 echo "$as_me:15241: result: $cf_cv_have_isascii" >&5
15242 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15243 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15244 #define HAVE_ISASCII 1
15245 EOF
15246
15247 if test "$ac_cv_func_sigaction" = yes; then
15248 echo "$as_me:15248: checking whether sigaction needs _POSIX_SOURCE" >&5
15249 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15250 cat >conftest.$ac_ext <<_ACEOF
15251 #line 15251 "configure"
15252 #include "confdefs.h"
15253
15254 #include <sys/types.h>
15255 #include <signal.h>
15256 int
15257 main ()
15258 {
15259 struct sigaction act
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 rm -f conftest.$ac_objext
15265 if { (eval echo "$as_me:15265: \"$ac_compile\"") >&5
15266   (eval $ac_compile) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); } &&
15270          { ac_try='test -s conftest.$ac_objext'
15271   { (eval echo "$as_me:15271: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); }; }; then
15276   sigact_bad=no
15277 else
15278   echo "$as_me: failed program was:" >&5
15279 cat conftest.$ac_ext >&5
15280
15281 cat >conftest.$ac_ext <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15284
15285 #define _POSIX_SOURCE
15286 #include <sys/types.h>
15287 #include <signal.h>
15288 int
15289 main ()
15290 {
15291 struct sigaction act
15292   ;
15293   return 0;
15294 }
15295 _ACEOF
15296 rm -f conftest.$ac_objext
15297 if { (eval echo "$as_me:15297: \"$ac_compile\"") >&5
15298   (eval $ac_compile) 2>&5
15299   ac_status=$?
15300   echo "$as_me:15300: \$? = $ac_status" >&5
15301   (exit $ac_status); } &&
15302          { ac_try='test -s conftest.$ac_objext'
15303   { (eval echo "$as_me:15303: \"$ac_try\"") >&5
15304   (eval $ac_try) 2>&5
15305   ac_status=$?
15306   echo "$as_me:15306: \$? = $ac_status" >&5
15307   (exit $ac_status); }; }; then
15308   sigact_bad=yes
15309          cat >>confdefs.h <<\EOF
15310 #define _POSIX_SOURCE 1
15311 EOF
15312
15313 else
15314   echo "$as_me: failed program was:" >&5
15315 cat conftest.$ac_ext >&5
15316 sigact_bad=unknown
15317 fi
15318 rm -f conftest.$ac_objext conftest.$ac_ext
15319 fi
15320 rm -f conftest.$ac_objext conftest.$ac_ext
15321 echo "$as_me:15321: result: $sigact_bad" >&5
15322 echo "${ECHO_T}$sigact_bad" >&6
15323 fi
15324
15325 echo "$as_me:15325: checking if nanosleep really works" >&5
15326 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15327 if test "${cf_cv_func_nanosleep+set}" = set; then
15328   echo $ECHO_N "(cached) $ECHO_C" >&6
15329 else
15330
15331 if test "$cross_compiling" = yes; then
15332   cf_cv_func_nanosleep=unknown
15333 else
15334   cat >conftest.$ac_ext <<_ACEOF
15335 #line 15335 "configure"
15336 #include "confdefs.h"
15337
15338 #include <stdio.h>
15339 #include <errno.h>
15340 #include <time.h>
15341
15342 #ifdef HAVE_SYS_TIME_H
15343 #include <sys/time.h>
15344 #endif
15345
15346 int main() {
15347         struct timespec ts1, ts2;
15348         int code;
15349         ts1.tv_sec  = 0;
15350         ts1.tv_nsec = 750000000;
15351         ts2.tv_sec  = 0;
15352         ts2.tv_nsec = 0;
15353         errno = 0;
15354         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15355         ${cf_cv_main_return:-return}(code != 0);
15356 }
15357
15358 _ACEOF
15359 rm -f conftest$ac_exeext
15360 if { (eval echo "$as_me:15360: \"$ac_link\"") >&5
15361   (eval $ac_link) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15365   { (eval echo "$as_me:15365: \"$ac_try\"") >&5
15366   (eval $ac_try) 2>&5
15367   ac_status=$?
15368   echo "$as_me:15368: \$? = $ac_status" >&5
15369   (exit $ac_status); }; }; then
15370   cf_cv_func_nanosleep=yes
15371 else
15372   echo "$as_me: program exited with status $ac_status" >&5
15373 echo "$as_me: failed program was:" >&5
15374 cat conftest.$ac_ext >&5
15375 cf_cv_func_nanosleep=no
15376 fi
15377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15378 fi
15379 fi
15380 echo "$as_me:15380: result: $cf_cv_func_nanosleep" >&5
15381 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15382
15383 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15384 #define HAVE_NANOSLEEP 1
15385 EOF
15386
15387 for ac_header in \
15388 termio.h \
15389 termios.h \
15390 unistd.h \
15391
15392 do
15393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15394 echo "$as_me:15394: checking for $ac_header" >&5
15395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15397   echo $ECHO_N "(cached) $ECHO_C" >&6
15398 else
15399   cat >conftest.$ac_ext <<_ACEOF
15400 #line 15400 "configure"
15401 #include "confdefs.h"
15402 #include <$ac_header>
15403 _ACEOF
15404 if { (eval echo "$as_me:15404: \"$ac_cpp conftest.$ac_ext\"") >&5
15405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15406   ac_status=$?
15407   egrep -v '^ *\+' conftest.er1 >conftest.err
15408   rm -f conftest.er1
15409   cat conftest.err >&5
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit $ac_status); } >/dev/null; then
15412   if test -s conftest.err; then
15413     ac_cpp_err=$ac_c_preproc_warn_flag
15414   else
15415     ac_cpp_err=
15416   fi
15417 else
15418   ac_cpp_err=yes
15419 fi
15420 if test -z "$ac_cpp_err"; then
15421   eval "$as_ac_Header=yes"
15422 else
15423   echo "$as_me: failed program was:" >&5
15424   cat conftest.$ac_ext >&5
15425   eval "$as_ac_Header=no"
15426 fi
15427 rm -f conftest.err conftest.$ac_ext
15428 fi
15429 echo "$as_me:15429: result: `eval echo '${'$as_ac_Header'}'`" >&5
15430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15432   cat >>confdefs.h <<EOF
15433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15434 EOF
15435
15436 fi
15437 done
15438
15439 if test "$ISC" = yes ; then
15440
15441 for ac_header in sys/termio.h
15442 do
15443 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15444 echo "$as_me:15444: checking for $ac_header" >&5
15445 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15446 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15447   echo $ECHO_N "(cached) $ECHO_C" >&6
15448 else
15449   cat >conftest.$ac_ext <<_ACEOF
15450 #line 15450 "configure"
15451 #include "confdefs.h"
15452 #include <$ac_header>
15453 _ACEOF
15454 if { (eval echo "$as_me:15454: \"$ac_cpp conftest.$ac_ext\"") >&5
15455   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15456   ac_status=$?
15457   egrep -v '^ *\+' conftest.er1 >conftest.err
15458   rm -f conftest.er1
15459   cat conftest.err >&5
15460   echo "$as_me:15460: \$? = $ac_status" >&5
15461   (exit $ac_status); } >/dev/null; then
15462   if test -s conftest.err; then
15463     ac_cpp_err=$ac_c_preproc_warn_flag
15464   else
15465     ac_cpp_err=
15466   fi
15467 else
15468   ac_cpp_err=yes
15469 fi
15470 if test -z "$ac_cpp_err"; then
15471   eval "$as_ac_Header=yes"
15472 else
15473   echo "$as_me: failed program was:" >&5
15474   cat conftest.$ac_ext >&5
15475   eval "$as_ac_Header=no"
15476 fi
15477 rm -f conftest.err conftest.$ac_ext
15478 fi
15479 echo "$as_me:15479: result: `eval echo '${'$as_ac_Header'}'`" >&5
15480 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15481 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15482   cat >>confdefs.h <<EOF
15483 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15484 EOF
15485
15486 fi
15487 done
15488
15489 fi
15490 if test "$ac_cv_header_termios_h" = yes ; then
15491         case "$CFLAGS $CPPFLAGS" in
15492         *-D_POSIX_SOURCE*)
15493                 termios_bad=dunno ;;
15494         *)      termios_bad=maybe ;;
15495         esac
15496         if test "$termios_bad" = maybe ; then
15497         echo "$as_me:15497: checking whether termios.h needs _POSIX_SOURCE" >&5
15498 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15499         cat >conftest.$ac_ext <<_ACEOF
15500 #line 15500 "configure"
15501 #include "confdefs.h"
15502 #include <termios.h>
15503 int
15504 main ()
15505 {
15506 struct termios foo; int x = foo.c_iflag
15507   ;
15508   return 0;
15509 }
15510 _ACEOF
15511 rm -f conftest.$ac_objext
15512 if { (eval echo "$as_me:15512: \"$ac_compile\"") >&5
15513   (eval $ac_compile) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); } &&
15517          { ac_try='test -s conftest.$ac_objext'
15518   { (eval echo "$as_me:15518: \"$ac_try\"") >&5
15519   (eval $ac_try) 2>&5
15520   ac_status=$?
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit $ac_status); }; }; then
15523   termios_bad=no
15524 else
15525   echo "$as_me: failed program was:" >&5
15526 cat conftest.$ac_ext >&5
15527
15528                 cat >conftest.$ac_ext <<_ACEOF
15529 #line 15529 "configure"
15530 #include "confdefs.h"
15531
15532 #define _POSIX_SOURCE
15533 #include <termios.h>
15534 int
15535 main ()
15536 {
15537 struct termios foo; int x = foo.c_iflag
15538   ;
15539   return 0;
15540 }
15541 _ACEOF
15542 rm -f conftest.$ac_objext
15543 if { (eval echo "$as_me:15543: \"$ac_compile\"") >&5
15544   (eval $ac_compile) 2>&5
15545   ac_status=$?
15546   echo "$as_me:15546: \$? = $ac_status" >&5
15547   (exit $ac_status); } &&
15548          { ac_try='test -s conftest.$ac_objext'
15549   { (eval echo "$as_me:15549: \"$ac_try\"") >&5
15550   (eval $ac_try) 2>&5
15551   ac_status=$?
15552   echo "$as_me:15552: \$? = $ac_status" >&5
15553   (exit $ac_status); }; }; then
15554   termios_bad=unknown
15555 else
15556   echo "$as_me: failed program was:" >&5
15557 cat conftest.$ac_ext >&5
15558 termios_bad=yes cat >>confdefs.h <<\EOF
15559 #define _POSIX_SOURCE 1
15560 EOF
15561
15562 fi
15563 rm -f conftest.$ac_objext conftest.$ac_ext
15564
15565 fi
15566 rm -f conftest.$ac_objext conftest.$ac_ext
15567         echo "$as_me:15567: result: $termios_bad" >&5
15568 echo "${ECHO_T}$termios_bad" >&6
15569         fi
15570 fi
15571
15572 echo "$as_me:15572: checking for tcgetattr" >&5
15573 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15574 if test "${cf_cv_have_tcgetattr+set}" = set; then
15575   echo $ECHO_N "(cached) $ECHO_C" >&6
15576 else
15577
15578 cat >conftest.$ac_ext <<_ACEOF
15579 #line 15579 "configure"
15580 #include "confdefs.h"
15581
15582 #include <sys/types.h>
15583 #ifdef HAVE_UNISTD_H
15584 #include <unistd.h>
15585 #endif
15586 #ifdef HAVE_TERMIOS_H
15587 #include <termios.h>
15588 #define TTY struct termios
15589 #else
15590 #ifdef HAVE_TERMIO_H
15591 #include <termio.h>
15592 #define TTY struct termio
15593 #endif
15594 #endif
15595
15596 int
15597 main ()
15598 {
15599
15600 TTY foo;
15601 tcgetattr(1, &foo);
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 rm -f conftest.$ac_objext conftest$ac_exeext
15607 if { (eval echo "$as_me:15607: \"$ac_link\"") >&5
15608   (eval $ac_link) 2>&5
15609   ac_status=$?
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -s conftest$ac_exeext'
15613   { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614   (eval $ac_try) 2>&5
15615   ac_status=$?
15616   echo "$as_me:15616: \$? = $ac_status" >&5
15617   (exit $ac_status); }; }; then
15618   cf_cv_have_tcgetattr=yes
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 cf_cv_have_tcgetattr=no
15623 fi
15624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15625 fi
15626 echo "$as_me:15626: result: $cf_cv_have_tcgetattr" >&5
15627 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15628 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15629 #define HAVE_TCGETATTR 1
15630 EOF
15631
15632 echo "$as_me:15632: checking for vsscanf function or workaround" >&5
15633 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15634 if test "${cf_cv_func_vsscanf+set}" = set; then
15635   echo $ECHO_N "(cached) $ECHO_C" >&6
15636 else
15637
15638 cat >conftest.$ac_ext <<_ACEOF
15639 #line 15639 "configure"
15640 #include "confdefs.h"
15641
15642 #include <stdarg.h>
15643 #include <stdio.h>
15644 int
15645 main ()
15646 {
15647
15648         va_list ap;
15649         vsscanf("from", "%d", ap)
15650   ;
15651   return 0;
15652 }
15653 _ACEOF
15654 rm -f conftest.$ac_objext conftest$ac_exeext
15655 if { (eval echo "$as_me:15655: \"$ac_link\"") >&5
15656   (eval $ac_link) 2>&5
15657   ac_status=$?
15658   echo "$as_me:15658: \$? = $ac_status" >&5
15659   (exit $ac_status); } &&
15660          { ac_try='test -s conftest$ac_exeext'
15661   { (eval echo "$as_me:15661: \"$ac_try\"") >&5
15662   (eval $ac_try) 2>&5
15663   ac_status=$?
15664   echo "$as_me:15664: \$? = $ac_status" >&5
15665   (exit $ac_status); }; }; then
15666   cf_cv_func_vsscanf=vsscanf
15667 else
15668   echo "$as_me: failed program was:" >&5
15669 cat conftest.$ac_ext >&5
15670
15671 cat >conftest.$ac_ext <<_ACEOF
15672 #line 15672 "configure"
15673 #include "confdefs.h"
15674
15675 #include <stdarg.h>
15676 #include <stdio.h>
15677 int
15678 main ()
15679 {
15680
15681     FILE strbuf;
15682     char *str = "from";
15683
15684     strbuf._flag = _IOREAD;
15685     strbuf._ptr = strbuf._base = (unsigned char *) str;
15686     strbuf._cnt = strlen(str);
15687     strbuf._file = _NFILE;
15688     return (vfscanf(&strbuf, "%d", ap))
15689   ;
15690   return 0;
15691 }
15692 _ACEOF
15693 rm -f conftest.$ac_objext conftest$ac_exeext
15694 if { (eval echo "$as_me:15694: \"$ac_link\"") >&5
15695   (eval $ac_link) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit $ac_status); } &&
15699          { ac_try='test -s conftest$ac_exeext'
15700   { (eval echo "$as_me:15700: \"$ac_try\"") >&5
15701   (eval $ac_try) 2>&5
15702   ac_status=$?
15703   echo "$as_me:15703: \$? = $ac_status" >&5
15704   (exit $ac_status); }; }; then
15705   cf_cv_func_vsscanf=vfscanf
15706 else
15707   echo "$as_me: failed program was:" >&5
15708 cat conftest.$ac_ext >&5
15709
15710 cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713
15714 #include <stdarg.h>
15715 #include <stdio.h>
15716 int
15717 main ()
15718 {
15719
15720     FILE strbuf;
15721     char *str = "from";
15722
15723     strbuf._flag = _IOREAD;
15724     strbuf._ptr = strbuf._base = (unsigned char *) str;
15725     strbuf._cnt = strlen(str);
15726     strbuf._file = _NFILE;
15727     return (_doscan(&strbuf, "%d", ap))
15728   ;
15729   return 0;
15730 }
15731 _ACEOF
15732 rm -f conftest.$ac_objext conftest$ac_exeext
15733 if { (eval echo "$as_me:15733: \"$ac_link\"") >&5
15734   (eval $ac_link) 2>&5
15735   ac_status=$?
15736   echo "$as_me:15736: \$? = $ac_status" >&5
15737   (exit $ac_status); } &&
15738          { ac_try='test -s conftest$ac_exeext'
15739   { (eval echo "$as_me:15739: \"$ac_try\"") >&5
15740   (eval $ac_try) 2>&5
15741   ac_status=$?
15742   echo "$as_me:15742: \$? = $ac_status" >&5
15743   (exit $ac_status); }; }; then
15744   cf_cv_func_vsscanf=_doscan
15745 else
15746   echo "$as_me: failed program was:" >&5
15747 cat conftest.$ac_ext >&5
15748
15749 cf_cv_func_vsscanf=no
15750 fi
15751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15752 fi
15753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15754 fi
15755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15756 fi
15757 echo "$as_me:15757: result: $cf_cv_func_vsscanf" >&5
15758 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15759
15760 case $cf_cv_func_vsscanf in #(vi
15761 vsscanf) cat >>confdefs.h <<\EOF
15762 #define HAVE_VSSCANF 1
15763 EOF
15764 ;; #(vi
15765 vfscanf) cat >>confdefs.h <<\EOF
15766 #define HAVE_VFSCANF 1
15767 EOF
15768 ;; #(vi
15769 _doscan) cat >>confdefs.h <<\EOF
15770 #define HAVE__DOSCAN 1
15771 EOF
15772 ;;
15773 esac
15774
15775 echo "$as_me:15775: checking for working mkstemp" >&5
15776 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15777 if test "${cf_cv_func_mkstemp+set}" = set; then
15778   echo $ECHO_N "(cached) $ECHO_C" >&6
15779 else
15780
15781 rm -rf conftest*
15782 if test "$cross_compiling" = yes; then
15783   echo "$as_me:15783: checking for mkstemp" >&5
15784 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15785 if test "${ac_cv_func_mkstemp+set}" = set; then
15786   echo $ECHO_N "(cached) $ECHO_C" >&6
15787 else
15788   cat >conftest.$ac_ext <<_ACEOF
15789 #line 15789 "configure"
15790 #include "confdefs.h"
15791 /* System header to define __stub macros and hopefully few prototypes,
15792     which can conflict with char mkstemp (); below.  */
15793 #include <assert.h>
15794 /* Override any gcc2 internal prototype to avoid an error.  */
15795 #ifdef __cplusplus
15796 extern "C"
15797 #endif
15798 /* We use char because int might match the return type of a gcc2
15799    builtin and then its argument prototype would still apply.  */
15800 char mkstemp ();
15801 char (*f) ();
15802
15803 int
15804 main ()
15805 {
15806 /* The GNU C library defines this for functions which it implements
15807     to always fail with ENOSYS.  Some functions are actually named
15808     something starting with __ and the normal name is an alias.  */
15809 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15810 choke me
15811 #else
15812 f = mkstemp;
15813 #endif
15814
15815   ;
15816   return 0;
15817 }
15818 _ACEOF
15819 rm -f conftest.$ac_objext conftest$ac_exeext
15820 if { (eval echo "$as_me:15820: \"$ac_link\"") >&5
15821   (eval $ac_link) 2>&5
15822   ac_status=$?
15823   echo "$as_me:15823: \$? = $ac_status" >&5
15824   (exit $ac_status); } &&
15825          { ac_try='test -s conftest$ac_exeext'
15826   { (eval echo "$as_me:15826: \"$ac_try\"") >&5
15827   (eval $ac_try) 2>&5
15828   ac_status=$?
15829   echo "$as_me:15829: \$? = $ac_status" >&5
15830   (exit $ac_status); }; }; then
15831   ac_cv_func_mkstemp=yes
15832 else
15833   echo "$as_me: failed program was:" >&5
15834 cat conftest.$ac_ext >&5
15835 ac_cv_func_mkstemp=no
15836 fi
15837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15838 fi
15839 echo "$as_me:15839: result: $ac_cv_func_mkstemp" >&5
15840 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15841
15842 else
15843   cat >conftest.$ac_ext <<_ACEOF
15844 #line 15844 "configure"
15845 #include "confdefs.h"
15846
15847 #include <sys/types.h>
15848 #include <stdlib.h>
15849 #include <stdio.h>
15850 #include <string.h>
15851 #include <sys/stat.h>
15852 int main()
15853 {
15854         char *tmpl = "conftestXXXXXX";
15855         char name[2][80];
15856         int n;
15857         int result = 0;
15858         int fd;
15859         struct stat sb;
15860
15861         umask(077);
15862         for (n = 0; n < 2; ++n) {
15863                 strcpy(name[n], tmpl);
15864                 if ((fd = mkstemp(name[n])) >= 0) {
15865                         if (!strcmp(name[n], tmpl)
15866                          || stat(name[n], &sb) != 0
15867                          || (sb.st_mode & S_IFMT) != S_IFREG
15868                          || (sb.st_mode & 077) != 0) {
15869                                 result = 1;
15870                         }
15871                         close(fd);
15872                 }
15873         }
15874         if (result == 0
15875          && !strcmp(name[0], name[1]))
15876                 result = 1;
15877         ${cf_cv_main_return:-return}(result);
15878 }
15879
15880 _ACEOF
15881 rm -f conftest$ac_exeext
15882 if { (eval echo "$as_me:15882: \"$ac_link\"") >&5
15883   (eval $ac_link) 2>&5
15884   ac_status=$?
15885   echo "$as_me:15885: \$? = $ac_status" >&5
15886   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15887   { (eval echo "$as_me:15887: \"$ac_try\"") >&5
15888   (eval $ac_try) 2>&5
15889   ac_status=$?
15890   echo "$as_me:15890: \$? = $ac_status" >&5
15891   (exit $ac_status); }; }; then
15892   cf_cv_func_mkstemp=yes
15893
15894 else
15895   echo "$as_me: program exited with status $ac_status" >&5
15896 echo "$as_me: failed program was:" >&5
15897 cat conftest.$ac_ext >&5
15898 cf_cv_func_mkstemp=no
15899
15900 fi
15901 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15902 fi
15903
15904 fi
15905 echo "$as_me:15905: result: $cf_cv_func_mkstemp" >&5
15906 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15907 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15908         cat >>confdefs.h <<\EOF
15909 #define HAVE_MKSTEMP 1
15910 EOF
15911
15912 fi
15913
15914 # setup for prototype of fallback for vsscanf()
15915
15916 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15917         HAVE_VSSCANF=1
15918 else
15919         HAVE_VSSCANF=0
15920 fi
15921
15922 if test "$cross_compiling" = yes ; then
15923         { echo "$as_me:15923: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15924 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15925 else
15926         echo "$as_me:15926: checking whether setvbuf arguments are reversed" >&5
15927 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15928 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15929   echo $ECHO_N "(cached) $ECHO_C" >&6
15930 else
15931   if test "$cross_compiling" = yes; then
15932   { { echo "$as_me:15932: error: cannot run test program while cross compiling" >&5
15933 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15934    { (exit 1); exit 1; }; }
15935 else
15936   cat >conftest.$ac_ext <<_ACEOF
15937 #line 15937 "configure"
15938 #include "confdefs.h"
15939 #include <stdio.h>
15940 /* If setvbuf has the reversed format, exit 0. */
15941 int
15942 main ()
15943 {
15944   /* This call has the arguments reversed.
15945      A reversed system may check and see that the address of main
15946      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15947   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15948     $ac_main_return(1);
15949   putc('\r', stdout);
15950   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15951 }
15952 _ACEOF
15953 rm -f conftest$ac_exeext
15954 if { (eval echo "$as_me:15954: \"$ac_link\"") >&5
15955   (eval $ac_link) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15959   { (eval echo "$as_me:15959: \"$ac_try\"") >&5
15960   (eval $ac_try) 2>&5
15961   ac_status=$?
15962   echo "$as_me:15962: \$? = $ac_status" >&5
15963   (exit $ac_status); }; }; then
15964   ac_cv_func_setvbuf_reversed=yes
15965 else
15966   echo "$as_me: program exited with status $ac_status" >&5
15967 echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969 ac_cv_func_setvbuf_reversed=no
15970 fi
15971 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15972 fi
15973 rm -f core core.* *.core
15974 fi
15975 echo "$as_me:15975: result: $ac_cv_func_setvbuf_reversed" >&5
15976 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15977 if test $ac_cv_func_setvbuf_reversed = yes; then
15978
15979 cat >>confdefs.h <<\EOF
15980 #define SETVBUF_REVERSED 1
15981 EOF
15982
15983 fi
15984
15985 fi
15986 echo "$as_me:15986: checking return type of signal handlers" >&5
15987 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15988 if test "${ac_cv_type_signal+set}" = set; then
15989   echo $ECHO_N "(cached) $ECHO_C" >&6
15990 else
15991   cat >conftest.$ac_ext <<_ACEOF
15992 #line 15992 "configure"
15993 #include "confdefs.h"
15994 #include <sys/types.h>
15995 #include <signal.h>
15996 #ifdef signal
15997 # undef signal
15998 #endif
15999 #ifdef __cplusplus
16000 extern "C" void (*signal (int, void (*)(int)))(int);
16001 #else
16002 void (*signal ()) ();
16003 #endif
16004
16005 int
16006 main ()
16007 {
16008 int i;
16009   ;
16010   return 0;
16011 }
16012 _ACEOF
16013 rm -f conftest.$ac_objext
16014 if { (eval echo "$as_me:16014: \"$ac_compile\"") >&5
16015   (eval $ac_compile) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); } &&
16019          { ac_try='test -s conftest.$ac_objext'
16020   { (eval echo "$as_me:16020: \"$ac_try\"") >&5
16021   (eval $ac_try) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit $ac_status); }; }; then
16025   ac_cv_type_signal=void
16026 else
16027   echo "$as_me: failed program was:" >&5
16028 cat conftest.$ac_ext >&5
16029 ac_cv_type_signal=int
16030 fi
16031 rm -f conftest.$ac_objext conftest.$ac_ext
16032 fi
16033 echo "$as_me:16033: result: $ac_cv_type_signal" >&5
16034 echo "${ECHO_T}$ac_cv_type_signal" >&6
16035
16036 cat >>confdefs.h <<EOF
16037 #define RETSIGTYPE $ac_cv_type_signal
16038 EOF
16039
16040 echo "$as_me:16040: checking for type sigaction_t" >&5
16041 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16042 if test "${cf_cv_type_sigaction+set}" = set; then
16043   echo $ECHO_N "(cached) $ECHO_C" >&6
16044 else
16045
16046         cat >conftest.$ac_ext <<_ACEOF
16047 #line 16047 "configure"
16048 #include "confdefs.h"
16049
16050 #include <signal.h>
16051 int
16052 main ()
16053 {
16054 sigaction_t x
16055   ;
16056   return 0;
16057 }
16058 _ACEOF
16059 rm -f conftest.$ac_objext
16060 if { (eval echo "$as_me:16060: \"$ac_compile\"") >&5
16061   (eval $ac_compile) 2>&5
16062   ac_status=$?
16063   echo "$as_me:16063: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -s conftest.$ac_objext'
16066   { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067   (eval $ac_try) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); }; }; then
16071   cf_cv_type_sigaction=yes
16072 else
16073   echo "$as_me: failed program was:" >&5
16074 cat conftest.$ac_ext >&5
16075 cf_cv_type_sigaction=no
16076 fi
16077 rm -f conftest.$ac_objext conftest.$ac_ext
16078 fi
16079
16080 echo "$as_me:16080: result: $cf_cv_type_sigaction" >&5
16081 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16082 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16083 #define HAVE_TYPE_SIGACTION 1
16084 EOF
16085
16086 echo "$as_me:16086: checking declaration of size-change" >&5
16087 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16088 if test "${cf_cv_sizechange+set}" = set; then
16089   echo $ECHO_N "(cached) $ECHO_C" >&6
16090 else
16091
16092     cf_cv_sizechange=unknown
16093     cf_save_CPPFLAGS="$CPPFLAGS"
16094
16095 for cf_opts in "" "NEED_PTEM_H"
16096 do
16097
16098     CPPFLAGS="$cf_save_CPPFLAGS"
16099     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16100     cat >conftest.$ac_ext <<_ACEOF
16101 #line 16101 "configure"
16102 #include "confdefs.h"
16103 #include <sys/types.h>
16104 #ifdef HAVE_TERMIOS_H
16105 #include <termios.h>
16106 #else
16107 #ifdef HAVE_TERMIO_H
16108 #include <termio.h>
16109 #endif
16110 #endif
16111 #ifdef NEED_PTEM_H
16112 /* This is a workaround for SCO:  they neglected to define struct winsize in
16113  * termios.h -- it's only in termio.h and ptem.h
16114  */
16115 #include        <sys/stream.h>
16116 #include        <sys/ptem.h>
16117 #endif
16118 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16119 #include <sys/ioctl.h>
16120 #endif
16121
16122 int
16123 main ()
16124 {
16125
16126 #ifdef TIOCGSIZE
16127         struct ttysize win;     /* FIXME: what system is this? */
16128         int y = win.ts_lines;
16129         int x = win.ts_cols;
16130 #else
16131 #ifdef TIOCGWINSZ
16132         struct winsize win;
16133         int y = win.ws_row;
16134         int x = win.ws_col;
16135 #else
16136         no TIOCGSIZE or TIOCGWINSZ
16137 #endif /* TIOCGWINSZ */
16138 #endif /* TIOCGSIZE */
16139
16140   ;
16141   return 0;
16142 }
16143 _ACEOF
16144 rm -f conftest.$ac_objext
16145 if { (eval echo "$as_me:16145: \"$ac_compile\"") >&5
16146   (eval $ac_compile) 2>&5
16147   ac_status=$?
16148   echo "$as_me:16148: \$? = $ac_status" >&5
16149   (exit $ac_status); } &&
16150          { ac_try='test -s conftest.$ac_objext'
16151   { (eval echo "$as_me:16151: \"$ac_try\"") >&5
16152   (eval $ac_try) 2>&5
16153   ac_status=$?
16154   echo "$as_me:16154: \$? = $ac_status" >&5
16155   (exit $ac_status); }; }; then
16156   cf_cv_sizechange=yes
16157 else
16158   echo "$as_me: failed program was:" >&5
16159 cat conftest.$ac_ext >&5
16160 cf_cv_sizechange=no
16161 fi
16162 rm -f conftest.$ac_objext conftest.$ac_ext
16163
16164         CPPFLAGS="$cf_save_CPPFLAGS"
16165         if test "$cf_cv_sizechange" = yes ; then
16166                 echo "size-change succeeded ($cf_opts)" >&5
16167                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16168                 break
16169         fi
16170 done
16171
16172 fi
16173 echo "$as_me:16173: result: $cf_cv_sizechange" >&5
16174 echo "${ECHO_T}$cf_cv_sizechange" >&6
16175 if test "$cf_cv_sizechange" != no ; then
16176         cat >>confdefs.h <<\EOF
16177 #define HAVE_SIZECHANGE 1
16178 EOF
16179
16180         case $cf_cv_sizechange in #(vi
16181         NEED*)
16182                 cat >>confdefs.h <<EOF
16183 #define $cf_cv_sizechange  1
16184 EOF
16185
16186                 ;;
16187         esac
16188 fi
16189
16190 echo "$as_me:16190: checking for memmove" >&5
16191 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16192 if test "${ac_cv_func_memmove+set}" = set; then
16193   echo $ECHO_N "(cached) $ECHO_C" >&6
16194 else
16195   cat >conftest.$ac_ext <<_ACEOF
16196 #line 16196 "configure"
16197 #include "confdefs.h"
16198 /* System header to define __stub macros and hopefully few prototypes,
16199     which can conflict with char memmove (); below.  */
16200 #include <assert.h>
16201 /* Override any gcc2 internal prototype to avoid an error.  */
16202 #ifdef __cplusplus
16203 extern "C"
16204 #endif
16205 /* We use char because int might match the return type of a gcc2
16206    builtin and then its argument prototype would still apply.  */
16207 char memmove ();
16208 char (*f) ();
16209
16210 int
16211 main ()
16212 {
16213 /* The GNU C library defines this for functions which it implements
16214     to always fail with ENOSYS.  Some functions are actually named
16215     something starting with __ and the normal name is an alias.  */
16216 #if defined (__stub_memmove) || defined (__stub___memmove)
16217 choke me
16218 #else
16219 f = memmove;
16220 #endif
16221
16222   ;
16223   return 0;
16224 }
16225 _ACEOF
16226 rm -f conftest.$ac_objext 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); } &&
16232          { ac_try='test -s conftest$ac_exeext'
16233   { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234   (eval $ac_try) 2>&5
16235   ac_status=$?
16236   echo "$as_me:16236: \$? = $ac_status" >&5
16237   (exit $ac_status); }; }; then
16238   ac_cv_func_memmove=yes
16239 else
16240   echo "$as_me: failed program was:" >&5
16241 cat conftest.$ac_ext >&5
16242 ac_cv_func_memmove=no
16243 fi
16244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16245 fi
16246 echo "$as_me:16246: result: $ac_cv_func_memmove" >&5
16247 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16248 if test $ac_cv_func_memmove = yes; then
16249   :
16250 else
16251
16252 echo "$as_me:16252: checking for bcopy" >&5
16253 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16254 if test "${ac_cv_func_bcopy+set}" = set; then
16255   echo $ECHO_N "(cached) $ECHO_C" >&6
16256 else
16257   cat >conftest.$ac_ext <<_ACEOF
16258 #line 16258 "configure"
16259 #include "confdefs.h"
16260 /* System header to define __stub macros and hopefully few prototypes,
16261     which can conflict with char bcopy (); below.  */
16262 #include <assert.h>
16263 /* Override any gcc2 internal prototype to avoid an error.  */
16264 #ifdef __cplusplus
16265 extern "C"
16266 #endif
16267 /* We use char because int might match the return type of a gcc2
16268    builtin and then its argument prototype would still apply.  */
16269 char bcopy ();
16270 char (*f) ();
16271
16272 int
16273 main ()
16274 {
16275 /* The GNU C library defines this for functions which it implements
16276     to always fail with ENOSYS.  Some functions are actually named
16277     something starting with __ and the normal name is an alias.  */
16278 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16279 choke me
16280 #else
16281 f = bcopy;
16282 #endif
16283
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); } &&
16294          { ac_try='test -s conftest$ac_exeext'
16295   { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296   (eval $ac_try) 2>&5
16297   ac_status=$?
16298   echo "$as_me:16298: \$? = $ac_status" >&5
16299   (exit $ac_status); }; }; then
16300   ac_cv_func_bcopy=yes
16301 else
16302   echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 ac_cv_func_bcopy=no
16305 fi
16306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16307 fi
16308 echo "$as_me:16308: result: $ac_cv_func_bcopy" >&5
16309 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16310 if test $ac_cv_func_bcopy = yes; then
16311
16312         echo "$as_me:16312: checking if bcopy does overlapping moves" >&5
16313 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16314 if test "${cf_cv_good_bcopy+set}" = set; then
16315   echo $ECHO_N "(cached) $ECHO_C" >&6
16316 else
16317
16318                 if test "$cross_compiling" = yes; then
16319   cf_cv_good_bcopy=unknown
16320 else
16321   cat >conftest.$ac_ext <<_ACEOF
16322 #line 16322 "configure"
16323 #include "confdefs.h"
16324
16325 int main() {
16326         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16327         char temp[40];
16328         bcopy(data, temp, sizeof(data));
16329         bcopy(temp+10, temp, 15);
16330         bcopy(temp+5, temp+15, 10);
16331         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16332 }
16333
16334 _ACEOF
16335 rm -f conftest$ac_exeext
16336 if { (eval echo "$as_me:16336: \"$ac_link\"") >&5
16337   (eval $ac_link) 2>&5
16338   ac_status=$?
16339   echo "$as_me:16339: \$? = $ac_status" >&5
16340   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16341   { (eval echo "$as_me:16341: \"$ac_try\"") >&5
16342   (eval $ac_try) 2>&5
16343   ac_status=$?
16344   echo "$as_me:16344: \$? = $ac_status" >&5
16345   (exit $ac_status); }; }; then
16346   cf_cv_good_bcopy=yes
16347 else
16348   echo "$as_me: program exited with status $ac_status" >&5
16349 echo "$as_me: failed program was:" >&5
16350 cat conftest.$ac_ext >&5
16351 cf_cv_good_bcopy=no
16352 fi
16353 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16354 fi
16355
16356 fi
16357 echo "$as_me:16357: result: $cf_cv_good_bcopy" >&5
16358 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16359
16360 else
16361   cf_cv_good_bcopy=no
16362 fi
16363
16364         if test "$cf_cv_good_bcopy" = yes ; then
16365                 cat >>confdefs.h <<\EOF
16366 #define USE_OK_BCOPY 1
16367 EOF
16368
16369         else
16370                 cat >>confdefs.h <<\EOF
16371 #define USE_MY_MEMMOVE 1
16372 EOF
16373
16374         fi
16375
16376 fi
16377
16378 echo "$as_me:16378: checking if poll really works" >&5
16379 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16380 if test "${cf_cv_working_poll+set}" = set; then
16381   echo $ECHO_N "(cached) $ECHO_C" >&6
16382 else
16383
16384 if test "$cross_compiling" = yes; then
16385   cf_cv_working_poll=unknown
16386 else
16387   cat >conftest.$ac_ext <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16390
16391 #include <stdio.h>
16392 #ifdef HAVE_POLL_H
16393 #include <poll.h>
16394 #else
16395 #include <sys/poll.h>
16396 #endif
16397 int main() {
16398         struct pollfd myfds;
16399         int ret;
16400
16401         myfds.fd = 0;
16402         myfds.events = POLLIN;
16403
16404         ret = poll(&myfds, 1, 100);
16405         ${cf_cv_main_return:-return}(ret != 0);
16406 }
16407 _ACEOF
16408 rm -f conftest$ac_exeext
16409 if { (eval echo "$as_me:16409: \"$ac_link\"") >&5
16410   (eval $ac_link) 2>&5
16411   ac_status=$?
16412   echo "$as_me:16412: \$? = $ac_status" >&5
16413   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16414   { (eval echo "$as_me:16414: \"$ac_try\"") >&5
16415   (eval $ac_try) 2>&5
16416   ac_status=$?
16417   echo "$as_me:16417: \$? = $ac_status" >&5
16418   (exit $ac_status); }; }; then
16419   cf_cv_working_poll=yes
16420 else
16421   echo "$as_me: program exited with status $ac_status" >&5
16422 echo "$as_me: failed program was:" >&5
16423 cat conftest.$ac_ext >&5
16424 cf_cv_working_poll=no
16425 fi
16426 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16427 fi
16428 fi
16429 echo "$as_me:16429: result: $cf_cv_working_poll" >&5
16430 echo "${ECHO_T}$cf_cv_working_poll" >&6
16431 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16432 #define HAVE_WORKING_POLL 1
16433 EOF
16434
16435 echo "$as_me:16435: checking for va_copy" >&5
16436 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16437 if test "${cf_cv_have_va_copy+set}" = set; then
16438   echo $ECHO_N "(cached) $ECHO_C" >&6
16439 else
16440
16441 cat >conftest.$ac_ext <<_ACEOF
16442 #line 16442 "configure"
16443 #include "confdefs.h"
16444
16445 #include <stdarg.h>
16446
16447 int
16448 main ()
16449 {
16450
16451         static va_list dst;
16452         static va_list src;
16453         va_copy(dst, src)
16454   ;
16455   return 0;
16456 }
16457 _ACEOF
16458 rm -f conftest.$ac_objext conftest$ac_exeext
16459 if { (eval echo "$as_me:16459: \"$ac_link\"") >&5
16460   (eval $ac_link) 2>&5
16461   ac_status=$?
16462   echo "$as_me:16462: \$? = $ac_status" >&5
16463   (exit $ac_status); } &&
16464          { ac_try='test -s conftest$ac_exeext'
16465   { (eval echo "$as_me:16465: \"$ac_try\"") >&5
16466   (eval $ac_try) 2>&5
16467   ac_status=$?
16468   echo "$as_me:16468: \$? = $ac_status" >&5
16469   (exit $ac_status); }; }; then
16470   cf_cv_have_va_copy=yes
16471 else
16472   echo "$as_me: failed program was:" >&5
16473 cat conftest.$ac_ext >&5
16474 cf_cv_have_va_copy=no
16475 fi
16476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16477 fi
16478 echo "$as_me:16478: result: $cf_cv_have_va_copy" >&5
16479 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16480
16481 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16482 #define HAVE_VA_COPY 1
16483 EOF
16484
16485 echo "$as_me:16485: checking for __va_copy" >&5
16486 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16487 if test "${cf_cv_have___va_copy+set}" = set; then
16488   echo $ECHO_N "(cached) $ECHO_C" >&6
16489 else
16490
16491 cat >conftest.$ac_ext <<_ACEOF
16492 #line 16492 "configure"
16493 #include "confdefs.h"
16494
16495 #include <stdarg.h>
16496
16497 int
16498 main ()
16499 {
16500
16501         static va_list dst;
16502         static va_list src;
16503         __va_copy(dst, src)
16504   ;
16505   return 0;
16506 }
16507 _ACEOF
16508 rm -f conftest.$ac_objext conftest$ac_exeext
16509 if { (eval echo "$as_me:16509: \"$ac_link\"") >&5
16510   (eval $ac_link) 2>&5
16511   ac_status=$?
16512   echo "$as_me:16512: \$? = $ac_status" >&5
16513   (exit $ac_status); } &&
16514          { ac_try='test -s conftest$ac_exeext'
16515   { (eval echo "$as_me:16515: \"$ac_try\"") >&5
16516   (eval $ac_try) 2>&5
16517   ac_status=$?
16518   echo "$as_me:16518: \$? = $ac_status" >&5
16519   (exit $ac_status); }; }; then
16520   cf_cv_have___va_copy=yes
16521 else
16522   echo "$as_me: failed program was:" >&5
16523 cat conftest.$ac_ext >&5
16524 cf_cv_have___va_copy=no
16525 fi
16526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16527 fi
16528 echo "$as_me:16528: result: $cf_cv_have___va_copy" >&5
16529 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16530
16531 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16532 #define HAVE___VA_COPY 1
16533 EOF
16534
16535 echo "$as_me:16535: checking for pid_t" >&5
16536 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16537 if test "${ac_cv_type_pid_t+set}" = set; then
16538   echo $ECHO_N "(cached) $ECHO_C" >&6
16539 else
16540   cat >conftest.$ac_ext <<_ACEOF
16541 #line 16541 "configure"
16542 #include "confdefs.h"
16543 $ac_includes_default
16544 int
16545 main ()
16546 {
16547 if ((pid_t *) 0)
16548   return 0;
16549 if (sizeof (pid_t))
16550   return 0;
16551   ;
16552   return 0;
16553 }
16554 _ACEOF
16555 rm -f conftest.$ac_objext
16556 if { (eval echo "$as_me:16556: \"$ac_compile\"") >&5
16557   (eval $ac_compile) 2>&5
16558   ac_status=$?
16559   echo "$as_me:16559: \$? = $ac_status" >&5
16560   (exit $ac_status); } &&
16561          { ac_try='test -s conftest.$ac_objext'
16562   { (eval echo "$as_me:16562: \"$ac_try\"") >&5
16563   (eval $ac_try) 2>&5
16564   ac_status=$?
16565   echo "$as_me:16565: \$? = $ac_status" >&5
16566   (exit $ac_status); }; }; then
16567   ac_cv_type_pid_t=yes
16568 else
16569   echo "$as_me: failed program was:" >&5
16570 cat conftest.$ac_ext >&5
16571 ac_cv_type_pid_t=no
16572 fi
16573 rm -f conftest.$ac_objext conftest.$ac_ext
16574 fi
16575 echo "$as_me:16575: result: $ac_cv_type_pid_t" >&5
16576 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16577 if test $ac_cv_type_pid_t = yes; then
16578   :
16579 else
16580
16581 cat >>confdefs.h <<EOF
16582 #define pid_t int
16583 EOF
16584
16585 fi
16586
16587 for ac_header in unistd.h vfork.h
16588 do
16589 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16590 echo "$as_me:16590: checking for $ac_header" >&5
16591 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16592 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16593   echo $ECHO_N "(cached) $ECHO_C" >&6
16594 else
16595   cat >conftest.$ac_ext <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16598 #include <$ac_header>
16599 _ACEOF
16600 if { (eval echo "$as_me:16600: \"$ac_cpp conftest.$ac_ext\"") >&5
16601   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16602   ac_status=$?
16603   egrep -v '^ *\+' conftest.er1 >conftest.err
16604   rm -f conftest.er1
16605   cat conftest.err >&5
16606   echo "$as_me:16606: \$? = $ac_status" >&5
16607   (exit $ac_status); } >/dev/null; then
16608   if test -s conftest.err; then
16609     ac_cpp_err=$ac_c_preproc_warn_flag
16610   else
16611     ac_cpp_err=
16612   fi
16613 else
16614   ac_cpp_err=yes
16615 fi
16616 if test -z "$ac_cpp_err"; then
16617   eval "$as_ac_Header=yes"
16618 else
16619   echo "$as_me: failed program was:" >&5
16620   cat conftest.$ac_ext >&5
16621   eval "$as_ac_Header=no"
16622 fi
16623 rm -f conftest.err conftest.$ac_ext
16624 fi
16625 echo "$as_me:16625: result: `eval echo '${'$as_ac_Header'}'`" >&5
16626 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16627 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16628   cat >>confdefs.h <<EOF
16629 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16630 EOF
16631
16632 fi
16633 done
16634
16635 for ac_func in fork vfork
16636 do
16637 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16638 echo "$as_me:16638: checking for $ac_func" >&5
16639 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16640 if eval "test \"\${$as_ac_var+set}\" = set"; then
16641   echo $ECHO_N "(cached) $ECHO_C" >&6
16642 else
16643   cat >conftest.$ac_ext <<_ACEOF
16644 #line 16644 "configure"
16645 #include "confdefs.h"
16646 /* System header to define __stub macros and hopefully few prototypes,
16647     which can conflict with char $ac_func (); below.  */
16648 #include <assert.h>
16649 /* Override any gcc2 internal prototype to avoid an error.  */
16650 #ifdef __cplusplus
16651 extern "C"
16652 #endif
16653 /* We use char because int might match the return type of a gcc2
16654    builtin and then its argument prototype would still apply.  */
16655 char $ac_func ();
16656 char (*f) ();
16657
16658 int
16659 main ()
16660 {
16661 /* The GNU C library defines this for functions which it implements
16662     to always fail with ENOSYS.  Some functions are actually named
16663     something starting with __ and the normal name is an alias.  */
16664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16665 choke me
16666 #else
16667 f = $ac_func;
16668 #endif
16669
16670   ;
16671   return 0;
16672 }
16673 _ACEOF
16674 rm -f conftest.$ac_objext conftest$ac_exeext
16675 if { (eval echo "$as_me:16675: \"$ac_link\"") >&5
16676   (eval $ac_link) 2>&5
16677   ac_status=$?
16678   echo "$as_me:16678: \$? = $ac_status" >&5
16679   (exit $ac_status); } &&
16680          { ac_try='test -s conftest$ac_exeext'
16681   { (eval echo "$as_me:16681: \"$ac_try\"") >&5
16682   (eval $ac_try) 2>&5
16683   ac_status=$?
16684   echo "$as_me:16684: \$? = $ac_status" >&5
16685   (exit $ac_status); }; }; then
16686   eval "$as_ac_var=yes"
16687 else
16688   echo "$as_me: failed program was:" >&5
16689 cat conftest.$ac_ext >&5
16690 eval "$as_ac_var=no"
16691 fi
16692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16693 fi
16694 echo "$as_me:16694: result: `eval echo '${'$as_ac_var'}'`" >&5
16695 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16696 if test `eval echo '${'$as_ac_var'}'` = yes; then
16697   cat >>confdefs.h <<EOF
16698 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16699 EOF
16700
16701 fi
16702 done
16703
16704 ac_cv_func_fork_works=$ac_cv_func_fork
16705 if test "x$ac_cv_func_fork" = xyes; then
16706   echo "$as_me:16706: checking for working fork" >&5
16707 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16708 if test "${ac_cv_func_fork_works+set}" = set; then
16709   echo $ECHO_N "(cached) $ECHO_C" >&6
16710 else
16711   if test "$cross_compiling" = yes; then
16712   ac_cv_func_fork_works=cross
16713 else
16714   cat >conftest.$ac_ext <<_ACEOF
16715 /* By Rüdiger Kuhlmann. */
16716       #include <sys/types.h>
16717       #if HAVE_UNISTD_H
16718       # include <unistd.h>
16719       #endif
16720       /* Some systems only have a dummy stub for fork() */
16721       int main ()
16722       {
16723         if (fork() < 0)
16724           $ac_main_return (1);
16725         $ac_main_return (0);
16726       }
16727 _ACEOF
16728 rm -f conftest$ac_exeext
16729 if { (eval echo "$as_me:16729: \"$ac_link\"") >&5
16730   (eval $ac_link) 2>&5
16731   ac_status=$?
16732   echo "$as_me:16732: \$? = $ac_status" >&5
16733   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16734   { (eval echo "$as_me:16734: \"$ac_try\"") >&5
16735   (eval $ac_try) 2>&5
16736   ac_status=$?
16737   echo "$as_me:16737: \$? = $ac_status" >&5
16738   (exit $ac_status); }; }; then
16739   ac_cv_func_fork_works=yes
16740 else
16741   echo "$as_me: program exited with status $ac_status" >&5
16742 echo "$as_me: failed program was:" >&5
16743 cat conftest.$ac_ext >&5
16744 ac_cv_func_fork_works=no
16745 fi
16746 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16747 fi
16748 fi
16749 echo "$as_me:16749: result: $ac_cv_func_fork_works" >&5
16750 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16751
16752 fi
16753 if test "x$ac_cv_func_fork_works" = xcross; then
16754   case $host in
16755     *-*-amigaos* | *-*-msdosdjgpp*)
16756       # Override, as these systems have only a dummy fork() stub
16757       ac_cv_func_fork_works=no
16758       ;;
16759     *)
16760       ac_cv_func_fork_works=yes
16761       ;;
16762   esac
16763   { echo "$as_me:16763: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16764 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16765 fi
16766 ac_cv_func_vfork_works=$ac_cv_func_vfork
16767 if test "x$ac_cv_func_vfork" = xyes; then
16768   echo "$as_me:16768: checking for working vfork" >&5
16769 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16770 if test "${ac_cv_func_vfork_works+set}" = set; then
16771   echo $ECHO_N "(cached) $ECHO_C" >&6
16772 else
16773   if test "$cross_compiling" = yes; then
16774   ac_cv_func_vfork_works=cross
16775 else
16776   cat >conftest.$ac_ext <<_ACEOF
16777 #line 16777 "configure"
16778 #include "confdefs.h"
16779 /* Thanks to Paul Eggert for this test.  */
16780 #include <stdio.h>
16781 #include <sys/types.h>
16782 #include <sys/stat.h>
16783 #if HAVE_UNISTD_H
16784 # include <unistd.h>
16785 #endif
16786 #if HAVE_VFORK_H
16787 # include <vfork.h>
16788 #endif
16789 /* On some sparc systems, changes by the child to local and incoming
16790    argument registers are propagated back to the parent.  The compiler
16791    is told about this with #include <vfork.h>, but some compilers
16792    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16793    static variable whose address is put into a register that is
16794    clobbered by the vfork.  */
16795 static
16796 #ifdef __cplusplus
16797 sparc_address_test (int arg)
16798 # else
16799 sparc_address_test (arg) int arg;
16800 #endif
16801 {
16802   static pid_t child;
16803   if (!child) {
16804     child = vfork ();
16805     if (child < 0) {
16806       perror ("vfork");
16807       _exit(2);
16808     }
16809     if (!child) {
16810       arg = getpid();
16811       write(-1, "", 0);
16812       _exit (arg);
16813     }
16814   }
16815 }
16816
16817 int
16818 main ()
16819 {
16820   pid_t parent = getpid ();
16821   pid_t child;
16822
16823   sparc_address_test ();
16824
16825   child = vfork ();
16826
16827   if (child == 0) {
16828     /* Here is another test for sparc vfork register problems.  This
16829        test uses lots of local variables, at least as many local
16830        variables as main has allocated so far including compiler
16831        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16832        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16833        reuse the register of parent for one of the local variables,
16834        since it will think that parent can't possibly be used any more
16835        in this routine.  Assigning to the local variable will thus
16836        munge parent in the parent process.  */
16837     pid_t
16838       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16839       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16840     /* Convince the compiler that p..p7 are live; otherwise, it might
16841        use the same hardware register for all 8 local variables.  */
16842     if (p != p1 || p != p2 || p != p3 || p != p4
16843         || p != p5 || p != p6 || p != p7)
16844       _exit(1);
16845
16846     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16847        from child file descriptors.  If the child closes a descriptor
16848        before it execs or exits, this munges the parent's descriptor
16849        as well.  Test for this by closing stdout in the child.  */
16850     _exit(close(fileno(stdout)) != 0);
16851   } else {
16852     int status;
16853     struct stat st;
16854
16855     while (wait(&status) != child)
16856       ;
16857     $ac_main_return(
16858          /* Was there some problem with vforking?  */
16859          child < 0
16860
16861          /* Did the child fail?  (This shouldn't happen.)  */
16862          || status
16863
16864          /* Did the vfork/compiler bug occur?  */
16865          || parent != getpid()
16866
16867          /* Did the file descriptor bug occur?  */
16868          || fstat(fileno(stdout), &st) != 0
16869          );
16870   }
16871 }
16872 _ACEOF
16873 rm -f conftest$ac_exeext
16874 if { (eval echo "$as_me:16874: \"$ac_link\"") >&5
16875   (eval $ac_link) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16879   { (eval echo "$as_me:16879: \"$ac_try\"") >&5
16880   (eval $ac_try) 2>&5
16881   ac_status=$?
16882   echo "$as_me:16882: \$? = $ac_status" >&5
16883   (exit $ac_status); }; }; then
16884   ac_cv_func_vfork_works=yes
16885 else
16886   echo "$as_me: program exited with status $ac_status" >&5
16887 echo "$as_me: failed program was:" >&5
16888 cat conftest.$ac_ext >&5
16889 ac_cv_func_vfork_works=no
16890 fi
16891 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16892 fi
16893 fi
16894 echo "$as_me:16894: result: $ac_cv_func_vfork_works" >&5
16895 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16896
16897 fi;
16898 if test "x$ac_cv_func_fork_works" = xcross; then
16899   ac_cv_func_vfork_works=ac_cv_func_vfork
16900   { echo "$as_me:16900: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16901 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16902 fi
16903
16904 if test "x$ac_cv_func_vfork_works" = xyes; then
16905
16906 cat >>confdefs.h <<\EOF
16907 #define HAVE_WORKING_VFORK 1
16908 EOF
16909
16910 else
16911
16912 cat >>confdefs.h <<\EOF
16913 #define vfork fork
16914 EOF
16915
16916 fi
16917 if test "x$ac_cv_func_fork_works" = xyes; then
16918
16919 cat >>confdefs.h <<\EOF
16920 #define HAVE_WORKING_FORK 1
16921 EOF
16922
16923 fi
16924
16925 # special check for test/ditto.c
16926
16927 echo "$as_me:16927: checking for openpty in -lutil" >&5
16928 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16929 if test "${ac_cv_lib_util_openpty+set}" = set; then
16930   echo $ECHO_N "(cached) $ECHO_C" >&6
16931 else
16932   ac_check_lib_save_LIBS=$LIBS
16933 LIBS="-lutil  $LIBS"
16934 cat >conftest.$ac_ext <<_ACEOF
16935 #line 16935 "configure"
16936 #include "confdefs.h"
16937
16938 /* Override any gcc2 internal prototype to avoid an error.  */
16939 #ifdef __cplusplus
16940 extern "C"
16941 #endif
16942 /* We use char because int might match the return type of a gcc2
16943    builtin and then its argument prototype would still apply.  */
16944 char openpty ();
16945 int
16946 main ()
16947 {
16948 openpty ();
16949   ;
16950   return 0;
16951 }
16952 _ACEOF
16953 rm -f conftest.$ac_objext conftest$ac_exeext
16954 if { (eval echo "$as_me:16954: \"$ac_link\"") >&5
16955   (eval $ac_link) 2>&5
16956   ac_status=$?
16957   echo "$as_me:16957: \$? = $ac_status" >&5
16958   (exit $ac_status); } &&
16959          { ac_try='test -s conftest$ac_exeext'
16960   { (eval echo "$as_me:16960: \"$ac_try\"") >&5
16961   (eval $ac_try) 2>&5
16962   ac_status=$?
16963   echo "$as_me:16963: \$? = $ac_status" >&5
16964   (exit $ac_status); }; }; then
16965   ac_cv_lib_util_openpty=yes
16966 else
16967   echo "$as_me: failed program was:" >&5
16968 cat conftest.$ac_ext >&5
16969 ac_cv_lib_util_openpty=no
16970 fi
16971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16972 LIBS=$ac_check_lib_save_LIBS
16973 fi
16974 echo "$as_me:16974: result: $ac_cv_lib_util_openpty" >&5
16975 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16976 if test $ac_cv_lib_util_openpty = yes; then
16977   cf_cv_lib_util=yes
16978 else
16979   cf_cv_lib_util=no
16980 fi
16981
16982 echo "$as_me:16982: checking for openpty header" >&5
16983 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16984 if test "${cf_cv_func_openpty+set}" = set; then
16985   echo $ECHO_N "(cached) $ECHO_C" >&6
16986 else
16987
16988     cf_save_LIBS="$LIBS"
16989     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16990     for cf_header in pty.h libutil.h util.h
16991     do
16992     cat >conftest.$ac_ext <<_ACEOF
16993 #line 16993 "configure"
16994 #include "confdefs.h"
16995
16996 #include <$cf_header>
16997
16998 int
16999 main ()
17000 {
17001
17002     int x = openpty((int *)0, (int *)0, (char *)0,
17003                    (struct termios *)0, (struct winsize *)0);
17004
17005   ;
17006   return 0;
17007 }
17008 _ACEOF
17009 rm -f conftest.$ac_objext conftest$ac_exeext
17010 if { (eval echo "$as_me:17010: \"$ac_link\"") >&5
17011   (eval $ac_link) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); } &&
17015          { ac_try='test -s conftest$ac_exeext'
17016   { (eval echo "$as_me:17016: \"$ac_try\"") >&5
17017   (eval $ac_try) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); }; }; then
17021
17022         cf_cv_func_openpty=$cf_header
17023         break
17024
17025 else
17026   echo "$as_me: failed program was:" >&5
17027 cat conftest.$ac_ext >&5
17028
17029         cf_cv_func_openpty=no
17030
17031 fi
17032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17033     done
17034     LIBS="$cf_save_LIBS"
17035
17036 fi
17037 echo "$as_me:17037: result: $cf_cv_func_openpty" >&5
17038 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17039
17040 if test "$cf_cv_func_openpty" != no ; then
17041     cat >>confdefs.h <<EOF
17042 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17043 EOF
17044
17045     cat >>confdefs.h <<\EOF
17046 #define USE_XTERM_PTY 1
17047 EOF
17048
17049     if test "$cf_cv_lib_util" = yes ; then
17050         TEST_LIBS="-lutil $TEST_LIBS"
17051     fi
17052 fi
17053
17054 if test "$with_hashed_db" != no ; then
17055         cat >>confdefs.h <<\EOF
17056 #define USE_HASHED_DB 1
17057 EOF
17058
17059 case $with_hashed_db in #(vi
17060 yes|*able*) #(vi
17061     ;;
17062 *)
17063     if test -d "$with_hashed_db" ; then
17064
17065 if test -n "$with_hashed_db/include" ; then
17066   for cf_add_incdir in $with_hashed_db/include
17067   do
17068         while test $cf_add_incdir != /usr/include
17069         do
17070           if test -d $cf_add_incdir
17071           then
17072                 cf_have_incdir=no
17073                 if test -n "$CFLAGS$CPPFLAGS" ; then
17074                   # a loop is needed to ensure we can add subdirs of existing dirs
17075                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17076                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17077                           cf_have_incdir=yes; break
17078                         fi
17079                   done
17080                 fi
17081
17082                 if test "$cf_have_incdir" = no ; then
17083                   if test "$cf_add_incdir" = /usr/local/include ; then
17084                         if test "$GCC" = yes
17085                         then
17086                           cf_save_CPPFLAGS=$CPPFLAGS
17087                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17088                           cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091 #include <stdio.h>
17092 int
17093 main ()
17094 {
17095 printf("Hello")
17096   ;
17097   return 0;
17098 }
17099 _ACEOF
17100 rm -f conftest.$ac_objext
17101 if { (eval echo "$as_me:17101: \"$ac_compile\"") >&5
17102   (eval $ac_compile) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); } &&
17106          { ac_try='test -s conftest.$ac_objext'
17107   { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); }; }; then
17112   :
17113 else
17114   echo "$as_me: failed program was:" >&5
17115 cat conftest.$ac_ext >&5
17116 cf_have_incdir=yes
17117 fi
17118 rm -f conftest.$ac_objext conftest.$ac_ext
17119                           CPPFLAGS=$cf_save_CPPFLAGS
17120                         fi
17121                   fi
17122                 fi
17123
17124                 if test "$cf_have_incdir" = no ; then
17125                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17126
17127 echo "${as_me:-configure}:17127: testing adding $cf_add_incdir to include-path ..." 1>&5
17128
17129                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17130
17131                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17132                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17133                   cf_add_incdir="$cf_top_incdir"
17134                 else
17135                   break
17136                 fi
17137           fi
17138         done
17139   done
17140 fi
17141
17142 if test -n "$with_hashed_db/lib" ; then
17143   for cf_add_libdir in $with_hashed_db/lib
17144   do
17145     if test $cf_add_libdir = /usr/lib ; then
17146       :
17147     elif test -d $cf_add_libdir
17148     then
17149       cf_have_libdir=no
17150       if test -n "$LDFLAGS$LIBS" ; then
17151         # a loop is needed to ensure we can add subdirs of existing dirs
17152         for cf_test_libdir in $LDFLAGS $LIBS ; do
17153           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17154             cf_have_libdir=yes; break
17155           fi
17156         done
17157       fi
17158       if test "$cf_have_libdir" = no ; then
17159         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17160
17161 echo "${as_me:-configure}:17161: testing adding $cf_add_libdir to library-path ..." 1>&5
17162
17163         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17164       fi
17165     fi
17166   done
17167 fi
17168
17169     fi
17170 esac
17171
17172 echo "$as_me:17172: checking for db.h" >&5
17173 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17174 if test "${ac_cv_header_db_h+set}" = set; then
17175   echo $ECHO_N "(cached) $ECHO_C" >&6
17176 else
17177   cat >conftest.$ac_ext <<_ACEOF
17178 #line 17178 "configure"
17179 #include "confdefs.h"
17180 #include <db.h>
17181 _ACEOF
17182 if { (eval echo "$as_me:17182: \"$ac_cpp conftest.$ac_ext\"") >&5
17183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17184   ac_status=$?
17185   egrep -v '^ *\+' conftest.er1 >conftest.err
17186   rm -f conftest.er1
17187   cat conftest.err >&5
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); } >/dev/null; then
17190   if test -s conftest.err; then
17191     ac_cpp_err=$ac_c_preproc_warn_flag
17192   else
17193     ac_cpp_err=
17194   fi
17195 else
17196   ac_cpp_err=yes
17197 fi
17198 if test -z "$ac_cpp_err"; then
17199   ac_cv_header_db_h=yes
17200 else
17201   echo "$as_me: failed program was:" >&5
17202   cat conftest.$ac_ext >&5
17203   ac_cv_header_db_h=no
17204 fi
17205 rm -f conftest.err conftest.$ac_ext
17206 fi
17207 echo "$as_me:17207: result: $ac_cv_header_db_h" >&5
17208 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17209 if test $ac_cv_header_db_h = yes; then
17210
17211 echo "$as_me:17211: checking for version of db" >&5
17212 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17213 if test "${cf_cv_hashed_db_version+set}" = set; then
17214   echo $ECHO_N "(cached) $ECHO_C" >&6
17215 else
17216
17217 cf_cv_hashed_db_version=unknown
17218
17219 for cf_db_version in 1 2 3 4 5
17220 do
17221
17222 echo "${as_me:-configure}:17222: testing checking for db version $cf_db_version ..." 1>&5
17223
17224         cat >conftest.$ac_ext <<_ACEOF
17225 #line 17225 "configure"
17226 #include "confdefs.h"
17227
17228 $ac_includes_default
17229 #include <db.h>
17230
17231 #ifdef DB_VERSION_MAJOR
17232         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17233 #if $cf_db_version == DB_VERSION_MAJOR
17234         /* ok */
17235 #else
17236         make an error
17237 #endif
17238 #else
17239 #if $cf_db_version == 1
17240         /* ok: assuming this is DB 1.8.5 */
17241 #else
17242         make an error
17243 #endif
17244 #endif
17245
17246 int
17247 main ()
17248 {
17249 DBT *foo = 0
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 rm -f conftest.$ac_objext
17255 if { (eval echo "$as_me:17255: \"$ac_compile\"") >&5
17256   (eval $ac_compile) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit $ac_status); } &&
17260          { ac_try='test -s conftest.$ac_objext'
17261   { (eval echo "$as_me:17261: \"$ac_try\"") >&5
17262   (eval $ac_try) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit $ac_status); }; }; then
17266
17267         cf_cv_hashed_db_version=$cf_db_version
17268         break
17269
17270 else
17271   echo "$as_me: failed program was:" >&5
17272 cat conftest.$ac_ext >&5
17273 fi
17274 rm -f conftest.$ac_objext conftest.$ac_ext
17275 done
17276
17277 fi
17278 echo "$as_me:17278: result: $cf_cv_hashed_db_version" >&5
17279 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17280
17281 if test "$cf_cv_hashed_db_version" = unknown ; then
17282         { { echo "$as_me:17282: error: Cannot determine version of db" >&5
17283 echo "$as_me: error: Cannot determine version of db" >&2;}
17284    { (exit 1); exit 1; }; }
17285 else
17286
17287 echo "$as_me:17287: checking for db libraries" >&5
17288 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17289 if test "${cf_cv_hashed_db_libs+set}" = set; then
17290   echo $ECHO_N "(cached) $ECHO_C" >&6
17291 else
17292
17293 cf_cv_hashed_db_libs=unknown
17294 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17295 do
17296         cf_save_libs="$LIBS"
17297         if test -n "$cf_db_libs"; then
17298                 LIBS="-l$cf_db_libs $LIBS"
17299         fi
17300
17301 echo "${as_me:-configure}:17301: testing checking for library "$cf_db_libs" ..." 1>&5
17302
17303         cat >conftest.$ac_ext <<_ACEOF
17304 #line 17304 "configure"
17305 #include "confdefs.h"
17306
17307 $ac_includes_default
17308 #include <db.h>
17309
17310 int
17311 main ()
17312 {
17313
17314         char *path = "/tmp/foo";
17315 #ifdef DB_VERSION_MAJOR
17316 #if DB_VERSION_MAJOR >= 4
17317         DB *result = 0;
17318         db_create(&result, NULL, 0);
17319         result->open(result,
17320                 NULL,
17321                 path,
17322                 path,
17323                 DB_HASH,
17324                 DB_CREATE,
17325                 0644);
17326 #elif DB_VERSION_MAJOR >= 3
17327         DB *result = 0;
17328         db_create(&result, NULL, 0);
17329         result->open(result,
17330                 path,
17331                 path,
17332                 DB_HASH,
17333                 DB_CREATE,
17334                 0644);
17335 #elif DB_VERSION_MAJOR >= 2
17336         DB *result = 0;
17337         db_open(path,
17338                 DB_HASH,
17339                 DB_CREATE,
17340                 0644,
17341                 (DB_ENV *) 0,
17342                 (DB_INFO *) 0,
17343                 &result);
17344 #endif /* DB_VERSION_MAJOR */
17345 #else
17346         DB *result = dbopen(path,
17347                      2,
17348                      0644,
17349                      DB_HASH,
17350                      0);
17351 #endif
17352         ${cf_cv_main_return:-return}(result != 0)
17353
17354   ;
17355   return 0;
17356 }
17357 _ACEOF
17358 rm -f conftest.$ac_objext conftest$ac_exeext
17359 if { (eval echo "$as_me:17359: \"$ac_link\"") >&5
17360   (eval $ac_link) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); } &&
17364          { ac_try='test -s conftest$ac_exeext'
17365   { (eval echo "$as_me:17365: \"$ac_try\"") >&5
17366   (eval $ac_try) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit $ac_status); }; }; then
17370
17371         if test -n "$cf_db_libs" ; then
17372                 cf_cv_hashed_db_libs=$cf_db_libs
17373         else
17374                 cf_cv_hashed_db_libs=default
17375         fi
17376         LIBS="$cf_save_libs"
17377         break
17378
17379 else
17380   echo "$as_me: failed program was:" >&5
17381 cat conftest.$ac_ext >&5
17382 fi
17383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17384         LIBS="$cf_save_libs"
17385 done
17386
17387 fi
17388 echo "$as_me:17388: result: $cf_cv_hashed_db_libs" >&5
17389 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17390
17391         if test "$cf_cv_hashed_db_libs" = unknown ; then
17392                 { { echo "$as_me:17392: error: Cannot determine library for db" >&5
17393 echo "$as_me: error: Cannot determine library for db" >&2;}
17394    { (exit 1); exit 1; }; }
17395         elif test "$cf_cv_hashed_db_libs" != default ; then
17396                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17397         fi
17398 fi
17399
17400 else
17401
17402         { { echo "$as_me:17402: error: Cannot find db.h" >&5
17403 echo "$as_me: error: Cannot find db.h" >&2;}
17404    { (exit 1); exit 1; }; }
17405
17406 fi
17407
17408 fi
17409
17410 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17411         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17412         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17413 fi
17414
17415 # Just in case, check if the C compiler has a bool type.
17416
17417 echo "$as_me:17417: checking if we should include stdbool.h" >&5
17418 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17419
17420 if test "${cf_cv_header_stdbool_h+set}" = set; then
17421   echo $ECHO_N "(cached) $ECHO_C" >&6
17422 else
17423
17424         cat >conftest.$ac_ext <<_ACEOF
17425 #line 17425 "configure"
17426 #include "confdefs.h"
17427
17428 int
17429 main ()
17430 {
17431 bool foo = false
17432   ;
17433   return 0;
17434 }
17435 _ACEOF
17436 rm -f conftest.$ac_objext
17437 if { (eval echo "$as_me:17437: \"$ac_compile\"") >&5
17438   (eval $ac_compile) 2>&5
17439   ac_status=$?
17440   echo "$as_me:17440: \$? = $ac_status" >&5
17441   (exit $ac_status); } &&
17442          { ac_try='test -s conftest.$ac_objext'
17443   { (eval echo "$as_me:17443: \"$ac_try\"") >&5
17444   (eval $ac_try) 2>&5
17445   ac_status=$?
17446   echo "$as_me:17446: \$? = $ac_status" >&5
17447   (exit $ac_status); }; }; then
17448   cf_cv_header_stdbool_h=0
17449 else
17450   echo "$as_me: failed program was:" >&5
17451 cat conftest.$ac_ext >&5
17452 cat >conftest.$ac_ext <<_ACEOF
17453 #line 17453 "configure"
17454 #include "confdefs.h"
17455
17456 #ifndef __BEOS__
17457 #include <stdbool.h>
17458 #endif
17459
17460 int
17461 main ()
17462 {
17463 bool foo = false
17464   ;
17465   return 0;
17466 }
17467 _ACEOF
17468 rm -f conftest.$ac_objext
17469 if { (eval echo "$as_me:17469: \"$ac_compile\"") >&5
17470   (eval $ac_compile) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); } &&
17474          { ac_try='test -s conftest.$ac_objext'
17475   { (eval echo "$as_me:17475: \"$ac_try\"") >&5
17476   (eval $ac_try) 2>&5
17477   ac_status=$?
17478   echo "$as_me:17478: \$? = $ac_status" >&5
17479   (exit $ac_status); }; }; then
17480   cf_cv_header_stdbool_h=1
17481 else
17482   echo "$as_me: failed program was:" >&5
17483 cat conftest.$ac_ext >&5
17484 cf_cv_header_stdbool_h=0
17485 fi
17486 rm -f conftest.$ac_objext conftest.$ac_ext
17487 fi
17488 rm -f conftest.$ac_objext conftest.$ac_ext
17489 fi
17490
17491 if test "$cf_cv_header_stdbool_h" = 1
17492 then    echo "$as_me:17492: result: yes" >&5
17493 echo "${ECHO_T}yes" >&6
17494 else    echo "$as_me:17494: result: no" >&5
17495 echo "${ECHO_T}no" >&6
17496 fi
17497
17498 echo "$as_me:17498: checking for builtin bool type" >&5
17499 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17500
17501 if test "${cf_cv_cc_bool_type+set}" = set; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504
17505         cat >conftest.$ac_ext <<_ACEOF
17506 #line 17506 "configure"
17507 #include "confdefs.h"
17508
17509 #include <stdio.h>
17510 #include <sys/types.h>
17511
17512 int
17513 main ()
17514 {
17515 bool x = false
17516   ;
17517   return 0;
17518 }
17519 _ACEOF
17520 rm -f conftest.$ac_objext
17521 if { (eval echo "$as_me:17521: \"$ac_compile\"") >&5
17522   (eval $ac_compile) 2>&5
17523   ac_status=$?
17524   echo "$as_me:17524: \$? = $ac_status" >&5
17525   (exit $ac_status); } &&
17526          { ac_try='test -s conftest.$ac_objext'
17527   { (eval echo "$as_me:17527: \"$ac_try\"") >&5
17528   (eval $ac_try) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit $ac_status); }; }; then
17532   cf_cv_cc_bool_type=1
17533 else
17534   echo "$as_me: failed program was:" >&5
17535 cat conftest.$ac_ext >&5
17536 cf_cv_cc_bool_type=0
17537 fi
17538 rm -f conftest.$ac_objext conftest.$ac_ext
17539
17540 fi
17541
17542 if test "$cf_cv_cc_bool_type" = 1
17543 then    echo "$as_me:17543: result: yes" >&5
17544 echo "${ECHO_T}yes" >&6
17545 else    echo "$as_me:17545: result: no" >&5
17546 echo "${ECHO_T}no" >&6
17547 fi
17548
17549 # Check for C++ compiler characteristics (and ensure that it's there!)
17550 if test -n "$CXX" ; then
17551         ac_ext=cc
17552 ac_cpp='$CXXCPP $CPPFLAGS'
17553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17556 ac_main_return=return
17557
17558 if test -n "$GXX" ; then
17559 case $cf_cv_system_name in #(vi
17560 os2*) #(vi
17561         cf_stdcpp_libname=stdcpp
17562         ;;
17563 *)
17564         cf_stdcpp_libname=stdc++
17565         ;;
17566 esac
17567 echo "$as_me:17567: checking for library $cf_stdcpp_libname" >&5
17568 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17569 if test "${cf_cv_libstdcpp+set}" = set; then
17570   echo $ECHO_N "(cached) $ECHO_C" >&6
17571 else
17572
17573         cf_save="$LIBS"
17574         LIBS="-l$cf_stdcpp_libname $LIBS"
17575 cat >conftest.$ac_ext <<_ACEOF
17576 #line 17576 "configure"
17577 #include "confdefs.h"
17578
17579 #include <strstream.h>
17580 int
17581 main ()
17582 {
17583
17584 char buf[80];
17585 strstreambuf foo(buf, sizeof(buf))
17586
17587   ;
17588   return 0;
17589 }
17590 _ACEOF
17591 rm -f conftest.$ac_objext conftest$ac_exeext
17592 if { (eval echo "$as_me:17592: \"$ac_link\"") >&5
17593   (eval $ac_link) 2>&5
17594   ac_status=$?
17595   echo "$as_me:17595: \$? = $ac_status" >&5
17596   (exit $ac_status); } &&
17597          { ac_try='test -s conftest$ac_exeext'
17598   { (eval echo "$as_me:17598: \"$ac_try\"") >&5
17599   (eval $ac_try) 2>&5
17600   ac_status=$?
17601   echo "$as_me:17601: \$? = $ac_status" >&5
17602   (exit $ac_status); }; }; then
17603   cf_cv_libstdcpp=yes
17604 else
17605   echo "$as_me: failed program was:" >&5
17606 cat conftest.$ac_ext >&5
17607 cf_cv_libstdcpp=no
17608 fi
17609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17610         LIBS="$cf_save"
17611
17612 fi
17613 echo "$as_me:17613: result: $cf_cv_libstdcpp" >&5
17614 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17615 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17616 fi
17617
17618         echo "$as_me:17618: checking whether $CXX understands -c and -o together" >&5
17619 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17620 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17621   echo $ECHO_N "(cached) $ECHO_C" >&6
17622 else
17623
17624 cat > conftest.$ac_ext <<CF_EOF
17625 #include <stdio.h>
17626 int main()
17627 {
17628         ${cf_cv_main_return:-return}(0);
17629 }
17630 CF_EOF
17631 # We do the test twice because some compilers refuse to overwrite an
17632 # existing .o file with -o, though they will create one.
17633 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17634 if { (eval echo "$as_me:17634: \"$ac_try\"") >&5
17635   (eval $ac_try) 2>&5
17636   ac_status=$?
17637   echo "$as_me:17637: \$? = $ac_status" >&5
17638   (exit $ac_status); } &&
17639   test -f conftest2.$ac_objext && { (eval echo "$as_me:17639: \"$ac_try\"") >&5
17640   (eval $ac_try) 2>&5
17641   ac_status=$?
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit $ac_status); };
17644 then
17645   eval cf_cv_prog_CXX_c_o=yes
17646 else
17647   eval cf_cv_prog_CXX_c_o=no
17648 fi
17649 rm -rf conftest*
17650
17651 fi
17652 if test $cf_cv_prog_CXX_c_o = yes; then
17653   echo "$as_me:17653: result: yes" >&5
17654 echo "${ECHO_T}yes" >&6
17655 else
17656   echo "$as_me:17656: result: no" >&5
17657 echo "${ECHO_T}no" >&6
17658 fi
17659
17660         case $GXX_VERSION in
17661         1*|2.0-6*)
17662                 cf_cxx_library=yes
17663                 ;;
17664         *-2.7*|2.7*)
17665
17666 cf_cxx_library=unknown
17667 case $cf_cv_system_name in #(vi
17668 os2*) #(vi
17669         cf_gpp_libname=gpp
17670         ;;
17671 *)
17672         cf_gpp_libname=g++
17673         ;;
17674 esac
17675 if test "$GXX" = yes; then
17676         echo "$as_me:17676: checking for lib$cf_gpp_libname" >&5
17677 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17678         cf_save="$LIBS"
17679         LIBS="-l$cf_gpp_libname $LIBS"
17680         cat >conftest.$ac_ext <<_ACEOF
17681 #line 17681 "configure"
17682 #include "confdefs.h"
17683
17684 #include <$cf_gpp_libname/builtin.h>
17685
17686 int
17687 main ()
17688 {
17689 two_arg_error_handler_t foo2 = lib_error_handler
17690   ;
17691   return 0;
17692 }
17693 _ACEOF
17694 rm -f conftest.$ac_objext conftest$ac_exeext
17695 if { (eval echo "$as_me:17695: \"$ac_link\"") >&5
17696   (eval $ac_link) 2>&5
17697   ac_status=$?
17698   echo "$as_me:17698: \$? = $ac_status" >&5
17699   (exit $ac_status); } &&
17700          { ac_try='test -s conftest$ac_exeext'
17701   { (eval echo "$as_me:17701: \"$ac_try\"") >&5
17702   (eval $ac_try) 2>&5
17703   ac_status=$?
17704   echo "$as_me:17704: \$? = $ac_status" >&5
17705   (exit $ac_status); }; }; then
17706   cf_cxx_library=yes
17707          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17708          if test "$cf_gpp_libname" = cpp ; then
17709             cat >>confdefs.h <<\EOF
17710 #define HAVE_GPP_BUILTIN_H 1
17711 EOF
17712
17713          else
17714             cat >>confdefs.h <<\EOF
17715 #define HAVE_GXX_BUILTIN_H 1
17716 EOF
17717
17718          fi
17719 else
17720   echo "$as_me: failed program was:" >&5
17721 cat conftest.$ac_ext >&5
17722 cat >conftest.$ac_ext <<_ACEOF
17723 #line 17723 "configure"
17724 #include "confdefs.h"
17725
17726 #include <builtin.h>
17727
17728 int
17729 main ()
17730 {
17731 two_arg_error_handler_t foo2 = lib_error_handler
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f conftest.$ac_objext conftest$ac_exeext
17737 if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738   (eval $ac_link) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); } &&
17742          { ac_try='test -s conftest$ac_exeext'
17743   { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); }; }; then
17748   cf_cxx_library=yes
17749          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17750          cat >>confdefs.h <<\EOF
17751 #define HAVE_BUILTIN_H 1
17752 EOF
17753
17754 else
17755   echo "$as_me: failed program was:" >&5
17756 cat conftest.$ac_ext >&5
17757 cf_cxx_library=no
17758 fi
17759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17760 fi
17761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17762         LIBS="$cf_save"
17763         echo "$as_me:17763: result: $cf_cxx_library" >&5
17764 echo "${ECHO_T}$cf_cxx_library" >&6
17765 fi
17766
17767                 ;;
17768         *)
17769                 cf_cxx_library=no
17770                 ;;
17771         esac
17772
17773         ac_ext=cc
17774 ac_cpp='$CXXCPP $CPPFLAGS'
17775 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17776 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17777 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17778 ac_main_return=return
17779 echo "$as_me:17779: checking how to run the C++ preprocessor" >&5
17780 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17781 if test -z "$CXXCPP"; then
17782   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17783   echo $ECHO_N "(cached) $ECHO_C" >&6
17784 else
17785       # Double quotes because CXXCPP needs to be expanded
17786     for CXXCPP in "$CXX -E" "/lib/cpp"
17787     do
17788       ac_preproc_ok=false
17789 for ac_cxx_preproc_warn_flag in '' yes
17790 do
17791   # Use a header file that comes with gcc, so configuring glibc
17792   # with a fresh cross-compiler works.
17793   # On the NeXT, cc -E runs the code through the compiler's parser,
17794   # not just through cpp. "Syntax error" is here to catch this case.
17795   cat >conftest.$ac_ext <<_ACEOF
17796 #line 17796 "configure"
17797 #include "confdefs.h"
17798 #include <assert.h>
17799                      Syntax error
17800 _ACEOF
17801 if { (eval echo "$as_me:17801: \"$ac_cpp conftest.$ac_ext\"") >&5
17802   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17803   ac_status=$?
17804   egrep -v '^ *\+' conftest.er1 >conftest.err
17805   rm -f conftest.er1
17806   cat conftest.err >&5
17807   echo "$as_me:17807: \$? = $ac_status" >&5
17808   (exit $ac_status); } >/dev/null; then
17809   if test -s conftest.err; then
17810     ac_cpp_err=$ac_cxx_preproc_warn_flag
17811   else
17812     ac_cpp_err=
17813   fi
17814 else
17815   ac_cpp_err=yes
17816 fi
17817 if test -z "$ac_cpp_err"; then
17818   :
17819 else
17820   echo "$as_me: failed program was:" >&5
17821   cat conftest.$ac_ext >&5
17822   # Broken: fails on valid input.
17823 continue
17824 fi
17825 rm -f conftest.err conftest.$ac_ext
17826
17827   # OK, works on sane cases.  Now check whether non-existent headers
17828   # can be detected and how.
17829   cat >conftest.$ac_ext <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17832 #include <ac_nonexistent.h>
17833 _ACEOF
17834 if { (eval echo "$as_me:17834: \"$ac_cpp conftest.$ac_ext\"") >&5
17835   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17836   ac_status=$?
17837   egrep -v '^ *\+' conftest.er1 >conftest.err
17838   rm -f conftest.er1
17839   cat conftest.err >&5
17840   echo "$as_me:17840: \$? = $ac_status" >&5
17841   (exit $ac_status); } >/dev/null; then
17842   if test -s conftest.err; then
17843     ac_cpp_err=$ac_cxx_preproc_warn_flag
17844   else
17845     ac_cpp_err=
17846   fi
17847 else
17848   ac_cpp_err=yes
17849 fi
17850 if test -z "$ac_cpp_err"; then
17851   # Broken: success on invalid input.
17852 continue
17853 else
17854   echo "$as_me: failed program was:" >&5
17855   cat conftest.$ac_ext >&5
17856   # Passes both tests.
17857 ac_preproc_ok=:
17858 break
17859 fi
17860 rm -f conftest.err conftest.$ac_ext
17861
17862 done
17863 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17864 rm -f conftest.err conftest.$ac_ext
17865 if $ac_preproc_ok; then
17866   break
17867 fi
17868
17869     done
17870     ac_cv_prog_CXXCPP=$CXXCPP
17871
17872 fi
17873   CXXCPP=$ac_cv_prog_CXXCPP
17874 else
17875   ac_cv_prog_CXXCPP=$CXXCPP
17876 fi
17877 echo "$as_me:17877: result: $CXXCPP" >&5
17878 echo "${ECHO_T}$CXXCPP" >&6
17879 ac_preproc_ok=false
17880 for ac_cxx_preproc_warn_flag in '' yes
17881 do
17882   # Use a header file that comes with gcc, so configuring glibc
17883   # with a fresh cross-compiler works.
17884   # On the NeXT, cc -E runs the code through the compiler's parser,
17885   # not just through cpp. "Syntax error" is here to catch this case.
17886   cat >conftest.$ac_ext <<_ACEOF
17887 #line 17887 "configure"
17888 #include "confdefs.h"
17889 #include <assert.h>
17890                      Syntax error
17891 _ACEOF
17892 if { (eval echo "$as_me:17892: \"$ac_cpp conftest.$ac_ext\"") >&5
17893   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17894   ac_status=$?
17895   egrep -v '^ *\+' conftest.er1 >conftest.err
17896   rm -f conftest.er1
17897   cat conftest.err >&5
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit $ac_status); } >/dev/null; then
17900   if test -s conftest.err; then
17901     ac_cpp_err=$ac_cxx_preproc_warn_flag
17902   else
17903     ac_cpp_err=
17904   fi
17905 else
17906   ac_cpp_err=yes
17907 fi
17908 if test -z "$ac_cpp_err"; then
17909   :
17910 else
17911   echo "$as_me: failed program was:" >&5
17912   cat conftest.$ac_ext >&5
17913   # Broken: fails on valid input.
17914 continue
17915 fi
17916 rm -f conftest.err conftest.$ac_ext
17917
17918   # OK, works on sane cases.  Now check whether non-existent headers
17919   # can be detected and how.
17920   cat >conftest.$ac_ext <<_ACEOF
17921 #line 17921 "configure"
17922 #include "confdefs.h"
17923 #include <ac_nonexistent.h>
17924 _ACEOF
17925 if { (eval echo "$as_me:17925: \"$ac_cpp conftest.$ac_ext\"") >&5
17926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17927   ac_status=$?
17928   egrep -v '^ *\+' conftest.er1 >conftest.err
17929   rm -f conftest.er1
17930   cat conftest.err >&5
17931   echo "$as_me:17931: \$? = $ac_status" >&5
17932   (exit $ac_status); } >/dev/null; then
17933   if test -s conftest.err; then
17934     ac_cpp_err=$ac_cxx_preproc_warn_flag
17935   else
17936     ac_cpp_err=
17937   fi
17938 else
17939   ac_cpp_err=yes
17940 fi
17941 if test -z "$ac_cpp_err"; then
17942   # Broken: success on invalid input.
17943 continue
17944 else
17945   echo "$as_me: failed program was:" >&5
17946   cat conftest.$ac_ext >&5
17947   # Passes both tests.
17948 ac_preproc_ok=:
17949 break
17950 fi
17951 rm -f conftest.err conftest.$ac_ext
17952
17953 done
17954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17955 rm -f conftest.err conftest.$ac_ext
17956 if $ac_preproc_ok; then
17957   :
17958 else
17959   { { echo "$as_me:17959: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17960 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17961    { (exit 1); exit 1; }; }
17962 fi
17963
17964 ac_ext=cc
17965 ac_cpp='$CXXCPP $CPPFLAGS'
17966 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17967 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17968 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17969 ac_main_return=return
17970
17971 for ac_header in typeinfo
17972 do
17973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17974 echo "$as_me:17974: checking for $ac_header" >&5
17975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979   cat >conftest.$ac_ext <<_ACEOF
17980 #line 17980 "configure"
17981 #include "confdefs.h"
17982 #include <$ac_header>
17983 _ACEOF
17984 if { (eval echo "$as_me:17984: \"$ac_cpp conftest.$ac_ext\"") >&5
17985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17986   ac_status=$?
17987   egrep -v '^ *\+' conftest.er1 >conftest.err
17988   rm -f conftest.er1
17989   cat conftest.err >&5
17990   echo "$as_me:17990: \$? = $ac_status" >&5
17991   (exit $ac_status); } >/dev/null; then
17992   if test -s conftest.err; then
17993     ac_cpp_err=$ac_cxx_preproc_warn_flag
17994   else
17995     ac_cpp_err=
17996   fi
17997 else
17998   ac_cpp_err=yes
17999 fi
18000 if test -z "$ac_cpp_err"; then
18001   eval "$as_ac_Header=yes"
18002 else
18003   echo "$as_me: failed program was:" >&5
18004   cat conftest.$ac_ext >&5
18005   eval "$as_ac_Header=no"
18006 fi
18007 rm -f conftest.err conftest.$ac_ext
18008 fi
18009 echo "$as_me:18009: result: `eval echo '${'$as_ac_Header'}'`" >&5
18010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18012   cat >>confdefs.h <<EOF
18013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18014 EOF
18015
18016 fi
18017 done
18018
18019 for ac_header in iostream
18020 do
18021 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18022 echo "$as_me:18022: checking for $ac_header" >&5
18023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18025   echo $ECHO_N "(cached) $ECHO_C" >&6
18026 else
18027   cat >conftest.$ac_ext <<_ACEOF
18028 #line 18028 "configure"
18029 #include "confdefs.h"
18030 #include <$ac_header>
18031 _ACEOF
18032 if { (eval echo "$as_me:18032: \"$ac_cpp conftest.$ac_ext\"") >&5
18033   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18034   ac_status=$?
18035   egrep -v '^ *\+' conftest.er1 >conftest.err
18036   rm -f conftest.er1
18037   cat conftest.err >&5
18038   echo "$as_me:18038: \$? = $ac_status" >&5
18039   (exit $ac_status); } >/dev/null; then
18040   if test -s conftest.err; then
18041     ac_cpp_err=$ac_cxx_preproc_warn_flag
18042   else
18043     ac_cpp_err=
18044   fi
18045 else
18046   ac_cpp_err=yes
18047 fi
18048 if test -z "$ac_cpp_err"; then
18049   eval "$as_ac_Header=yes"
18050 else
18051   echo "$as_me: failed program was:" >&5
18052   cat conftest.$ac_ext >&5
18053   eval "$as_ac_Header=no"
18054 fi
18055 rm -f conftest.err conftest.$ac_ext
18056 fi
18057 echo "$as_me:18057: result: `eval echo '${'$as_ac_Header'}'`" >&5
18058 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18059 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18060   cat >>confdefs.h <<EOF
18061 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18062 EOF
18063
18064 fi
18065 done
18066
18067 if test x"$ac_cv_header_iostream" = xyes ; then
18068         echo "$as_me:18068: checking if iostream uses std-namespace" >&5
18069 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18070         cat >conftest.$ac_ext <<_ACEOF
18071 #line 18071 "configure"
18072 #include "confdefs.h"
18073
18074 #include <iostream>
18075 using std::endl;
18076 using std::cerr;
18077 int
18078 main ()
18079 {
18080
18081 cerr << "testing" << endl;
18082
18083   ;
18084   return 0;
18085 }
18086 _ACEOF
18087 rm -f conftest.$ac_objext
18088 if { (eval echo "$as_me:18088: \"$ac_compile\"") >&5
18089   (eval $ac_compile) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); } &&
18093          { ac_try='test -s conftest.$ac_objext'
18094   { (eval echo "$as_me:18094: \"$ac_try\"") >&5
18095   (eval $ac_try) 2>&5
18096   ac_status=$?
18097   echo "$as_me:18097: \$? = $ac_status" >&5
18098   (exit $ac_status); }; }; then
18099   cf_iostream_namespace=yes
18100 else
18101   echo "$as_me: failed program was:" >&5
18102 cat conftest.$ac_ext >&5
18103 cf_iostream_namespace=no
18104 fi
18105 rm -f conftest.$ac_objext conftest.$ac_ext
18106         echo "$as_me:18106: result: $cf_iostream_namespace" >&5
18107 echo "${ECHO_T}$cf_iostream_namespace" >&6
18108         if test "$cf_iostream_namespace" = yes ; then
18109                 cat >>confdefs.h <<\EOF
18110 #define IOSTREAM_NAMESPACE 1
18111 EOF
18112
18113         fi
18114 fi
18115
18116 echo "$as_me:18116: checking if we should include stdbool.h" >&5
18117 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18118
18119 if test "${cf_cv_header_stdbool_h+set}" = set; then
18120   echo $ECHO_N "(cached) $ECHO_C" >&6
18121 else
18122
18123         cat >conftest.$ac_ext <<_ACEOF
18124 #line 18124 "configure"
18125 #include "confdefs.h"
18126
18127 int
18128 main ()
18129 {
18130 bool foo = false
18131   ;
18132   return 0;
18133 }
18134 _ACEOF
18135 rm -f conftest.$ac_objext
18136 if { (eval echo "$as_me:18136: \"$ac_compile\"") >&5
18137   (eval $ac_compile) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141          { ac_try='test -s conftest.$ac_objext'
18142   { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143   (eval $ac_try) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); }; }; then
18147   cf_cv_header_stdbool_h=0
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 cat conftest.$ac_ext >&5
18151 cat >conftest.$ac_ext <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154
18155 #ifndef __BEOS__
18156 #include <stdbool.h>
18157 #endif
18158
18159 int
18160 main ()
18161 {
18162 bool foo = false
18163   ;
18164   return 0;
18165 }
18166 _ACEOF
18167 rm -f conftest.$ac_objext
18168 if { (eval echo "$as_me:18168: \"$ac_compile\"") >&5
18169   (eval $ac_compile) 2>&5
18170   ac_status=$?
18171   echo "$as_me:18171: \$? = $ac_status" >&5
18172   (exit $ac_status); } &&
18173          { ac_try='test -s conftest.$ac_objext'
18174   { (eval echo "$as_me:18174: \"$ac_try\"") >&5
18175   (eval $ac_try) 2>&5
18176   ac_status=$?
18177   echo "$as_me:18177: \$? = $ac_status" >&5
18178   (exit $ac_status); }; }; then
18179   cf_cv_header_stdbool_h=1
18180 else
18181   echo "$as_me: failed program was:" >&5
18182 cat conftest.$ac_ext >&5
18183 cf_cv_header_stdbool_h=0
18184 fi
18185 rm -f conftest.$ac_objext conftest.$ac_ext
18186 fi
18187 rm -f conftest.$ac_objext conftest.$ac_ext
18188 fi
18189
18190 if test "$cf_cv_header_stdbool_h" = 1
18191 then    echo "$as_me:18191: result: yes" >&5
18192 echo "${ECHO_T}yes" >&6
18193 else    echo "$as_me:18193: result: no" >&5
18194 echo "${ECHO_T}no" >&6
18195 fi
18196
18197 echo "$as_me:18197: checking for builtin bool type" >&5
18198 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18199
18200 if test "${cf_cv_builtin_bool+set}" = set; then
18201   echo $ECHO_N "(cached) $ECHO_C" >&6
18202 else
18203
18204         cat >conftest.$ac_ext <<_ACEOF
18205 #line 18205 "configure"
18206 #include "confdefs.h"
18207
18208 #include <stdio.h>
18209 #include <sys/types.h>
18210
18211 int
18212 main ()
18213 {
18214 bool x = false
18215   ;
18216   return 0;
18217 }
18218 _ACEOF
18219 rm -f conftest.$ac_objext
18220 if { (eval echo "$as_me:18220: \"$ac_compile\"") >&5
18221   (eval $ac_compile) 2>&5
18222   ac_status=$?
18223   echo "$as_me:18223: \$? = $ac_status" >&5
18224   (exit $ac_status); } &&
18225          { ac_try='test -s conftest.$ac_objext'
18226   { (eval echo "$as_me:18226: \"$ac_try\"") >&5
18227   (eval $ac_try) 2>&5
18228   ac_status=$?
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit $ac_status); }; }; then
18231   cf_cv_builtin_bool=1
18232 else
18233   echo "$as_me: failed program was:" >&5
18234 cat conftest.$ac_ext >&5
18235 cf_cv_builtin_bool=0
18236 fi
18237 rm -f conftest.$ac_objext conftest.$ac_ext
18238
18239 fi
18240
18241 if test "$cf_cv_builtin_bool" = 1
18242 then    echo "$as_me:18242: result: yes" >&5
18243 echo "${ECHO_T}yes" >&6
18244 else    echo "$as_me:18244: result: no" >&5
18245 echo "${ECHO_T}no" >&6
18246 fi
18247
18248 echo "$as_me:18248: checking for size of bool" >&5
18249 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18250 if test "${cf_cv_type_of_bool+set}" = set; then
18251   echo $ECHO_N "(cached) $ECHO_C" >&6
18252 else
18253
18254         rm -f cf_test.out
18255         if test "$cross_compiling" = yes; then
18256   cf_cv_type_of_bool=unknown
18257 else
18258   cat >conftest.$ac_ext <<_ACEOF
18259 #line 18259 "configure"
18260 #include "confdefs.h"
18261
18262 #include <stdlib.h>
18263 #include <stdio.h>
18264
18265 #if defined(__cplusplus)
18266
18267 #ifdef HAVE_GXX_BUILTIN_H
18268 #include <g++/builtin.h>
18269 #elif HAVE_GPP_BUILTIN_H
18270 #include <gpp/builtin.h>
18271 #elif HAVE_BUILTIN_H
18272 #include <builtin.h>
18273 #endif
18274
18275 #else
18276
18277 #if $cf_cv_header_stdbool_h
18278 #include <stdbool.h>
18279 #endif
18280
18281 #endif
18282
18283 main()
18284 {
18285         FILE *fp = fopen("cf_test.out", "w");
18286         if (fp != 0) {
18287                 bool x = true;
18288                 if ((bool)(-x) >= 0)
18289                         fputs("unsigned ", fp);
18290                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18291                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18292                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18293                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18294                 fclose(fp);
18295         }
18296         ${cf_cv_main_return:-return}(0);
18297 }
18298
18299 _ACEOF
18300 rm -f conftest$ac_exeext
18301 if { (eval echo "$as_me:18301: \"$ac_link\"") >&5
18302   (eval $ac_link) 2>&5
18303   ac_status=$?
18304   echo "$as_me:18304: \$? = $ac_status" >&5
18305   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18306   { (eval echo "$as_me:18306: \"$ac_try\"") >&5
18307   (eval $ac_try) 2>&5
18308   ac_status=$?
18309   echo "$as_me:18309: \$? = $ac_status" >&5
18310   (exit $ac_status); }; }; then
18311   cf_cv_type_of_bool=`cat cf_test.out`
18312                  if test -z "$cf_cv_type_of_bool"; then
18313                    cf_cv_type_of_bool=unknown
18314                  fi
18315 else
18316   echo "$as_me: program exited with status $ac_status" >&5
18317 echo "$as_me: failed program was:" >&5
18318 cat conftest.$ac_ext >&5
18319 cf_cv_type_of_bool=unknown
18320 fi
18321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18322 fi
18323
18324 fi
18325
18326         rm -f cf_test.out
18327 echo "$as_me:18327: result: $cf_cv_type_of_bool" >&5
18328 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18329 if test "$cf_cv_type_of_bool" = unknown ; then
18330         case .$NCURSES_BOOL in #(vi
18331         .auto|.) NCURSES_BOOL=unsigned;;
18332         esac
18333         { echo "$as_me:18333: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18334 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18335         cf_cv_type_of_bool=$NCURSES_BOOL
18336 fi
18337
18338 echo "$as_me:18338: checking for special defines needed for etip.h" >&5
18339 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18340 cf_save_CXXFLAGS="$CXXFLAGS"
18341 cf_result="none"
18342 for cf_math in "" MATH_H
18343 do
18344 for cf_excp in "" MATH_EXCEPTION
18345 do
18346         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
18347         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18348         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18349 cat >conftest.$ac_ext <<_ACEOF
18350 #line 18350 "configure"
18351 #include "confdefs.h"
18352
18353 #include <etip.h.in>
18354
18355 int
18356 main ()
18357 {
18358
18359   ;
18360   return 0;
18361 }
18362 _ACEOF
18363 rm -f conftest.$ac_objext
18364 if { (eval echo "$as_me:18364: \"$ac_compile\"") >&5
18365   (eval $ac_compile) 2>&5
18366   ac_status=$?
18367   echo "$as_me:18367: \$? = $ac_status" >&5
18368   (exit $ac_status); } &&
18369          { ac_try='test -s conftest.$ac_objext'
18370   { (eval echo "$as_me:18370: \"$ac_try\"") >&5
18371   (eval $ac_try) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit $ac_status); }; }; then
18375
18376         test -n "$cf_math" && cat >>confdefs.h <<EOF
18377 #define ETIP_NEEDS_${cf_math} 1
18378 EOF
18379
18380         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18381 #define ETIP_NEEDS_${cf_excp} 1
18382 EOF
18383
18384         cf_result="$cf_math $cf_excp"
18385         break
18386
18387 else
18388   echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 fi
18391 rm -f conftest.$ac_objext conftest.$ac_ext
18392 done
18393 done
18394 echo "$as_me:18394: result: $cf_result" >&5
18395 echo "${ECHO_T}$cf_result" >&6
18396 CXXFLAGS="$cf_save_CXXFLAGS"
18397
18398 if test -n "$CXX"; then
18399 echo "$as_me:18399: checking if $CXX accepts parameter initialization" >&5
18400 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18401 if test "${cf_cv_cpp_param_init+set}" = set; then
18402   echo $ECHO_N "(cached) $ECHO_C" >&6
18403 else
18404
18405         ac_ext=cc
18406 ac_cpp='$CXXCPP $CPPFLAGS'
18407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18410 ac_main_return=return
18411
18412         if test "$cross_compiling" = yes; then
18413   cf_cv_cpp_param_init=unknown
18414 else
18415   cat >conftest.$ac_ext <<_ACEOF
18416 #line 18416 "configure"
18417 #include "confdefs.h"
18418
18419 class TEST {
18420 private:
18421         int value;
18422 public:
18423         TEST(int x = 1);
18424         ~TEST();
18425 };
18426
18427 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18428 {
18429         value = x;
18430 }
18431 void main() { }
18432
18433 _ACEOF
18434 rm -f conftest$ac_exeext
18435 if { (eval echo "$as_me:18435: \"$ac_link\"") >&5
18436   (eval $ac_link) 2>&5
18437   ac_status=$?
18438   echo "$as_me:18438: \$? = $ac_status" >&5
18439   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18440   { (eval echo "$as_me:18440: \"$ac_try\"") >&5
18441   (eval $ac_try) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit $ac_status); }; }; then
18445   cf_cv_cpp_param_init=yes
18446 else
18447   echo "$as_me: program exited with status $ac_status" >&5
18448 echo "$as_me: failed program was:" >&5
18449 cat conftest.$ac_ext >&5
18450 cf_cv_cpp_param_init=no
18451 fi
18452 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18453 fi
18454         ac_ext=cc
18455 ac_cpp='$CXXCPP $CPPFLAGS'
18456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18459 ac_main_return=return
18460
18461 fi
18462 echo "$as_me:18462: result: $cf_cv_cpp_param_init" >&5
18463 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18464 fi
18465 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18466 #define CPP_HAS_PARAM_INIT 1
18467 EOF
18468
18469 if test -n "$CXX"; then
18470
18471 echo "$as_me:18471: checking if $CXX accepts static_cast" >&5
18472 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18473 if test "${cf_cv_cpp_static_cast+set}" = set; then
18474   echo $ECHO_N "(cached) $ECHO_C" >&6
18475 else
18476
18477         ac_ext=cc
18478 ac_cpp='$CXXCPP $CPPFLAGS'
18479 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18480 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18481 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18482 ac_main_return=return
18483
18484         cat >conftest.$ac_ext <<_ACEOF
18485 #line 18485 "configure"
18486 #include "confdefs.h"
18487
18488 class NCursesPanel
18489 {
18490 public:
18491   NCursesPanel(int nlines,
18492                int ncols,
18493                int begin_y = 0,
18494                int begin_x = 0)
18495   {
18496   }
18497
18498   ~NCursesPanel();
18499 };
18500
18501 template<class T> class NCursesUserPanel : public NCursesPanel
18502 {
18503 public:
18504   NCursesUserPanel (int nlines,
18505                     int ncols,
18506                     int begin_y = 0,
18507                     int begin_x = 0,
18508                     const T* p_UserData = static_cast<T*>(0))
18509     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18510   {
18511   };
18512   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18513   {
18514   };
18515
18516   virtual ~NCursesUserPanel() {};
18517 };
18518
18519 int
18520 main ()
18521 {
18522
18523         const char* p_UserData = static_cast<char*>(0)
18524   ;
18525   return 0;
18526 }
18527 _ACEOF
18528 rm -f conftest.$ac_objext
18529 if { (eval echo "$as_me:18529: \"$ac_compile\"") >&5
18530   (eval $ac_compile) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit $ac_status); } &&
18534          { ac_try='test -s conftest.$ac_objext'
18535   { (eval echo "$as_me:18535: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:18538: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540   cf_cv_cpp_static_cast=yes
18541 else
18542   echo "$as_me: failed program was:" >&5
18543 cat conftest.$ac_ext >&5
18544 cf_cv_cpp_static_cast=no
18545 fi
18546 rm -f conftest.$ac_objext conftest.$ac_ext
18547
18548         ac_ext=cc
18549 ac_cpp='$CXXCPP $CPPFLAGS'
18550 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18551 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18552 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18553 ac_main_return=return
18554
18555 fi
18556 echo "$as_me:18556: result: $cf_cv_cpp_static_cast" >&5
18557 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18558
18559 fi
18560
18561 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18562 #define CPP_HAS_STATIC_CAST 1
18563 EOF
18564
18565         CXX_AR='$(AR)'
18566         CXX_ARFLAGS='$(ARFLAGS)'
18567         case $cf_cv_system_name in #(vi
18568         irix*) #(vi
18569             if test "$GXX" != yes ; then
18570                 CXX_AR='$(CXX)'
18571                 CXX_ARFLAGS='-ar -o'
18572             fi
18573             ;;
18574         sco3.2v5*) #(vi
18575             CXXLDFLAGS="-u main"
18576             ;;
18577         solaris2*)
18578             if test "$GXX" != yes ; then
18579                 CXX_AR='$(CXX)'
18580                 CXX_ARFLAGS='-xar -o'
18581             fi
18582             ;;
18583         esac
18584
18585 else
18586         cf_cxx_library=no
18587         cf_cv_builtin_bool=1
18588
18589         # Just because we are not configuring against C++ right now does not
18590         # mean that a user will not want to use C++.  Some distributors disable
18591         # the C++ portion of this configuration as a shortcut (or just to avoid
18592         # compiling the demo in the c++ directory).  So we need a reasonable
18593         # default for the 'bool' type.
18594         #
18595         # Caveat: since the storage of the bool type is not standardized, it
18596         # may change.
18597
18598         if test "$NCURSES_BOOL" != auto ; then
18599                 cf_cv_type_of_bool=$NCURSES_BOOL
18600                 cf_cv_header_stdbool_h=0
18601         else
18602                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18603
18604 echo "$as_me:18604: checking for size of bool" >&5
18605 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18606 if test "${cf_cv_type_of_bool+set}" = set; then
18607   echo $ECHO_N "(cached) $ECHO_C" >&6
18608 else
18609
18610         rm -f cf_test.out
18611         if test "$cross_compiling" = yes; then
18612   cf_cv_type_of_bool=unknown
18613 else
18614   cat >conftest.$ac_ext <<_ACEOF
18615 #line 18615 "configure"
18616 #include "confdefs.h"
18617
18618 #include <stdlib.h>
18619 #include <stdio.h>
18620
18621 #if defined(__cplusplus)
18622
18623 #ifdef HAVE_GXX_BUILTIN_H
18624 #include <g++/builtin.h>
18625 #elif HAVE_GPP_BUILTIN_H
18626 #include <gpp/builtin.h>
18627 #elif HAVE_BUILTIN_H
18628 #include <builtin.h>
18629 #endif
18630
18631 #else
18632
18633 #if $cf_cv_header_stdbool_h
18634 #include <stdbool.h>
18635 #endif
18636
18637 #endif
18638
18639 main()
18640 {
18641         FILE *fp = fopen("cf_test.out", "w");
18642         if (fp != 0) {
18643                 bool x = true;
18644                 if ((bool)(-x) >= 0)
18645                         fputs("unsigned ", fp);
18646                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18647                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18648                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18649                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18650                 fclose(fp);
18651         }
18652         ${cf_cv_main_return:-return}(0);
18653 }
18654
18655 _ACEOF
18656 rm -f conftest$ac_exeext
18657 if { (eval echo "$as_me:18657: \"$ac_link\"") >&5
18658   (eval $ac_link) 2>&5
18659   ac_status=$?
18660   echo "$as_me:18660: \$? = $ac_status" >&5
18661   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18662   { (eval echo "$as_me:18662: \"$ac_try\"") >&5
18663   (eval $ac_try) 2>&5
18664   ac_status=$?
18665   echo "$as_me:18665: \$? = $ac_status" >&5
18666   (exit $ac_status); }; }; then
18667   cf_cv_type_of_bool=`cat cf_test.out`
18668                  if test -z "$cf_cv_type_of_bool"; then
18669                    cf_cv_type_of_bool=unknown
18670                  fi
18671 else
18672   echo "$as_me: program exited with status $ac_status" >&5
18673 echo "$as_me: failed program was:" >&5
18674 cat conftest.$ac_ext >&5
18675 cf_cv_type_of_bool=unknown
18676 fi
18677 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18678 fi
18679
18680 fi
18681
18682         rm -f cf_test.out
18683 echo "$as_me:18683: result: $cf_cv_type_of_bool" >&5
18684 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18685 if test "$cf_cv_type_of_bool" = unknown ; then
18686         case .$NCURSES_BOOL in #(vi
18687         .auto|.) NCURSES_BOOL=unsigned;;
18688         esac
18689         { echo "$as_me:18689: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18690 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18691         cf_cv_type_of_bool=$NCURSES_BOOL
18692 fi
18693
18694                 else
18695                         echo "$as_me:18695: checking for fallback type of bool" >&5
18696 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18697                         case "$host_cpu" in #(vi
18698                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18699                         *)      cf_cv_type_of_bool=int  ;;
18700                         esac
18701                         echo "$as_me:18701: result: $cf_cv_type_of_bool" >&5
18702 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18703                 fi
18704         fi
18705 fi
18706
18707 # If the C compiler did not declare bool, and we did not determine that the C++
18708 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18709 # ncurses library use the same type as C++ bool.  Note that this allows one to
18710 # specify the type of bool in a configure-script option and postpone
18711 # integration with the C++ compiler provided that the types are compatible.
18712 USE_CXX_BOOL=1
18713 if test $cf_cv_cc_bool_type = 1
18714 then
18715         # oops: C has a bool.  Unlikely, but C++ could differ.
18716         USE_CXX_BOOL=0
18717 elif test $cf_cv_builtin_bool = 0
18718 then
18719         # C++ has no bool
18720         USE_CXX_BOOL=0
18721 else
18722         # this is the normal case
18723         USE_CXX_BOOL='defined(__cplusplus)'
18724 fi
18725
18726 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18727
18728         if test "$cf_with_ada" != "no" ; then
18729                 if test "$with_libtool" != "no"; then
18730                         { echo "$as_me:18730: WARNING: libtool does not support Ada - disabling feature" >&5
18731 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18732                         cf_with_ada=no
18733                 fi
18734         fi
18735
18736         if test "$cf_with_ada" != "no" ; then
18737
18738 cf_ada_make=gnatmake
18739 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18740 set dummy $cf_ada_make; ac_word=$2
18741 echo "$as_me:18741: checking for $ac_word" >&5
18742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18743 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18744   echo $ECHO_N "(cached) $ECHO_C" >&6
18745 else
18746   if test -n "$gnat_exists"; then
18747   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18748 else
18749   ac_save_IFS=$IFS; IFS=$ac_path_separator
18750 ac_dummy="$PATH"
18751 for ac_dir in $ac_dummy; do
18752   IFS=$ac_save_IFS
18753   test -z "$ac_dir" && ac_dir=.
18754   $as_executable_p "$ac_dir/$ac_word" || continue
18755 ac_cv_prog_gnat_exists="yes"
18756 echo "$as_me:18756: found $ac_dir/$ac_word" >&5
18757 break
18758 done
18759
18760   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18761 fi
18762 fi
18763 gnat_exists=$ac_cv_prog_gnat_exists
18764 if test -n "$gnat_exists"; then
18765   echo "$as_me:18765: result: $gnat_exists" >&5
18766 echo "${ECHO_T}$gnat_exists" >&6
18767 else
18768   echo "$as_me:18768: result: no" >&5
18769 echo "${ECHO_T}no" >&6
18770 fi
18771
18772 if test "$ac_cv_prog_gnat_exists" = no; then
18773    cf_ada_make=
18774    cf_cv_prog_gnat_correct=no
18775 else
18776
18777 echo "$as_me:18777: checking for gnat version" >&5
18778 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18779 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18780         grep '[0-9].[0-9][0-9]*' |\
18781     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18782 echo "$as_me:18782: result: $cf_gnat_version" >&5
18783 echo "${ECHO_T}$cf_gnat_version" >&6
18784
18785 case $cf_gnat_version in #(vi
18786 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18787         cf_cv_prog_gnat_correct=yes
18788         ;;
18789 *)
18790         { echo "$as_me:18790: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18791 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18792         cf_cv_prog_gnat_correct=no
18793         ;;
18794 esac
18795
18796    # Extract the first word of "m4", so it can be a program name with args.
18797 set dummy m4; ac_word=$2
18798 echo "$as_me:18798: checking for $ac_word" >&5
18799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18800 if test "${ac_cv_prog_M4_exists+set}" = set; then
18801   echo $ECHO_N "(cached) $ECHO_C" >&6
18802 else
18803   if test -n "$M4_exists"; then
18804   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18805 else
18806   ac_save_IFS=$IFS; IFS=$ac_path_separator
18807 ac_dummy="$PATH"
18808 for ac_dir in $ac_dummy; do
18809   IFS=$ac_save_IFS
18810   test -z "$ac_dir" && ac_dir=.
18811   $as_executable_p "$ac_dir/$ac_word" || continue
18812 ac_cv_prog_M4_exists="yes"
18813 echo "$as_me:18813: found $ac_dir/$ac_word" >&5
18814 break
18815 done
18816
18817   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18818 fi
18819 fi
18820 M4_exists=$ac_cv_prog_M4_exists
18821 if test -n "$M4_exists"; then
18822   echo "$as_me:18822: result: $M4_exists" >&5
18823 echo "${ECHO_T}$M4_exists" >&6
18824 else
18825   echo "$as_me:18825: result: no" >&5
18826 echo "${ECHO_T}no" >&6
18827 fi
18828
18829    if test "$ac_cv_prog_M4_exists" = no; then
18830       cf_cv_prog_gnat_correct=no
18831       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18832    fi
18833    if test "$cf_cv_prog_gnat_correct" = yes; then
18834       echo "$as_me:18834: checking if GNAT works" >&5
18835 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18836
18837 rm -rf conftest* *~conftest*
18838 cat >>conftest.ads <<CF_EOF
18839 procedure conftest;
18840 CF_EOF
18841 cat >>conftest.adb <<CF_EOF
18842 with Text_IO;
18843 with GNAT.OS_Lib;
18844 procedure conftest is
18845 begin
18846    Text_IO.Put ("Hello World");
18847    Text_IO.New_Line;
18848    GNAT.OS_Lib.OS_Exit (0);
18849 end conftest;
18850 CF_EOF
18851 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18852    if ( ./conftest 1>&5 2>&1 ) ; then
18853       cf_cv_prog_gnat_correct=yes
18854    else
18855       cf_cv_prog_gnat_correct=no
18856    fi
18857 else
18858    cf_cv_prog_gnat_correct=no
18859 fi
18860 rm -rf conftest* *~conftest*
18861
18862       echo "$as_me:18862: result: $cf_cv_prog_gnat_correct" >&5
18863 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18864    fi
18865 fi
18866
18867                 if test "$cf_cv_prog_gnat_correct" = yes; then
18868
18869         ADAFLAGS="$ADAFLAGS -gnatpn"
18870
18871                         # make ADAFLAGS consistent with CFLAGS
18872                         case "$CFLAGS" in
18873                         *-g*)
18874
18875         ADAFLAGS="$ADAFLAGS -g"
18876
18877                                 ;;
18878                         esac
18879                         case "$CFLAGS" in
18880                         *-O*)
18881
18882         ADAFLAGS="$ADAFLAGS -O3"
18883
18884                                 ;;
18885                         esac
18886
18887 echo "$as_me:18887: checking if GNAT supports generics" >&5
18888 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18889 case $cf_gnat_version in #(vi
18890 3.[1-9]*|[4-9].*) #(vi
18891         cf_gnat_generics=yes
18892         ;;
18893 *)
18894         cf_gnat_generics=no
18895         ;;
18896 esac
18897 echo "$as_me:18897: result: $cf_gnat_generics" >&5
18898 echo "${ECHO_T}$cf_gnat_generics" >&6
18899
18900 if test "$cf_gnat_generics" = yes
18901 then
18902         cf_compile_generics=generics
18903         cf_generic_objects="\${GENOBJS}"
18904 else
18905         cf_compile_generics=
18906         cf_generic_objects=
18907 fi
18908
18909 echo "$as_me:18909: checking if GNAT supports SIGINT" >&5
18910 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18911 if test "${cf_cv_gnat_sigint+set}" = set; then
18912   echo $ECHO_N "(cached) $ECHO_C" >&6
18913 else
18914
18915 rm -rf conftest* *~conftest*
18916 cat >>conftest.ads <<CF_EOF
18917 with Ada.Interrupts.Names;
18918
18919 package ConfTest is
18920
18921    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18922    pragma Unreserve_All_Interrupts;
18923    pragma Warnings (On);
18924
18925    protected Process is
18926       procedure Stop;
18927       function Continue return Boolean;
18928       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18929    private
18930       Done : Boolean := False;
18931    end Process;
18932
18933 end ConfTest;
18934 CF_EOF
18935 cat >>conftest.adb <<CF_EOF
18936 package body ConfTest is
18937    protected body Process is
18938       procedure Stop is
18939       begin
18940          Done := True;
18941       end Stop;
18942       function Continue return Boolean is
18943       begin
18944          return not Done;
18945       end Continue;
18946    end Process;
18947 end ConfTest;
18948 CF_EOF
18949 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18950       cf_cv_gnat_sigint=yes
18951 else
18952    cf_cv_gnat_sigint=no
18953 fi
18954 rm -rf conftest* *~conftest*
18955
18956 fi
18957 echo "$as_me:18957: result: $cf_cv_gnat_sigint" >&5
18958 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18959
18960 if test $cf_cv_gnat_sigint = yes ; then
18961         USE_GNAT_SIGINT=""
18962 else
18963         USE_GNAT_SIGINT="#"
18964 fi
18965
18966 echo "$as_me:18966: checking if GNAT pragma Unreferenced works" >&5
18967 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18968 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18969   echo $ECHO_N "(cached) $ECHO_C" >&6
18970 else
18971
18972 rm -rf conftest* *~conftest*
18973 cat >>conftest.ads <<CF_EOF
18974 procedure conftest;
18975 CF_EOF
18976 cat >>conftest.adb <<CF_EOF
18977 with Text_IO;
18978 with GNAT.OS_Lib;
18979 procedure conftest is
18980    test : Integer;
18981    pragma Unreferenced (test);
18982 begin
18983    test := 1;
18984    Text_IO.Put ("Hello World");
18985    Text_IO.New_Line;
18986    GNAT.OS_Lib.OS_Exit (0);
18987 end conftest;
18988 CF_EOF
18989 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18990       cf_cv_pragma_unreferenced=yes
18991 else
18992    cf_cv_pragma_unreferenced=no
18993 fi
18994 rm -rf conftest* *~conftest*
18995
18996 fi
18997 echo "$as_me:18997: result: $cf_cv_pragma_unreferenced" >&5
18998 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18999
19000 # if the pragma is supported, use it (needed in the Trace code).
19001 if test $cf_cv_pragma_unreferenced = yes ; then
19002         PRAGMA_UNREF=TRUE
19003 else
19004         PRAGMA_UNREF=FALSE
19005 fi
19006
19007 cf_gnat_libraries=no
19008 cf_gnat_projects=no
19009
19010 echo "$as_me:19010: checking if GNAT supports project files" >&5
19011 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19012 case $cf_gnat_version in #(vi
19013 3.[0-9]*) #(vi
19014         ;;
19015 *)
19016         case $cf_cv_system_name in #(vi
19017         cygwin*) #(vi
19018                 ;;
19019         *)
19020                 mkdir conftest.src conftest.bin conftest.lib
19021                 cd conftest.src
19022                 rm -rf conftest* *~conftest*
19023                 cat >>library.gpr <<CF_EOF
19024 project Library is
19025   Kind := External ("LIB_KIND");
19026   for Library_Name use "ConfTest";
19027   for Object_Dir use ".";
19028   for Library_ALI_Dir use External("LIBRARY_DIR");
19029   for Library_Version use External ("SONAME");
19030   for Library_Kind use Kind;
19031   for Library_Dir use External("BUILD_DIR");
19032   Source_Dir := External ("SOURCE_DIR");
19033   for Source_Dirs use (Source_Dir);
19034   package Compiler is
19035      for Default_Switches ("Ada") use
19036        ("-g",
19037         "-O2",
19038         "-gnatafno",
19039         "-gnatVa",   -- All validity checks
19040         "-gnatwa");  -- Activate all optional errors
19041   end Compiler;
19042 end Library;
19043 CF_EOF
19044                 cat >>confpackage.ads <<CF_EOF
19045 package ConfPackage is
19046    procedure conftest;
19047 end ConfPackage;
19048 CF_EOF
19049                 cat >>confpackage.adb <<CF_EOF
19050 with Text_IO;
19051 package body ConfPackage is
19052    procedure conftest is
19053    begin
19054       Text_IO.Put ("Hello World");
19055       Text_IO.New_Line;
19056    end conftest;
19057 end ConfPackage;
19058 CF_EOF
19059                 if ( $cf_ada_make $ADAFLAGS \
19060                                 -Plibrary.gpr \
19061                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19062                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19063                                 -XSOURCE_DIR=`pwd` \
19064                                 -XSONAME=libConfTest.so.1 \
19065                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19066                         cf_gnat_projects=yes
19067                 fi
19068                 cd ..
19069                 if test -f conftest.lib/confpackage.ali
19070                 then
19071                         cf_gnat_libraries=yes
19072                 fi
19073                 rm -rf conftest* *~conftest*
19074                 ;;
19075         esac
19076         ;;
19077 esac
19078 echo "$as_me:19078: result: $cf_gnat_projects" >&5
19079 echo "${ECHO_T}$cf_gnat_projects" >&6
19080
19081 if test $cf_gnat_projects = yes
19082 then
19083         echo "$as_me:19083: checking if GNAT supports libraries" >&5
19084 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19085         echo "$as_me:19085: result: $cf_gnat_libraries" >&5
19086 echo "${ECHO_T}$cf_gnat_libraries" >&6
19087 fi
19088
19089 if test "$cf_gnat_projects" = yes
19090 then
19091         USE_OLD_MAKERULES="#"
19092         USE_GNAT_PROJECTS=""
19093 else
19094         USE_OLD_MAKERULES=""
19095         USE_GNAT_PROJECTS="#"
19096 fi
19097
19098 if test "$cf_gnat_libraries" = yes
19099 then
19100         USE_GNAT_LIBRARIES=""
19101 else
19102         USE_GNAT_LIBRARIES="#"
19103 fi
19104
19105 echo "$as_me:19105: checking for ada-compiler" >&5
19106 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19107
19108 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19109 if test "${with_ada_compiler+set}" = set; then
19110   withval="$with_ada_compiler"
19111   cf_ada_compiler=$withval
19112 else
19113   cf_ada_compiler=gnatmake
19114 fi;
19115
19116 echo "$as_me:19116: result: $cf_ada_compiler" >&5
19117 echo "${ECHO_T}$cf_ada_compiler" >&6
19118
19119                         cf_ada_package=terminal_interface
19120
19121 echo "$as_me:19121: checking for ada-include" >&5
19122 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19123
19124 # Check whether --with-ada-include or --without-ada-include was given.
19125 if test "${with_ada_include+set}" = set; then
19126   withval="$with_ada_include"
19127
19128 else
19129   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19130 fi; if test -n "$prefix/share/ada/adainclude" ; then
19131
19132 if test "x$prefix" != xNONE; then
19133   cf_path_syntax="$prefix"
19134 else
19135   cf_path_syntax="$ac_default_prefix"
19136 fi
19137
19138 case ".$withval" in #(vi
19139 .\$\(*\)*|.\'*\'*) #(vi
19140   ;;
19141 ..|./*|.\\*) #(vi
19142   ;;
19143 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19144   ;;
19145 .\${*prefix}*) #(vi
19146   eval withval="$withval"
19147   case ".$withval" in #(vi
19148   .NONE/*)
19149     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19150     ;;
19151   esac
19152   ;; #(vi
19153 .no|.NONE/*)
19154   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19155   ;;
19156 *)
19157   { { echo "$as_me:19157: error: expected a pathname, not \"$withval\"" >&5
19158 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19159    { (exit 1); exit 1; }; }
19160   ;;
19161 esac
19162
19163 fi
19164 ADA_INCLUDE="$withval"
19165
19166 echo "$as_me:19166: result: $ADA_INCLUDE" >&5
19167 echo "${ECHO_T}$ADA_INCLUDE" >&6
19168
19169 echo "$as_me:19169: checking for ada-objects" >&5
19170 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19171
19172 # Check whether --with-ada-objects or --without-ada-objects was given.
19173 if test "${with_ada_objects+set}" = set; then
19174   withval="$with_ada_objects"
19175
19176 else
19177   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19178 fi; if test -n "$prefix/lib/ada/adalib" ; then
19179
19180 if test "x$prefix" != xNONE; then
19181   cf_path_syntax="$prefix"
19182 else
19183   cf_path_syntax="$ac_default_prefix"
19184 fi
19185
19186 case ".$withval" in #(vi
19187 .\$\(*\)*|.\'*\'*) #(vi
19188   ;;
19189 ..|./*|.\\*) #(vi
19190   ;;
19191 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19192   ;;
19193 .\${*prefix}*) #(vi
19194   eval withval="$withval"
19195   case ".$withval" in #(vi
19196   .NONE/*)
19197     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19198     ;;
19199   esac
19200   ;; #(vi
19201 .no|.NONE/*)
19202   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19203   ;;
19204 *)
19205   { { echo "$as_me:19205: error: expected a pathname, not \"$withval\"" >&5
19206 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19207    { (exit 1); exit 1; }; }
19208   ;;
19209 esac
19210
19211 fi
19212 ADA_OBJECTS="$withval"
19213
19214 echo "$as_me:19214: result: $ADA_OBJECTS" >&5
19215 echo "${ECHO_T}$ADA_OBJECTS" >&6
19216
19217 echo "$as_me:19217: checking if an Ada95 shared-library should be built" >&5
19218 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19219
19220 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19221 if test "${with_ada_sharedlib+set}" = set; then
19222   withval="$with_ada_sharedlib"
19223   with_ada_sharedlib=$withval
19224 else
19225   with_ada_sharedlib=no
19226 fi;
19227 echo "$as_me:19227: result: $with_ada_sharedlib" >&5
19228 echo "${ECHO_T}$with_ada_sharedlib" >&6
19229
19230 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19231 MAKE_ADA_SHAREDLIB="#"
19232
19233 if test "x$with_ada_sharedlib" != xno
19234 then
19235         MAKE_ADA_SHAREDLIB=
19236         if test "x$with_ada_sharedlib" != xyes
19237         then
19238                 ADA_SHAREDLIB="$with_ada_sharedlib"
19239         fi
19240 fi
19241
19242                 fi
19243         fi
19244 else
19245         cf_with_ada=no
19246 fi
19247
19248 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19249 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19250 ###
19251 ### ticlib modules may be a separate library, otherwise contained in termlib.
19252 ### termlib modules may be a separate library, otherwise contained in ncurses.
19253 ###
19254 ### The of "+" or " " between the tokens controls the way the script
19255 ### chooses to split module lists into libraries.
19256 ###
19257 ### (see CF_LIB_RULES).
19258 echo "$as_me:19258: checking for library subsets" >&5
19259 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19260 LIB_SUBSETS=
19261
19262 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19263         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19264         if test "$with_ticlib" != no ; then
19265                 LIB_SUBSETS="${LIB_SUBSETS} "
19266         else
19267                 LIB_SUBSETS="${LIB_SUBSETS}+"
19268         fi
19269 fi
19270
19271 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19272 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19273
19274 if test "$with_termlib" != no ; then
19275         LIB_SUBSETS="${LIB_SUBSETS} "
19276 else
19277         LIB_SUBSETS="${LIB_SUBSETS}+"
19278 fi
19279
19280 LIB_SUBSETS="${LIB_SUBSETS}base"
19281
19282 # Most term-driver calls are to tinfo, but some like init_pair are to the
19283 # base library (so it resides in base).
19284 if test "$with_term_driver" != no ; then
19285         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19286         case $cf_cv_system_name in #(vi
19287         *mingw32*) #(vi
19288                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19289                 ;;
19290         *) #(vi
19291                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19292                 ;;
19293         esac
19294 fi
19295
19296 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19297 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19298
19299 echo "$as_me:19299: result: $LIB_SUBSETS" >&5
19300 echo "${ECHO_T}$LIB_SUBSETS" >&6
19301
19302 ### Construct the list of include-directories to be generated
19303
19304 CPPFLAGS="$CPPFLAGS -I. -I../include"
19305 if test "$srcdir" != "."; then
19306         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19307 fi
19308 if test "$GCC" != yes; then
19309         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19310 elif test "$includedir" != "/usr/include"; then
19311         if test "$includedir" = '${prefix}/include' ; then
19312                 if test $prefix != /usr ; then
19313                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19314                 fi
19315         else
19316                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19317         fi
19318 fi
19319
19320 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19321 if test "$srcdir" != "."; then
19322         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19323 fi
19324 if test "$GCC" != yes; then
19325         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19326 elif test "$includedir" != "/usr/include"; then
19327         if test "$includedir" = '${prefix}/include' ; then
19328                 if test $prefix != /usr ; then
19329                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19330                 fi
19331         else
19332                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19333         fi
19334 fi
19335
19336 ### Build up pieces for makefile rules
19337 echo "$as_me:19337: checking default library suffix" >&5
19338 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19339
19340         case $DFT_LWR_MODEL in
19341         libtool) DFT_ARG_SUFFIX=''   ;;
19342         normal)  DFT_ARG_SUFFIX=''   ;;
19343         debug)   DFT_ARG_SUFFIX='_g' ;;
19344         profile) DFT_ARG_SUFFIX='_p' ;;
19345         shared)  DFT_ARG_SUFFIX=''   ;;
19346         esac
19347         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19348 echo "$as_me:19348: result: $DFT_ARG_SUFFIX" >&5
19349 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19350
19351 echo "$as_me:19351: checking default library-dependency suffix" >&5
19352 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19353
19354         case $DFT_LWR_MODEL in #(vi
19355         libtool) #(vi
19356                 DFT_LIB_SUFFIX='.la'
19357                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19358                 ;;
19359         normal) #(vi
19360                 DFT_LIB_SUFFIX='.a'
19361                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19362                 ;;
19363         debug) #(vi
19364                 DFT_LIB_SUFFIX='_g.a'
19365                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19366                 ;;
19367         profile) #(vi
19368                 DFT_LIB_SUFFIX='_p.a'
19369                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19370                 ;;
19371         shared) #(vi
19372                 case $cf_cv_system_name in
19373                 aix[5-7]*) #(vi
19374                         DFT_LIB_SUFFIX='.a'
19375                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19376                         ;;
19377                 cygwin*) #(vi
19378                         DFT_LIB_SUFFIX='.dll'
19379                         DFT_DEP_SUFFIX='.dll.a'
19380                         ;;
19381                 darwin*) #(vi
19382                         DFT_LIB_SUFFIX='.dylib'
19383                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19384                         ;;
19385                 hpux*) #(vi
19386                         case $target in
19387                         ia64*) #(vi
19388                                 DFT_LIB_SUFFIX='.so'
19389                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19390                                 ;;
19391                         *) #(vi
19392                                 DFT_LIB_SUFFIX='.sl'
19393                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19394                                 ;;
19395                         esac
19396                         ;;
19397                 *)      DFT_LIB_SUFFIX='.so'
19398                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19399                         ;;
19400                 esac
19401         esac
19402         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19403         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19404 echo "$as_me:19404: result: $DFT_DEP_SUFFIX" >&5
19405 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19406
19407 echo "$as_me:19407: checking default object directory" >&5
19408 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19409
19410         case $DFT_LWR_MODEL in
19411         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19412         normal)  DFT_OBJ_SUBDIR='objects' ;;
19413         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19414         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19415         shared)
19416                 case $cf_cv_system_name in #(vi
19417                 cygwin) #(vi
19418                         DFT_OBJ_SUBDIR='objects' ;;
19419                 *)
19420                         DFT_OBJ_SUBDIR='obj_s' ;;
19421                 esac
19422         esac
19423 echo "$as_me:19423: result: $DFT_OBJ_SUBDIR" >&5
19424 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19425
19426 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19427 if test "$cf_with_cxx" = yes ; then
19428 echo "$as_me:19428: checking c++ library-dependency suffix" >&5
19429 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19430 if test "$with_libtool" != "no"; then
19431         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19432 else
19433
19434         case normal in #(vi
19435         libtool) #(vi
19436                 CXX_LIB_SUFFIX='.la'
19437                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19438                 ;;
19439         normal) #(vi
19440                 CXX_LIB_SUFFIX='.a'
19441                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19442                 ;;
19443         debug) #(vi
19444                 CXX_LIB_SUFFIX='_g.a'
19445                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19446                 ;;
19447         profile) #(vi
19448                 CXX_LIB_SUFFIX='_p.a'
19449                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19450                 ;;
19451         shared) #(vi
19452                 case $cf_cv_system_name in
19453                 aix[5-7]*) #(vi
19454                         CXX_LIB_SUFFIX='.a'
19455                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19456                         ;;
19457                 cygwin*) #(vi
19458                         CXX_LIB_SUFFIX='.dll'
19459                         CXX_DEP_SUFFIX='.dll.a'
19460                         ;;
19461                 darwin*) #(vi
19462                         CXX_LIB_SUFFIX='.dylib'
19463                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19464                         ;;
19465                 hpux*) #(vi
19466                         case $target in
19467                         ia64*) #(vi
19468                                 CXX_LIB_SUFFIX='.so'
19469                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19470                                 ;;
19471                         *) #(vi
19472                                 CXX_LIB_SUFFIX='.sl'
19473                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19474                                 ;;
19475                         esac
19476                         ;;
19477                 *)      CXX_LIB_SUFFIX='.so'
19478                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19479                         ;;
19480                 esac
19481         esac
19482         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19483         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19484 fi
19485 echo "$as_me:19485: result: $CXX_LIB_SUFFIX" >&5
19486 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19487
19488 fi
19489
19490 # do not want -ldl in build except as needed for -lncurses dependency
19491 if test "$with_dlsym" = yes ; then
19492 if test $DFT_LWR_MODEL = shared || \
19493    test $DFT_LWR_MODEL = libtool ; then
19494
19495 # remove dl library from $LIBS
19496 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19497
19498 fi
19499 fi
19500 ### Set up low-level terminfo dependencies for makefiles.
19501
19502 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19503 # do not need libdl
19504 TICS_LIST=
19505 if test "$with_dlsym" = yes ; then
19506
19507 # remove dl library from $SHLIB_LIST
19508 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19509
19510 fi
19511
19512 if test "$with_ticlib" != no ; then
19513
19514         if test "$with_ticlib" != yes ; then
19515                 TICS_NAME=$with_ticlib
19516                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19517                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19518                 TICS_LIB_SUFFIX="${with_ticlib}"
19519         else
19520                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19521                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19522                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19523         fi
19524         TICS_LDFLAGS="-L${LIB_DIR}"
19525         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19526 else
19527         TICS_LDFLAGS="-L${LIB_DIR}"
19528         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19529 fi
19530
19531 if test "$with_termlib" != no ; then
19532
19533         if test "$with_termlib" != yes ; then
19534                 TINFO_NAME=$with_termlib
19535                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19536                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19537                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19538                 TINFO_LIB_SUFFIX="${with_termlib}"
19539         else
19540                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19541                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19542                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19543                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19544         fi
19545
19546         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19547         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19548         if test "$DFT_LWR_MODEL" = "libtool"; then
19549                 TEST_ARGS="${TEST_DEPS}"
19550                 TEST_ARG2="${TEST_DEP2}"
19551                 TINFO_LDFLAGS="-L${LIB_DIR}"
19552                 TINFO_LIBS="$TEST_ARGS"
19553                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19554                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19555         else
19556                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19557                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19558                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19559                 TINFO_LDFLAGS="-L${LIB_DIR}"
19560                 TINFO_LIBS="$TEST_ARGS"
19561                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19562         fi
19563 else
19564         # the next lines are needed for linking libtic over libncurses
19565         TINFO_NAME=${LIB_NAME}
19566         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19567         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19568         if test "$with_tic_depends" = yes ; then
19569                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19570         else
19571                 TICS_LIST="$SHLIB_LIST"
19572         fi
19573
19574         TINFO_LDFLAGS="-L${LIB_DIR}"
19575         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19576 fi
19577
19578 if test "$DFT_LWR_MODEL" = shared ; then
19579         case $cf_cv_system_name in #(vi
19580         cygwin*)
19581                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19582                 TINFO_SUFFIX=.dll
19583                 ;;
19584         esac
19585 fi
19586
19587 if test "$with_dlsym" = yes ; then
19588
19589 # remove dl library from $TICS_LIST
19590 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19591
19592 fi
19593
19594 if test "$DFT_LWR_MODEL" = "libtool"; then
19595     OBJEXT=lo
19596 fi
19597
19598 # needed for Ada95
19599 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19600
19601 case $DFT_LWR_MODEL in
19602 normal|debug|profile)
19603
19604 if test "$GCC" = yes ; then
19605         case $cf_cv_system_name in #(
19606         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19607                 LDFLAGS_STATIC=
19608                 LDFLAGS_SHARED=
19609                 ;;
19610     *)  #( normally, except when broken
19611         LDFLAGS_STATIC=-static
19612         LDFLAGS_SHARED=-dynamic
19613         ;;
19614     esac
19615 else
19616         case $cf_cv_system_name in #(
19617         aix[4-7]*)      #( from ld manpage
19618                 LDFLAGS_STATIC=-bstatic
19619                 LDFLAGS_SHARED=-bdynamic
19620                 ;;
19621         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19622                 # We could also use just "archive" and "shared".
19623                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19624                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19625                 ;;
19626         irix*)          #( from ld manpage IRIX64
19627                 LDFLAGS_STATIC=-Bstatic
19628                 LDFLAGS_SHARED=-Bdynamic
19629                 ;;
19630         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19631                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19632                 LDFLAGS_STATIC=-noso
19633                 LDFLAGS_SHARED=-so_archive
19634                 ;;
19635         solaris2*)
19636                 LDFLAGS_STATIC=-Bstatic
19637                 LDFLAGS_SHARED=-Bdynamic
19638                 ;;
19639         esac
19640 fi
19641
19642 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19643 then
19644         echo "$as_me:19644: checking if linker supports switching between static/dynamic" >&5
19645 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19646
19647         rm -f libconftest.a
19648         cat >conftest.$ac_ext <<EOF
19649 #line 19649 "configure"
19650 #include <stdio.h>
19651 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19652 EOF
19653         if { (eval echo "$as_me:19653: \"$ac_compile\"") >&5
19654   (eval $ac_compile) 2>&5
19655   ac_status=$?
19656   echo "$as_me:19656: \$? = $ac_status" >&5
19657   (exit $ac_status); } ; then
19658                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19659                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19660         fi
19661         rm -f conftest.*
19662
19663         cf_save_LIBS="$LIBS"
19664
19665         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19666         cat >conftest.$ac_ext <<_ACEOF
19667 #line 19667 "configure"
19668 #include "confdefs.h"
19669
19670 #line 19670 "configure"
19671 #include <stdio.h>
19672 int cf_ldflags_static(FILE *fp);
19673
19674 int
19675 main ()
19676 {
19677
19678         return cf_ldflags_static(stdin);
19679
19680   ;
19681   return 0;
19682 }
19683 _ACEOF
19684 rm -f conftest.$ac_objext conftest$ac_exeext
19685 if { (eval echo "$as_me:19685: \"$ac_link\"") >&5
19686   (eval $ac_link) 2>&5
19687   ac_status=$?
19688   echo "$as_me:19688: \$? = $ac_status" >&5
19689   (exit $ac_status); } &&
19690          { ac_try='test -s conftest$ac_exeext'
19691   { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692   (eval $ac_try) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit $ac_status); }; }; then
19696
19697         # some linkers simply ignore the -dynamic
19698         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
19699         *static*) # (vi
19700                 cf_ldflags_static=no
19701                 ;;
19702         *)
19703                 cf_ldflags_static=yes
19704                 ;;
19705         esac
19706
19707 else
19708   echo "$as_me: failed program was:" >&5
19709 cat conftest.$ac_ext >&5
19710 cf_ldflags_static=no
19711 fi
19712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19713
19714         rm -f libconftest.*
19715         LIBS="$cf_save_LIBS"
19716
19717         echo "$as_me:19717: result: $cf_ldflags_static" >&5
19718 echo "${ECHO_T}$cf_ldflags_static" >&6
19719
19720         if test $cf_ldflags_static != yes
19721         then
19722                 LDFLAGS_STATIC=
19723                 LDFLAGS_SHARED=
19724         fi
19725 else
19726         LDFLAGS_STATIC=
19727         LDFLAGS_SHARED=
19728 fi
19729
19730         ;;
19731 esac
19732
19733 echo "$as_me:19733: checking where we will install curses.h" >&5
19734 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19735 test "$with_overwrite" = no && \
19736 test "x$includedir" = 'x${prefix}/include' && \
19737         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19738 echo "$as_me:19738: result: $includedir" >&5
19739 echo "${ECHO_T}$includedir" >&6
19740
19741 ### Resolve a conflict between normal and wide-curses by forcing applications
19742 ### that will need libutf8 to add it to their configure script.
19743 if test "$with_overwrite" != no ; then
19744 if test "$NCURSES_LIBUTF8" = 1 ; then
19745         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19746         { echo "$as_me:19746: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19747 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19748 fi
19749 fi
19750 WITH_OVERWRITE=$with_overwrite
19751
19752 # used to separate tack out of the tree
19753 NCURSES_TREE=
19754
19755 ### predefined stuff for the test programs
19756 cat >>confdefs.h <<\EOF
19757 #define HAVE_SLK_COLOR 1
19758 EOF
19759
19760 ### Construct the list of subdirectories for which we'll customize makefiles
19761 ### with the appropriate compile-rules.
19762
19763 echo "$as_me:19763: checking for src modules" >&5
19764 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19765
19766 # dependencies and linker-arguments for test-programs
19767 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19768 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19769 if test "$DFT_LWR_MODEL" = "libtool"; then
19770         TEST_ARGS="${TEST_DEPS}"
19771         TEST_ARG2="${TEST_DEP2}"
19772 else
19773         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19774         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19775 fi
19776
19777 cf_cv_src_modules=
19778 for cf_dir in $modules_to_build
19779 do
19780         if test -f $srcdir/$cf_dir/modules; then
19781
19782                 # We may/may not have tack in the distribution, though the
19783                 # makefile is.
19784                 if test $cf_dir = tack ; then
19785                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19786                                 continue
19787                         fi
19788                 fi
19789
19790                 if test -z "$cf_cv_src_modules"; then
19791                         cf_cv_src_modules=$cf_dir
19792                 else
19793                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19794                 fi
19795
19796                 # Make the ncurses_cfg.h file record the library interface files as
19797                 # well.  These are header files that are the same name as their
19798                 # directory.  Ncurses is the only library that does not follow
19799                 # that pattern.
19800                 if test $cf_dir = tack ; then
19801                         continue
19802                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19803
19804 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19805
19806                         cat >>confdefs.h <<EOF
19807 #define HAVE_${cf_have_include}_H 1
19808 EOF
19809
19810                         cat >>confdefs.h <<EOF
19811 #define HAVE_LIB${cf_have_include} 1
19812 EOF
19813
19814                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19815                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19816                         if test "$DFT_LWR_MODEL" = "libtool"; then
19817                                 TEST_ARGS="${TEST_DEPS}"
19818                                 TEST_ARG2="${TEST_DEP2}"
19819                         else
19820                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19821                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19822                         fi
19823                 fi
19824         fi
19825 done
19826 echo "$as_me:19826: result: $cf_cv_src_modules" >&5
19827 echo "${ECHO_T}$cf_cv_src_modules" >&6
19828
19829 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19830 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19831
19832 SRC_SUBDIRS=
19833 if test "x$cf_with_manpages" != xno ; then
19834         SRC_SUBDIRS="$SRC_SUBDIRS man"
19835 fi
19836 SRC_SUBDIRS="$SRC_SUBDIRS include"
19837 for cf_dir in $cf_cv_src_modules
19838 do
19839         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19840 done
19841 if test "x$cf_with_tests" != "xno" ; then
19842         SRC_SUBDIRS="$SRC_SUBDIRS test"
19843 fi
19844 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19845 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19846
19847 ADA_SUBDIRS=
19848 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
19849         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19850         ADA_SUBDIRS="gen src"
19851         if test "x$cf_with_tests" != "xno" ; then
19852                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19853         fi
19854 fi
19855
19856 SUB_MAKEFILES=
19857 for cf_dir in $SRC_SUBDIRS
19858 do
19859         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19860 done
19861
19862 if test -n "$ADA_SUBDIRS"; then
19863         for cf_dir in $ADA_SUBDIRS
19864         do
19865                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19866         done
19867
19868 fi
19869
19870 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
19871    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19872    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19873 fi
19874
19875 DIRS_TO_MAKE="lib"
19876 for cf_item in $cf_list_models
19877 do
19878
19879         case $cf_item in
19880         libtool) cf_subdir='obj_lo'  ;;
19881         normal)  cf_subdir='objects' ;;
19882         debug)   cf_subdir='obj_g' ;;
19883         profile) cf_subdir='obj_p' ;;
19884         shared)
19885                 case $cf_cv_system_name in #(vi
19886                 cygwin) #(vi
19887                         cf_subdir='objects' ;;
19888                 *)
19889                         cf_subdir='obj_s' ;;
19890                 esac
19891         esac
19892
19893         for cf_item2 in $DIRS_TO_MAKE
19894         do
19895                 test $cf_item2 = $cf_subdir && break
19896         done
19897         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19898 done
19899 for cf_dir in $DIRS_TO_MAKE
19900 do
19901         test ! -d $cf_dir && mkdir $cf_dir
19902 done
19903
19904 # symbols that differ when compiling Ada95 by itself.
19905 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19906
19907 # values to use as strings
19908 cat >>confdefs.h <<EOF
19909 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19910 EOF
19911
19912 cat >>confdefs.h <<EOF
19913 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19914 EOF
19915
19916 ### Now that we're done running tests, add the compiler-warnings, if any
19917
19918 cf_fix_cppflags=no
19919 cf_new_cflags=
19920 cf_new_cppflags=
19921 cf_new_extra_cppflags=
19922
19923 for cf_add_cflags in $EXTRA_CFLAGS
19924 do
19925 case $cf_fix_cppflags in
19926 no)
19927         case $cf_add_cflags in #(vi
19928         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19929                 case $cf_add_cflags in
19930                 -D*)
19931                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19932
19933                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19934                                 && test -z "${cf_tst_cflags}" \
19935                                 && cf_fix_cppflags=yes
19936
19937                         if test $cf_fix_cppflags = yes ; then
19938                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19939                                 continue
19940                         elif test "${cf_tst_cflags}" = "\"'" ; then
19941                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19942                                 continue
19943                         fi
19944                         ;;
19945                 esac
19946                 case "$CPPFLAGS" in
19947                 *$cf_add_cflags) #(vi
19948                         ;;
19949                 *) #(vi
19950                         case $cf_add_cflags in #(vi
19951                         -D*)
19952                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19953
19954 CPPFLAGS=`echo "$CPPFLAGS" | \
19955         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19956                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19957
19958                                 ;;
19959                         esac
19960                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19961                         ;;
19962                 esac
19963                 ;;
19964         *)
19965                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19966                 ;;
19967         esac
19968         ;;
19969 yes)
19970         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19971
19972         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19973
19974         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19975                 && test -z "${cf_tst_cflags}" \
19976                 && cf_fix_cppflags=no
19977         ;;
19978 esac
19979 done
19980
19981 if test -n "$cf_new_cflags" ; then
19982
19983         CFLAGS="$CFLAGS $cf_new_cflags"
19984 fi
19985
19986 if test -n "$cf_new_cppflags" ; then
19987
19988         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19989 fi
19990
19991 if test -n "$cf_new_extra_cppflags" ; then
19992
19993         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19994 fi
19995
19996 ### Define substitutions for header files to avoid name-pollution
19997
19998 if test "$cf_cv_have_tcgetattr" = yes ; then
19999         HAVE_TCGETATTR=1
20000 else
20001         HAVE_TCGETATTR=0
20002 fi
20003
20004 if test "$ac_cv_header_termio_h" = yes ; then
20005         HAVE_TERMIO_H=1
20006 else
20007         HAVE_TERMIO_H=0
20008 fi
20009
20010 if test "$ac_cv_header_termios_h" = yes ; then
20011         HAVE_TERMIOS_H=1
20012 else
20013         HAVE_TERMIOS_H=0
20014 fi
20015
20016 ################################################################################
20017 test "$use_database" = yes && \
20018 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20019
20020 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20021 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20022
20023 if test x"$enable_pc_files" = xyes ; then \
20024 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20025 MAKE_PC_FILES=
20026 else
20027 MAKE_PC_FILES="#"
20028 fi
20029
20030 # Extract the first word of "tic", so it can be a program name with args.
20031 set dummy tic; ac_word=$2
20032 echo "$as_me:20032: checking for $ac_word" >&5
20033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20034 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20035   echo $ECHO_N "(cached) $ECHO_C" >&6
20036 else
20037   case $TIC_PATH in
20038   [\\/]* | ?:[\\/]*)
20039   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20040   ;;
20041   *)
20042   ac_save_IFS=$IFS; IFS=$ac_path_separator
20043 ac_dummy="$PATH:/usr/local/ncurses/bin"
20044 for ac_dir in $ac_dummy; do
20045   IFS=$ac_save_IFS
20046   test -z "$ac_dir" && ac_dir=.
20047   if $as_executable_p "$ac_dir/$ac_word"; then
20048    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20049    echo "$as_me:20049: found $ac_dir/$ac_word" >&5
20050    break
20051 fi
20052 done
20053
20054   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20055   ;;
20056 esac
20057 fi
20058 TIC_PATH=$ac_cv_path_TIC_PATH
20059
20060 if test -n "$TIC_PATH"; then
20061   echo "$as_me:20061: result: $TIC_PATH" >&5
20062 echo "${ECHO_T}$TIC_PATH" >&6
20063 else
20064   echo "$as_me:20064: result: no" >&5
20065 echo "${ECHO_T}no" >&6
20066 fi
20067
20068 if test -n "$FALLBACK_LIST"
20069 then
20070         if test "$TIC_PATH" = unknown
20071         then
20072                 { echo "$as_me:20072: WARNING: no tic program found for fallbacks" >&5
20073 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20074         fi
20075 fi
20076
20077 if test "x$cf_with_tests" != xno ; then
20078         MAKE_TESTS=
20079 else
20080         MAKE_TESTS="#"
20081 fi
20082
20083 ADAHTML_DIR=../../doc/html/ada
20084
20085 SUB_SCRIPTS=
20086 case $cf_cv_system_name in #(vi
20087 *mingw32*) #(vi
20088         SUB_SCRIPTS="mk-dlls.sh"
20089         ;;
20090 esac
20091
20092 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"
20093 ac_config_commands="$ac_config_commands default"
20094 cat >confcache <<\_ACEOF
20095 # This file is a shell script that caches the results of configure
20096 # tests run on this system so they can be shared between configure
20097 # scripts and configure runs, see configure's option --config-cache.
20098 # It is not useful on other systems.  If it contains results you don't
20099 # want to keep, you may remove or edit it.
20100 #
20101 # config.status only pays attention to the cache file if you give it
20102 # the --recheck option to rerun configure.
20103 #
20104 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20105 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20106 # following values.
20107
20108 _ACEOF
20109
20110 # The following way of writing the cache mishandles newlines in values,
20111 # but we know of no workaround that is simple, portable, and efficient.
20112 # So, don't put newlines in cache variables' values.
20113 # Ultrix sh set writes to stderr and can't be redirected directly,
20114 # and sets the high bit in the cache file unless we assign to the vars.
20115 {
20116   (set) 2>&1 |
20117     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20118     *ac_space=\ *)
20119       # `set' does not quote correctly, so add quotes (double-quote
20120       # substitution turns \\\\ into \\, and sed turns \\ into \).
20121       sed -n \
20122         "s/'/'\\\\''/g;
20123           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20124       ;;
20125     *)
20126       # `set' quotes correctly as required by POSIX, so do not add quotes.
20127       sed -n \
20128         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20129       ;;
20130     esac;
20131 } |
20132   sed '
20133      t clear
20134      : clear
20135      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20136      t end
20137      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20138      : end' >>confcache
20139 if cmp -s $cache_file confcache; then :; else
20140   if test -w $cache_file; then
20141     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20142     cat confcache >$cache_file
20143   else
20144     echo "not updating unwritable cache $cache_file"
20145   fi
20146 fi
20147 rm -f confcache
20148
20149 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20150 # Let make expand exec_prefix.
20151 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20152
20153 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20154 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20155 # trailing colons and then remove the whole line if VPATH becomes empty
20156 # (actually we leave an empty line to preserve line numbers).
20157 if test "x$srcdir" = x.; then
20158   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20159 s/:*\$(srcdir):*/:/;
20160 s/:*\${srcdir}:*/:/;
20161 s/:*@srcdir@:*/:/;
20162 s/^\([^=]*=[    ]*\):*/\1/;
20163 s/:*$//;
20164 s/^[^=]*=[      ]*$//;
20165 }'
20166 fi
20167
20168 DEFS=-DHAVE_CONFIG_H
20169
20170 : ${CONFIG_STATUS=./config.status}
20171 ac_clean_files_save=$ac_clean_files
20172 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20173 { echo "$as_me:20173: creating $CONFIG_STATUS" >&5
20174 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20175 cat >$CONFIG_STATUS <<_ACEOF
20176 #! $SHELL
20177 # Generated automatically by configure.
20178 # Run this file to recreate the current configuration.
20179 # Compiler output produced by configure, useful for debugging
20180 # configure, is in config.log if it exists.
20181
20182 debug=false
20183 SHELL=\${CONFIG_SHELL-$SHELL}
20184 ac_cs_invocation="\$0 \$@"
20185
20186 _ACEOF
20187
20188 cat >>$CONFIG_STATUS <<\_ACEOF
20189 # Be Bourne compatible
20190 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20191   emulate sh
20192   NULLCMD=:
20193 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20194   set -o posix
20195 fi
20196
20197 # Name of the executable.
20198 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20199
20200 if expr a : '\(a\)' >/dev/null 2>&1; then
20201   as_expr=expr
20202 else
20203   as_expr=false
20204 fi
20205
20206 rm -f conf$$ conf$$.exe conf$$.file
20207 echo >conf$$.file
20208 if ln -s conf$$.file conf$$ 2>/dev/null; then
20209   # We could just check for DJGPP; but this test a) works b) is more generic
20210   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20211   if test -f conf$$.exe; then
20212     # Don't use ln at all; we don't have any links
20213     as_ln_s='cp -p'
20214   else
20215     as_ln_s='ln -s'
20216   fi
20217 elif ln conf$$.file conf$$ 2>/dev/null; then
20218   as_ln_s=ln
20219 else
20220   as_ln_s='cp -p'
20221 fi
20222 rm -f conf$$ conf$$.exe conf$$.file
20223
20224 as_executable_p="test -f"
20225
20226 # Support unset when possible.
20227 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20228   as_unset=unset
20229 else
20230   as_unset=false
20231 fi
20232
20233 # NLS nuisances.
20234 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20235 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20236 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20237 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20238 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20239 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20240 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20241 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20242
20243 # IFS
20244 # We need space, tab and new line, in precisely that order.
20245 as_nl='
20246 '
20247 IFS="   $as_nl"
20248
20249 # CDPATH.
20250 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20251
20252 exec 6>&1
20253
20254 _ACEOF
20255
20256 # Files that config.status was made for.
20257 if test -n "$ac_config_files"; then
20258   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20259 fi
20260
20261 if test -n "$ac_config_headers"; then
20262   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20263 fi
20264
20265 if test -n "$ac_config_links"; then
20266   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20267 fi
20268
20269 if test -n "$ac_config_commands"; then
20270   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20271 fi
20272
20273 cat >>$CONFIG_STATUS <<\EOF
20274
20275 ac_cs_usage="\
20276 \`$as_me' instantiates files from templates according to the
20277 current configuration.
20278
20279 Usage: $0 [OPTIONS] [FILE]...
20280
20281   -h, --help       print this help, then exit
20282   -V, --version    print version number, then exit
20283   -d, --debug      don't remove temporary files
20284       --recheck    update $as_me by reconfiguring in the same conditions
20285   --file=FILE[:TEMPLATE]
20286                    instantiate the configuration file FILE
20287   --header=FILE[:TEMPLATE]
20288                    instantiate the configuration header FILE
20289
20290 Configuration files:
20291 $config_files
20292
20293 Configuration headers:
20294 $config_headers
20295
20296 Configuration commands:
20297 $config_commands
20298
20299 Report bugs to <dickey@invisible-island.net>."
20300 EOF
20301
20302 cat >>$CONFIG_STATUS <<EOF
20303 ac_cs_version="\\
20304 config.status
20305 configured by $0, generated by GNU Autoconf 2.52.20101002,
20306   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20307
20308 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20309 Free Software Foundation, Inc.
20310 This config.status script is free software; the Free Software Foundation
20311 gives unlimited permission to copy, distribute and modify it."
20312 srcdir=$srcdir
20313 INSTALL="$INSTALL"
20314 EOF
20315
20316 cat >>$CONFIG_STATUS <<\EOF
20317 # If no file are specified by the user, then we need to provide default
20318 # value.  By we need to know if files were specified by the user.
20319 ac_need_defaults=:
20320 while test $# != 0
20321 do
20322   case $1 in
20323   --*=*)
20324     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20325     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20326     shift
20327     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20328     shift
20329     ;;
20330   -*);;
20331   *) # This is not an option, so the user has probably given explicit
20332      # arguments.
20333      ac_need_defaults=false;;
20334   esac
20335
20336   case $1 in
20337   # Handling of the options.
20338 EOF
20339 cat >>$CONFIG_STATUS <<EOF
20340   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20341     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20342     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20343 EOF
20344 cat >>$CONFIG_STATUS <<\EOF
20345   --version | --vers* | -V )
20346     echo "$ac_cs_version"; exit 0 ;;
20347   --he | --h)
20348     # Conflict between --help and --header
20349     { { echo "$as_me:20349: error: ambiguous option: $1
20350 Try \`$0 --help' for more information." >&5
20351 echo "$as_me: error: ambiguous option: $1
20352 Try \`$0 --help' for more information." >&2;}
20353    { (exit 1); exit 1; }; };;
20354   --help | --hel | -h )
20355     echo "$ac_cs_usage"; exit 0 ;;
20356   --debug | --d* | -d )
20357     debug=: ;;
20358   --file | --fil | --fi | --f )
20359     shift
20360     CONFIG_FILES="$CONFIG_FILES $1"
20361     ac_need_defaults=false;;
20362   --header | --heade | --head | --hea )
20363     shift
20364     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20365     ac_need_defaults=false;;
20366
20367   # This is an error.
20368   -*) { { echo "$as_me:20368: error: unrecognized option: $1
20369 Try \`$0 --help' for more information." >&5
20370 echo "$as_me: error: unrecognized option: $1
20371 Try \`$0 --help' for more information." >&2;}
20372    { (exit 1); exit 1; }; } ;;
20373
20374   *) ac_config_targets="$ac_config_targets $1" ;;
20375
20376   esac
20377   shift
20378 done
20379
20380 exec 5>>config.log
20381 cat >&5 << _ACEOF
20382
20383 ## ----------------------- ##
20384 ## Running config.status.  ##
20385 ## ----------------------- ##
20386
20387 This file was extended by $as_me 2.52.20101002, executed with
20388   CONFIG_FILES    = $CONFIG_FILES
20389   CONFIG_HEADERS  = $CONFIG_HEADERS
20390   CONFIG_LINKS    = $CONFIG_LINKS
20391   CONFIG_COMMANDS = $CONFIG_COMMANDS
20392   > $ac_cs_invocation
20393 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20394
20395 _ACEOF
20396 EOF
20397
20398 cat >>$CONFIG_STATUS <<EOF
20399 #
20400 # INIT-COMMANDS section.
20401 #
20402
20403 ### Special initialization commands, used to pass information from the
20404 ### configuration-run into config.status
20405
20406 AWK="$AWK"
20407 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20408 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20409 ECHO_LINK="$ECHO_LINK"
20410 LDCONFIG="$LDCONFIG"
20411 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20412 LIB_NAME="$LIB_NAME"
20413 LIB_SUBSETS="$LIB_SUBSETS"
20414 LIB_SUFFIX="$LIB_SUFFIX"
20415 LIB_TRACING="$LIB_TRACING"
20416 LN_S="$LN_S"
20417 MAKE_TERMINFO="$MAKE_TERMINFO"
20418 NCURSES_MAJOR="$NCURSES_MAJOR"
20419 NCURSES_MINOR="$NCURSES_MINOR"
20420 NCURSES_OSPEED="$NCURSES_OSPEED"
20421 NCURSES_PATCH="$NCURSES_PATCH"
20422 SRC_SUBDIRS="$SRC_SUBDIRS"
20423 TERMINFO="$TERMINFO"
20424 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20425 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20426 TICS_NAME="$TICS_NAME"
20427 TIC_PATH="$TIC_PATH"
20428 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20429 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20430 TINFO_NAME="$TINFO_NAME"
20431 TINFO_SUFFIX="$TINFO_SUFFIX"
20432 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20433 WITH_CURSES_H="$with_curses_h"
20434 WITH_ECHO="$with_echo"
20435 WITH_OVERWRITE="$with_overwrite"
20436 cf_LIST_MODELS="$cf_list_models"
20437 cf_cv_abi_version="$cf_cv_abi_version"
20438 cf_cv_do_relink="$cf_cv_do_relink"
20439 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20440 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20441 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20442 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20443 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20444 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20445 cf_cv_rel_version="$cf_cv_rel_version"
20446 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20447 cf_cv_shared_soname='$cf_cv_shared_soname'
20448 cf_cv_shlib_version="$cf_cv_shlib_version"
20449 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20450 cf_cv_system_name="$cf_cv_system_name"
20451 cf_with_ada="$cf_with_ada"
20452 cf_with_cxx_binding="$cf_with_cxx_binding"
20453 cf_with_manpages="$cf_with_manpages"
20454 cf_with_tests="$cf_with_tests"
20455 host="$host"
20456 target="$target"
20457
20458 EOF
20459
20460 cat >>$CONFIG_STATUS <<\EOF
20461 for ac_config_target in $ac_config_targets
20462 do
20463   case "$ac_config_target" in
20464   # Handling of arguments.
20465   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20466   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20467   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20468   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20469   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20470   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20471   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20472   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20473   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20474   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20475   *) { { echo "$as_me:20475: error: invalid argument: $ac_config_target" >&5
20476 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20477    { (exit 1); exit 1; }; };;
20478   esac
20479 done
20480
20481 # If the user did not use the arguments to specify the items to instantiate,
20482 # then the envvar interface is used.  Set only those that are not.
20483 # We use the long form for the default assignment because of an extremely
20484 # bizarre bug on SunOS 4.1.3.
20485 if $ac_need_defaults; then
20486   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20487   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20488   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20489 fi
20490
20491 # Create a temporary directory, and hook for its removal unless debugging.
20492 $debug ||
20493 {
20494   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20495   trap '{ (exit 1); exit 1; }' 1 2 13 15
20496 }
20497
20498 # Create a (secure) tmp directory for tmp files.
20499 : ${TMPDIR=/tmp}
20500 {
20501   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20502   test -n "$tmp" && test -d "$tmp"
20503 }  ||
20504 {
20505   tmp=$TMPDIR/cs$$-$RANDOM
20506   (umask 077 && mkdir $tmp)
20507 } ||
20508 {
20509    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20510    { (exit 1); exit 1; }
20511 }
20512
20513 EOF
20514
20515 cat >>$CONFIG_STATUS <<EOF
20516
20517 #
20518 # CONFIG_FILES section.
20519 #
20520
20521 # No need to generate the scripts if there are no CONFIG_FILES.
20522 # This happens for instance when ./config.status config.h
20523 if test -n "\$CONFIG_FILES"; then
20524   # Protect against being on the right side of a sed subst in config.status.
20525   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20526    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20527 s,@SHELL@,$SHELL,;t t
20528 s,@exec_prefix@,$exec_prefix,;t t
20529 s,@prefix@,$prefix,;t t
20530 s,@program_transform_name@,$program_transform_name,;t t
20531 s,@bindir@,$bindir,;t t
20532 s,@sbindir@,$sbindir,;t t
20533 s,@libexecdir@,$libexecdir,;t t
20534 s,@datadir@,$datadir,;t t
20535 s,@sysconfdir@,$sysconfdir,;t t
20536 s,@sharedstatedir@,$sharedstatedir,;t t
20537 s,@localstatedir@,$localstatedir,;t t
20538 s,@libdir@,$libdir,;t t
20539 s,@includedir@,$includedir,;t t
20540 s,@oldincludedir@,$oldincludedir,;t t
20541 s,@infodir@,$infodir,;t t
20542 s,@mandir@,$mandir,;t t
20543 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20544 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20545 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20546 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20547 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20548 s,@build_alias@,$build_alias,;t t
20549 s,@host_alias@,$host_alias,;t t
20550 s,@target_alias@,$target_alias,;t t
20551 s,@ECHO_C@,$ECHO_C,;t t
20552 s,@ECHO_N@,$ECHO_N,;t t
20553 s,@ECHO_T@,$ECHO_T,;t t
20554 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20555 s,@DEFS@,$DEFS,;t t
20556 s,@LIBS@,$LIBS,;t t
20557 s,@top_builddir@,$top_builddir,;t t
20558 s,@EGREP@,$EGREP,;t t
20559 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20560 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20561 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20562 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20563 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20564 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20565 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20566 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20567 s,@build@,$build,;t t
20568 s,@build_cpu@,$build_cpu,;t t
20569 s,@build_vendor@,$build_vendor,;t t
20570 s,@build_os@,$build_os,;t t
20571 s,@host@,$host,;t t
20572 s,@host_cpu@,$host_cpu,;t t
20573 s,@host_vendor@,$host_vendor,;t t
20574 s,@host_os@,$host_os,;t t
20575 s,@target@,$target,;t t
20576 s,@target_cpu@,$target_cpu,;t t
20577 s,@target_vendor@,$target_vendor,;t t
20578 s,@target_os@,$target_os,;t t
20579 s,@CC@,$CC,;t t
20580 s,@CFLAGS@,$CFLAGS,;t t
20581 s,@LDFLAGS@,$LDFLAGS,;t t
20582 s,@CPPFLAGS@,$CPPFLAGS,;t t
20583 s,@ac_ct_CC@,$ac_ct_CC,;t t
20584 s,@EXEEXT@,$EXEEXT,;t t
20585 s,@OBJEXT@,$OBJEXT,;t t
20586 s,@CPP@,$CPP,;t t
20587 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20588 s,@PROG_EXT@,$PROG_EXT,;t t
20589 s,@LDCONFIG@,$LDCONFIG,;t t
20590 s,@CXX@,$CXX,;t t
20591 s,@CXXFLAGS@,$CXXFLAGS,;t t
20592 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20593 s,@AWK@,$AWK,;t t
20594 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20595 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20596 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20597 s,@LINT@,$LINT,;t t
20598 s,@LINT_OPTS@,$LINT_OPTS,;t t
20599 s,@LN_S@,$LN_S,;t t
20600 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20601 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20602 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20603 s,@SET_MAKE@,$SET_MAKE,;t t
20604 s,@CTAGS@,$CTAGS,;t t
20605 s,@ETAGS@,$ETAGS,;t t
20606 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20607 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20608 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20609 s,@RANLIB@,$RANLIB,;t t
20610 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20611 s,@LD@,$LD,;t t
20612 s,@ac_ct_LD@,$ac_ct_LD,;t t
20613 s,@AR@,$AR,;t t
20614 s,@ac_ct_AR@,$ac_ct_AR,;t t
20615 s,@ARFLAGS@,$ARFLAGS,;t t
20616 s,@DESTDIR@,$DESTDIR,;t t
20617 s,@BUILD_CC@,$BUILD_CC,;t t
20618 s,@BUILD_CPP@,$BUILD_CPP,;t t
20619 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20620 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20621 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20622 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20623 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20624 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20625 s,@cf_list_models@,$cf_list_models,;t t
20626 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20627 s,@LIBTOOL@,$LIBTOOL,;t t
20628 s,@LT_UNDEF@,$LT_UNDEF,;t t
20629 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20630 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20631 s,@LIB_CREATE@,$LIB_CREATE,;t t
20632 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20633 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20634 s,@LIB_PREP@,$LIB_PREP,;t t
20635 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20636 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20637 s,@LIB_LINK@,$LIB_LINK,;t t
20638 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20639 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20640 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20641 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20642 s,@TICS_NAME@,$TICS_NAME,;t t
20643 s,@TINFO_NAME@,$TINFO_NAME,;t t
20644 s,@LIB_NAME@,$LIB_NAME,;t t
20645 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20646 s,@CC_G_OPT@,$CC_G_OPT,;t t
20647 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20648 s,@LD_MODEL@,$LD_MODEL,;t t
20649 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20650 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20651 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20652 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20653 s,@LINK_PROGS@,$LINK_PROGS,;t t
20654 s,@LINK_TESTS@,$LINK_TESTS,;t t
20655 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20656 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20657 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20658 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20659 s,@RPATH_LIST@,$RPATH_LIST,;t t
20660 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20661 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20662 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20663 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20664 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20665 s,@TERMINFO@,$TERMINFO,;t t
20666 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20667 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20668 s,@TERMPATH@,$TERMPATH,;t t
20669 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20670 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20671 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20672 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20673 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20674 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20675 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20676 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20677 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20678 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20679 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20680 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20681 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20682 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20683 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20684 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20685 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20686 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20687 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20688 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20689 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20690 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20691 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20692 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20693 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20694 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20695 s,@PTHREAD@,$PTHREAD,;t t
20696 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20697 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20698 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20699 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20700 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20701 s,@ECHO_LINK@,$ECHO_LINK,;t t
20702 s,@ADAFLAGS@,$ADAFLAGS,;t t
20703 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20704 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20705 s,@ADA_TRACE@,$ADA_TRACE,;t t
20706 s,@MATH_LIB@,$MATH_LIB,;t t
20707 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20708 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20709 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20710 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20711 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20712 s,@TEST_LIBS@,$TEST_LIBS,;t t
20713 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20714 s,@CXXCPP@,$CXXCPP,;t t
20715 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20716 s,@CXX_AR@,$CXX_AR,;t t
20717 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20718 s,@CXXLIBS@,$CXXLIBS,;t t
20719 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20720 s,@gnat_exists@,$gnat_exists,;t t
20721 s,@M4_exists@,$M4_exists,;t t
20722 s,@cf_ada_make@,$cf_ada_make,;t t
20723 s,@cf_compile_generics@,$cf_compile_generics,;t t
20724 s,@cf_generic_objects@,$cf_generic_objects,;t t
20725 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20726 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20727 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20728 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20729 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20730 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20731 s,@cf_ada_package@,$cf_ada_package,;t t
20732 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20733 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20734 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20735 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20736 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20737 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20738 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20739 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20740 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20741 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20742 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20743 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20744 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
20745 s,@TICS_LIBS@,$TICS_LIBS,;t t
20746 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20747 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20748 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20749 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
20750 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20751 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
20752 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20753 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20754 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20755 s,@TICS_LIST@,$TICS_LIST,;t t
20756 s,@TINFO_LIST@,$TINFO_LIST,;t t
20757 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20758 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20759 s,@TEST_ARGS@,$TEST_ARGS,;t t
20760 s,@TEST_DEPS@,$TEST_DEPS,;t t
20761 s,@TEST_ARG2@,$TEST_ARG2,;t t
20762 s,@TEST_DEP2@,$TEST_DEP2,;t t
20763 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20764 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20765 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20766 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20767 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20768 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20769 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20770 s,@cross_compiling@,$cross_compiling,;t t
20771 s,@TIC_PATH@,$TIC_PATH,;t t
20772 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20773 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20774 CEOF
20775
20776 EOF
20777
20778   cat >>$CONFIG_STATUS <<\EOF
20779   # Split the substitutions into bite-sized pieces for seds with
20780   # small command number limits, like on Digital OSF/1 and HP-UX.
20781   ac_max_sed_lines=48
20782   ac_sed_frag=1 # Number of current file.
20783   ac_beg=1 # First line for current file.
20784   ac_end=$ac_max_sed_lines # Line after last line for current file.
20785   ac_more_lines=:
20786   ac_sed_cmds=
20787   while $ac_more_lines; do
20788     if test $ac_beg -gt 1; then
20789       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20790     else
20791       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20792     fi
20793     if test ! -s $tmp/subs.frag; then
20794       ac_more_lines=false
20795     else
20796       # The purpose of the label and of the branching condition is to
20797       # speed up the sed processing (if there are no `@' at all, there
20798       # is no need to browse any of the substitutions).
20799       # These are the two extra sed commands mentioned above.
20800       (echo ':t
20801   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20802       if test -z "$ac_sed_cmds"; then
20803         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20804       else
20805         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20806       fi
20807       ac_sed_frag=`expr $ac_sed_frag + 1`
20808       ac_beg=$ac_end
20809       ac_end=`expr $ac_end + $ac_max_sed_lines`
20810     fi
20811   done
20812   if test -z "$ac_sed_cmds"; then
20813     ac_sed_cmds=cat
20814   fi
20815 fi # test -n "$CONFIG_FILES"
20816
20817 EOF
20818 cat >>$CONFIG_STATUS <<\EOF
20819 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20820   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20821   case $ac_file in
20822   - | *:- | *:-:* ) # input from stdin
20823         cat >$tmp/stdin
20824         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20825         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20826   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20827         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20828   * )   ac_file_in=$ac_file.in ;;
20829   esac
20830
20831   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20832   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20833          X"$ac_file" : 'X\(//\)[^/]' \| \
20834          X"$ac_file" : 'X\(//\)$' \| \
20835          X"$ac_file" : 'X\(/\)' \| \
20836          .     : '\(.\)' 2>/dev/null ||
20837 echo X"$ac_file" |
20838     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20839           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20840           /^X\(\/\/\)$/{ s//\1/; q; }
20841           /^X\(\/\).*/{ s//\1/; q; }
20842           s/.*/./; q'`
20843   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20844     { case "$ac_dir" in
20845   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20846   *)                      as_incr_dir=.;;
20847 esac
20848 as_dummy="$ac_dir"
20849 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20850   case $as_mkdir_dir in
20851     # Skip DOS drivespec
20852     ?:) as_incr_dir=$as_mkdir_dir ;;
20853     *)
20854       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20855       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20856     ;;
20857   esac
20858 done; }
20859
20860     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20861     # A "../" for each directory in $ac_dir_suffix.
20862     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20863   else
20864     ac_dir_suffix= ac_dots=
20865   fi
20866
20867   case $srcdir in
20868   .)  ac_srcdir=.
20869       if test -z "$ac_dots"; then
20870          ac_top_srcdir=.
20871       else
20872          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20873       fi ;;
20874   [\\/]* | ?:[\\/]* )
20875       ac_srcdir=$srcdir$ac_dir_suffix;
20876       ac_top_srcdir=$srcdir ;;
20877   *) # Relative path.
20878     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20879     ac_top_srcdir=$ac_dots$srcdir ;;
20880   esac
20881
20882   case $INSTALL in
20883   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20884   *) ac_INSTALL=$ac_dots$INSTALL ;;
20885   esac
20886
20887   if test x"$ac_file" != x-; then
20888     { echo "$as_me:20888: creating $ac_file" >&5
20889 echo "$as_me: creating $ac_file" >&6;}
20890     rm -f "$ac_file"
20891   fi
20892   # Let's still pretend it is `configure' which instantiates (i.e., don't
20893   # use $as_me), people would be surprised to read:
20894   #    /* config.h.  Generated automatically by config.status.  */
20895   configure_input="Generated automatically from `echo $ac_file_in |
20896                                                  sed 's,.*/,,'` by configure."
20897
20898   # First look for the input files in the build tree, otherwise in the
20899   # src tree.
20900   ac_file_inputs=`IFS=:
20901     for f in $ac_file_in; do
20902       case $f in
20903       -) echo $tmp/stdin ;;
20904       [\\/$]*)
20905          # Absolute (can't be DOS-style, as IFS=:)
20906          test -f "$f" || { { echo "$as_me:20906: error: cannot find input file: $f" >&5
20907 echo "$as_me: error: cannot find input file: $f" >&2;}
20908    { (exit 1); exit 1; }; }
20909          echo $f;;
20910       *) # Relative
20911          if test -f "$f"; then
20912            # Build tree
20913            echo $f
20914          elif test -f "$srcdir/$f"; then
20915            # Source tree
20916            echo $srcdir/$f
20917          else
20918            # /dev/null tree
20919            { { echo "$as_me:20919: error: cannot find input file: $f" >&5
20920 echo "$as_me: error: cannot find input file: $f" >&2;}
20921    { (exit 1); exit 1; }; }
20922          fi;;
20923       esac
20924     done` || { (exit 1); exit 1; }
20925 EOF
20926 cat >>$CONFIG_STATUS <<EOF
20927   sed "$ac_vpsub
20928 $extrasub
20929 EOF
20930 cat >>$CONFIG_STATUS <<\EOF
20931 :t
20932 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20933 s,@configure_input@,$configure_input,;t t
20934 s,@srcdir@,$ac_srcdir,;t t
20935 s,@top_srcdir@,$ac_top_srcdir,;t t
20936 s,@INSTALL@,$ac_INSTALL,;t t
20937 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20938   rm -f $tmp/stdin
20939   if test x"$ac_file" != x-; then
20940     mv $tmp/out $ac_file
20941   else
20942     cat $tmp/out
20943     rm -f $tmp/out
20944   fi
20945
20946 done
20947 EOF
20948 cat >>$CONFIG_STATUS <<\EOF
20949
20950 #
20951 # CONFIG_HEADER section.
20952 #
20953
20954 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20955 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20956 #
20957 # ac_d sets the value in "#define NAME VALUE" lines.
20958 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20959 ac_dB='[        ].*$,\1#\2'
20960 ac_dC=' '
20961 ac_dD=',;t'
20962 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20963 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20964 ac_iB='\([      ]\),\1#\2define\3'
20965 ac_iC=' '
20966 ac_iD='\4,;t'
20967 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20968 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20969 ac_uB='$,\1#\2define\3'
20970 ac_uC=' '
20971 ac_uD=',;t'
20972
20973 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20974   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20975   case $ac_file in
20976   - | *:- | *:-:* ) # input from stdin
20977         cat >$tmp/stdin
20978         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20979         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20980   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20981         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20982   * )   ac_file_in=$ac_file.in ;;
20983   esac
20984
20985   test x"$ac_file" != x- && { echo "$as_me:20985: creating $ac_file" >&5
20986 echo "$as_me: creating $ac_file" >&6;}
20987
20988   # First look for the input files in the build tree, otherwise in the
20989   # src tree.
20990   ac_file_inputs=`IFS=:
20991     for f in $ac_file_in; do
20992       case $f in
20993       -) echo $tmp/stdin ;;
20994       [\\/$]*)
20995          # Absolute (can't be DOS-style, as IFS=:)
20996          test -f "$f" || { { echo "$as_me:20996: error: cannot find input file: $f" >&5
20997 echo "$as_me: error: cannot find input file: $f" >&2;}
20998    { (exit 1); exit 1; }; }
20999          echo $f;;
21000       *) # Relative
21001          if test -f "$f"; then
21002            # Build tree
21003            echo $f
21004          elif test -f "$srcdir/$f"; then
21005            # Source tree
21006            echo $srcdir/$f
21007          else
21008            # /dev/null tree
21009            { { echo "$as_me:21009: error: cannot find input file: $f" >&5
21010 echo "$as_me: error: cannot find input file: $f" >&2;}
21011    { (exit 1); exit 1; }; }
21012          fi;;
21013       esac
21014     done` || { (exit 1); exit 1; }
21015   # Remove the trailing spaces.
21016   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21017
21018 EOF
21019
21020 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21021 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21022 # be either 'cat' or 'sort'.
21023 cat confdefs.h | uniq >conftest.vals
21024
21025 # Break up conftest.vals because some shells have a limit on
21026 # the size of here documents, and old seds have small limits too.
21027
21028 rm -f conftest.tail
21029 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21030 while grep . conftest.vals >/dev/null
21031 do
21032   # Write chunks of a limited-size here document to conftest.frag.
21033   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21034   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21035   echo 'CEOF' >> $CONFIG_STATUS
21036   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21037   rm -f conftest.vals
21038   mv conftest.tail conftest.vals
21039 done
21040 rm -f conftest.vals
21041
21042 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21043 # marker @DEFS@.
21044 echo '  cat >> conftest.edit <<CEOF
21045 /@DEFS@/r conftest.frag
21046 /@DEFS@/d
21047 CEOF
21048 sed -f conftest.edit $tmp/in > $tmp/out
21049 rm -f $tmp/in
21050 mv $tmp/out $tmp/in
21051 rm -f conftest.edit conftest.frag
21052 ' >> $CONFIG_STATUS
21053
21054 cat >>$CONFIG_STATUS <<\EOF
21055   # Let's still pretend it is `configure' which instantiates (i.e., don't
21056   # use $as_me), people would be surprised to read:
21057   #    /* config.h.  Generated automatically by config.status.  */
21058   if test x"$ac_file" = x-; then
21059     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21060   else
21061     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21062   fi
21063   cat $tmp/in >>$tmp/config.h
21064   rm -f $tmp/in
21065   if test x"$ac_file" != x-; then
21066     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21067       { echo "$as_me:21067: $ac_file is unchanged" >&5
21068 echo "$as_me: $ac_file is unchanged" >&6;}
21069     else
21070       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21071          X"$ac_file" : 'X\(//\)[^/]' \| \
21072          X"$ac_file" : 'X\(//\)$' \| \
21073          X"$ac_file" : 'X\(/\)' \| \
21074          .     : '\(.\)' 2>/dev/null ||
21075 echo X"$ac_file" |
21076     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21077           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21078           /^X\(\/\/\)$/{ s//\1/; q; }
21079           /^X\(\/\).*/{ s//\1/; q; }
21080           s/.*/./; q'`
21081       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21082         { case "$ac_dir" in
21083   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21084   *)                      as_incr_dir=.;;
21085 esac
21086 as_dummy="$ac_dir"
21087 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21088   case $as_mkdir_dir in
21089     # Skip DOS drivespec
21090     ?:) as_incr_dir=$as_mkdir_dir ;;
21091     *)
21092       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21093       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21094     ;;
21095   esac
21096 done; }
21097
21098       fi
21099       rm -f $ac_file
21100       mv $tmp/config.h $ac_file
21101     fi
21102   else
21103     cat $tmp/config.h
21104     rm -f $tmp/config.h
21105   fi
21106 done
21107 EOF
21108 cat >>$CONFIG_STATUS <<\EOF
21109 #
21110 # CONFIG_COMMANDS section.
21111 #
21112 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21113   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21114   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21115
21116   case $ac_dest in
21117     default )
21118 if test "x$cf_with_tests" != xno ; then
21119
21120 for cf_dir in test
21121 do
21122         if test ! -d $srcdir/$cf_dir; then
21123                 continue
21124         elif test -f $srcdir/$cf_dir/programs; then
21125                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21126         fi
21127 done
21128
21129 fi
21130
21131         case $cf_cv_system_name in #(vi
21132         OS/2*|os2*) #(vi
21133         LIB_PREFIX=''
21134         ;;
21135         *)      LIB_PREFIX='lib'
21136         ;;
21137         esac
21138 cf_prefix=$LIB_PREFIX
21139
21140 if test $cf_cv_shlib_version = cygdll ; then
21141         TINFO_NAME=$TINFO_ARG_SUFFIX
21142         TINFO_SUFFIX=.dll
21143 fi
21144
21145 if test -n "$TINFO_SUFFIX" ; then
21146         case $TINFO_SUFFIX in
21147         tw*)
21148                 TINFO_NAME="${TINFO_NAME}tw"
21149                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21150                 ;;
21151         t*)
21152                 TINFO_NAME="${TINFO_NAME}t"
21153                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21154                 ;;
21155         w*)
21156                 TINFO_NAME="${TINFO_NAME}w"
21157                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21158                 ;;
21159         esac
21160 fi
21161
21162 for cf_dir in $SRC_SUBDIRS
21163 do
21164         if test ! -d $srcdir/$cf_dir ; then
21165                 continue
21166         elif test -f $srcdir/$cf_dir/modules; then
21167
21168                 SHARED_LIB=
21169                 LIBS_TO_MAKE=
21170                 for cf_item in $cf_LIST_MODELS
21171                 do
21172
21173         case $cf_item in #(vi
21174         libtool) #(vi
21175                 cf_suffix='.la'
21176                 cf_depsuf=$cf_suffix
21177                 ;;
21178         normal) #(vi
21179                 cf_suffix='.a'
21180                 cf_depsuf=$cf_suffix
21181                 ;;
21182         debug) #(vi
21183                 cf_suffix='_g.a'
21184                 cf_depsuf=$cf_suffix
21185                 ;;
21186         profile) #(vi
21187                 cf_suffix='_p.a'
21188                 cf_depsuf=$cf_suffix
21189                 ;;
21190         shared) #(vi
21191                 case $cf_cv_system_name in
21192                 aix[5-7]*) #(vi
21193                         cf_suffix='.a'
21194                         cf_depsuf=$cf_suffix
21195                         ;;
21196                 cygwin*) #(vi
21197                         cf_suffix='.dll'
21198                         cf_depsuf='.dll.a'
21199                         ;;
21200                 darwin*) #(vi
21201                         cf_suffix='.dylib'
21202                         cf_depsuf=$cf_suffix
21203                         ;;
21204                 hpux*) #(vi
21205                         case $target in
21206                         ia64*) #(vi
21207                                 cf_suffix='.so'
21208                                 cf_depsuf=$cf_suffix
21209                                 ;;
21210                         *) #(vi
21211                                 cf_suffix='.sl'
21212                                 cf_depsuf=$cf_suffix
21213                                 ;;
21214                         esac
21215                         ;;
21216                 *)      cf_suffix='.so'
21217                         cf_depsuf=$cf_suffix
21218                         ;;
21219                 esac
21220         esac
21221         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21222         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21223
21224                         if test $cf_item = shared ; then
21225                         if test "$cf_cv_do_symlinks" = yes ; then
21226                                 case "$cf_cv_shlib_version" in #(vi
21227                                 rel) #(vi
21228                                         case "$cf_cv_system_name" in #(vi
21229                                         darwin*)
21230                                         case .${LIB_SUFFIX} in
21231                                         .tw*)
21232                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21233                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21234                                                 ;;
21235                                         .t*)
21236                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21237                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21238                                                 ;;
21239                                         .w*)
21240                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21241                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21242                                                 ;;
21243                                         *)
21244                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21245                                                 ;;
21246                                         esac
21247                                         ;; #(vi
21248                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21249                                         esac
21250                                         ;;
21251                                 abi)
21252                                         case "$cf_cv_system_name" in #(vi
21253                                         darwin*)
21254                                         case .${LIB_SUFFIX} in
21255                                         .tw*)
21256                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21257                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21258                                                 ;;
21259                                         .t*)
21260                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21261                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21262                                                 ;;
21263                                         .w*)
21264                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21265                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21266                                                 ;;
21267                                         *)
21268                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21269                                                 ;;
21270                                         esac
21271                                         ;; #(vi
21272                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21273                                         esac
21274                                         ;;
21275                                 esac
21276                         fi
21277                         # cygwin needs import library, and has unique naming convention
21278                         # use autodetected ${cf_prefix} for import lib and static lib, but
21279                         # use 'cyg' prefix for shared lib.
21280                         if test $cf_cv_shlib_version = cygdll ; then
21281                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21282                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21283                                 continue
21284                         fi
21285                         fi
21286                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21287                 done
21288
21289                 if test $cf_dir = ncurses ; then
21290                         cf_subsets="$LIB_SUBSETS"
21291                         cf_r_parts="$cf_subsets"
21292                         cf_liblist="$LIBS_TO_MAKE"
21293
21294                         while test -n "$cf_r_parts"
21295                         do
21296                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21297                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21298                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21299                                         cf_item=
21300                                         case $cf_l_parts in #(vi
21301                                         *termlib*) #(vi
21302                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21303                                                 ;;
21304                                         *ticlib*)
21305                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21306                                                 ;;
21307                                         *)
21308                                                 break
21309                                                 ;;
21310                                         esac
21311                                         if test -n "$cf_item"; then
21312                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21313                                         fi
21314                                 else
21315                                         break
21316                                 fi
21317                         done
21318                 else
21319                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21320                 fi
21321
21322                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21323                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21324                         $cf_dir/Makefile >$cf_dir/Makefile.out
21325                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21326
21327                 $AWK -f $srcdir/mk-0th.awk \
21328                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21329                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21330
21331                 for cf_subset in $cf_subsets
21332                 do
21333                         cf_subdirs=
21334                         for cf_item in $cf_LIST_MODELS
21335                         do
21336                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21337
21338 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21339
21340         case $cf_item in #(vi
21341         libtool) #(vi
21342                 cf_suffix='.la'
21343                 cf_depsuf=$cf_suffix
21344                 ;;
21345         normal) #(vi
21346                 cf_suffix='.a'
21347                 cf_depsuf=$cf_suffix
21348                 ;;
21349         debug) #(vi
21350                 cf_suffix='_g.a'
21351                 cf_depsuf=$cf_suffix
21352                 ;;
21353         profile) #(vi
21354                 cf_suffix='_p.a'
21355                 cf_depsuf=$cf_suffix
21356                 ;;
21357         shared) #(vi
21358                 case $cf_cv_system_name in
21359                 aix[5-7]*) #(vi
21360                         cf_suffix='.a'
21361                         cf_depsuf=$cf_suffix
21362                         ;;
21363                 cygwin*) #(vi
21364                         cf_suffix='.dll'
21365                         cf_depsuf='.dll.a'
21366                         ;;
21367                 darwin*) #(vi
21368                         cf_suffix='.dylib'
21369                         cf_depsuf=$cf_suffix
21370                         ;;
21371                 hpux*) #(vi
21372                         case $target in
21373                         ia64*) #(vi
21374                                 cf_suffix='.so'
21375                                 cf_depsuf=$cf_suffix
21376                                 ;;
21377                         *) #(vi
21378                                 cf_suffix='.sl'
21379                                 cf_depsuf=$cf_suffix
21380                                 ;;
21381                         esac
21382                         ;;
21383                 *)      cf_suffix='.so'
21384                         cf_depsuf=$cf_suffix
21385                         ;;
21386                 esac
21387         esac
21388         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21389         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21390
21391         case $cf_item in
21392         libtool) cf_subdir='obj_lo'  ;;
21393         normal)  cf_subdir='objects' ;;
21394         debug)   cf_subdir='obj_g' ;;
21395         profile) cf_subdir='obj_p' ;;
21396         shared)
21397                 case $cf_cv_system_name in #(vi
21398                 cygwin) #(vi
21399                         cf_subdir='objects' ;;
21400                 *)
21401                         cf_subdir='obj_s' ;;
21402                 esac
21403         esac
21404
21405                         # Test for case where we build libtinfo with a different name.
21406                         cf_libname=$cf_dir
21407                         if test $cf_dir = ncurses ; then
21408                                 case $cf_subset in
21409                                 *base*)
21410                                         cf_libname=${cf_libname}$LIB_SUFFIX
21411                                         ;;
21412                                 *termlib*)
21413                                         cf_libname=$TINFO_LIB_SUFFIX
21414                                         ;;
21415                                 ticlib*)
21416                                         cf_libname=$TICS_LIB_SUFFIX
21417                                         ;;
21418                                 esac
21419                         else
21420                                 cf_libname=${cf_libname}$LIB_SUFFIX
21421                         fi
21422                         if test -n "${DFT_ARG_SUFFIX}" ; then
21423                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21424                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21425                         fi
21426
21427                         # These dependencies really are for development, not
21428                         # builds, but they are useful in porting, too.
21429                         cf_depend="../include/ncurses_cfg.h"
21430                         if test "$srcdir" = "."; then
21431                                 cf_reldir="."
21432                         else
21433                                 cf_reldir="\${srcdir}"
21434                         fi
21435
21436                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21437                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21438                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21439                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21440                         fi
21441
21442                         cf_dir_suffix=
21443                         old_cf_suffix="$cf_suffix"
21444                         if test "$cf_cv_shlib_version_infix" = yes ; then
21445                         if test -n "$LIB_SUFFIX" ; then
21446                                 case $LIB_SUFFIX in
21447                                 tw*)
21448                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21449                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21450                                         cf_dir_suffix=tw
21451                                         ;;
21452                                 t*)
21453                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21454                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21455                                         cf_dir_suffix=t
21456                                         ;;
21457                                 w*)
21458                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21459                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21460                                         cf_dir_suffix=w
21461                                         ;;
21462                                 esac
21463                         fi
21464                         fi
21465
21466                         $AWK -f $srcdir/mk-1st.awk \
21467                                 name=${cf_libname}${cf_dir_suffix} \
21468                                 traces=$LIB_TRACING \
21469                                 MODEL=$cf_ITEM \
21470                                 model=$cf_subdir \
21471                                 prefix=$cf_prefix \
21472                                 suffix=$cf_suffix \
21473                                 subset=$cf_subset \
21474                                 SymLink="$LN_S" \
21475                                 TermlibRoot=$TINFO_NAME \
21476                                 TermlibSuffix=$TINFO_SUFFIX \
21477                                 ShlibVer=$cf_cv_shlib_version \
21478                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21479                                 ReLink=${cf_cv_do_relink:-no} \
21480                                 DoLinks=$cf_cv_do_symlinks \
21481                                 rmSoLocs=$cf_cv_rm_so_locs \
21482                                 ldconfig="$LDCONFIG" \
21483                                 overwrite=$WITH_OVERWRITE \
21484                                 depend="$cf_depend" \
21485                                 host="$host" \
21486                                 libtool_version="$LIBTOOL_VERSION" \
21487                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21488
21489                         cf_suffix="$old_cf_suffix"
21490
21491                         for cf_subdir2 in $cf_subdirs lib
21492                         do
21493                                 test $cf_subdir = $cf_subdir2 && break
21494                         done
21495                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21496                         $AWK -f $srcdir/mk-2nd.awk \
21497                                 name=$cf_dir \
21498                                 traces=$LIB_TRACING \
21499                                 MODEL=$cf_ITEM \
21500                                 model=$cf_subdir \
21501                                 subset=$cf_subset \
21502                                 srcdir=$srcdir \
21503                                 echo=$WITH_ECHO \
21504                                 crenames=$cf_cv_prog_CC_c_o \
21505                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21506                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21507                         cf_subdirs="$cf_subdirs $cf_subdir"
21508                         done
21509                 done
21510         fi
21511
21512         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21513 done
21514
21515 for cf_dir in $SRC_SUBDIRS
21516 do
21517         if test ! -d $srcdir/$cf_dir ; then
21518                 continue
21519         fi
21520
21521         if test -f $cf_dir/Makefile ; then
21522                 case "$cf_dir" in
21523                 Ada95) #(vi
21524                         echo 'libs \' >> Makefile
21525                         echo 'install.libs \' >> Makefile
21526                         echo 'uninstall.libs ::' >> Makefile
21527                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21528                         ;;
21529                 esac
21530         fi
21531
21532         if test -f $srcdir/$cf_dir/modules; then
21533                 echo >> Makefile
21534                 if test -f $srcdir/$cf_dir/headers; then
21535 cat >> Makefile <<CF_EOF
21536 install.includes \\
21537 uninstall.includes \\
21538 CF_EOF
21539                 fi
21540 if test "$cf_dir" != "c++" ; then
21541 echo 'lint \' >> Makefile
21542 fi
21543 cat >> Makefile <<CF_EOF
21544 libs \\
21545 lintlib \\
21546 install.libs \\
21547 uninstall.libs \\
21548 install.$cf_dir \\
21549 uninstall.$cf_dir ::
21550         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21551 CF_EOF
21552         elif test -f $srcdir/$cf_dir/headers; then
21553 cat >> Makefile <<CF_EOF
21554
21555 libs \\
21556 install.libs \\
21557 uninstall.libs \\
21558 install.includes \\
21559 uninstall.includes ::
21560         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21561 CF_EOF
21562 fi
21563 done
21564
21565 cat >> Makefile <<CF_EOF
21566
21567 install.libs uninstall.libs \\
21568 install.data uninstall.data ::
21569 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21570 CF_EOF
21571
21572 if test "x$cf_with_manpages" = xyes; then
21573 cat >> Makefile <<CF_EOF
21574
21575 install.man \\
21576 uninstall.man ::
21577         cd man && \${MAKE} \${CF_MFLAGS} \$@
21578 CF_EOF
21579 fi
21580
21581 cat >> Makefile <<CF_EOF
21582
21583 distclean ::
21584         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21585         rm -f headers.sh headers.sed mk_shared_lib.sh
21586         rm -f edit_man.* man_alias.*
21587         rm -rf \${DIRS_TO_MAKE}
21588 CF_EOF
21589
21590 # Special case: tack's manpage lives in its own directory.
21591 if test "x$cf_with_manpages" = xyes; then
21592 if test -d tack ; then
21593 if test -f $srcdir/$tack.h; then
21594 cat >> Makefile <<CF_EOF
21595
21596 install.man \\
21597 uninstall.man ::
21598         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21599 CF_EOF
21600 fi
21601 fi
21602 fi
21603
21604 rm -f headers.sed headers.sh
21605
21606 echo creating headers.sh
21607 cat >headers.sh <<CF_EOF
21608 #! /bin/sh
21609 # This shell script is generated by the 'configure' script.  It is invoked in a
21610 # subdirectory of the build tree.  It generates a sed-script in the parent
21611 # directory that is used to adjust includes for header files that reside in a
21612 # subdirectory of /usr/include, etc.
21613 PRG=""
21614 while test \$# != 3
21615 do
21616 PRG="\$PRG \$1"; shift
21617 done
21618 DST=\$1
21619 REF=\$2
21620 SRC=\$3
21621 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21622 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21623 echo installing \$SRC in \$DST
21624 CF_EOF
21625
21626 if test $WITH_CURSES_H = yes; then
21627         cat >>headers.sh <<CF_EOF
21628 case \$DST in
21629 /*/include/*)
21630         END=\`basename \$DST\`
21631         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21632         do
21633                 NAME=\`basename \$i\`
21634                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21635         done
21636         ;;
21637 *)
21638         echo "" >> \$TMPSED
21639         ;;
21640 esac
21641 CF_EOF
21642
21643 else
21644         cat >>headers.sh <<CF_EOF
21645 case \$DST in
21646 /*/include/*)
21647         END=\`basename \$DST\`
21648         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21649         do
21650                 NAME=\`basename \$i\`
21651                 if test "\$NAME" = "curses.h"
21652                 then
21653                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21654                         NAME=ncurses.h
21655                 fi
21656                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21657         done
21658         ;;
21659 *)
21660         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21661         ;;
21662 esac
21663 CF_EOF
21664 fi
21665 cat >>headers.sh <<CF_EOF
21666 rm -f \$TMPSRC
21667 sed -f \$TMPSED \$SRC > \$TMPSRC
21668 NAME=\`basename \$SRC\`
21669 CF_EOF
21670 if test $WITH_CURSES_H != yes; then
21671         cat >>headers.sh <<CF_EOF
21672 test "\$NAME" = "curses.h" && NAME=ncurses.h
21673 CF_EOF
21674 fi
21675 cat >>headers.sh <<CF_EOF
21676 # Just in case someone gzip'd manpages, remove the conflicting copy.
21677 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21678
21679 eval \$PRG \$TMPSRC \$DST/\$NAME
21680 rm -f \$TMPSRC \$TMPSED
21681 CF_EOF
21682
21683 chmod 0755 headers.sh
21684
21685 for cf_dir in $SRC_SUBDIRS
21686 do
21687         if test ! -d $srcdir/$cf_dir ; then
21688                 continue
21689         fi
21690
21691         if test -f $srcdir/$cf_dir/headers; then
21692                 $AWK -f $srcdir/mk-hdr.awk \
21693                         subset="$LIB_SUBSETS" \
21694                         compat="$WITH_CURSES_H" \
21695                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21696         fi
21697
21698         if test -f $srcdir/$cf_dir/modules; then
21699                 if test "$cf_dir" != "c++" ; then
21700                         cat >>$cf_dir/Makefile <<"CF_EOF"
21701 depend : ${AUTO_SRC}
21702         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21703
21704 # DO NOT DELETE THIS LINE -- make depend depends on it.
21705 CF_EOF
21706                 fi
21707         fi
21708 done
21709
21710 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21711 if test -z "$USE_OLD_MAKERULES" ; then
21712         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21713 fi
21714 fi
21715  ;;
21716   esac
21717 done
21718 EOF
21719
21720 cat >>$CONFIG_STATUS <<\EOF
21721
21722 { (exit 0); exit 0; }
21723 EOF
21724 chmod +x $CONFIG_STATUS
21725 ac_clean_files=$ac_clean_files_save
21726
21727 # configure is writing to config.log, and then calls config.status.
21728 # config.status does its own redirection, appending to config.log.
21729 # Unfortunately, on DOS this fails, as config.log is still kept open
21730 # by configure, so config.status won't be able to write to it; its
21731 # output is simply discarded.  So we exec the FD to /dev/null,
21732 # effectively closing config.log, so it can be properly (re)opened and
21733 # appended to by config.status.  When coming back to configure, we
21734 # need to make the FD available again.
21735 if test "$no_create" != yes; then
21736   ac_cs_success=:
21737   exec 5>/dev/null
21738   $SHELL $CONFIG_STATUS || ac_cs_success=false
21739   exec 5>>config.log
21740   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21741   # would make configure fail if this is the last instruction.
21742   $ac_cs_success || { (exit 1); exit 1; }
21743 fi
21744 ${MAKE:-make} preinstall