]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20110917
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.525 .
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); }' \
6599                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
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.1[0-9]) #(vi
7254         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7255         ;;
7256 solaris2.[1-9]) #(vi
7257         cf_xopen_source="-D__EXTENSIONS__"
7258         ;;
7259 *)
7260         echo "$as_me:7260: checking if we should define _XOPEN_SOURCE" >&5
7261 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7262 if test "${cf_cv_xopen_source+set}" = set; then
7263   echo $ECHO_N "(cached) $ECHO_C" >&6
7264 else
7265
7266         cat >conftest.$ac_ext <<_ACEOF
7267 #line 7267 "configure"
7268 #include "confdefs.h"
7269 #include <sys/types.h>
7270 int
7271 main ()
7272 {
7273
7274 #ifndef _XOPEN_SOURCE
7275 make an error
7276 #endif
7277   ;
7278   return 0;
7279 }
7280 _ACEOF
7281 rm -f conftest.$ac_objext
7282 if { (eval echo "$as_me:7282: \"$ac_compile\"") >&5
7283   (eval $ac_compile) 2>&5
7284   ac_status=$?
7285   echo "$as_me:7285: \$? = $ac_status" >&5
7286   (exit $ac_status); } &&
7287          { ac_try='test -s conftest.$ac_objext'
7288   { (eval echo "$as_me:7288: \"$ac_try\"") >&5
7289   (eval $ac_try) 2>&5
7290   ac_status=$?
7291   echo "$as_me:7291: \$? = $ac_status" >&5
7292   (exit $ac_status); }; }; then
7293   cf_cv_xopen_source=no
7294 else
7295   echo "$as_me: failed program was:" >&5
7296 cat conftest.$ac_ext >&5
7297 cf_save="$CPPFLAGS"
7298          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7299          cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302 #include <sys/types.h>
7303 int
7304 main ()
7305 {
7306
7307 #ifdef _XOPEN_SOURCE
7308 make an error
7309 #endif
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext
7315 if { (eval echo "$as_me:7315: \"$ac_compile\"") >&5
7316   (eval $ac_compile) 2>&5
7317   ac_status=$?
7318   echo "$as_me:7318: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest.$ac_objext'
7321   { (eval echo "$as_me:7321: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   cf_cv_xopen_source=no
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7331 fi
7332 rm -f conftest.$ac_objext conftest.$ac_ext
7333         CPPFLAGS="$cf_save"
7334
7335 fi
7336 rm -f conftest.$ac_objext conftest.$ac_ext
7337
7338 fi
7339 echo "$as_me:7339: result: $cf_cv_xopen_source" >&5
7340 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7341         if test "$cf_cv_xopen_source" != no ; then
7342
7343 CFLAGS=`echo "$CFLAGS" | \
7344         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7345                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7346
7347 CPPFLAGS=`echo "$CPPFLAGS" | \
7348         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7349                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7350
7351                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7352
7353 cf_fix_cppflags=no
7354 cf_new_cflags=
7355 cf_new_cppflags=
7356 cf_new_extra_cppflags=
7357
7358 for cf_add_cflags in $cf_temp_xopen_source
7359 do
7360 case $cf_fix_cppflags in
7361 no)
7362         case $cf_add_cflags in #(vi
7363         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7364                 case $cf_add_cflags in
7365                 -D*)
7366                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7367
7368                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7369                                 && test -z "${cf_tst_cflags}" \
7370                                 && cf_fix_cppflags=yes
7371
7372                         if test $cf_fix_cppflags = yes ; then
7373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7374                                 continue
7375                         elif test "${cf_tst_cflags}" = "\"'" ; then
7376                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7377                                 continue
7378                         fi
7379                         ;;
7380                 esac
7381                 case "$CPPFLAGS" in
7382                 *$cf_add_cflags) #(vi
7383                         ;;
7384                 *) #(vi
7385                         case $cf_add_cflags in #(vi
7386                         -D*)
7387                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7388
7389 CPPFLAGS=`echo "$CPPFLAGS" | \
7390         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7391                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7392
7393                                 ;;
7394                         esac
7395                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7396                         ;;
7397                 esac
7398                 ;;
7399         *)
7400                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7401                 ;;
7402         esac
7403         ;;
7404 yes)
7405         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7406
7407         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7408
7409         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7410                 && test -z "${cf_tst_cflags}" \
7411                 && cf_fix_cppflags=no
7412         ;;
7413 esac
7414 done
7415
7416 if test -n "$cf_new_cflags" ; then
7417
7418         CFLAGS="$CFLAGS $cf_new_cflags"
7419 fi
7420
7421 if test -n "$cf_new_cppflags" ; then
7422
7423         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7424 fi
7425
7426 if test -n "$cf_new_extra_cppflags" ; then
7427
7428         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7429 fi
7430
7431         fi
7432
7433 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7434
7435 cf_save_CFLAGS="$CFLAGS"
7436 cf_save_CPPFLAGS="$CPPFLAGS"
7437
7438 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7439         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7440                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7441
7442 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7443         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7444                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7445
7446 echo "$as_me:7446: checking if we should define _POSIX_C_SOURCE" >&5
7447 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7448 if test "${cf_cv_posix_c_source+set}" = set; then
7449   echo $ECHO_N "(cached) $ECHO_C" >&6
7450 else
7451
7452 echo "${as_me:-configure}:7452: testing if the symbol is already defined go no further ..." 1>&5
7453
7454         cat >conftest.$ac_ext <<_ACEOF
7455 #line 7455 "configure"
7456 #include "confdefs.h"
7457 #include <sys/types.h>
7458 int
7459 main ()
7460 {
7461
7462 #ifndef _POSIX_C_SOURCE
7463 make an error
7464 #endif
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -f conftest.$ac_objext
7470 if { (eval echo "$as_me:7470: \"$ac_compile\"") >&5
7471   (eval $ac_compile) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); } &&
7475          { ac_try='test -s conftest.$ac_objext'
7476   { (eval echo "$as_me:7476: \"$ac_try\"") >&5
7477   (eval $ac_try) 2>&5
7478   ac_status=$?
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit $ac_status); }; }; then
7481   cf_cv_posix_c_source=no
7482 else
7483   echo "$as_me: failed program was:" >&5
7484 cat conftest.$ac_ext >&5
7485 cf_want_posix_source=no
7486          case .$cf_POSIX_C_SOURCE in #(vi
7487          .[12]??*) #(vi
7488                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7489                 ;;
7490          .2) #(vi
7491                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7492                 cf_want_posix_source=yes
7493                 ;;
7494          .*)
7495                 cf_want_posix_source=yes
7496                 ;;
7497          esac
7498          if test "$cf_want_posix_source" = yes ; then
7499                 cat >conftest.$ac_ext <<_ACEOF
7500 #line 7500 "configure"
7501 #include "confdefs.h"
7502 #include <sys/types.h>
7503 int
7504 main ()
7505 {
7506
7507 #ifdef _POSIX_SOURCE
7508 make an error
7509 #endif
7510   ;
7511   return 0;
7512 }
7513 _ACEOF
7514 rm -f conftest.$ac_objext
7515 if { (eval echo "$as_me:7515: \"$ac_compile\"") >&5
7516   (eval $ac_compile) 2>&5
7517   ac_status=$?
7518   echo "$as_me:7518: \$? = $ac_status" >&5
7519   (exit $ac_status); } &&
7520          { ac_try='test -s conftest.$ac_objext'
7521   { (eval echo "$as_me:7521: \"$ac_try\"") >&5
7522   (eval $ac_try) 2>&5
7523   ac_status=$?
7524   echo "$as_me:7524: \$? = $ac_status" >&5
7525   (exit $ac_status); }; }; then
7526   :
7527 else
7528   echo "$as_me: failed program was:" >&5
7529 cat conftest.$ac_ext >&5
7530 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7531 fi
7532 rm -f conftest.$ac_objext conftest.$ac_ext
7533          fi
7534
7535 echo "${as_me:-configure}:7535: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7536
7537          CFLAGS="$cf_trim_CFLAGS"
7538          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7539
7540 echo "${as_me:-configure}:7540: testing if the second compile does not leave our definition intact error ..." 1>&5
7541
7542          cat >conftest.$ac_ext <<_ACEOF
7543 #line 7543 "configure"
7544 #include "confdefs.h"
7545 #include <sys/types.h>
7546 int
7547 main ()
7548 {
7549
7550 #ifndef _POSIX_C_SOURCE
7551 make an error
7552 #endif
7553   ;
7554   return 0;
7555 }
7556 _ACEOF
7557 rm -f conftest.$ac_objext
7558 if { (eval echo "$as_me:7558: \"$ac_compile\"") >&5
7559   (eval $ac_compile) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); } &&
7563          { ac_try='test -s conftest.$ac_objext'
7564   { (eval echo "$as_me:7564: \"$ac_try\"") >&5
7565   (eval $ac_try) 2>&5
7566   ac_status=$?
7567   echo "$as_me:7567: \$? = $ac_status" >&5
7568   (exit $ac_status); }; }; then
7569   :
7570 else
7571   echo "$as_me: failed program was:" >&5
7572 cat conftest.$ac_ext >&5
7573 cf_cv_posix_c_source=no
7574 fi
7575 rm -f conftest.$ac_objext conftest.$ac_ext
7576          CFLAGS="$cf_save_CFLAGS"
7577          CPPFLAGS="$cf_save_CPPFLAGS"
7578
7579 fi
7580 rm -f conftest.$ac_objext conftest.$ac_ext
7581
7582 fi
7583 echo "$as_me:7583: result: $cf_cv_posix_c_source" >&5
7584 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7585
7586 if test "$cf_cv_posix_c_source" != no ; then
7587         CFLAGS="$cf_trim_CFLAGS"
7588         CPPFLAGS="$cf_trim_CPPFLAGS"
7589
7590 cf_fix_cppflags=no
7591 cf_new_cflags=
7592 cf_new_cppflags=
7593 cf_new_extra_cppflags=
7594
7595 for cf_add_cflags in $cf_cv_posix_c_source
7596 do
7597 case $cf_fix_cppflags in
7598 no)
7599         case $cf_add_cflags in #(vi
7600         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7601                 case $cf_add_cflags in
7602                 -D*)
7603                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7604
7605                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7606                                 && test -z "${cf_tst_cflags}" \
7607                                 && cf_fix_cppflags=yes
7608
7609                         if test $cf_fix_cppflags = yes ; then
7610                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7611                                 continue
7612                         elif test "${cf_tst_cflags}" = "\"'" ; then
7613                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7614                                 continue
7615                         fi
7616                         ;;
7617                 esac
7618                 case "$CPPFLAGS" in
7619                 *$cf_add_cflags) #(vi
7620                         ;;
7621                 *) #(vi
7622                         case $cf_add_cflags in #(vi
7623                         -D*)
7624                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7625
7626 CPPFLAGS=`echo "$CPPFLAGS" | \
7627         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7628                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7629
7630                                 ;;
7631                         esac
7632                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7633                         ;;
7634                 esac
7635                 ;;
7636         *)
7637                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7638                 ;;
7639         esac
7640         ;;
7641 yes)
7642         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7643
7644         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7645
7646         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7647                 && test -z "${cf_tst_cflags}" \
7648                 && cf_fix_cppflags=no
7649         ;;
7650 esac
7651 done
7652
7653 if test -n "$cf_new_cflags" ; then
7654
7655         CFLAGS="$CFLAGS $cf_new_cflags"
7656 fi
7657
7658 if test -n "$cf_new_cppflags" ; then
7659
7660         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7661 fi
7662
7663 if test -n "$cf_new_extra_cppflags" ; then
7664
7665         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7666 fi
7667
7668 fi
7669
7670         ;;
7671 esac
7672
7673 if test -n "$cf_xopen_source" ; then
7674
7675 cf_fix_cppflags=no
7676 cf_new_cflags=
7677 cf_new_cppflags=
7678 cf_new_extra_cppflags=
7679
7680 for cf_add_cflags in $cf_xopen_source
7681 do
7682 case $cf_fix_cppflags in
7683 no)
7684         case $cf_add_cflags in #(vi
7685         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7686                 case $cf_add_cflags in
7687                 -D*)
7688                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7689
7690                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7691                                 && test -z "${cf_tst_cflags}" \
7692                                 && cf_fix_cppflags=yes
7693
7694                         if test $cf_fix_cppflags = yes ; then
7695                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7696                                 continue
7697                         elif test "${cf_tst_cflags}" = "\"'" ; then
7698                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7699                                 continue
7700                         fi
7701                         ;;
7702                 esac
7703                 case "$CPPFLAGS" in
7704                 *$cf_add_cflags) #(vi
7705                         ;;
7706                 *) #(vi
7707                         case $cf_add_cflags in #(vi
7708                         -D*)
7709                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7710
7711 CPPFLAGS=`echo "$CPPFLAGS" | \
7712         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7713                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7714
7715                                 ;;
7716                         esac
7717                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7718                         ;;
7719                 esac
7720                 ;;
7721         *)
7722                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7723                 ;;
7724         esac
7725         ;;
7726 yes)
7727         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7728
7729         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7730
7731         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7732                 && test -z "${cf_tst_cflags}" \
7733                 && cf_fix_cppflags=no
7734         ;;
7735 esac
7736 done
7737
7738 if test -n "$cf_new_cflags" ; then
7739
7740         CFLAGS="$CFLAGS $cf_new_cflags"
7741 fi
7742
7743 if test -n "$cf_new_cppflags" ; then
7744
7745         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7746 fi
7747
7748 if test -n "$cf_new_extra_cppflags" ; then
7749
7750         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7751 fi
7752
7753 fi
7754
7755 # Work around breakage on OS X
7756
7757 echo "$as_me:7757: checking if SIGWINCH is defined" >&5
7758 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7759 if test "${cf_cv_define_sigwinch+set}" = set; then
7760   echo $ECHO_N "(cached) $ECHO_C" >&6
7761 else
7762
7763         cat >conftest.$ac_ext <<_ACEOF
7764 #line 7764 "configure"
7765 #include "confdefs.h"
7766
7767 #include <sys/types.h>
7768 #include <sys/signal.h>
7769
7770 int
7771 main ()
7772 {
7773 int x = SIGWINCH
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 rm -f conftest.$ac_objext
7779 if { (eval echo "$as_me:7779: \"$ac_compile\"") >&5
7780   (eval $ac_compile) 2>&5
7781   ac_status=$?
7782   echo "$as_me:7782: \$? = $ac_status" >&5
7783   (exit $ac_status); } &&
7784          { ac_try='test -s conftest.$ac_objext'
7785   { (eval echo "$as_me:7785: \"$ac_try\"") >&5
7786   (eval $ac_try) 2>&5
7787   ac_status=$?
7788   echo "$as_me:7788: \$? = $ac_status" >&5
7789   (exit $ac_status); }; }; then
7790   cf_cv_define_sigwinch=yes
7791 else
7792   echo "$as_me: failed program was:" >&5
7793 cat conftest.$ac_ext >&5
7794 cat >conftest.$ac_ext <<_ACEOF
7795 #line 7795 "configure"
7796 #include "confdefs.h"
7797
7798 #undef _XOPEN_SOURCE
7799 #undef _POSIX_SOURCE
7800 #undef _POSIX_C_SOURCE
7801 #include <sys/types.h>
7802 #include <sys/signal.h>
7803
7804 int
7805 main ()
7806 {
7807 int x = SIGWINCH
7808   ;
7809   return 0;
7810 }
7811 _ACEOF
7812 rm -f conftest.$ac_objext
7813 if { (eval echo "$as_me:7813: \"$ac_compile\"") >&5
7814   (eval $ac_compile) 2>&5
7815   ac_status=$?
7816   echo "$as_me:7816: \$? = $ac_status" >&5
7817   (exit $ac_status); } &&
7818          { ac_try='test -s conftest.$ac_objext'
7819   { (eval echo "$as_me:7819: \"$ac_try\"") >&5
7820   (eval $ac_try) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); }; }; then
7824   cf_cv_define_sigwinch=maybe
7825 else
7826   echo "$as_me: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7828 cf_cv_define_sigwinch=no
7829 fi
7830 rm -f conftest.$ac_objext conftest.$ac_ext
7831
7832 fi
7833 rm -f conftest.$ac_objext conftest.$ac_ext
7834
7835 fi
7836 echo "$as_me:7836: result: $cf_cv_define_sigwinch" >&5
7837 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7838
7839 if test "$cf_cv_define_sigwinch" = maybe ; then
7840 echo "$as_me:7840: checking for actual SIGWINCH definition" >&5
7841 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7842 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7843   echo $ECHO_N "(cached) $ECHO_C" >&6
7844 else
7845
7846 cf_cv_fixup_sigwinch=unknown
7847 cf_sigwinch=32
7848 while test $cf_sigwinch != 1
7849 do
7850         cat >conftest.$ac_ext <<_ACEOF
7851 #line 7851 "configure"
7852 #include "confdefs.h"
7853
7854 #undef _XOPEN_SOURCE
7855 #undef _POSIX_SOURCE
7856 #undef _POSIX_C_SOURCE
7857 #include <sys/types.h>
7858 #include <sys/signal.h>
7859
7860 int
7861 main ()
7862 {
7863
7864 #if SIGWINCH != $cf_sigwinch
7865 make an error
7866 #endif
7867 int x = SIGWINCH
7868   ;
7869   return 0;
7870 }
7871 _ACEOF
7872 rm -f conftest.$ac_objext
7873 if { (eval echo "$as_me:7873: \"$ac_compile\"") >&5
7874   (eval $ac_compile) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); } &&
7878          { ac_try='test -s conftest.$ac_objext'
7879   { (eval echo "$as_me:7879: \"$ac_try\"") >&5
7880   (eval $ac_try) 2>&5
7881   ac_status=$?
7882   echo "$as_me:7882: \$? = $ac_status" >&5
7883   (exit $ac_status); }; }; then
7884   cf_cv_fixup_sigwinch=$cf_sigwinch
7885          break
7886 else
7887   echo "$as_me: failed program was:" >&5
7888 cat conftest.$ac_ext >&5
7889 fi
7890 rm -f conftest.$ac_objext conftest.$ac_ext
7891
7892 cf_sigwinch=`expr $cf_sigwinch - 1`
7893 done
7894
7895 fi
7896 echo "$as_me:7896: result: $cf_cv_fixup_sigwinch" >&5
7897 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7898
7899         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7900                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7901         fi
7902 fi
7903
7904 # Checks for CODESET support.
7905
7906   echo "$as_me:7906: checking for nl_langinfo and CODESET" >&5
7907 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7908 if test "${am_cv_langinfo_codeset+set}" = set; then
7909   echo $ECHO_N "(cached) $ECHO_C" >&6
7910 else
7911   cat >conftest.$ac_ext <<_ACEOF
7912 #line 7912 "configure"
7913 #include "confdefs.h"
7914 #include <langinfo.h>
7915 int
7916 main ()
7917 {
7918 char* cs = nl_langinfo(CODESET);
7919   ;
7920   return 0;
7921 }
7922 _ACEOF
7923 rm -f conftest.$ac_objext conftest$ac_exeext
7924 if { (eval echo "$as_me:7924: \"$ac_link\"") >&5
7925   (eval $ac_link) 2>&5
7926   ac_status=$?
7927   echo "$as_me:7927: \$? = $ac_status" >&5
7928   (exit $ac_status); } &&
7929          { ac_try='test -s conftest$ac_exeext'
7930   { (eval echo "$as_me:7930: \"$ac_try\"") >&5
7931   (eval $ac_try) 2>&5
7932   ac_status=$?
7933   echo "$as_me:7933: \$? = $ac_status" >&5
7934   (exit $ac_status); }; }; then
7935   am_cv_langinfo_codeset=yes
7936 else
7937   echo "$as_me: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 am_cv_langinfo_codeset=no
7940 fi
7941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7942
7943 fi
7944 echo "$as_me:7944: result: $am_cv_langinfo_codeset" >&5
7945 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7946   if test $am_cv_langinfo_codeset = yes; then
7947
7948 cat >>confdefs.h <<\EOF
7949 #define HAVE_LANGINFO_CODESET 1
7950 EOF
7951
7952   fi
7953
7954 # use these variables to work around a defect in gcc's fixincludes.
7955 NCURSES_OK_WCHAR_T=
7956 NCURSES_OK_WINT_T=
7957
7958 echo "$as_me:7958: checking if you want wide-character code" >&5
7959 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7960
7961 # Check whether --enable-widec or --disable-widec was given.
7962 if test "${enable_widec+set}" = set; then
7963   enableval="$enable_widec"
7964   with_widec=$enableval
7965 else
7966   with_widec=no
7967 fi;
7968 echo "$as_me:7968: result: $with_widec" >&5
7969 echo "${ECHO_T}$with_widec" >&6
7970 if test "$with_widec" = yes ; then
7971         LIB_SUFFIX="w${LIB_SUFFIX}"
7972         cat >>confdefs.h <<\EOF
7973 #define USE_WIDEC_SUPPORT 1
7974 EOF
7975
7976         case "$CFLAGS $CPPFLAGS" in #(vi
7977         *-D_XOPEN_SOURCE=500) #(vi
7978                 ;;
7979         *)
7980
7981 echo "$as_me:7981: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7982 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7983 cat >conftest.$ac_ext <<_ACEOF
7984 #line 7984 "configure"
7985 #include "confdefs.h"
7986 #include <sys/types.h>
7987
7988 int
7989 main ()
7990 {
7991
7992 #ifndef _XOPEN_SOURCE_EXTENDED
7993 make an error
7994 #endif
7995   ;
7996   return 0;
7997 }
7998 _ACEOF
7999 rm -f conftest.$ac_objext
8000 if { (eval echo "$as_me:8000: \"$ac_compile\"") >&5
8001   (eval $ac_compile) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); } &&
8005          { ac_try='test -s conftest.$ac_objext'
8006   { (eval echo "$as_me:8006: \"$ac_try\"") >&5
8007   (eval $ac_try) 2>&5
8008   ac_status=$?
8009   echo "$as_me:8009: \$? = $ac_status" >&5
8010   (exit $ac_status); }; }; then
8011   cf_result=no
8012 else
8013   echo "$as_me: failed program was:" >&5
8014 cat conftest.$ac_ext >&5
8015 cf_result=yes
8016 fi
8017 rm -f conftest.$ac_objext conftest.$ac_ext
8018 echo "$as_me:8018: result: $cf_result" >&5
8019 echo "${ECHO_T}$cf_result" >&6
8020
8021 if test "$cf_result" = yes ; then
8022         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8023 elif test "x" != "x" ; then
8024         echo "$as_me:8024: checking checking for compatible value versus " >&5
8025 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8026         cat >conftest.$ac_ext <<_ACEOF
8027 #line 8027 "configure"
8028 #include "confdefs.h"
8029 #include <sys/types.h>
8030
8031 int
8032 main ()
8033 {
8034
8035 #if _XOPEN_SOURCE_EXTENDED- < 0
8036 make an error
8037 #endif
8038   ;
8039   return 0;
8040 }
8041 _ACEOF
8042 rm -f conftest.$ac_objext
8043 if { (eval echo "$as_me:8043: \"$ac_compile\"") >&5
8044   (eval $ac_compile) 2>&5
8045   ac_status=$?
8046   echo "$as_me:8046: \$? = $ac_status" >&5
8047   (exit $ac_status); } &&
8048          { ac_try='test -s conftest.$ac_objext'
8049   { (eval echo "$as_me:8049: \"$ac_try\"") >&5
8050   (eval $ac_try) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); }; }; then
8054   cf_result=yes
8055 else
8056   echo "$as_me: failed program was:" >&5
8057 cat conftest.$ac_ext >&5
8058 cf_result=no
8059 fi
8060 rm -f conftest.$ac_objext conftest.$ac_ext
8061         echo "$as_me:8061: result: $cf_result" >&5
8062 echo "${ECHO_T}$cf_result" >&6
8063         if test "$cf_result" = no ; then
8064                 # perhaps we can override it - try...
8065                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8066         fi
8067 fi
8068
8069                 ;;
8070         esac
8071
8072         # with_overwrite=no
8073         NCURSES_CH_T=cchar_t
8074
8075 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8076 do
8077 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8078 echo "$as_me:8078: checking for $ac_func" >&5
8079 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8080 if eval "test \"\${$as_ac_var+set}\" = set"; then
8081   echo $ECHO_N "(cached) $ECHO_C" >&6
8082 else
8083   cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 /* System header to define __stub macros and hopefully few prototypes,
8087     which can conflict with char $ac_func (); below.  */
8088 #include <assert.h>
8089 /* Override any gcc2 internal prototype to avoid an error.  */
8090 #ifdef __cplusplus
8091 extern "C"
8092 #endif
8093 /* We use char because int might match the return type of a gcc2
8094    builtin and then its argument prototype would still apply.  */
8095 char $ac_func ();
8096 char (*f) ();
8097
8098 int
8099 main ()
8100 {
8101 /* The GNU C library defines this for functions which it implements
8102     to always fail with ENOSYS.  Some functions are actually named
8103     something starting with __ and the normal name is an alias.  */
8104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8105 choke me
8106 #else
8107 f = $ac_func;
8108 #endif
8109
8110   ;
8111   return 0;
8112 }
8113 _ACEOF
8114 rm -f conftest.$ac_objext conftest$ac_exeext
8115 if { (eval echo "$as_me:8115: \"$ac_link\"") >&5
8116   (eval $ac_link) 2>&5
8117   ac_status=$?
8118   echo "$as_me:8118: \$? = $ac_status" >&5
8119   (exit $ac_status); } &&
8120          { ac_try='test -s conftest$ac_exeext'
8121   { (eval echo "$as_me:8121: \"$ac_try\"") >&5
8122   (eval $ac_try) 2>&5
8123   ac_status=$?
8124   echo "$as_me:8124: \$? = $ac_status" >&5
8125   (exit $ac_status); }; }; then
8126   eval "$as_ac_var=yes"
8127 else
8128   echo "$as_me: failed program was:" >&5
8129 cat conftest.$ac_ext >&5
8130 eval "$as_ac_var=no"
8131 fi
8132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8133 fi
8134 echo "$as_me:8134: result: `eval echo '${'$as_ac_var'}'`" >&5
8135 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8136 if test `eval echo '${'$as_ac_var'}'` = yes; then
8137   cat >>confdefs.h <<EOF
8138 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8139 EOF
8140
8141 fi
8142 done
8143
8144         if test "$ac_cv_func_putwc" != yes ; then
8145
8146 echo "$as_me:8146: checking for multibyte character support" >&5
8147 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8148 if test "${cf_cv_utf8_lib+set}" = set; then
8149   echo $ECHO_N "(cached) $ECHO_C" >&6
8150 else
8151
8152         cf_save_LIBS="$LIBS"
8153         cat >conftest.$ac_ext <<_ACEOF
8154 #line 8154 "configure"
8155 #include "confdefs.h"
8156
8157 #include <stdlib.h>
8158 int
8159 main ()
8160 {
8161 putwc(0,0);
8162   ;
8163   return 0;
8164 }
8165 _ACEOF
8166 rm -f conftest.$ac_objext conftest$ac_exeext
8167 if { (eval echo "$as_me:8167: \"$ac_link\"") >&5
8168   (eval $ac_link) 2>&5
8169   ac_status=$?
8170   echo "$as_me:8170: \$? = $ac_status" >&5
8171   (exit $ac_status); } &&
8172          { ac_try='test -s conftest$ac_exeext'
8173   { (eval echo "$as_me:8173: \"$ac_try\"") >&5
8174   (eval $ac_try) 2>&5
8175   ac_status=$?
8176   echo "$as_me:8176: \$? = $ac_status" >&5
8177   (exit $ac_status); }; }; then
8178   cf_cv_utf8_lib=yes
8179 else
8180   echo "$as_me: failed program was:" >&5
8181 cat conftest.$ac_ext >&5
8182
8183 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8184 # will be set on completion of the AC_TRY_LINK below.
8185 cf_cv_header_path_utf8=
8186 cf_cv_library_path_utf8=
8187
8188 echo "${as_me:-configure}:8188: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8189
8190 cf_save_LIBS="$LIBS"
8191
8192 cat >conftest.$ac_ext <<_ACEOF
8193 #line 8193 "configure"
8194 #include "confdefs.h"
8195
8196 #include <libutf8.h>
8197 int
8198 main ()
8199 {
8200 putwc(0,0);
8201   ;
8202   return 0;
8203 }
8204 _ACEOF
8205 rm -f conftest.$ac_objext conftest$ac_exeext
8206 if { (eval echo "$as_me:8206: \"$ac_link\"") >&5
8207   (eval $ac_link) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); } &&
8211          { ac_try='test -s conftest$ac_exeext'
8212   { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8213   (eval $ac_try) 2>&5
8214   ac_status=$?
8215   echo "$as_me:8215: \$? = $ac_status" >&5
8216   (exit $ac_status); }; }; then
8217
8218         cf_cv_find_linkage_utf8=yes
8219         cf_cv_header_path_utf8=/usr/include
8220         cf_cv_library_path_utf8=/usr/lib
8221
8222 else
8223   echo "$as_me: failed program was:" >&5
8224 cat conftest.$ac_ext >&5
8225
8226 LIBS="-lutf8  $cf_save_LIBS"
8227
8228 cat >conftest.$ac_ext <<_ACEOF
8229 #line 8229 "configure"
8230 #include "confdefs.h"
8231
8232 #include <libutf8.h>
8233 int
8234 main ()
8235 {
8236 putwc(0,0);
8237   ;
8238   return 0;
8239 }
8240 _ACEOF
8241 rm -f conftest.$ac_objext conftest$ac_exeext
8242 if { (eval echo "$as_me:8242: \"$ac_link\"") >&5
8243   (eval $ac_link) 2>&5
8244   ac_status=$?
8245   echo "$as_me:8245: \$? = $ac_status" >&5
8246   (exit $ac_status); } &&
8247          { ac_try='test -s conftest$ac_exeext'
8248   { (eval echo "$as_me:8248: \"$ac_try\"") >&5
8249   (eval $ac_try) 2>&5
8250   ac_status=$?
8251   echo "$as_me:8251: \$? = $ac_status" >&5
8252   (exit $ac_status); }; }; then
8253
8254         cf_cv_find_linkage_utf8=yes
8255         cf_cv_header_path_utf8=/usr/include
8256         cf_cv_library_path_utf8=/usr/lib
8257         cf_cv_library_file_utf8="-lutf8"
8258
8259 else
8260   echo "$as_me: failed program was:" >&5
8261 cat conftest.$ac_ext >&5
8262
8263         cf_cv_find_linkage_utf8=no
8264         LIBS="$cf_save_LIBS"
8265
8266     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8267
8268 echo "${as_me:-configure}:8268: testing find linkage for utf8 library ..." 1>&5
8269
8270 echo "${as_me:-configure}:8270: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8271
8272     cf_save_CPPFLAGS="$CPPFLAGS"
8273     cf_test_CPPFLAGS="$CPPFLAGS"
8274
8275 cf_search=
8276
8277 # collect the current set of include-directories from compiler flags
8278 cf_header_path_list=""
8279 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8280         for cf_header_path in $CPPFLAGS $CFLAGS
8281         do
8282                 case $cf_header_path in #(vi
8283                 -I*)
8284                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8285
8286 test "$cf_header_path" != "NONE" && \
8287 test -d "$cf_header_path" && \
8288  {
8289         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8290         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8291         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8292         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8293         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8294         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8295 }
8296
8297                         cf_header_path_list="$cf_header_path_list $cf_search"
8298                         ;;
8299                 esac
8300         done
8301 fi
8302
8303 # add the variations for the package we are looking for
8304
8305 cf_search=
8306
8307 test "/usr" != "$prefix" && \
8308 test -d "/usr" && \
8309 (test $prefix = NONE || test "/usr" != "$prefix") && {
8310         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8311         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8312         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8313         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8314         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8315         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8316 }
8317
8318 test "$prefix" != "NONE" && \
8319 test -d "$prefix" && \
8320  {
8321         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8322         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8323         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8324         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8325         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8326         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8327 }
8328
8329 test "/usr/local" != "$prefix" && \
8330 test -d "/usr/local" && \
8331 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8332         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8333         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8334         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8335         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8336         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8337         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8338 }
8339
8340 test "/opt" != "$prefix" && \
8341 test -d "/opt" && \
8342 (test $prefix = NONE || test "/opt" != "$prefix") && {
8343         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8344         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8345         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8346         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8347         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8348         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8349 }
8350
8351 test "$HOME" != "$prefix" && \
8352 test -d "$HOME" && \
8353 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8354         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8355         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8356         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8357         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8358         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8359         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8360 }
8361
8362 test "$includedir" != NONE && \
8363 test "$includedir" != "/usr/include" && \
8364 test -d "$includedir" && {
8365         test -d $includedir &&    cf_search="$cf_search $includedir"
8366         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8367 }
8368
8369 test "$oldincludedir" != NONE && \
8370 test "$oldincludedir" != "/usr/include" && \
8371 test -d "$oldincludedir" && {
8372         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8373         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8374 }
8375
8376 cf_search="$cf_search $cf_header_path_list"
8377
8378     for cf_cv_header_path_utf8 in $cf_search
8379     do
8380       if test -d $cf_cv_header_path_utf8 ; then
8381         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8382
8383 echo "${as_me:-configure}:8383: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8384
8385         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8386         cat >conftest.$ac_ext <<_ACEOF
8387 #line 8387 "configure"
8388 #include "confdefs.h"
8389
8390 #include <libutf8.h>
8391 int
8392 main ()
8393 {
8394 putwc(0,0);
8395   ;
8396   return 0;
8397 }
8398 _ACEOF
8399 rm -f conftest.$ac_objext
8400 if { (eval echo "$as_me:8400: \"$ac_compile\"") >&5
8401   (eval $ac_compile) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); } &&
8405          { ac_try='test -s conftest.$ac_objext'
8406   { (eval echo "$as_me:8406: \"$ac_try\"") >&5
8407   (eval $ac_try) 2>&5
8408   ac_status=$?
8409   echo "$as_me:8409: \$? = $ac_status" >&5
8410   (exit $ac_status); }; }; then
8411
8412             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8413
8414 echo "${as_me:-configure}:8414: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8415
8416             cf_cv_find_linkage_utf8=maybe
8417             cf_test_CPPFLAGS="$CPPFLAGS"
8418             break
8419 else
8420   echo "$as_me: failed program was:" >&5
8421 cat conftest.$ac_ext >&5
8422
8423             CPPFLAGS="$cf_save_CPPFLAGS"
8424
8425 fi
8426 rm -f conftest.$ac_objext conftest.$ac_ext
8427       fi
8428     done
8429
8430     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8431
8432 echo "${as_me:-configure}:8432: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8433
8434       cf_save_LIBS="$LIBS"
8435       cf_save_LDFLAGS="$LDFLAGS"
8436
8437       if test "$cf_cv_find_linkage_utf8" != yes ; then
8438
8439 cf_search=
8440 cf_library_path_list=""
8441 if test -n "${LDFLAGS}${LIBS}" ; then
8442         for cf_library_path in $LDFLAGS $LIBS
8443         do
8444                 case $cf_library_path in #(vi
8445                 -L*)
8446                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8447
8448 test "$cf_library_path" != "NONE" && \
8449 test -d "$cf_library_path" && \
8450  {
8451         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8452         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8453         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8454         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8455         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8456         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8457 }
8458
8459                         cf_library_path_list="$cf_library_path_list $cf_search"
8460                         ;;
8461                 esac
8462         done
8463 fi
8464
8465 cf_search=
8466
8467 test "/usr" != "$prefix" && \
8468 test -d "/usr" && \
8469 (test $prefix = NONE || test "/usr" != "$prefix") && {
8470         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8471         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8472         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8473         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8474         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8475         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8476 }
8477
8478 test "$prefix" != "NONE" && \
8479 test -d "$prefix" && \
8480  {
8481         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8482         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8483         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8484         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8485         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8486         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8487 }
8488
8489 test "/usr/local" != "$prefix" && \
8490 test -d "/usr/local" && \
8491 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8492         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8493         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8494         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8495         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8496         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8497         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8498 }
8499
8500 test "/opt" != "$prefix" && \
8501 test -d "/opt" && \
8502 (test $prefix = NONE || test "/opt" != "$prefix") && {
8503         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8504         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8505         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8506         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8507         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8508         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8509 }
8510
8511 test "$HOME" != "$prefix" && \
8512 test -d "$HOME" && \
8513 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8514         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8515         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8516         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8517         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8518         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8519         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8520 }
8521
8522 cf_search="$cf_library_path_list $cf_search"
8523
8524         for cf_cv_library_path_utf8 in $cf_search
8525         do
8526           if test -d $cf_cv_library_path_utf8 ; then
8527             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8528
8529 echo "${as_me:-configure}:8529: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8530
8531             CPPFLAGS="$cf_test_CPPFLAGS"
8532             LIBS="-lutf8  $cf_save_LIBS"
8533             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8534             cat >conftest.$ac_ext <<_ACEOF
8535 #line 8535 "configure"
8536 #include "confdefs.h"
8537
8538 #include <libutf8.h>
8539 int
8540 main ()
8541 {
8542 putwc(0,0);
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext conftest$ac_exeext
8548 if { (eval echo "$as_me:8548: \"$ac_link\"") >&5
8549   (eval $ac_link) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest$ac_exeext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559
8560                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8561
8562 echo "${as_me:-configure}:8562: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8563
8564                 cf_cv_find_linkage_utf8=yes
8565                 cf_cv_library_file_utf8="-lutf8"
8566                 break
8567 else
8568   echo "$as_me: failed program was:" >&5
8569 cat conftest.$ac_ext >&5
8570
8571                 CPPFLAGS="$cf_save_CPPFLAGS"
8572                 LIBS="$cf_save_LIBS"
8573                 LDFLAGS="$cf_save_LDFLAGS"
8574
8575 fi
8576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8577           fi
8578         done
8579         CPPFLAGS="$cf_save_CPPFLAGS"
8580         LDFLAGS="$cf_save_LDFLAGS"
8581       fi
8582
8583     else
8584       cf_cv_find_linkage_utf8=no
8585     fi
8586
8587 fi
8588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8589
8590 fi
8591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8592
8593 LIBS="$cf_save_LIBS"
8594
8595 if test "$cf_cv_find_linkage_utf8" = yes ; then
8596 cf_cv_utf8_lib=add-on
8597 else
8598 cf_cv_utf8_lib=no
8599 fi
8600
8601 fi
8602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8603 fi
8604 echo "$as_me:8604: result: $cf_cv_utf8_lib" >&5
8605 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8606
8607 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8608 # ncurses/ncursesw:
8609 if test "$cf_cv_utf8_lib" = "add-on" ; then
8610         cat >>confdefs.h <<\EOF
8611 #define HAVE_LIBUTF8_H 1
8612 EOF
8613
8614 if test -n "$cf_cv_header_path_utf8" ; then
8615   for cf_add_incdir in $cf_cv_header_path_utf8
8616   do
8617         while test $cf_add_incdir != /usr/include
8618         do
8619           if test -d $cf_add_incdir
8620           then
8621                 cf_have_incdir=no
8622                 if test -n "$CFLAGS$CPPFLAGS" ; then
8623                   # a loop is needed to ensure we can add subdirs of existing dirs
8624                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8625                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8626                           cf_have_incdir=yes; break
8627                         fi
8628                   done
8629                 fi
8630
8631                 if test "$cf_have_incdir" = no ; then
8632                   if test "$cf_add_incdir" = /usr/local/include ; then
8633                         if test "$GCC" = yes
8634                         then
8635                           cf_save_CPPFLAGS=$CPPFLAGS
8636                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8637                           cat >conftest.$ac_ext <<_ACEOF
8638 #line 8638 "configure"
8639 #include "confdefs.h"
8640 #include <stdio.h>
8641 int
8642 main ()
8643 {
8644 printf("Hello")
8645   ;
8646   return 0;
8647 }
8648 _ACEOF
8649 rm -f conftest.$ac_objext
8650 if { (eval echo "$as_me:8650: \"$ac_compile\"") >&5
8651   (eval $ac_compile) 2>&5
8652   ac_status=$?
8653   echo "$as_me:8653: \$? = $ac_status" >&5
8654   (exit $ac_status); } &&
8655          { ac_try='test -s conftest.$ac_objext'
8656   { (eval echo "$as_me:8656: \"$ac_try\"") >&5
8657   (eval $ac_try) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit $ac_status); }; }; then
8661   :
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 cat conftest.$ac_ext >&5
8665 cf_have_incdir=yes
8666 fi
8667 rm -f conftest.$ac_objext conftest.$ac_ext
8668                           CPPFLAGS=$cf_save_CPPFLAGS
8669                         fi
8670                   fi
8671                 fi
8672
8673                 if test "$cf_have_incdir" = no ; then
8674                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8675
8676 echo "${as_me:-configure}:8676: testing adding $cf_add_incdir to include-path ..." 1>&5
8677
8678                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8679
8680                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8681                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8682                   cf_add_incdir="$cf_top_incdir"
8683                 else
8684                   break
8685                 fi
8686           fi
8687         done
8688   done
8689 fi
8690
8691 if test -n "$cf_cv_library_path_utf8" ; then
8692   for cf_add_libdir in $cf_cv_library_path_utf8
8693   do
8694     if test $cf_add_libdir = /usr/lib ; then
8695       :
8696     elif test -d $cf_add_libdir
8697     then
8698       cf_have_libdir=no
8699       if test -n "$LDFLAGS$LIBS" ; then
8700         # a loop is needed to ensure we can add subdirs of existing dirs
8701         for cf_test_libdir in $LDFLAGS $LIBS ; do
8702           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8703             cf_have_libdir=yes; break
8704           fi
8705         done
8706       fi
8707       if test "$cf_have_libdir" = no ; then
8708         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8709
8710 echo "${as_me:-configure}:8710: testing adding $cf_add_libdir to library-path ..." 1>&5
8711
8712         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8713       fi
8714     fi
8715   done
8716 fi
8717
8718         LIBS="$cf_cv_library_file_utf8 $LIBS"
8719 fi
8720
8721                 if test "$cf_cv_utf8_lib" != no ; then
8722                         NCURSES_LIBUTF8=1
8723                 fi
8724         fi
8725
8726 # This is needed on Tru64 5.0 to declare mbstate_t
8727 echo "$as_me:8727: checking if we must include wchar.h to declare mbstate_t" >&5
8728 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8729 if test "${cf_cv_mbstate_t+set}" = set; then
8730   echo $ECHO_N "(cached) $ECHO_C" >&6
8731 else
8732
8733 cat >conftest.$ac_ext <<_ACEOF
8734 #line 8734 "configure"
8735 #include "confdefs.h"
8736
8737 #include <stdlib.h>
8738 #include <stdarg.h>
8739 #include <stdio.h>
8740 #ifdef HAVE_LIBUTF8_H
8741 #include <libutf8.h>
8742 #endif
8743 int
8744 main ()
8745 {
8746 mbstate_t state
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 rm -f conftest.$ac_objext
8752 if { (eval echo "$as_me:8752: \"$ac_compile\"") >&5
8753   (eval $ac_compile) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); } &&
8757          { ac_try='test -s conftest.$ac_objext'
8758   { (eval echo "$as_me:8758: \"$ac_try\"") >&5
8759   (eval $ac_try) 2>&5
8760   ac_status=$?
8761   echo "$as_me:8761: \$? = $ac_status" >&5
8762   (exit $ac_status); }; }; then
8763   cf_cv_mbstate_t=no
8764 else
8765   echo "$as_me: failed program was:" >&5
8766 cat conftest.$ac_ext >&5
8767 cat >conftest.$ac_ext <<_ACEOF
8768 #line 8768 "configure"
8769 #include "confdefs.h"
8770
8771 #include <stdlib.h>
8772 #include <stdarg.h>
8773 #include <stdio.h>
8774 #include <wchar.h>
8775 #ifdef HAVE_LIBUTF8_H
8776 #include <libutf8.h>
8777 #endif
8778 int
8779 main ()
8780 {
8781 mbstate_t value
8782   ;
8783   return 0;
8784 }
8785 _ACEOF
8786 rm -f conftest.$ac_objext
8787 if { (eval echo "$as_me:8787: \"$ac_compile\"") >&5
8788   (eval $ac_compile) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); } &&
8792          { ac_try='test -s conftest.$ac_objext'
8793   { (eval echo "$as_me:8793: \"$ac_try\"") >&5
8794   (eval $ac_try) 2>&5
8795   ac_status=$?
8796   echo "$as_me:8796: \$? = $ac_status" >&5
8797   (exit $ac_status); }; }; then
8798   cf_cv_mbstate_t=yes
8799 else
8800   echo "$as_me: failed program was:" >&5
8801 cat conftest.$ac_ext >&5
8802 cf_cv_mbstate_t=unknown
8803 fi
8804 rm -f conftest.$ac_objext conftest.$ac_ext
8805 fi
8806 rm -f conftest.$ac_objext conftest.$ac_ext
8807 fi
8808 echo "$as_me:8808: result: $cf_cv_mbstate_t" >&5
8809 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8810
8811 if test "$cf_cv_mbstate_t" = yes ; then
8812         cat >>confdefs.h <<\EOF
8813 #define NEED_WCHAR_H 1
8814 EOF
8815
8816         NEED_WCHAR_H=1
8817 fi
8818
8819 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8820 if test "$cf_cv_mbstate_t" = unknown ; then
8821         NCURSES_MBSTATE_T=1
8822 fi
8823
8824 # This is needed on Tru64 5.0 to declare wchar_t
8825 echo "$as_me:8825: checking if we must include wchar.h to declare wchar_t" >&5
8826 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8827 if test "${cf_cv_wchar_t+set}" = set; then
8828   echo $ECHO_N "(cached) $ECHO_C" >&6
8829 else
8830
8831 cat >conftest.$ac_ext <<_ACEOF
8832 #line 8832 "configure"
8833 #include "confdefs.h"
8834
8835 #include <stdlib.h>
8836 #include <stdarg.h>
8837 #include <stdio.h>
8838 #ifdef HAVE_LIBUTF8_H
8839 #include <libutf8.h>
8840 #endif
8841 int
8842 main ()
8843 {
8844 wchar_t state
8845   ;
8846   return 0;
8847 }
8848 _ACEOF
8849 rm -f conftest.$ac_objext
8850 if { (eval echo "$as_me:8850: \"$ac_compile\"") >&5
8851   (eval $ac_compile) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); } &&
8855          { ac_try='test -s conftest.$ac_objext'
8856   { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857   (eval $ac_try) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); }; }; then
8861   cf_cv_wchar_t=no
8862 else
8863   echo "$as_me: failed program was:" >&5
8864 cat conftest.$ac_ext >&5
8865 cat >conftest.$ac_ext <<_ACEOF
8866 #line 8866 "configure"
8867 #include "confdefs.h"
8868
8869 #include <stdlib.h>
8870 #include <stdarg.h>
8871 #include <stdio.h>
8872 #include <wchar.h>
8873 #ifdef HAVE_LIBUTF8_H
8874 #include <libutf8.h>
8875 #endif
8876 int
8877 main ()
8878 {
8879 wchar_t value
8880   ;
8881   return 0;
8882 }
8883 _ACEOF
8884 rm -f conftest.$ac_objext
8885 if { (eval echo "$as_me:8885: \"$ac_compile\"") >&5
8886   (eval $ac_compile) 2>&5
8887   ac_status=$?
8888   echo "$as_me:8888: \$? = $ac_status" >&5
8889   (exit $ac_status); } &&
8890          { ac_try='test -s conftest.$ac_objext'
8891   { (eval echo "$as_me:8891: \"$ac_try\"") >&5
8892   (eval $ac_try) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); }; }; then
8896   cf_cv_wchar_t=yes
8897 else
8898   echo "$as_me: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 cf_cv_wchar_t=unknown
8901 fi
8902 rm -f conftest.$ac_objext conftest.$ac_ext
8903 fi
8904 rm -f conftest.$ac_objext conftest.$ac_ext
8905 fi
8906 echo "$as_me:8906: result: $cf_cv_wchar_t" >&5
8907 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8908
8909 if test "$cf_cv_wchar_t" = yes ; then
8910         cat >>confdefs.h <<\EOF
8911 #define NEED_WCHAR_H 1
8912 EOF
8913
8914         NEED_WCHAR_H=1
8915 fi
8916
8917 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8918 if test "$cf_cv_wchar_t" = unknown ; then
8919         NCURSES_WCHAR_T=1
8920 fi
8921
8922 # if we find wchar_t in either place, use substitution to provide a fallback.
8923 if test "$cf_cv_wchar_t" != unknown ; then
8924         NCURSES_OK_WCHAR_T=1
8925 fi
8926
8927 # This is needed on Tru64 5.0 to declare wint_t
8928 echo "$as_me:8928: checking if we must include wchar.h to declare wint_t" >&5
8929 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8930 if test "${cf_cv_wint_t+set}" = set; then
8931   echo $ECHO_N "(cached) $ECHO_C" >&6
8932 else
8933
8934 cat >conftest.$ac_ext <<_ACEOF
8935 #line 8935 "configure"
8936 #include "confdefs.h"
8937
8938 #include <stdlib.h>
8939 #include <stdarg.h>
8940 #include <stdio.h>
8941 #ifdef HAVE_LIBUTF8_H
8942 #include <libutf8.h>
8943 #endif
8944 int
8945 main ()
8946 {
8947 wint_t state
8948   ;
8949   return 0;
8950 }
8951 _ACEOF
8952 rm -f conftest.$ac_objext
8953 if { (eval echo "$as_me:8953: \"$ac_compile\"") >&5
8954   (eval $ac_compile) 2>&5
8955   ac_status=$?
8956   echo "$as_me:8956: \$? = $ac_status" >&5
8957   (exit $ac_status); } &&
8958          { ac_try='test -s conftest.$ac_objext'
8959   { (eval echo "$as_me:8959: \"$ac_try\"") >&5
8960   (eval $ac_try) 2>&5
8961   ac_status=$?
8962   echo "$as_me:8962: \$? = $ac_status" >&5
8963   (exit $ac_status); }; }; then
8964   cf_cv_wint_t=no
8965 else
8966   echo "$as_me: failed program was:" >&5
8967 cat conftest.$ac_ext >&5
8968 cat >conftest.$ac_ext <<_ACEOF
8969 #line 8969 "configure"
8970 #include "confdefs.h"
8971
8972 #include <stdlib.h>
8973 #include <stdarg.h>
8974 #include <stdio.h>
8975 #include <wchar.h>
8976 #ifdef HAVE_LIBUTF8_H
8977 #include <libutf8.h>
8978 #endif
8979 int
8980 main ()
8981 {
8982 wint_t value
8983   ;
8984   return 0;
8985 }
8986 _ACEOF
8987 rm -f conftest.$ac_objext
8988 if { (eval echo "$as_me:8988: \"$ac_compile\"") >&5
8989   (eval $ac_compile) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); } &&
8993          { ac_try='test -s conftest.$ac_objext'
8994   { (eval echo "$as_me:8994: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:8997: \$? = $ac_status" >&5
8998   (exit $ac_status); }; }; then
8999   cf_cv_wint_t=yes
9000 else
9001   echo "$as_me: failed program was:" >&5
9002 cat conftest.$ac_ext >&5
9003 cf_cv_wint_t=unknown
9004 fi
9005 rm -f conftest.$ac_objext conftest.$ac_ext
9006 fi
9007 rm -f conftest.$ac_objext conftest.$ac_ext
9008 fi
9009 echo "$as_me:9009: result: $cf_cv_wint_t" >&5
9010 echo "${ECHO_T}$cf_cv_wint_t" >&6
9011
9012 if test "$cf_cv_wint_t" = yes ; then
9013         cat >>confdefs.h <<\EOF
9014 #define NEED_WCHAR_H 1
9015 EOF
9016
9017         NEED_WCHAR_H=1
9018 fi
9019
9020 # if we do not find wint_t in either place, use substitution to provide a fallback.
9021 if test "$cf_cv_wint_t" = unknown ; then
9022         NCURSES_WINT_T=1
9023 fi
9024
9025 # if we find wint_t in either place, use substitution to provide a fallback.
9026 if test "$cf_cv_wint_t" != unknown ; then
9027         NCURSES_OK_WINT_T=1
9028 fi
9029
9030         if test "$NCURSES_MBSTATE_T" != 0; then
9031                 cat >>confdefs.h <<\EOF
9032 #define NEED_MBSTATE_T_DEF 1
9033 EOF
9034
9035         fi
9036 fi
9037
9038 ###   use option --disable-lp64 to allow long chtype
9039 case $cf_cv_abi_version in
9040 [345]*)
9041         default_with_lp64=no
9042         ;;
9043 *)
9044         default_with_lp64=yes
9045         ;;
9046 esac
9047
9048 echo "$as_me:9048: checking whether to enable _LP64 definition in curses.h" >&5
9049 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9050
9051 # Check whether --enable-lp64 or --disable-lp64 was given.
9052 if test "${enable_lp64+set}" = set; then
9053   enableval="$enable_lp64"
9054   with_lp64=$enableval
9055 else
9056   with_lp64=$default_with_lp64
9057 fi;
9058 echo "$as_me:9058: result: $with_lp64" >&5
9059 echo "${ECHO_T}$with_lp64" >&6
9060
9061 if test "$with_lp64" = yes ; then
9062         cf_cv_enable_lp64=1
9063 else
9064         cf_cv_enable_lp64=0
9065 fi
9066
9067 # Check whether --enable-largefile or --disable-largefile was given.
9068 if test "${enable_largefile+set}" = set; then
9069   enableval="$enable_largefile"
9070
9071 fi;
9072 if test "$enable_largefile" != no; then
9073
9074   echo "$as_me:9074: checking for special C compiler options needed for large files" >&5
9075 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9076 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9077   echo $ECHO_N "(cached) $ECHO_C" >&6
9078 else
9079   ac_cv_sys_largefile_CC=no
9080      if test "$GCC" != yes; then
9081        ac_save_CC=$CC
9082        while :; do
9083          # IRIX 6.2 and later do not support large files by default,
9084          # so use the C compiler's -n32 option if that helps.
9085          cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088 #include <sys/types.h>
9089  /* Check that off_t can represent 2**63 - 1 correctly.
9090     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9091     since some C++ compilers masquerading as C compilers
9092     incorrectly reject 9223372036854775807.  */
9093 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9094   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9095                        && LARGE_OFF_T % 2147483647 == 1)
9096                       ? 1 : -1];
9097 int
9098 main ()
9099 {
9100
9101   ;
9102   return 0;
9103 }
9104 _ACEOF
9105          rm -f conftest.$ac_objext
9106 if { (eval echo "$as_me:9106: \"$ac_compile\"") >&5
9107   (eval $ac_compile) 2>&5
9108   ac_status=$?
9109   echo "$as_me:9109: \$? = $ac_status" >&5
9110   (exit $ac_status); } &&
9111          { ac_try='test -s conftest.$ac_objext'
9112   { (eval echo "$as_me:9112: \"$ac_try\"") >&5
9113   (eval $ac_try) 2>&5
9114   ac_status=$?
9115   echo "$as_me:9115: \$? = $ac_status" >&5
9116   (exit $ac_status); }; }; then
9117   break
9118 else
9119   echo "$as_me: failed program was:" >&5
9120 cat conftest.$ac_ext >&5
9121 fi
9122 rm -f conftest.$ac_objext
9123          CC="$CC -n32"
9124          rm -f conftest.$ac_objext
9125 if { (eval echo "$as_me:9125: \"$ac_compile\"") >&5
9126   (eval $ac_compile) 2>&5
9127   ac_status=$?
9128   echo "$as_me:9128: \$? = $ac_status" >&5
9129   (exit $ac_status); } &&
9130          { ac_try='test -s conftest.$ac_objext'
9131   { (eval echo "$as_me:9131: \"$ac_try\"") >&5
9132   (eval $ac_try) 2>&5
9133   ac_status=$?
9134   echo "$as_me:9134: \$? = $ac_status" >&5
9135   (exit $ac_status); }; }; then
9136   ac_cv_sys_largefile_CC=' -n32'; break
9137 else
9138   echo "$as_me: failed program was:" >&5
9139 cat conftest.$ac_ext >&5
9140 fi
9141 rm -f conftest.$ac_objext
9142          break
9143        done
9144        CC=$ac_save_CC
9145        rm -f conftest.$ac_ext
9146     fi
9147 fi
9148 echo "$as_me:9148: result: $ac_cv_sys_largefile_CC" >&5
9149 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9150   if test "$ac_cv_sys_largefile_CC" != no; then
9151     CC=$CC$ac_cv_sys_largefile_CC
9152   fi
9153
9154   echo "$as_me:9154: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9155 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9156 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9157   echo $ECHO_N "(cached) $ECHO_C" >&6
9158 else
9159   while :; do
9160   ac_cv_sys_file_offset_bits=no
9161   cat >conftest.$ac_ext <<_ACEOF
9162 #line 9162 "configure"
9163 #include "confdefs.h"
9164 #include <sys/types.h>
9165  /* Check that off_t can represent 2**63 - 1 correctly.
9166     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9167     since some C++ compilers masquerading as C compilers
9168     incorrectly reject 9223372036854775807.  */
9169 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9170   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9171                        && LARGE_OFF_T % 2147483647 == 1)
9172                       ? 1 : -1];
9173 int
9174 main ()
9175 {
9176
9177   ;
9178   return 0;
9179 }
9180 _ACEOF
9181 rm -f conftest.$ac_objext
9182 if { (eval echo "$as_me:9182: \"$ac_compile\"") >&5
9183   (eval $ac_compile) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit $ac_status); } &&
9187          { ac_try='test -s conftest.$ac_objext'
9188   { (eval echo "$as_me:9188: \"$ac_try\"") >&5
9189   (eval $ac_try) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); }; }; then
9193   break
9194 else
9195   echo "$as_me: failed program was:" >&5
9196 cat conftest.$ac_ext >&5
9197 fi
9198 rm -f conftest.$ac_objext conftest.$ac_ext
9199   cat >conftest.$ac_ext <<_ACEOF
9200 #line 9200 "configure"
9201 #include "confdefs.h"
9202 #define _FILE_OFFSET_BITS 64
9203 #include <sys/types.h>
9204  /* Check that off_t can represent 2**63 - 1 correctly.
9205     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9206     since some C++ compilers masquerading as C compilers
9207     incorrectly reject 9223372036854775807.  */
9208 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9209   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9210                        && LARGE_OFF_T % 2147483647 == 1)
9211                       ? 1 : -1];
9212 int
9213 main ()
9214 {
9215
9216   ;
9217   return 0;
9218 }
9219 _ACEOF
9220 rm -f conftest.$ac_objext
9221 if { (eval echo "$as_me:9221: \"$ac_compile\"") >&5
9222   (eval $ac_compile) 2>&5
9223   ac_status=$?
9224   echo "$as_me:9224: \$? = $ac_status" >&5
9225   (exit $ac_status); } &&
9226          { ac_try='test -s conftest.$ac_objext'
9227   { (eval echo "$as_me:9227: \"$ac_try\"") >&5
9228   (eval $ac_try) 2>&5
9229   ac_status=$?
9230   echo "$as_me:9230: \$? = $ac_status" >&5
9231   (exit $ac_status); }; }; then
9232   ac_cv_sys_file_offset_bits=64; break
9233 else
9234   echo "$as_me: failed program was:" >&5
9235 cat conftest.$ac_ext >&5
9236 fi
9237 rm -f conftest.$ac_objext conftest.$ac_ext
9238   break
9239 done
9240 fi
9241 echo "$as_me:9241: result: $ac_cv_sys_file_offset_bits" >&5
9242 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9243 if test "$ac_cv_sys_file_offset_bits" != no; then
9244
9245 cat >>confdefs.h <<EOF
9246 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9247 EOF
9248
9249 fi
9250 rm -rf conftest*
9251   echo "$as_me:9251: checking for _LARGE_FILES value needed for large files" >&5
9252 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9253 if test "${ac_cv_sys_large_files+set}" = set; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256   while :; do
9257   ac_cv_sys_large_files=no
9258   cat >conftest.$ac_ext <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <sys/types.h>
9262  /* Check that off_t can represent 2**63 - 1 correctly.
9263     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9264     since some C++ compilers masquerading as C compilers
9265     incorrectly reject 9223372036854775807.  */
9266 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9267   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9268                        && LARGE_OFF_T % 2147483647 == 1)
9269                       ? 1 : -1];
9270 int
9271 main ()
9272 {
9273
9274   ;
9275   return 0;
9276 }
9277 _ACEOF
9278 rm -f conftest.$ac_objext
9279 if { (eval echo "$as_me:9279: \"$ac_compile\"") >&5
9280   (eval $ac_compile) 2>&5
9281   ac_status=$?
9282   echo "$as_me:9282: \$? = $ac_status" >&5
9283   (exit $ac_status); } &&
9284          { ac_try='test -s conftest.$ac_objext'
9285   { (eval echo "$as_me:9285: \"$ac_try\"") >&5
9286   (eval $ac_try) 2>&5
9287   ac_status=$?
9288   echo "$as_me:9288: \$? = $ac_status" >&5
9289   (exit $ac_status); }; }; then
9290   break
9291 else
9292   echo "$as_me: failed program was:" >&5
9293 cat conftest.$ac_ext >&5
9294 fi
9295 rm -f conftest.$ac_objext conftest.$ac_ext
9296   cat >conftest.$ac_ext <<_ACEOF
9297 #line 9297 "configure"
9298 #include "confdefs.h"
9299 #define _LARGE_FILES 1
9300 #include <sys/types.h>
9301  /* Check that off_t can represent 2**63 - 1 correctly.
9302     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9303     since some C++ compilers masquerading as C compilers
9304     incorrectly reject 9223372036854775807.  */
9305 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9306   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9307                        && LARGE_OFF_T % 2147483647 == 1)
9308                       ? 1 : -1];
9309 int
9310 main ()
9311 {
9312
9313   ;
9314   return 0;
9315 }
9316 _ACEOF
9317 rm -f conftest.$ac_objext
9318 if { (eval echo "$as_me:9318: \"$ac_compile\"") >&5
9319   (eval $ac_compile) 2>&5
9320   ac_status=$?
9321   echo "$as_me:9321: \$? = $ac_status" >&5
9322   (exit $ac_status); } &&
9323          { ac_try='test -s conftest.$ac_objext'
9324   { (eval echo "$as_me:9324: \"$ac_try\"") >&5
9325   (eval $ac_try) 2>&5
9326   ac_status=$?
9327   echo "$as_me:9327: \$? = $ac_status" >&5
9328   (exit $ac_status); }; }; then
9329   ac_cv_sys_large_files=1; break
9330 else
9331   echo "$as_me: failed program was:" >&5
9332 cat conftest.$ac_ext >&5
9333 fi
9334 rm -f conftest.$ac_objext conftest.$ac_ext
9335   break
9336 done
9337 fi
9338 echo "$as_me:9338: result: $ac_cv_sys_large_files" >&5
9339 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9340 if test "$ac_cv_sys_large_files" != no; then
9341
9342 cat >>confdefs.h <<EOF
9343 #define _LARGE_FILES $ac_cv_sys_large_files
9344 EOF
9345
9346 fi
9347 rm -rf conftest*
9348 fi
9349
9350     if test "$enable_largefile" != no ; then
9351         echo "$as_me:9351: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9352 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9353 if test "${ac_cv_sys_largefile_source+set}" = set; then
9354   echo $ECHO_N "(cached) $ECHO_C" >&6
9355 else
9356   while :; do
9357   ac_cv_sys_largefile_source=no
9358   cat >conftest.$ac_ext <<_ACEOF
9359 #line 9359 "configure"
9360 #include "confdefs.h"
9361 #include <stdio.h>
9362 int
9363 main ()
9364 {
9365 return !fseeko;
9366   ;
9367   return 0;
9368 }
9369 _ACEOF
9370 rm -f conftest.$ac_objext
9371 if { (eval echo "$as_me:9371: \"$ac_compile\"") >&5
9372   (eval $ac_compile) 2>&5
9373   ac_status=$?
9374   echo "$as_me:9374: \$? = $ac_status" >&5
9375   (exit $ac_status); } &&
9376          { ac_try='test -s conftest.$ac_objext'
9377   { (eval echo "$as_me:9377: \"$ac_try\"") >&5
9378   (eval $ac_try) 2>&5
9379   ac_status=$?
9380   echo "$as_me:9380: \$? = $ac_status" >&5
9381   (exit $ac_status); }; }; then
9382   break
9383 else
9384   echo "$as_me: failed program was:" >&5
9385 cat conftest.$ac_ext >&5
9386 fi
9387 rm -f conftest.$ac_objext conftest.$ac_ext
9388   cat >conftest.$ac_ext <<_ACEOF
9389 #line 9389 "configure"
9390 #include "confdefs.h"
9391 #define _LARGEFILE_SOURCE 1
9392 #include <stdio.h>
9393 int
9394 main ()
9395 {
9396 return !fseeko;
9397   ;
9398   return 0;
9399 }
9400 _ACEOF
9401 rm -f conftest.$ac_objext
9402 if { (eval echo "$as_me:9402: \"$ac_compile\"") >&5
9403   (eval $ac_compile) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); } &&
9407          { ac_try='test -s conftest.$ac_objext'
9408   { (eval echo "$as_me:9408: \"$ac_try\"") >&5
9409   (eval $ac_try) 2>&5
9410   ac_status=$?
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit $ac_status); }; }; then
9413   ac_cv_sys_largefile_source=1; break
9414 else
9415   echo "$as_me: failed program was:" >&5
9416 cat conftest.$ac_ext >&5
9417 fi
9418 rm -f conftest.$ac_objext conftest.$ac_ext
9419   break
9420 done
9421 fi
9422 echo "$as_me:9422: result: $ac_cv_sys_largefile_source" >&5
9423 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9424 if test "$ac_cv_sys_largefile_source" != no; then
9425
9426 cat >>confdefs.h <<EOF
9427 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9428 EOF
9429
9430 fi
9431 rm -rf conftest*
9432
9433 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9434 # in glibc 2.1.3, but that breaks too many other things.
9435 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9436 echo "$as_me:9436: checking for fseeko" >&5
9437 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9438 if test "${ac_cv_func_fseeko+set}" = set; then
9439   echo $ECHO_N "(cached) $ECHO_C" >&6
9440 else
9441   cat >conftest.$ac_ext <<_ACEOF
9442 #line 9442 "configure"
9443 #include "confdefs.h"
9444 #include <stdio.h>
9445 int
9446 main ()
9447 {
9448 return fseeko && fseeko (stdin, 0, 0);
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 rm -f conftest.$ac_objext conftest$ac_exeext
9454 if { (eval echo "$as_me:9454: \"$ac_link\"") >&5
9455   (eval $ac_link) 2>&5
9456   ac_status=$?
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit $ac_status); } &&
9459          { ac_try='test -s conftest$ac_exeext'
9460   { (eval echo "$as_me:9460: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); }; }; then
9465   ac_cv_func_fseeko=yes
9466 else
9467   echo "$as_me: failed program was:" >&5
9468 cat conftest.$ac_ext >&5
9469 ac_cv_func_fseeko=no
9470 fi
9471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9472 fi
9473 echo "$as_me:9473: result: $ac_cv_func_fseeko" >&5
9474 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9475 if test $ac_cv_func_fseeko = yes; then
9476
9477 cat >>confdefs.h <<\EOF
9478 #define HAVE_FSEEKO 1
9479 EOF
9480
9481 fi
9482
9483         # Normally we would collect these definitions in the config.h,
9484         # but (like _XOPEN_SOURCE), some environments rely on having these
9485         # defined before any of the system headers are included.  Another
9486         # case comes up with C++, e.g., on AIX the compiler compiles the
9487         # header files by themselves before looking at the body files it is
9488         # told to compile.  For ncurses, those header files do not include
9489         # the config.h
9490         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9491         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9492         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9493
9494         echo "$as_me:9494: checking whether to use struct dirent64" >&5
9495 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9496 if test "${cf_cv_struct_dirent64+set}" = set; then
9497   echo $ECHO_N "(cached) $ECHO_C" >&6
9498 else
9499
9500                 cat >conftest.$ac_ext <<_ACEOF
9501 #line 9501 "configure"
9502 #include "confdefs.h"
9503
9504 #include <sys/types.h>
9505 #include <dirent.h>
9506
9507 int
9508 main ()
9509 {
9510
9511                 /* if transitional largefile support is setup, this is true */
9512                 extern struct dirent64 * readdir(DIR *);
9513                 struct dirent64 *x = readdir((DIR *)0);
9514                 struct dirent *y = readdir((DIR *)0);
9515                 int z = x - y;
9516
9517   ;
9518   return 0;
9519 }
9520 _ACEOF
9521 rm -f conftest.$ac_objext
9522 if { (eval echo "$as_me:9522: \"$ac_compile\"") >&5
9523   (eval $ac_compile) 2>&5
9524   ac_status=$?
9525   echo "$as_me:9525: \$? = $ac_status" >&5
9526   (exit $ac_status); } &&
9527          { ac_try='test -s conftest.$ac_objext'
9528   { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9529   (eval $ac_try) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit $ac_status); }; }; then
9533   cf_cv_struct_dirent64=yes
9534 else
9535   echo "$as_me: failed program was:" >&5
9536 cat conftest.$ac_ext >&5
9537 cf_cv_struct_dirent64=no
9538 fi
9539 rm -f conftest.$ac_objext conftest.$ac_ext
9540
9541 fi
9542 echo "$as_me:9542: result: $cf_cv_struct_dirent64" >&5
9543 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9544         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9545 #define HAVE_STRUCT_DIRENT64 1
9546 EOF
9547
9548     fi
9549
9550 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9551 echo "$as_me:9551: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9552 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9553
9554 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9555 if test "${enable_tparm_varargs+set}" = set; then
9556   enableval="$enable_tparm_varargs"
9557   with_tparm_varargs=$enableval
9558 else
9559   with_tparm_varargs=yes
9560 fi;
9561 echo "$as_me:9561: result: $with_tparm_varargs" >&5
9562 echo "${ECHO_T}$with_tparm_varargs" >&6
9563 NCURSES_TPARM_VARARGS=0
9564 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9565
9566 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9567 if test "$with_ticlib" != no ; then
9568 echo "$as_me:9568: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9569 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9570
9571 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9572 if test "${enable_tic_depends+set}" = set; then
9573   enableval="$enable_tic_depends"
9574   with_tic_depends=$enableval
9575 else
9576   with_tic_depends=yes
9577 fi;
9578 echo "$as_me:9578: result: $with_tic_depends" >&5
9579 echo "${ECHO_T}$with_tic_depends" >&6
9580 else
9581         with_tic_depends=no
9582 fi
9583
9584 ###   use option --with-bool to override bool's type
9585 echo "$as_me:9585: checking for type of bool" >&5
9586 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9587
9588 # Check whether --with-bool or --without-bool was given.
9589 if test "${with_bool+set}" = set; then
9590   withval="$with_bool"
9591   NCURSES_BOOL="$withval"
9592 else
9593   NCURSES_BOOL=auto
9594 fi;
9595 echo "$as_me:9595: result: $NCURSES_BOOL" >&5
9596 echo "${ECHO_T}$NCURSES_BOOL" >&6
9597
9598 echo "$as_me:9598: checking for alternate terminal capabilities file" >&5
9599 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9600
9601 # Check whether --with-caps or --without-caps was given.
9602 if test "${with_caps+set}" = set; then
9603   withval="$with_caps"
9604   TERMINFO_CAPS=Caps.$withval
9605 else
9606   TERMINFO_CAPS=Caps
9607 fi;
9608 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9609 echo "$as_me:9609: result: $TERMINFO_CAPS" >&5
9610 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9611
9612 ###   use option --with-chtype to override chtype's type
9613 echo "$as_me:9613: checking for type of chtype" >&5
9614 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9615
9616 # Check whether --with-chtype or --without-chtype was given.
9617 if test "${with_chtype+set}" = set; then
9618   withval="$with_chtype"
9619   NCURSES_CHTYPE="$withval"
9620 else
9621   NCURSES_CHTYPE=auto
9622 fi;
9623 echo "$as_me:9623: result: $NCURSES_CHTYPE" >&5
9624 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9625
9626 ###   use option --with-ospeed to override ospeed's type
9627 echo "$as_me:9627: checking for type of ospeed" >&5
9628 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9629
9630 # Check whether --with-ospeed or --without-ospeed was given.
9631 if test "${with_ospeed+set}" = set; then
9632   withval="$with_ospeed"
9633   NCURSES_OSPEED="$withval"
9634 else
9635   NCURSES_OSPEED=short
9636 fi;
9637 echo "$as_me:9637: result: $NCURSES_OSPEED" >&5
9638 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9639
9640 ###   use option --with-mmask-t to override mmask_t's type
9641 echo "$as_me:9641: checking for type of mmask_t" >&5
9642 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9643
9644 # Check whether --with-mmask-t or --without-mmask-t was given.
9645 if test "${with_mmask_t+set}" = set; then
9646   withval="$with_mmask_t"
9647   NCURSES_MMASK_T="$withval"
9648 else
9649   NCURSES_MMASK_T=auto
9650 fi;
9651 echo "$as_me:9651: result: $NCURSES_MMASK_T" >&5
9652 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9653
9654 ###   use option --with-ccharw-max to override CCHARW_MAX size
9655 echo "$as_me:9655: checking for size CCHARW_MAX" >&5
9656 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9657
9658 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9659 if test "${with_ccharw_max+set}" = set; then
9660   withval="$with_ccharw_max"
9661   NCURSES_CCHARW_MAX="$withval"
9662 else
9663   NCURSES_CCHARW_MAX=5
9664 fi;
9665 echo "$as_me:9665: result: $NCURSES_CCHARW_MAX" >&5
9666 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9667
9668 ### Enable compiling-in rcs id's
9669 echo "$as_me:9669: checking if RCS identifiers should be compiled-in" >&5
9670 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9671
9672 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9673 if test "${with_rcs_ids+set}" = set; then
9674   withval="$with_rcs_ids"
9675   with_rcs_ids=$withval
9676 else
9677   with_rcs_ids=no
9678 fi;
9679 echo "$as_me:9679: result: $with_rcs_ids" >&5
9680 echo "${ECHO_T}$with_rcs_ids" >&6
9681 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9682 #define USE_RCS_IDS 1
9683 EOF
9684
9685 ###############################################################################
9686
9687 echo "$as_me:9687: checking format of man-pages" >&5
9688 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9689
9690 # Check whether --with-manpage-format or --without-manpage-format was given.
9691 if test "${with_manpage_format+set}" = set; then
9692   withval="$with_manpage_format"
9693   MANPAGE_FORMAT=$withval
9694 else
9695   MANPAGE_FORMAT=unknown
9696 fi;
9697
9698 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9699 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9700
9701 cf_unknown=
9702
9703 case $MANPAGE_FORMAT in
9704 unknown)
9705   if test -z "$MANPATH" ; then
9706     MANPATH="/usr/man:/usr/share/man"
9707   fi
9708
9709   # look for the 'date' man-page (it's most likely to be installed!)
9710   MANPAGE_FORMAT=
9711   cf_preform=no
9712   cf_catonly=yes
9713   cf_example=date
9714
9715   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9716   for cf_dir in $MANPATH; do
9717     test -z "$cf_dir" && cf_dir=/usr/man
9718     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
9719     do
9720       cf_test=`echo $cf_name | sed -e 's/*//'`
9721       if test "x$cf_test" = "x$cf_name" ; then
9722
9723         case "$cf_name" in
9724         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9725         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9726         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9727         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9728         esac
9729
9730         case "$cf_name" in
9731         $cf_dir/man*)
9732           cf_catonly=no
9733           ;;
9734         $cf_dir/cat*)
9735           cf_preform=yes
9736           ;;
9737         esac
9738         break
9739       fi
9740
9741       # if we found a match in either man* or cat*, stop looking
9742       if test -n "$MANPAGE_FORMAT" ; then
9743         cf_found=no
9744         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9745         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9746         case "$cf_name" in
9747         $cf_dir/cat*)
9748           cf_found=yes
9749           ;;
9750         esac
9751         test $cf_found=yes && break
9752       fi
9753     done
9754     # only check the first directory in $MANPATH where we find manpages
9755     if test -n "$MANPAGE_FORMAT" ; then
9756        break
9757     fi
9758   done
9759   # if we did not find the example, just assume it is normal
9760   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9761   IFS="$ac_save_ifs"
9762   ;;
9763 *)
9764   for cf_option in $MANPAGE_FORMAT; do
9765      case $cf_option in #(vi
9766      gzip|compress|BSDI|normal|formatted|catonly)
9767        ;;
9768      *)
9769        cf_unknown="$cf_unknown $cf_option"
9770        ;;
9771      esac
9772   done
9773   ;;
9774 esac
9775
9776 echo "$as_me:9776: result: $MANPAGE_FORMAT" >&5
9777 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9778 if test -n "$cf_unknown" ; then
9779   { echo "$as_me:9779: WARNING: Unexpected manpage-format $cf_unknown" >&5
9780 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9781 fi
9782
9783 echo "$as_me:9783: checking for manpage renaming" >&5
9784 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9785
9786 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9787 if test "${with_manpage_renames+set}" = set; then
9788   withval="$with_manpage_renames"
9789   MANPAGE_RENAMES=$withval
9790 else
9791   MANPAGE_RENAMES=yes
9792 fi;
9793
9794 case ".$MANPAGE_RENAMES" in #(vi
9795 .no) #(vi
9796   ;;
9797 .|.yes)
9798   # Debian 'man' program?
9799   if test -f /etc/debian_version ; then
9800     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9801   else
9802     MANPAGE_RENAMES=no
9803   fi
9804   ;;
9805 esac
9806
9807 if test "$MANPAGE_RENAMES" != no ; then
9808   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9809     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9810   elif test ! -f $MANPAGE_RENAMES ; then
9811     { { echo "$as_me:9811: error: not a filename: $MANPAGE_RENAMES" >&5
9812 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9813    { (exit 1); exit 1; }; }
9814   fi
9815
9816   test ! -d man && mkdir man
9817
9818   # Construct a sed-script to perform renaming within man-pages
9819   if test -n "$MANPAGE_RENAMES" ; then
9820     test ! -d man && mkdir man
9821     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9822   fi
9823 fi
9824
9825 echo "$as_me:9825: result: $MANPAGE_RENAMES" >&5
9826 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9827
9828 echo "$as_me:9828: checking if manpage aliases will be installed" >&5
9829 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9830
9831 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9832 if test "${with_manpage_aliases+set}" = set; then
9833   withval="$with_manpage_aliases"
9834   MANPAGE_ALIASES=$withval
9835 else
9836   MANPAGE_ALIASES=yes
9837 fi;
9838
9839 echo "$as_me:9839: result: $MANPAGE_ALIASES" >&5
9840 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9841
9842 case "x$LN_S" in #(vi
9843 xln*) #(vi
9844         cf_use_symlinks=yes
9845         ;;
9846 *)
9847         cf_use_symlinks=no
9848         ;;
9849 esac
9850
9851 MANPAGE_SYMLINKS=no
9852 if test "$MANPAGE_ALIASES" = yes ; then
9853 echo "$as_me:9853: checking if manpage symlinks should be used" >&5
9854 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9855
9856 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9857 if test "${with_manpage_symlinks+set}" = set; then
9858   withval="$with_manpage_symlinks"
9859   MANPAGE_SYMLINKS=$withval
9860 else
9861   MANPAGE_SYMLINKS=$cf_use_symlinks
9862 fi;
9863
9864 if test "$$cf_use_symlinks" = no; then
9865 if test "$MANPAGE_SYMLINKS" = yes ; then
9866         { echo "$as_me:9866: WARNING: cannot make symlinks" >&5
9867 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9868         MANPAGE_SYMLINKS=no
9869 fi
9870 fi
9871
9872 echo "$as_me:9872: result: $MANPAGE_SYMLINKS" >&5
9873 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9874 fi
9875
9876 echo "$as_me:9876: checking for manpage tbl" >&5
9877 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9878
9879 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9880 if test "${with_manpage_tbl+set}" = set; then
9881   withval="$with_manpage_tbl"
9882   MANPAGE_TBL=$withval
9883 else
9884   MANPAGE_TBL=no
9885 fi;
9886
9887 echo "$as_me:9887: result: $MANPAGE_TBL" >&5
9888 echo "${ECHO_T}$MANPAGE_TBL" >&6
9889
9890   if test "$prefix" = "NONE" ; then
9891      cf_prefix="$ac_default_prefix"
9892   else
9893      cf_prefix="$prefix"
9894   fi
9895
9896   case "$MANPAGE_FORMAT" in # (vi
9897   *catonly*) # (vi
9898     cf_format=yes
9899     cf_inboth=no
9900     ;;
9901   *formatted*) # (vi
9902     cf_format=yes
9903     cf_inboth=yes
9904     ;;
9905   *)
9906     cf_format=no
9907     cf_inboth=no
9908     ;;
9909   esac
9910
9911 test ! -d man && mkdir man
9912
9913 cf_so_strip=
9914 cf_compress=
9915 case "$MANPAGE_FORMAT" in #(vi
9916 *compress*) #(vi
9917         cf_so_strip="Z"
9918         cf_compress=compress
9919   ;;
9920 *gzip*)
9921         cf_so_strip="gz"
9922         cf_compress=gzip
9923   ;;
9924 esac
9925
9926 cf_edit_man=./edit_man.sh
9927 cf_man_alias=`pwd`/man_alias.sed
9928
9929 cat >$cf_edit_man <<CF_EOF
9930 #! /bin/sh
9931 # this script is generated by the configure-script CF_MAN_PAGES macro.
9932
9933 prefix="$cf_prefix"
9934 datadir="$datadir"
9935
9936 NCURSES_MAJOR="$NCURSES_MAJOR"
9937 NCURSES_MINOR="$NCURSES_MINOR"
9938 NCURSES_PATCH="$NCURSES_PATCH"
9939
9940 NCURSES_OSPEED="$NCURSES_OSPEED"
9941 TERMINFO="$TERMINFO"
9942
9943 INSTALL="$INSTALL"
9944 INSTALL_DATA="$INSTALL_DATA"
9945
9946 transform="$program_transform_name"
9947
9948 TMP=\${TMPDIR:=/tmp}/man\$\$
9949 trap "rm -f \$TMP" 0 1 2 5 15
9950
9951 form=\$1
9952 shift || exit 1
9953
9954 verb=\$1
9955 shift || exit 1
9956
9957 mandir=\$1
9958 shift || exit 1
9959
9960 srcdir=\$1
9961 top_srcdir=\$srcdir/..
9962 shift || exit 1
9963
9964 if test "\$form" = normal ; then
9965         if test "$cf_format" = yes ; then
9966         if test "$cf_inboth" = no ; then
9967                 sh \$0 format \$verb \$mandir \$srcdir \$*
9968                 exit $?
9969         fi
9970         fi
9971         cf_subdir=\$mandir/man
9972         cf_tables=$MANPAGE_TBL
9973 else
9974         cf_subdir=\$mandir/cat
9975         cf_tables=yes
9976 fi
9977
9978 # process the list of source-files
9979 for i in \$* ; do
9980 case \$i in #(vi
9981 *.orig|*.rej) ;; #(vi
9982 *.[0-9]*)
9983         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9984         if test \$verb = installing ; then
9985         if test ! -d \$cf_subdir\${section} ; then
9986                 mkdir -p \$cf_subdir\$section
9987         fi
9988         fi
9989
9990         # replace variables in man page
9991         if test ! -f $cf_man_alias ; then
9992 cat >>$cf_man_alias <<-CF_EOF2
9993                 s,@DATADIR@,\$datadir,g
9994                 s,@TERMINFO@,\$TERMINFO,g
9995                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9996                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9997                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9998                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9999 CF_EOF
10000
10001         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10002         do
10003                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10004                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10005 cat >>$cf_edit_man <<-CF_EOF
10006                 s,@$cf_NAME@,$cf_name,g
10007 CF_EOF
10008         done
10009
10010 cat >>$cf_edit_man <<CF_EOF
10011 CF_EOF2
10012                 echo "...made $cf_man_alias"
10013         fi
10014
10015         aliases=
10016         cf_source=\`basename \$i\`
10017         inalias=\$cf_source
10018         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10019         if test ! -f \$inalias ; then
10020                 echo .. skipped \$cf_source
10021                 continue
10022         fi
10023 CF_EOF
10024
10025 if test "$MANPAGE_ALIASES" != no ; then
10026 cat >>$cf_edit_man <<CF_EOF
10027         nCurses=ignore.3x
10028         test $with_curses_h = yes && nCurses=ncurses.3x
10029         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10030 CF_EOF
10031 fi
10032
10033 if test "$MANPAGE_RENAMES" = no ; then
10034 cat >>$cf_edit_man <<CF_EOF
10035         # perform program transformations for section 1 man pages
10036         if test \$section = 1 ; then
10037                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10038         else
10039                 cf_target=\$cf_subdir\${section}/\$cf_source
10040         fi
10041 CF_EOF
10042 else
10043 cat >>$cf_edit_man <<CF_EOF
10044         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10045         if test -z "\$cf_target" ; then
10046                 echo '? missing rename for '\$cf_source
10047                 cf_target="\$cf_source"
10048         fi
10049         cf_target="\$cf_subdir\${section}/\${cf_target}"
10050
10051 CF_EOF
10052 fi
10053
10054 cat >>$cf_edit_man <<CF_EOF
10055         sed     -f $cf_man_alias \\
10056 CF_EOF
10057
10058 if test -f $MANPAGE_RENAMES ; then
10059 cat >>$cf_edit_man <<CF_EOF
10060                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10061 CF_EOF
10062 else
10063 cat >>$cf_edit_man <<CF_EOF
10064                 < \$i >\$TMP
10065 CF_EOF
10066 fi
10067
10068 cat >>$cf_edit_man <<CF_EOF
10069 if test \$cf_tables = yes ; then
10070         tbl \$TMP >\$TMP.out
10071         mv \$TMP.out \$TMP
10072 fi
10073 CF_EOF
10074
10075 if test $with_overwrite != yes ; then
10076 cat >>$cf_edit_man <<CF_EOF
10077         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10078         mv \$TMP.out \$TMP
10079 CF_EOF
10080 fi
10081
10082 if test $with_curses_h != yes ; then
10083 cat >>$cf_edit_man <<CF_EOF
10084         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10085         mv \$TMP.out \$TMP
10086 CF_EOF
10087 fi
10088
10089 cat >>$cf_edit_man <<CF_EOF
10090         if test \$form = format ; then
10091                 nroff -man \$TMP >\$TMP.out
10092                 mv \$TMP.out \$TMP
10093         fi
10094 CF_EOF
10095
10096 if test -n "$cf_compress" ; then
10097 cat >>$cf_edit_man <<CF_EOF
10098         if test \$verb = installing ; then
10099         if ( $cf_compress -f \$TMP )
10100         then
10101                 mv \$TMP.$cf_so_strip \$TMP
10102         fi
10103         fi
10104         cf_target="\$cf_target.$cf_so_strip"
10105 CF_EOF
10106 fi
10107
10108 case "$MANPAGE_FORMAT" in #(vi
10109 *BSDI*)
10110 cat >>$cf_edit_man <<CF_EOF
10111         if test \$form = format ; then
10112                 # BSDI installs only .0 suffixes in the cat directories
10113                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10114         fi
10115 CF_EOF
10116   ;;
10117 esac
10118
10119 cat >>$cf_edit_man <<CF_EOF
10120         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10121         if test \$verb = installing ; then
10122                 echo \$verb \$cf_target
10123                 \$INSTALL_DATA \$TMP \$cf_target
10124                 test -d \$cf_subdir\${section} &&
10125                 test -n "\$aliases" && (
10126                         cd \$cf_subdir\${section} && (
10127                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10128                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10129                                 cf_target=\`basename \$cf_target\`
10130                                 for cf_alias in \$aliases
10131                                 do
10132                                         if test \$section = 1 ; then
10133                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10134                                         fi
10135
10136                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10137                                                 if test -f \$cf_alias\${suffix} ; then
10138                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10139                                                         then
10140                                                                 continue
10141                                                         fi
10142                                                 fi
10143                                                 echo .. \$verb alias \$cf_alias\${suffix}
10144 CF_EOF
10145 case "x$LN_S" in #(vi
10146 *-f) #(vi
10147 cat >>$cf_edit_man <<CF_EOF
10148                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10149 CF_EOF
10150         ;;
10151 *)
10152 cat >>$cf_edit_man <<CF_EOF
10153                                                 rm -f \$cf_alias\${suffix}
10154                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10155 CF_EOF
10156         ;;
10157 esac
10158 cat >>$cf_edit_man <<CF_EOF
10159                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10160                                                 echo ".so \$cf_source" >\$TMP
10161 CF_EOF
10162 if test -n "$cf_compress" ; then
10163 cat >>$cf_edit_man <<CF_EOF
10164                                                 if test -n "$cf_so_strip" ; then
10165                                                         $cf_compress -f \$TMP
10166                                                         mv \$TMP.$cf_so_strip \$TMP
10167                                                 fi
10168 CF_EOF
10169 fi
10170 cat >>$cf_edit_man <<CF_EOF
10171                                                 echo .. \$verb alias \$cf_alias\${suffix}
10172                                                 rm -f \$cf_alias\${suffix}
10173                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10174                                         fi
10175                                 done
10176                         )
10177                 )
10178         elif test \$verb = removing ; then
10179                 test -f \$cf_target && (
10180                         echo \$verb \$cf_target
10181                         rm -f \$cf_target
10182                 )
10183                 test -d \$cf_subdir\${section} &&
10184                 test -n "\$aliases" && (
10185                         cd \$cf_subdir\${section} && (
10186                                 for cf_alias in \$aliases
10187                                 do
10188                                         if test \$section = 1 ; then
10189                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10190                                         fi
10191
10192                                         echo .. \$verb alias \$cf_alias\${suffix}
10193                                         rm -f \$cf_alias\${suffix}
10194                                 done
10195                         )
10196                 )
10197         else
10198 #               echo ".hy 0"
10199                 cat \$TMP
10200         fi
10201         ;;
10202 esac
10203 done
10204
10205 if test $cf_inboth = yes ; then
10206 if test \$form != format ; then
10207         sh \$0 format \$verb \$mandir \$srcdir \$*
10208 fi
10209 fi
10210
10211 exit 0
10212 CF_EOF
10213 chmod 755 $cf_edit_man
10214
10215 ###############################################################################
10216
10217 ### Note that some functions (such as const) are normally disabled anyway.
10218 echo "$as_me:10218: checking if you want to build with function extensions" >&5
10219 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10220
10221 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10222 if test "${enable_ext_funcs+set}" = set; then
10223   enableval="$enable_ext_funcs"
10224   with_ext_funcs=$enableval
10225 else
10226   with_ext_funcs=yes
10227 fi;
10228 echo "$as_me:10228: result: $with_ext_funcs" >&5
10229 echo "${ECHO_T}$with_ext_funcs" >&6
10230 if test "$with_ext_funcs" = yes ; then
10231         NCURSES_EXT_FUNCS=1
10232         cat >>confdefs.h <<\EOF
10233 #define HAVE_ASSUME_DEFAULT_COLORS 1
10234 EOF
10235
10236         cat >>confdefs.h <<\EOF
10237 #define HAVE_CURSES_VERSION 1
10238 EOF
10239
10240         cat >>confdefs.h <<\EOF
10241 #define HAVE_HAS_KEY 1
10242 EOF
10243
10244         cat >>confdefs.h <<\EOF
10245 #define HAVE_RESIZETERM 1
10246 EOF
10247
10248         cat >>confdefs.h <<\EOF
10249 #define HAVE_RESIZE_TERM 1
10250 EOF
10251
10252         cat >>confdefs.h <<\EOF
10253 #define HAVE_TERM_ENTRY_H 1
10254 EOF
10255
10256         cat >>confdefs.h <<\EOF
10257 #define HAVE_USE_DEFAULT_COLORS 1
10258 EOF
10259
10260         cat >>confdefs.h <<\EOF
10261 #define HAVE_USE_SCREEN 1
10262 EOF
10263
10264         cat >>confdefs.h <<\EOF
10265 #define HAVE_USE_WINDOW 1
10266 EOF
10267
10268         cat >>confdefs.h <<\EOF
10269 #define HAVE_WRESIZE 1
10270 EOF
10271
10272         cat >>confdefs.h <<\EOF
10273 #define NCURSES_EXT_FUNCS 1
10274 EOF
10275
10276         GENERATED_EXT_FUNCS=generated
10277 else
10278         NCURSES_EXT_FUNCS=0
10279         GENERATED_EXT_FUNCS=
10280 fi
10281
10282 echo "$as_me:10282: checking if you want to build with experimental SCREEN extensions" >&5
10283 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10284
10285 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10286 if test "${enable_sp_funcs+set}" = set; then
10287   enableval="$enable_sp_funcs"
10288   with_sp_funcs=$enableval
10289 else
10290   with_sp_funcs=no
10291 fi;
10292 echo "$as_me:10292: result: $with_sp_funcs" >&5
10293 echo "${ECHO_T}$with_sp_funcs" >&6
10294 if test "$with_sp_funcs" = yes ; then
10295         NCURSES_SP_FUNCS=1
10296         cat >>confdefs.h <<\EOF
10297 #define NCURSES_SP_FUNCS 1
10298 EOF
10299
10300         GENERATED_SP_FUNCS=generated
10301 else
10302         NCURSES_SP_FUNCS=0
10303         GENERATED_SP_FUNCS=
10304 fi
10305
10306 echo "$as_me:10306: checking if you want to build with experimental terminal-driver" >&5
10307 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10308
10309 # Check whether --enable-term-driver or --disable-term-driver was given.
10310 if test "${enable_term_driver+set}" = set; then
10311   enableval="$enable_term_driver"
10312   with_term_driver=$enableval
10313 else
10314   with_term_driver=no
10315 fi;
10316 echo "$as_me:10316: result: $with_term_driver" >&5
10317 echo "${ECHO_T}$with_term_driver" >&6
10318 if test "$with_term_driver" = yes ; then
10319         cat >>confdefs.h <<\EOF
10320 #define USE_TERM_DRIVER 1
10321 EOF
10322
10323         if test "$with_sp_funcs" != yes ; then
10324                 { { echo "$as_me:10324: error: The term-driver option relies upon sp-funcs" >&5
10325 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10326    { (exit 1); exit 1; }; }
10327         fi
10328 fi
10329
10330 ###   use option --enable-const to turn on use of const beyond that in XSI.
10331 echo "$as_me:10331: checking for extended use of const keyword" >&5
10332 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10333
10334 # Check whether --enable-const or --disable-const was given.
10335 if test "${enable_const+set}" = set; then
10336   enableval="$enable_const"
10337   with_ext_const=$enableval
10338 else
10339   with_ext_const=no
10340 fi;
10341 echo "$as_me:10341: result: $with_ext_const" >&5
10342 echo "${ECHO_T}$with_ext_const" >&6
10343 NCURSES_CONST='/*nothing*/'
10344 if test "$with_ext_const" = yes ; then
10345         NCURSES_CONST=const
10346 fi
10347
10348 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10349 echo "$as_me:10349: checking if you want to use extended colors" >&5
10350 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10351
10352 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10353 if test "${enable_ext_colors+set}" = set; then
10354   enableval="$enable_ext_colors"
10355   with_ext_colors=$enableval
10356 else
10357   with_ext_colors=no
10358 fi;
10359 echo "$as_me:10359: result: $with_ext_colors" >&5
10360 echo "${ECHO_T}$with_ext_colors" >&6
10361 NCURSES_EXT_COLORS=0
10362 if test "$with_ext_colors" = yes ; then
10363         if test "$with_widec" != yes ; then
10364                 { { echo "$as_me:10364: error: This option applies only to wide-character library" >&5
10365 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10366    { (exit 1); exit 1; }; }
10367         else
10368                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10369
10370 if test "${with_abi_version+set}" != set; then
10371         case $cf_cv_rel_version in
10372         5.*)
10373                 cf_cv_rel_version=6.0
10374                 cf_cv_abi_version=6
10375                 { echo "$as_me:10375: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10376 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10377                 ;;
10378         esac
10379 fi
10380
10381         fi
10382         NCURSES_EXT_COLORS=1
10383         cat >>confdefs.h <<\EOF
10384 #define NCURSES_EXT_COLORS 1
10385 EOF
10386
10387 fi
10388
10389 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10390 echo "$as_me:10390: checking if you want to use extended mouse encoding" >&5
10391 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10392
10393 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10394 if test "${enable_ext_mouse+set}" = set; then
10395   enableval="$enable_ext_mouse"
10396   with_ext_mouse=$enableval
10397 else
10398   with_ext_mouse=no
10399 fi;
10400 echo "$as_me:10400: result: $with_ext_mouse" >&5
10401 echo "${ECHO_T}$with_ext_mouse" >&6
10402 NCURSES_MOUSE_VERSION=1
10403 if test "$with_ext_mouse" = yes ; then
10404         NCURSES_MOUSE_VERSION=2
10405
10406 if test "${with_abi_version+set}" != set; then
10407         case $cf_cv_rel_version in
10408         5.*)
10409                 cf_cv_rel_version=6.0
10410                 cf_cv_abi_version=6
10411                 { echo "$as_me:10411: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10412 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10413                 ;;
10414         esac
10415 fi
10416
10417 fi
10418
10419 echo "$as_me:10419: checking if you want \$NCURSES_NO_PADDING code" >&5
10420 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10421
10422 # Check whether --enable-no-padding or --disable-no-padding was given.
10423 if test "${enable_no_padding+set}" = set; then
10424   enableval="$enable_no_padding"
10425   with_no_padding=$enableval
10426 else
10427   with_no_padding=$with_ext_funcs
10428 fi;
10429 echo "$as_me:10429: result: $with_no_padding" >&5
10430 echo "${ECHO_T}$with_no_padding" >&6
10431 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10432 #define NCURSES_NO_PADDING 1
10433 EOF
10434
10435 echo "$as_me:10435: checking for ANSI C header files" >&5
10436 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10437 if test "${ac_cv_header_stdc+set}" = set; then
10438   echo $ECHO_N "(cached) $ECHO_C" >&6
10439 else
10440   cat >conftest.$ac_ext <<_ACEOF
10441 #line 10441 "configure"
10442 #include "confdefs.h"
10443 #include <stdlib.h>
10444 #include <stdarg.h>
10445 #include <string.h>
10446 #include <float.h>
10447
10448 _ACEOF
10449 if { (eval echo "$as_me:10449: \"$ac_cpp conftest.$ac_ext\"") >&5
10450   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10451   ac_status=$?
10452   egrep -v '^ *\+' conftest.er1 >conftest.err
10453   rm -f conftest.er1
10454   cat conftest.err >&5
10455   echo "$as_me:10455: \$? = $ac_status" >&5
10456   (exit $ac_status); } >/dev/null; then
10457   if test -s conftest.err; then
10458     ac_cpp_err=$ac_c_preproc_warn_flag
10459   else
10460     ac_cpp_err=
10461   fi
10462 else
10463   ac_cpp_err=yes
10464 fi
10465 if test -z "$ac_cpp_err"; then
10466   ac_cv_header_stdc=yes
10467 else
10468   echo "$as_me: failed program was:" >&5
10469   cat conftest.$ac_ext >&5
10470   ac_cv_header_stdc=no
10471 fi
10472 rm -f conftest.err conftest.$ac_ext
10473
10474 if test $ac_cv_header_stdc = yes; then
10475   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10476   cat >conftest.$ac_ext <<_ACEOF
10477 #line 10477 "configure"
10478 #include "confdefs.h"
10479 #include <string.h>
10480
10481 _ACEOF
10482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10483   egrep "memchr" >/dev/null 2>&1; then
10484   :
10485 else
10486   ac_cv_header_stdc=no
10487 fi
10488 rm -rf conftest*
10489
10490 fi
10491
10492 if test $ac_cv_header_stdc = yes; then
10493   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10494   cat >conftest.$ac_ext <<_ACEOF
10495 #line 10495 "configure"
10496 #include "confdefs.h"
10497 #include <stdlib.h>
10498
10499 _ACEOF
10500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10501   egrep "free" >/dev/null 2>&1; then
10502   :
10503 else
10504   ac_cv_header_stdc=no
10505 fi
10506 rm -rf conftest*
10507
10508 fi
10509
10510 if test $ac_cv_header_stdc = yes; then
10511   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10512   if test "$cross_compiling" = yes; then
10513   :
10514 else
10515   cat >conftest.$ac_ext <<_ACEOF
10516 #line 10516 "configure"
10517 #include "confdefs.h"
10518 #include <ctype.h>
10519 #if ((' ' & 0x0FF) == 0x020)
10520 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10521 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10522 #else
10523 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10524                      || ('j' <= (c) && (c) <= 'r') \
10525                      || ('s' <= (c) && (c) <= 'z'))
10526 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10527 #endif
10528
10529 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10530 int
10531 main ()
10532 {
10533   int i;
10534   for (i = 0; i < 256; i++)
10535     if (XOR (islower (i), ISLOWER (i))
10536         || toupper (i) != TOUPPER (i))
10537       $ac_main_return(2);
10538   $ac_main_return (0);
10539 }
10540 _ACEOF
10541 rm -f conftest$ac_exeext
10542 if { (eval echo "$as_me:10542: \"$ac_link\"") >&5
10543   (eval $ac_link) 2>&5
10544   ac_status=$?
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10547   { (eval echo "$as_me:10547: \"$ac_try\"") >&5
10548   (eval $ac_try) 2>&5
10549   ac_status=$?
10550   echo "$as_me:10550: \$? = $ac_status" >&5
10551   (exit $ac_status); }; }; then
10552   :
10553 else
10554   echo "$as_me: program exited with status $ac_status" >&5
10555 echo "$as_me: failed program was:" >&5
10556 cat conftest.$ac_ext >&5
10557 ac_cv_header_stdc=no
10558 fi
10559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10560 fi
10561 fi
10562 fi
10563 echo "$as_me:10563: result: $ac_cv_header_stdc" >&5
10564 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10565 if test $ac_cv_header_stdc = yes; then
10566
10567 cat >>confdefs.h <<\EOF
10568 #define STDC_HEADERS 1
10569 EOF
10570
10571 fi
10572
10573 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10574
10575 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10576                   inttypes.h stdint.h unistd.h
10577 do
10578 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10579 echo "$as_me:10579: checking for $ac_header" >&5
10580 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10582   echo $ECHO_N "(cached) $ECHO_C" >&6
10583 else
10584   cat >conftest.$ac_ext <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 $ac_includes_default
10588 #include <$ac_header>
10589 _ACEOF
10590 rm -f conftest.$ac_objext
10591 if { (eval echo "$as_me:10591: \"$ac_compile\"") >&5
10592   (eval $ac_compile) 2>&5
10593   ac_status=$?
10594   echo "$as_me:10594: \$? = $ac_status" >&5
10595   (exit $ac_status); } &&
10596          { ac_try='test -s conftest.$ac_objext'
10597   { (eval echo "$as_me:10597: \"$ac_try\"") >&5
10598   (eval $ac_try) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit $ac_status); }; }; then
10602   eval "$as_ac_Header=yes"
10603 else
10604   echo "$as_me: failed program was:" >&5
10605 cat conftest.$ac_ext >&5
10606 eval "$as_ac_Header=no"
10607 fi
10608 rm -f conftest.$ac_objext conftest.$ac_ext
10609 fi
10610 echo "$as_me:10610: result: `eval echo '${'$as_ac_Header'}'`" >&5
10611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10613   cat >>confdefs.h <<EOF
10614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10615 EOF
10616
10617 fi
10618 done
10619
10620 echo "$as_me:10620: checking for signed char" >&5
10621 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10622 if test "${ac_cv_type_signed_char+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628 $ac_includes_default
10629 int
10630 main ()
10631 {
10632 if ((signed char *) 0)
10633   return 0;
10634 if (sizeof (signed char))
10635   return 0;
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 rm -f conftest.$ac_objext
10641 if { (eval echo "$as_me:10641: \"$ac_compile\"") >&5
10642   (eval $ac_compile) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); } &&
10646          { ac_try='test -s conftest.$ac_objext'
10647   { (eval echo "$as_me:10647: \"$ac_try\"") >&5
10648   (eval $ac_try) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit $ac_status); }; }; then
10652   ac_cv_type_signed_char=yes
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 cat conftest.$ac_ext >&5
10656 ac_cv_type_signed_char=no
10657 fi
10658 rm -f conftest.$ac_objext conftest.$ac_ext
10659 fi
10660 echo "$as_me:10660: result: $ac_cv_type_signed_char" >&5
10661 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10662
10663 echo "$as_me:10663: checking size of signed char" >&5
10664 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10665 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10666   echo $ECHO_N "(cached) $ECHO_C" >&6
10667 else
10668   if test "$ac_cv_type_signed_char" = yes; then
10669   if test "$cross_compiling" = yes; then
10670   # Depending upon the size, compute the lo and hi bounds.
10671 cat >conftest.$ac_ext <<_ACEOF
10672 #line 10672 "configure"
10673 #include "confdefs.h"
10674 $ac_includes_default
10675 int
10676 main ()
10677 {
10678 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10679   ;
10680   return 0;
10681 }
10682 _ACEOF
10683 rm -f conftest.$ac_objext
10684 if { (eval echo "$as_me:10684: \"$ac_compile\"") >&5
10685   (eval $ac_compile) 2>&5
10686   ac_status=$?
10687   echo "$as_me:10687: \$? = $ac_status" >&5
10688   (exit $ac_status); } &&
10689          { ac_try='test -s conftest.$ac_objext'
10690   { (eval echo "$as_me:10690: \"$ac_try\"") >&5
10691   (eval $ac_try) 2>&5
10692   ac_status=$?
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); }; }; then
10695   ac_lo=0 ac_mid=0
10696   while :; do
10697     cat >conftest.$ac_ext <<_ACEOF
10698 #line 10698 "configure"
10699 #include "confdefs.h"
10700 $ac_includes_default
10701 int
10702 main ()
10703 {
10704 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f conftest.$ac_objext
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); } &&
10715          { ac_try='test -s conftest.$ac_objext'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); }; }; then
10721   ac_hi=$ac_mid; break
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat conftest.$ac_ext >&5
10725 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10726 fi
10727 rm -f conftest.$ac_objext conftest.$ac_ext
10728   done
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 ac_hi=-1 ac_mid=-1
10733   while :; do
10734     cat >conftest.$ac_ext <<_ACEOF
10735 #line 10735 "configure"
10736 #include "confdefs.h"
10737 $ac_includes_default
10738 int
10739 main ()
10740 {
10741 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10742   ;
10743   return 0;
10744 }
10745 _ACEOF
10746 rm -f conftest.$ac_objext
10747 if { (eval echo "$as_me:10747: \"$ac_compile\"") >&5
10748   (eval $ac_compile) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit $ac_status); } &&
10752          { ac_try='test -s conftest.$ac_objext'
10753   { (eval echo "$as_me:10753: \"$ac_try\"") >&5
10754   (eval $ac_try) 2>&5
10755   ac_status=$?
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit $ac_status); }; }; then
10758   ac_lo=$ac_mid; break
10759 else
10760   echo "$as_me: failed program was:" >&5
10761 cat conftest.$ac_ext >&5
10762 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10763 fi
10764 rm -f conftest.$ac_objext conftest.$ac_ext
10765   done
10766 fi
10767 rm -f conftest.$ac_objext conftest.$ac_ext
10768 # Binary search between lo and hi bounds.
10769 while test "x$ac_lo" != "x$ac_hi"; do
10770   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10771   cat >conftest.$ac_ext <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774 $ac_includes_default
10775 int
10776 main ()
10777 {
10778 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10779   ;
10780   return 0;
10781 }
10782 _ACEOF
10783 rm -f conftest.$ac_objext
10784 if { (eval echo "$as_me:10784: \"$ac_compile\"") >&5
10785   (eval $ac_compile) 2>&5
10786   ac_status=$?
10787   echo "$as_me:10787: \$? = $ac_status" >&5
10788   (exit $ac_status); } &&
10789          { ac_try='test -s conftest.$ac_objext'
10790   { (eval echo "$as_me:10790: \"$ac_try\"") >&5
10791   (eval $ac_try) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit $ac_status); }; }; then
10795   ac_hi=$ac_mid
10796 else
10797   echo "$as_me: failed program was:" >&5
10798 cat conftest.$ac_ext >&5
10799 ac_lo=`expr $ac_mid + 1`
10800 fi
10801 rm -f conftest.$ac_objext conftest.$ac_ext
10802 done
10803 ac_cv_sizeof_signed_char=$ac_lo
10804 else
10805   if test "$cross_compiling" = yes; then
10806   { { echo "$as_me:10806: error: cannot run test program while cross compiling" >&5
10807 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10808    { (exit 1); exit 1; }; }
10809 else
10810   cat >conftest.$ac_ext <<_ACEOF
10811 #line 10811 "configure"
10812 #include "confdefs.h"
10813 $ac_includes_default
10814 int
10815 main ()
10816 {
10817 FILE *f = fopen ("conftest.val", "w");
10818 if (!f)
10819   $ac_main_return (1);
10820 fprintf (f, "%d", (sizeof (signed char)));
10821 fclose (f);
10822   ;
10823   return 0;
10824 }
10825 _ACEOF
10826 rm -f conftest$ac_exeext
10827 if { (eval echo "$as_me:10827: \"$ac_link\"") >&5
10828   (eval $ac_link) 2>&5
10829   ac_status=$?
10830   echo "$as_me:10830: \$? = $ac_status" >&5
10831   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   ac_cv_sizeof_signed_char=`cat conftest.val`
10838 else
10839   echo "$as_me: program exited with status $ac_status" >&5
10840 echo "$as_me: failed program was:" >&5
10841 cat conftest.$ac_ext >&5
10842 fi
10843 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10844 fi
10845 fi
10846 rm -f conftest.val
10847 else
10848   ac_cv_sizeof_signed_char=0
10849 fi
10850 fi
10851 echo "$as_me:10851: result: $ac_cv_sizeof_signed_char" >&5
10852 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10853 cat >>confdefs.h <<EOF
10854 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10855 EOF
10856
10857 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10858         NCURSES_SBOOL="signed char"
10859 else
10860         NCURSES_SBOOL="char"
10861 fi
10862 echo "$as_me:10862: checking if you want to use signed Boolean array in term.h" >&5
10863 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10864
10865 # Check whether --enable-signed-char or --disable-signed-char was given.
10866 if test "${enable_signed_char+set}" = set; then
10867   enableval="$enable_signed_char"
10868   with_signed_char=$enableval
10869 else
10870   with_signed_char=no
10871 fi;
10872 echo "$as_me:10872: result: $with_signed_char" >&5
10873 echo "${ECHO_T}$with_signed_char" >&6
10874 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10875
10876 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10877 echo "$as_me:10877: checking if you want SIGWINCH handler" >&5
10878 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10879
10880 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10881 if test "${enable_sigwinch+set}" = set; then
10882   enableval="$enable_sigwinch"
10883   with_sigwinch=$enableval
10884 else
10885   with_sigwinch=$with_ext_funcs
10886 fi;
10887 echo "$as_me:10887: result: $with_sigwinch" >&5
10888 echo "${ECHO_T}$with_sigwinch" >&6
10889 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10890 #define USE_SIGWINCH 1
10891 EOF
10892
10893 ###   use option --enable-tcap-names to allow user to define new capabilities
10894 echo "$as_me:10894: checking if you want user-definable terminal capabilities like termcap" >&5
10895 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10896
10897 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10898 if test "${enable_tcap_names+set}" = set; then
10899   enableval="$enable_tcap_names"
10900   with_tcap_names=$enableval
10901 else
10902   with_tcap_names=$with_ext_funcs
10903 fi;
10904 echo "$as_me:10904: result: $with_tcap_names" >&5
10905 echo "${ECHO_T}$with_tcap_names" >&6
10906 NCURSES_XNAMES=0
10907 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10908
10909 ###############################################################################
10910 # These options are relatively safe to experiment with.
10911
10912 echo "$as_me:10912: checking if you want all development code" >&5
10913 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10914
10915 # Check whether --with-develop or --without-develop was given.
10916 if test "${with_develop+set}" = set; then
10917   withval="$with_develop"
10918   with_develop=$withval
10919 else
10920   with_develop=no
10921 fi;
10922 echo "$as_me:10922: result: $with_develop" >&5
10923 echo "${ECHO_T}$with_develop" >&6
10924
10925 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10926 echo "$as_me:10926: checking if you want hard-tabs code" >&5
10927 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10928
10929 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10930 if test "${enable_hard_tabs+set}" = set; then
10931   enableval="$enable_hard_tabs"
10932
10933 else
10934   enable_hard_tabs=$with_develop
10935 fi;
10936 echo "$as_me:10936: result: $enable_hard_tabs" >&5
10937 echo "${ECHO_T}$enable_hard_tabs" >&6
10938 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10939 #define USE_HARD_TABS 1
10940 EOF
10941
10942 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10943 echo "$as_me:10943: checking if you want limited support for xmc" >&5
10944 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10945
10946 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10947 if test "${enable_xmc_glitch+set}" = set; then
10948   enableval="$enable_xmc_glitch"
10949
10950 else
10951   enable_xmc_glitch=$with_develop
10952 fi;
10953 echo "$as_me:10953: result: $enable_xmc_glitch" >&5
10954 echo "${ECHO_T}$enable_xmc_glitch" >&6
10955 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10956 #define USE_XMC_SUPPORT 1
10957 EOF
10958
10959 ###############################################################################
10960 # These are just experimental, probably should not be in a package:
10961
10962 echo "$as_me:10962: checking if you do not want to assume colors are white-on-black" >&5
10963 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10964
10965 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10966 if test "${enable_assumed_color+set}" = set; then
10967   enableval="$enable_assumed_color"
10968   with_assumed_color=$enableval
10969 else
10970   with_assumed_color=yes
10971 fi;
10972 echo "$as_me:10972: result: $with_assumed_color" >&5
10973 echo "${ECHO_T}$with_assumed_color" >&6
10974 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10975 #define USE_ASSUMED_COLOR 1
10976 EOF
10977
10978 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10979 echo "$as_me:10979: checking if you want hashmap scrolling-optimization code" >&5
10980 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10981
10982 # Check whether --enable-hashmap or --disable-hashmap was given.
10983 if test "${enable_hashmap+set}" = set; then
10984   enableval="$enable_hashmap"
10985   with_hashmap=$enableval
10986 else
10987   with_hashmap=yes
10988 fi;
10989 echo "$as_me:10989: result: $with_hashmap" >&5
10990 echo "${ECHO_T}$with_hashmap" >&6
10991 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10992 #define USE_HASHMAP 1
10993 EOF
10994
10995 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10996 echo "$as_me:10996: checking if you want colorfgbg code" >&5
10997 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10998
10999 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11000 if test "${enable_colorfgbg+set}" = set; then
11001   enableval="$enable_colorfgbg"
11002   with_colorfgbg=$enableval
11003 else
11004   with_colorfgbg=no
11005 fi;
11006 echo "$as_me:11006: result: $with_colorfgbg" >&5
11007 echo "${ECHO_T}$with_colorfgbg" >&6
11008 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11009 #define USE_COLORFGBG 1
11010 EOF
11011
11012 ###   use option --enable-interop to turn on use of bindings used for interop
11013 echo "$as_me:11013: checking if you want interop bindings" >&5
11014 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11015
11016 # Check whether --enable-interop or --disable-interop was given.
11017 if test "${enable_interop+set}" = set; then
11018   enableval="$enable_interop"
11019   with_exp_interop=$enableval
11020 else
11021   with_exp_interop=no
11022 fi;
11023 echo "$as_me:11023: result: $with_exp_interop" >&5
11024 echo "${ECHO_T}$with_exp_interop" >&6
11025
11026 NCURSES_INTEROP_FUNCS=0
11027 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11028
11029 # This is still experimental (20080329), but should ultimately be moved to
11030 # the script-block --with-normal, etc.
11031
11032 echo "$as_me:11032: checking if you want to link with the pthread library" >&5
11033 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11034
11035 # Check whether --with-pthread or --without-pthread was given.
11036 if test "${with_pthread+set}" = set; then
11037   withval="$with_pthread"
11038   with_pthread=$withval
11039 else
11040   with_pthread=no
11041 fi;
11042 echo "$as_me:11042: result: $with_pthread" >&5
11043 echo "${ECHO_T}$with_pthread" >&6
11044
11045 if test "$with_pthread" != no ; then
11046     echo "$as_me:11046: checking for pthread.h" >&5
11047 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11048 if test "${ac_cv_header_pthread_h+set}" = set; then
11049   echo $ECHO_N "(cached) $ECHO_C" >&6
11050 else
11051   cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #include <pthread.h>
11055 _ACEOF
11056 if { (eval echo "$as_me:11056: \"$ac_cpp conftest.$ac_ext\"") >&5
11057   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11058   ac_status=$?
11059   egrep -v '^ *\+' conftest.er1 >conftest.err
11060   rm -f conftest.er1
11061   cat conftest.err >&5
11062   echo "$as_me:11062: \$? = $ac_status" >&5
11063   (exit $ac_status); } >/dev/null; then
11064   if test -s conftest.err; then
11065     ac_cpp_err=$ac_c_preproc_warn_flag
11066   else
11067     ac_cpp_err=
11068   fi
11069 else
11070   ac_cpp_err=yes
11071 fi
11072 if test -z "$ac_cpp_err"; then
11073   ac_cv_header_pthread_h=yes
11074 else
11075   echo "$as_me: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   ac_cv_header_pthread_h=no
11078 fi
11079 rm -f conftest.err conftest.$ac_ext
11080 fi
11081 echo "$as_me:11081: result: $ac_cv_header_pthread_h" >&5
11082 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11083 if test $ac_cv_header_pthread_h = yes; then
11084
11085         cat >>confdefs.h <<\EOF
11086 #define HAVE_PTHREADS_H 1
11087 EOF
11088
11089         echo "$as_me:11089: checking if we can link with the pthread library" >&5
11090 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
11091         cf_save_LIBS="$LIBS"
11092         LIBS="-lpthread $LIBS"
11093         cat >conftest.$ac_ext <<_ACEOF
11094 #line 11094 "configure"
11095 #include "confdefs.h"
11096
11097 #include <pthread.h>
11098
11099 int
11100 main ()
11101 {
11102
11103         int rc = pthread_create(0,0,0,0);
11104
11105   ;
11106   return 0;
11107 }
11108 _ACEOF
11109 rm -f conftest.$ac_objext conftest$ac_exeext
11110 if { (eval echo "$as_me:11110: \"$ac_link\"") >&5
11111   (eval $ac_link) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit $ac_status); } &&
11115          { ac_try='test -s conftest$ac_exeext'
11116   { (eval echo "$as_me:11116: \"$ac_try\"") >&5
11117   (eval $ac_try) 2>&5
11118   ac_status=$?
11119   echo "$as_me:11119: \$? = $ac_status" >&5
11120   (exit $ac_status); }; }; then
11121   with_pthread=yes
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 cat conftest.$ac_ext >&5
11125 with_pthread=no
11126 fi
11127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11128         LIBS="$cf_save_LIBS"
11129         echo "$as_me:11129: result: $with_pthread" >&5
11130 echo "${ECHO_T}$with_pthread" >&6
11131
11132         if test "$with_pthread" = yes ; then
11133             LIBS="-lpthread $LIBS"
11134             cat >>confdefs.h <<\EOF
11135 #define HAVE_LIBPTHREADS 1
11136 EOF
11137
11138         else
11139             { { echo "$as_me:11139: error: Cannot link with pthread library" >&5
11140 echo "$as_me: error: Cannot link with pthread library" >&2;}
11141    { (exit 1); exit 1; }; }
11142         fi
11143
11144 fi
11145
11146 fi
11147
11148 if test "x$with_pthread" != xno; then
11149         echo "$as_me:11149: checking for pthread_kill" >&5
11150 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11151 if test "${ac_cv_func_pthread_kill+set}" = set; then
11152   echo $ECHO_N "(cached) $ECHO_C" >&6
11153 else
11154   cat >conftest.$ac_ext <<_ACEOF
11155 #line 11155 "configure"
11156 #include "confdefs.h"
11157 /* System header to define __stub macros and hopefully few prototypes,
11158     which can conflict with char pthread_kill (); below.  */
11159 #include <assert.h>
11160 /* Override any gcc2 internal prototype to avoid an error.  */
11161 #ifdef __cplusplus
11162 extern "C"
11163 #endif
11164 /* We use char because int might match the return type of a gcc2
11165    builtin and then its argument prototype would still apply.  */
11166 char pthread_kill ();
11167 char (*f) ();
11168
11169 int
11170 main ()
11171 {
11172 /* The GNU C library defines this for functions which it implements
11173     to always fail with ENOSYS.  Some functions are actually named
11174     something starting with __ and the normal name is an alias.  */
11175 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11176 choke me
11177 #else
11178 f = pthread_kill;
11179 #endif
11180
11181   ;
11182   return 0;
11183 }
11184 _ACEOF
11185 rm -f conftest.$ac_objext conftest$ac_exeext
11186 if { (eval echo "$as_me:11186: \"$ac_link\"") >&5
11187   (eval $ac_link) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); } &&
11191          { ac_try='test -s conftest$ac_exeext'
11192   { (eval echo "$as_me:11192: \"$ac_try\"") >&5
11193   (eval $ac_try) 2>&5
11194   ac_status=$?
11195   echo "$as_me:11195: \$? = $ac_status" >&5
11196   (exit $ac_status); }; }; then
11197   ac_cv_func_pthread_kill=yes
11198 else
11199   echo "$as_me: failed program was:" >&5
11200 cat conftest.$ac_ext >&5
11201 ac_cv_func_pthread_kill=no
11202 fi
11203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11204 fi
11205 echo "$as_me:11205: result: $ac_cv_func_pthread_kill" >&5
11206 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11207 if test $ac_cv_func_pthread_kill = yes; then
11208
11209                 echo "$as_me:11209: checking if you want to allow EINTR in wgetch with pthreads" >&5
11210 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11211
11212 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11213 if test "${enable_pthreads_eintr+set}" = set; then
11214   enableval="$enable_pthreads_eintr"
11215   use_pthreads_eintr=$enableval
11216 else
11217   use_pthreads_eintr=no
11218 fi;
11219                 echo "$as_me:11219: result: $use_pthreads_eintr" >&5
11220 echo "${ECHO_T}$use_pthreads_eintr" >&6
11221                 if test $use_pthreads_eintr = yes ; then
11222                         cat >>confdefs.h <<\EOF
11223 #define USE_PTHREADS_EINTR 1
11224 EOF
11225
11226                 fi
11227 fi
11228
11229         echo "$as_me:11229: checking if you want to use weak-symbols for pthreads" >&5
11230 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11231
11232 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11233 if test "${enable_weak_symbols+set}" = set; then
11234   enableval="$enable_weak_symbols"
11235   use_weak_symbols=$enableval
11236 else
11237   use_weak_symbols=no
11238 fi;
11239         echo "$as_me:11239: result: $use_weak_symbols" >&5
11240 echo "${ECHO_T}$use_weak_symbols" >&6
11241         if test "$use_weak_symbols" = yes ; then
11242
11243 echo "$as_me:11243: checking if $CC supports weak symbols" >&5
11244 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11245 if test "${cf_cv_weak_symbols+set}" = set; then
11246   echo $ECHO_N "(cached) $ECHO_C" >&6
11247 else
11248
11249 cat >conftest.$ac_ext <<_ACEOF
11250 #line 11250 "configure"
11251 #include "confdefs.h"
11252
11253 #include <stdio.h>
11254 int
11255 main ()
11256 {
11257
11258 #if defined(__GNUC__)
11259 #  if defined __USE_ISOC99
11260 #    define _cat_pragma(exp)    _Pragma(#exp)
11261 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11262 #  else
11263 #    define _weak_pragma(exp)
11264 #  endif
11265 #  define _declare(name)        __extension__ extern __typeof__(name) name
11266 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11267 #endif
11268
11269 weak_symbol(fopen);
11270
11271   ;
11272   return 0;
11273 }
11274 _ACEOF
11275 rm -f conftest.$ac_objext
11276 if { (eval echo "$as_me:11276: \"$ac_compile\"") >&5
11277   (eval $ac_compile) 2>&5
11278   ac_status=$?
11279   echo "$as_me:11279: \$? = $ac_status" >&5
11280   (exit $ac_status); } &&
11281          { ac_try='test -s conftest.$ac_objext'
11282   { (eval echo "$as_me:11282: \"$ac_try\"") >&5
11283   (eval $ac_try) 2>&5
11284   ac_status=$?
11285   echo "$as_me:11285: \$? = $ac_status" >&5
11286   (exit $ac_status); }; }; then
11287   cf_cv_weak_symbols=yes
11288 else
11289   echo "$as_me: failed program was:" >&5
11290 cat conftest.$ac_ext >&5
11291 cf_cv_weak_symbols=no
11292 fi
11293 rm -f conftest.$ac_objext conftest.$ac_ext
11294
11295 fi
11296 echo "$as_me:11296: result: $cf_cv_weak_symbols" >&5
11297 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11298
11299         else
11300                 cf_cv_weak_symbols=no
11301         fi
11302
11303         if test $cf_cv_weak_symbols = yes ; then
11304                 cat >>confdefs.h <<\EOF
11305 #define USE_WEAK_SYMBOLS 1
11306 EOF
11307
11308         fi
11309 fi
11310
11311 PTHREAD=
11312 if test "$with_pthread" = "yes" ; then
11313     cat >>confdefs.h <<\EOF
11314 #define USE_PTHREADS 1
11315 EOF
11316
11317     enable_reentrant=yes
11318     if test $cf_cv_weak_symbols = yes ; then
11319         PTHREAD=-lpthread
11320     fi
11321 fi
11322
11323 # Reentrant code has to be opaque; there's little advantage to making ncurses
11324 # opaque outside of that, so there is no --enable-opaque option.  We can use
11325 # this option without --with-pthreads, but this will be always set for
11326 # pthreads.
11327 echo "$as_me:11327: checking if you want experimental reentrant code" >&5
11328 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11329
11330 # Check whether --enable-reentrant or --disable-reentrant was given.
11331 if test "${enable_reentrant+set}" = set; then
11332   enableval="$enable_reentrant"
11333   with_reentrant=$enableval
11334 else
11335   with_reentrant=no
11336 fi;
11337 echo "$as_me:11337: result: $with_reentrant" >&5
11338 echo "${ECHO_T}$with_reentrant" >&6
11339 if test "$with_reentrant" = yes ; then
11340         cf_cv_enable_reentrant=1
11341         cf_cv_enable_opaque="NCURSES_INTERNALS"
11342         NCURSES_OPAQUE=1
11343         NCURSES_SIZE_T=int
11344         if test $cf_cv_weak_symbols = yes ; then
11345
11346 # remove pthread library from $LIBS
11347 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11348
11349                 TEST_LIBS="-lpthread $TEST_LIBS"
11350                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11351         else
11352                 LIB_SUFFIX="t${LIB_SUFFIX}"
11353         fi
11354         cat >>confdefs.h <<\EOF
11355 #define USE_REENTRANT 1
11356 EOF
11357
11358 if test "${with_abi_version+set}" != set; then
11359         case $cf_cv_rel_version in
11360         5.*)
11361                 cf_cv_rel_version=6.0
11362                 cf_cv_abi_version=6
11363                 { echo "$as_me:11363: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11364 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11365                 ;;
11366         esac
11367 fi
11368
11369 else
11370         cf_cv_enable_reentrant=0
11371         cf_cv_enable_opaque="NCURSES_OPAQUE"
11372         NCURSES_OPAQUE=0
11373         NCURSES_SIZE_T=short
11374 fi
11375
11376 ### Allow using a different wrap-prefix
11377 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11378         echo "$as_me:11378: checking for prefix used to wrap public variables" >&5
11379 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11380
11381 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11382 if test "${with_wrap_prefix+set}" = set; then
11383   withval="$with_wrap_prefix"
11384   NCURSES_WRAP_PREFIX=$withval
11385 else
11386   NCURSES_WRAP_PREFIX=_nc_
11387 fi;
11388         echo "$as_me:11388: result: $NCURSES_WRAP_PREFIX" >&5
11389 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11390 else
11391         NCURSES_WRAP_PREFIX=_nc_
11392 fi
11393
11394 cat >>confdefs.h <<EOF
11395 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11396 EOF
11397
11398 echo "$as_me:11398: checking if you want experimental safe-sprintf code" >&5
11399 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11400
11401 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11402 if test "${enable_safe_sprintf+set}" = set; then
11403   enableval="$enable_safe_sprintf"
11404   with_safe_sprintf=$enableval
11405 else
11406   with_safe_sprintf=no
11407 fi;
11408 echo "$as_me:11408: result: $with_safe_sprintf" >&5
11409 echo "${ECHO_T}$with_safe_sprintf" >&6
11410 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11411 #define USE_SAFE_SPRINTF 1
11412 EOF
11413
11414 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11415 # when hashmap is used scroll hints are useless
11416 if test "$with_hashmap" = no ; then
11417 echo "$as_me:11417: checking if you want to experiment without scrolling-hints code" >&5
11418 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11419
11420 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11421 if test "${enable_scroll_hints+set}" = set; then
11422   enableval="$enable_scroll_hints"
11423   with_scroll_hints=$enableval
11424 else
11425   with_scroll_hints=yes
11426 fi;
11427 echo "$as_me:11427: result: $with_scroll_hints" >&5
11428 echo "${ECHO_T}$with_scroll_hints" >&6
11429 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11430 #define USE_SCROLL_HINTS 1
11431 EOF
11432
11433 fi
11434
11435 echo "$as_me:11435: checking if you want experimental wgetch-events code" >&5
11436 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11437
11438 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11439 if test "${enable_wgetch_events+set}" = set; then
11440   enableval="$enable_wgetch_events"
11441   with_wgetch_events=$enableval
11442 else
11443   with_wgetch_events=no
11444 fi;
11445 echo "$as_me:11445: result: $with_wgetch_events" >&5
11446 echo "${ECHO_T}$with_wgetch_events" >&6
11447 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11448 #define NCURSES_WGETCH_EVENTS 1
11449 EOF
11450
11451 ###############################################################################
11452
11453 ###     use option --disable-echo to suppress full display compiling commands
11454 echo "$as_me:11454: checking if you want to display full commands during build" >&5
11455 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11456
11457 # Check whether --enable-echo or --disable-echo was given.
11458 if test "${enable_echo+set}" = set; then
11459   enableval="$enable_echo"
11460   with_echo=$enableval
11461 else
11462   with_echo=yes
11463 fi;
11464 if test "$with_echo" = yes; then
11465         ECHO_LINK=
11466 else
11467         ECHO_LINK='@ echo linking $@ ... ;'
11468         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11469         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11470 fi
11471 echo "$as_me:11471: result: $with_echo" >&5
11472 echo "${ECHO_T}$with_echo" >&6
11473
11474 ###     use option --enable-warnings to turn on all gcc warnings
11475 echo "$as_me:11475: checking if you want to see compiler warnings" >&5
11476 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11477
11478 # Check whether --enable-warnings or --disable-warnings was given.
11479 if test "${enable_warnings+set}" = set; then
11480   enableval="$enable_warnings"
11481   with_warnings=$enableval
11482 fi;
11483 echo "$as_me:11483: result: $with_warnings" >&5
11484 echo "${ECHO_T}$with_warnings" >&6
11485
11486 if test "x$with_warnings" = "xyes"; then
11487
11488         ADAFLAGS="$ADAFLAGS -gnatg"
11489
11490 INTEL_COMPILER=no
11491
11492 if test "$GCC" = yes ; then
11493         case $host_os in
11494         linux*|gnu*)
11495                 echo "$as_me:11495: checking if this is really Intel C compiler" >&5
11496 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11497                 cf_save_CFLAGS="$CFLAGS"
11498                 CFLAGS="$CFLAGS -no-gcc"
11499                 cat >conftest.$ac_ext <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502
11503 int
11504 main ()
11505 {
11506
11507 #ifdef __INTEL_COMPILER
11508 #else
11509 make an error
11510 #endif
11511
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 rm -f conftest.$ac_objext
11517 if { (eval echo "$as_me:11517: \"$ac_compile\"") >&5
11518   (eval $ac_compile) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit $ac_status); } &&
11522          { ac_try='test -s conftest.$ac_objext'
11523   { (eval echo "$as_me:11523: \"$ac_try\"") >&5
11524   (eval $ac_try) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); }; }; then
11528   INTEL_COMPILER=yes
11529 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11530
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 cat conftest.$ac_ext >&5
11534 fi
11535 rm -f conftest.$ac_objext conftest.$ac_ext
11536                 CFLAGS="$cf_save_CFLAGS"
11537                 echo "$as_me:11537: result: $INTEL_COMPILER" >&5
11538 echo "${ECHO_T}$INTEL_COMPILER" >&6
11539                 ;;
11540         esac
11541 fi
11542
11543 cat > conftest.$ac_ext <<EOF
11544 #line 11544 "${as_me:-configure}"
11545 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11546 EOF
11547
11548 if test "$INTEL_COMPILER" = yes
11549 then
11550 # The "-wdXXX" options suppress warnings:
11551 # remark #1419: external declaration in primary source file
11552 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11553 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11554 # remark #193: zero used for undefined preprocessing identifier
11555 # remark #593: variable "curs_sb_left_arrow" was set but never used
11556 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11557 # remark #869: parameter "tw" was never referenced
11558 # remark #981: operands are evaluated in unspecified order
11559 # warning #279: controlling expression is constant
11560
11561         { echo "$as_me:11561: checking for $CC warning options..." >&5
11562 echo "$as_me: checking for $CC warning options..." >&6;}
11563         cf_save_CFLAGS="$CFLAGS"
11564         EXTRA_CFLAGS="-Wall"
11565         for cf_opt in \
11566                 wd1419 \
11567                 wd1683 \
11568                 wd1684 \
11569                 wd193 \
11570                 wd593 \
11571                 wd279 \
11572                 wd810 \
11573                 wd869 \
11574                 wd981
11575         do
11576                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11577                 if { (eval echo "$as_me:11577: \"$ac_compile\"") >&5
11578   (eval $ac_compile) 2>&5
11579   ac_status=$?
11580   echo "$as_me:11580: \$? = $ac_status" >&5
11581   (exit $ac_status); }; then
11582                         test -n "$verbose" && echo "$as_me:11582: result: ... -$cf_opt" >&5
11583 echo "${ECHO_T}... -$cf_opt" >&6
11584                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11585                 fi
11586         done
11587         CFLAGS="$cf_save_CFLAGS"
11588
11589 elif test "$GCC" = yes
11590 then
11591         { echo "$as_me:11591: checking for $CC warning options..." >&5
11592 echo "$as_me: checking for $CC warning options..." >&6;}
11593         cf_save_CFLAGS="$CFLAGS"
11594         EXTRA_CFLAGS=
11595         cf_warn_CONST=""
11596         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11597         for cf_opt in W Wall \
11598                 Wbad-function-cast \
11599                 Wcast-align \
11600                 Wcast-qual \
11601                 Winline \
11602                 Wmissing-declarations \
11603                 Wmissing-prototypes \
11604                 Wnested-externs \
11605                 Wpointer-arith \
11606                 Wshadow \
11607                 Wstrict-prototypes \
11608                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11609         do
11610                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11611                 if { (eval echo "$as_me:11611: \"$ac_compile\"") >&5
11612   (eval $ac_compile) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit $ac_status); }; then
11616                         test -n "$verbose" && echo "$as_me:11616: result: ... -$cf_opt" >&5
11617 echo "${ECHO_T}... -$cf_opt" >&6
11618                         case $cf_opt in #(vi
11619                         Wcast-qual) #(vi
11620                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11621                                 ;;
11622                         Winline) #(vi
11623                                 case $GCC_VERSION in
11624                                 [34].*)
11625                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11626
11627 echo "${as_me:-configure}:11627: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11628
11629                                         continue;;
11630                                 esac
11631                                 ;;
11632                         esac
11633                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11634                 fi
11635         done
11636         CFLAGS="$cf_save_CFLAGS"
11637 fi
11638 rm -rf conftest*
11639
11640         if test "$cf_with_cxx" = yes ; then
11641
11642 INTEL_CPLUSPLUS=no
11643
11644 if test "$GCC" = yes ; then
11645         case $host_os in
11646         linux*|gnu*)
11647                 echo "$as_me:11647: checking if this is really Intel C++ compiler" >&5
11648 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11649                 cf_save_CFLAGS="$CXXFLAGS"
11650                 CXXFLAGS="$CXXFLAGS -no-gcc"
11651                 cat >conftest.$ac_ext <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11654
11655 int
11656 main ()
11657 {
11658
11659 #ifdef __INTEL_COMPILER
11660 #else
11661 make an error
11662 #endif
11663
11664   ;
11665   return 0;
11666 }
11667 _ACEOF
11668 rm -f conftest.$ac_objext
11669 if { (eval echo "$as_me:11669: \"$ac_compile\"") >&5
11670   (eval $ac_compile) 2>&5
11671   ac_status=$?
11672   echo "$as_me:11672: \$? = $ac_status" >&5
11673   (exit $ac_status); } &&
11674          { ac_try='test -s conftest.$ac_objext'
11675   { (eval echo "$as_me:11675: \"$ac_try\"") >&5
11676   (eval $ac_try) 2>&5
11677   ac_status=$?
11678   echo "$as_me:11678: \$? = $ac_status" >&5
11679   (exit $ac_status); }; }; then
11680   INTEL_CPLUSPLUS=yes
11681 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11682
11683 else
11684   echo "$as_me: failed program was:" >&5
11685 cat conftest.$ac_ext >&5
11686 fi
11687 rm -f conftest.$ac_objext conftest.$ac_ext
11688                 CXXFLAGS="$cf_save_CFLAGS"
11689                 echo "$as_me:11689: result: $INTEL_CPLUSPLUS" >&5
11690 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11691                 ;;
11692         esac
11693 fi
11694
11695 ac_ext=cc
11696 ac_cpp='$CXXCPP $CPPFLAGS'
11697 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11698 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11699 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11700 ac_main_return=return
11701
11702 cat > conftest.$ac_ext <<EOF
11703 #line 11703 "configure"
11704 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11705 EOF
11706
11707 if test "$INTEL_CPLUSPLUS" = yes
11708 then
11709 # The "-wdXXX" options suppress warnings:
11710 # remark #1419: external declaration in primary source file
11711 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11712 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11713 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11714 # remark #193: zero used for undefined preprocessing identifier
11715 # remark #593: variable "curs_sb_left_arrow" was set but never used
11716 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11717 # remark #869: parameter "tw" was never referenced
11718 # remark #981: operands are evaluated in unspecified order
11719 # warning #269: invalid format string conversion
11720
11721         { echo "$as_me:11721: checking for $CC warning options..." >&5
11722 echo "$as_me: checking for $CC warning options..." >&6;}
11723         cf_save_CXXFLAGS="$CXXFLAGS"
11724         EXTRA_CXXFLAGS="-Wall"
11725         for cf_opt in \
11726                 wd1419 \
11727                 wd1682 \
11728                 wd1683 \
11729                 wd1684 \
11730                 wd193 \
11731                 wd279 \
11732                 wd593 \
11733                 wd810 \
11734                 wd869 \
11735                 wd981
11736         do
11737                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11738                 if { (eval echo "$as_me:11738: \"$ac_compile\"") >&5
11739   (eval $ac_compile) 2>&5
11740   ac_status=$?
11741   echo "$as_me:11741: \$? = $ac_status" >&5
11742   (exit $ac_status); }; then
11743                         test -n "$verbose" && echo "$as_me:11743: result: ... -$cf_opt" >&5
11744 echo "${ECHO_T}... -$cf_opt" >&6
11745                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11746                 fi
11747         done
11748         CXXFLAGS="$cf_save_CXXFLAGS"
11749
11750 elif test "$GXX" = yes
11751 then
11752         { echo "$as_me:11752: checking for $CXX warning options..." >&5
11753 echo "$as_me: checking for $CXX warning options..." >&6;}
11754         cf_save_CXXFLAGS="$CXXFLAGS"
11755         EXTRA_CXXFLAGS="-W -Wall"
11756         cf_gxx_extra_warnings=""
11757         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11758         case "$GCC_VERSION" in
11759         [1-2].*)
11760                 ;;
11761         *)
11762                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11763                 ;;
11764         esac
11765         for cf_opt in \
11766                 Wabi \
11767                 fabi-version=0 \
11768                 Woverloaded-virtual \
11769                 Wsign-promo \
11770                 Wsynth \
11771                 Wold-style-cast \
11772                 Wcast-align \
11773                 Wcast-qual \
11774                 Wmissing-prototypes \
11775                 Wpointer-arith \
11776                 Wshadow \
11777                 Wstrict-prototypes \
11778                 Wundef $cf_gxx_extra_warnings Wno-unused
11779         do
11780                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11781                 if { (eval echo "$as_me:11781: \"$ac_compile\"") >&5
11782   (eval $ac_compile) 2>&5
11783   ac_status=$?
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); }; then
11786                         test -n "$verbose" && echo "$as_me:11786: result: ... -$cf_opt" >&5
11787 echo "${ECHO_T}... -$cf_opt" >&6
11788                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11789                 else
11790                         test -n "$verbose" && echo "$as_me:11790: result: ... no -$cf_opt" >&5
11791 echo "${ECHO_T}... no -$cf_opt" >&6
11792                 fi
11793         done
11794         CXXFLAGS="$cf_save_CXXFLAGS"
11795 fi
11796
11797 rm -rf conftest*
11798 ac_ext=c
11799 ac_cpp='$CPP $CPPFLAGS'
11800 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11801 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11803 ac_main_return=return
11804
11805         fi
11806 fi
11807
11808 if test "$GCC" = yes
11809 then
11810 cat > conftest.i <<EOF
11811 #ifndef GCC_PRINTF
11812 #define GCC_PRINTF 0
11813 #endif
11814 #ifndef GCC_SCANF
11815 #define GCC_SCANF 0
11816 #endif
11817 #ifndef GCC_NORETURN
11818 #define GCC_NORETURN /* nothing */
11819 #endif
11820 #ifndef GCC_UNUSED
11821 #define GCC_UNUSED /* nothing */
11822 #endif
11823 EOF
11824 if test "$GCC" = yes
11825 then
11826         { echo "$as_me:11826: checking for $CC __attribute__ directives..." >&5
11827 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11828 cat > conftest.$ac_ext <<EOF
11829 #line 11829 "${as_me:-configure}"
11830 #include "confdefs.h"
11831 #include "conftest.h"
11832 #include "conftest.i"
11833 #if     GCC_PRINTF
11834 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11835 #else
11836 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11837 #endif
11838 #if     GCC_SCANF
11839 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11840 #else
11841 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11842 #endif
11843 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11844 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11845 extern void foo(void) GCC_NORETURN;
11846 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11847 EOF
11848         cf_printf_attribute=no
11849         cf_scanf_attribute=no
11850         for cf_attribute in scanf printf unused noreturn
11851         do
11852
11853 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11854
11855                 cf_directive="__attribute__(($cf_attribute))"
11856                 echo "checking for $CC $cf_directive" 1>&5
11857
11858                 case $cf_attribute in #(vi
11859                 printf) #(vi
11860                         cf_printf_attribute=yes
11861                         cat >conftest.h <<EOF
11862 #define GCC_$cf_ATTRIBUTE 1
11863 EOF
11864                         ;;
11865                 scanf) #(vi
11866                         cf_scanf_attribute=yes
11867                         cat >conftest.h <<EOF
11868 #define GCC_$cf_ATTRIBUTE 1
11869 EOF
11870                         ;;
11871                 *) #(vi
11872                         cat >conftest.h <<EOF
11873 #define GCC_$cf_ATTRIBUTE $cf_directive
11874 EOF
11875                         ;;
11876                 esac
11877
11878                 if { (eval echo "$as_me:11878: \"$ac_compile\"") >&5
11879   (eval $ac_compile) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit $ac_status); }; then
11883                         test -n "$verbose" && echo "$as_me:11883: result: ... $cf_attribute" >&5
11884 echo "${ECHO_T}... $cf_attribute" >&6
11885                         cat conftest.h >>confdefs.h
11886                         case $cf_attribute in #(vi
11887                         printf) #(vi
11888                                 if test "$cf_printf_attribute" = no ; then
11889                                         cat >>confdefs.h <<EOF
11890 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11891 EOF
11892                                 else
11893                                         cat >>confdefs.h <<EOF
11894 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11895 EOF
11896                                 fi
11897                                 ;;
11898                         scanf) #(vi
11899                                 if test "$cf_scanf_attribute" = no ; then
11900                                         cat >>confdefs.h <<EOF
11901 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11902 EOF
11903                                 else
11904                                         cat >>confdefs.h <<EOF
11905 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11906 EOF
11907                                 fi
11908                                 ;;
11909                         esac
11910                 fi
11911         done
11912 else
11913         fgrep define conftest.i >>confdefs.h
11914 fi
11915 rm -rf conftest*
11916 fi
11917
11918 ###     use option --enable-assertions to turn on generation of assertion code
11919 echo "$as_me:11919: checking if you want to enable runtime assertions" >&5
11920 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11921
11922 # Check whether --enable-assertions or --disable-assertions was given.
11923 if test "${enable_assertions+set}" = set; then
11924   enableval="$enable_assertions"
11925   with_assertions=$enableval
11926 else
11927   with_assertions=no
11928 fi;
11929 echo "$as_me:11929: result: $with_assertions" >&5
11930 echo "${ECHO_T}$with_assertions" >&6
11931 if test -n "$GCC"
11932 then
11933         if test "$with_assertions" = no
11934         then
11935                 cat >>confdefs.h <<\EOF
11936 #define NDEBUG 1
11937 EOF
11938
11939                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11940         else
11941
11942         ADAFLAGS="$ADAFLAGS -gnata"
11943
11944         fi
11945 fi
11946
11947 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11948
11949 echo "$as_me:11949: checking if you want to use dmalloc for testing" >&5
11950 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11951
11952 # Check whether --with-dmalloc or --without-dmalloc was given.
11953 if test "${with_dmalloc+set}" = set; then
11954   withval="$with_dmalloc"
11955   cat >>confdefs.h <<\EOF
11956 #define USE_DMALLOC 1
11957 EOF
11958
11959         : ${with_cflags:=-g}
11960         : ${with_no_leaks:=yes}
11961          with_dmalloc=yes
11962 else
11963   with_dmalloc=
11964 fi;
11965 echo "$as_me:11965: result: ${with_dmalloc:-no}" >&5
11966 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11967
11968 case .$with_cflags in #(vi
11969 .*-g*)
11970         case .$CFLAGS in #(vi
11971         .*-g*) #(vi
11972                 ;;
11973         *)
11974
11975 cf_fix_cppflags=no
11976 cf_new_cflags=
11977 cf_new_cppflags=
11978 cf_new_extra_cppflags=
11979
11980 for cf_add_cflags in -g
11981 do
11982 case $cf_fix_cppflags in
11983 no)
11984         case $cf_add_cflags in #(vi
11985         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11986                 case $cf_add_cflags in
11987                 -D*)
11988                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11989
11990                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11991                                 && test -z "${cf_tst_cflags}" \
11992                                 && cf_fix_cppflags=yes
11993
11994                         if test $cf_fix_cppflags = yes ; then
11995                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11996                                 continue
11997                         elif test "${cf_tst_cflags}" = "\"'" ; then
11998                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11999                                 continue
12000                         fi
12001                         ;;
12002                 esac
12003                 case "$CPPFLAGS" in
12004                 *$cf_add_cflags) #(vi
12005                         ;;
12006                 *) #(vi
12007                         case $cf_add_cflags in #(vi
12008                         -D*)
12009                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12010
12011 CPPFLAGS=`echo "$CPPFLAGS" | \
12012         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12013                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12014
12015                                 ;;
12016                         esac
12017                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12018                         ;;
12019                 esac
12020                 ;;
12021         *)
12022                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12023                 ;;
12024         esac
12025         ;;
12026 yes)
12027         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12028
12029         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12030
12031         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12032                 && test -z "${cf_tst_cflags}" \
12033                 && cf_fix_cppflags=no
12034         ;;
12035 esac
12036 done
12037
12038 if test -n "$cf_new_cflags" ; then
12039
12040         CFLAGS="$CFLAGS $cf_new_cflags"
12041 fi
12042
12043 if test -n "$cf_new_cppflags" ; then
12044
12045         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12046 fi
12047
12048 if test -n "$cf_new_extra_cppflags" ; then
12049
12050         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12051 fi
12052
12053                 ;;
12054         esac
12055         ;;
12056 esac
12057
12058 if test "$with_dmalloc" = yes ; then
12059         echo "$as_me:12059: checking for dmalloc.h" >&5
12060 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12061 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12062   echo $ECHO_N "(cached) $ECHO_C" >&6
12063 else
12064   cat >conftest.$ac_ext <<_ACEOF
12065 #line 12065 "configure"
12066 #include "confdefs.h"
12067 #include <dmalloc.h>
12068 _ACEOF
12069 if { (eval echo "$as_me:12069: \"$ac_cpp conftest.$ac_ext\"") >&5
12070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12071   ac_status=$?
12072   egrep -v '^ *\+' conftest.er1 >conftest.err
12073   rm -f conftest.er1
12074   cat conftest.err >&5
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); } >/dev/null; then
12077   if test -s conftest.err; then
12078     ac_cpp_err=$ac_c_preproc_warn_flag
12079   else
12080     ac_cpp_err=
12081   fi
12082 else
12083   ac_cpp_err=yes
12084 fi
12085 if test -z "$ac_cpp_err"; then
12086   ac_cv_header_dmalloc_h=yes
12087 else
12088   echo "$as_me: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   ac_cv_header_dmalloc_h=no
12091 fi
12092 rm -f conftest.err conftest.$ac_ext
12093 fi
12094 echo "$as_me:12094: result: $ac_cv_header_dmalloc_h" >&5
12095 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12096 if test $ac_cv_header_dmalloc_h = yes; then
12097
12098 echo "$as_me:12098: checking for dmalloc_debug in -ldmalloc" >&5
12099 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12100 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12101   echo $ECHO_N "(cached) $ECHO_C" >&6
12102 else
12103   ac_check_lib_save_LIBS=$LIBS
12104 LIBS="-ldmalloc  $LIBS"
12105 cat >conftest.$ac_ext <<_ACEOF
12106 #line 12106 "configure"
12107 #include "confdefs.h"
12108
12109 /* Override any gcc2 internal prototype to avoid an error.  */
12110 #ifdef __cplusplus
12111 extern "C"
12112 #endif
12113 /* We use char because int might match the return type of a gcc2
12114    builtin and then its argument prototype would still apply.  */
12115 char dmalloc_debug ();
12116 int
12117 main ()
12118 {
12119 dmalloc_debug ();
12120   ;
12121   return 0;
12122 }
12123 _ACEOF
12124 rm -f conftest.$ac_objext conftest$ac_exeext
12125 if { (eval echo "$as_me:12125: \"$ac_link\"") >&5
12126   (eval $ac_link) 2>&5
12127   ac_status=$?
12128   echo "$as_me:12128: \$? = $ac_status" >&5
12129   (exit $ac_status); } &&
12130          { ac_try='test -s conftest$ac_exeext'
12131   { (eval echo "$as_me:12131: \"$ac_try\"") >&5
12132   (eval $ac_try) 2>&5
12133   ac_status=$?
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); }; }; then
12136   ac_cv_lib_dmalloc_dmalloc_debug=yes
12137 else
12138   echo "$as_me: failed program was:" >&5
12139 cat conftest.$ac_ext >&5
12140 ac_cv_lib_dmalloc_dmalloc_debug=no
12141 fi
12142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12143 LIBS=$ac_check_lib_save_LIBS
12144 fi
12145 echo "$as_me:12145: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12146 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12147 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12148   cat >>confdefs.h <<EOF
12149 #define HAVE_LIBDMALLOC 1
12150 EOF
12151
12152   LIBS="-ldmalloc $LIBS"
12153
12154 fi
12155
12156 fi
12157
12158 fi
12159
12160 echo "$as_me:12160: checking if you want to use dbmalloc for testing" >&5
12161 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12162
12163 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12164 if test "${with_dbmalloc+set}" = set; then
12165   withval="$with_dbmalloc"
12166   cat >>confdefs.h <<\EOF
12167 #define USE_DBMALLOC 1
12168 EOF
12169
12170         : ${with_cflags:=-g}
12171         : ${with_no_leaks:=yes}
12172          with_dbmalloc=yes
12173 else
12174   with_dbmalloc=
12175 fi;
12176 echo "$as_me:12176: result: ${with_dbmalloc:-no}" >&5
12177 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12178
12179 case .$with_cflags in #(vi
12180 .*-g*)
12181         case .$CFLAGS in #(vi
12182         .*-g*) #(vi
12183                 ;;
12184         *)
12185
12186 cf_fix_cppflags=no
12187 cf_new_cflags=
12188 cf_new_cppflags=
12189 cf_new_extra_cppflags=
12190
12191 for cf_add_cflags in -g
12192 do
12193 case $cf_fix_cppflags in
12194 no)
12195         case $cf_add_cflags in #(vi
12196         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12197                 case $cf_add_cflags in
12198                 -D*)
12199                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12200
12201                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12202                                 && test -z "${cf_tst_cflags}" \
12203                                 && cf_fix_cppflags=yes
12204
12205                         if test $cf_fix_cppflags = yes ; then
12206                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12207                                 continue
12208                         elif test "${cf_tst_cflags}" = "\"'" ; then
12209                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12210                                 continue
12211                         fi
12212                         ;;
12213                 esac
12214                 case "$CPPFLAGS" in
12215                 *$cf_add_cflags) #(vi
12216                         ;;
12217                 *) #(vi
12218                         case $cf_add_cflags in #(vi
12219                         -D*)
12220                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12221
12222 CPPFLAGS=`echo "$CPPFLAGS" | \
12223         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12224                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12225
12226                                 ;;
12227                         esac
12228                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12229                         ;;
12230                 esac
12231                 ;;
12232         *)
12233                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12234                 ;;
12235         esac
12236         ;;
12237 yes)
12238         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12239
12240         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12241
12242         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12243                 && test -z "${cf_tst_cflags}" \
12244                 && cf_fix_cppflags=no
12245         ;;
12246 esac
12247 done
12248
12249 if test -n "$cf_new_cflags" ; then
12250
12251         CFLAGS="$CFLAGS $cf_new_cflags"
12252 fi
12253
12254 if test -n "$cf_new_cppflags" ; then
12255
12256         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12257 fi
12258
12259 if test -n "$cf_new_extra_cppflags" ; then
12260
12261         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12262 fi
12263
12264                 ;;
12265         esac
12266         ;;
12267 esac
12268
12269 if test "$with_dbmalloc" = yes ; then
12270         echo "$as_me:12270: checking for dbmalloc.h" >&5
12271 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12272 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278 #include <dbmalloc.h>
12279 _ACEOF
12280 if { (eval echo "$as_me:12280: \"$ac_cpp conftest.$ac_ext\"") >&5
12281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12282   ac_status=$?
12283   egrep -v '^ *\+' conftest.er1 >conftest.err
12284   rm -f conftest.er1
12285   cat conftest.err >&5
12286   echo "$as_me:12286: \$? = $ac_status" >&5
12287   (exit $ac_status); } >/dev/null; then
12288   if test -s conftest.err; then
12289     ac_cpp_err=$ac_c_preproc_warn_flag
12290   else
12291     ac_cpp_err=
12292   fi
12293 else
12294   ac_cpp_err=yes
12295 fi
12296 if test -z "$ac_cpp_err"; then
12297   ac_cv_header_dbmalloc_h=yes
12298 else
12299   echo "$as_me: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   ac_cv_header_dbmalloc_h=no
12302 fi
12303 rm -f conftest.err conftest.$ac_ext
12304 fi
12305 echo "$as_me:12305: result: $ac_cv_header_dbmalloc_h" >&5
12306 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12307 if test $ac_cv_header_dbmalloc_h = yes; then
12308
12309 echo "$as_me:12309: checking for debug_malloc in -ldbmalloc" >&5
12310 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12311 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12312   echo $ECHO_N "(cached) $ECHO_C" >&6
12313 else
12314   ac_check_lib_save_LIBS=$LIBS
12315 LIBS="-ldbmalloc  $LIBS"
12316 cat >conftest.$ac_ext <<_ACEOF
12317 #line 12317 "configure"
12318 #include "confdefs.h"
12319
12320 /* Override any gcc2 internal prototype to avoid an error.  */
12321 #ifdef __cplusplus
12322 extern "C"
12323 #endif
12324 /* We use char because int might match the return type of a gcc2
12325    builtin and then its argument prototype would still apply.  */
12326 char debug_malloc ();
12327 int
12328 main ()
12329 {
12330 debug_malloc ();
12331   ;
12332   return 0;
12333 }
12334 _ACEOF
12335 rm -f conftest.$ac_objext conftest$ac_exeext
12336 if { (eval echo "$as_me:12336: \"$ac_link\"") >&5
12337   (eval $ac_link) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); } &&
12341          { ac_try='test -s conftest$ac_exeext'
12342   { (eval echo "$as_me:12342: \"$ac_try\"") >&5
12343   (eval $ac_try) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); }; }; then
12347   ac_cv_lib_dbmalloc_debug_malloc=yes
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 cat conftest.$ac_ext >&5
12351 ac_cv_lib_dbmalloc_debug_malloc=no
12352 fi
12353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12354 LIBS=$ac_check_lib_save_LIBS
12355 fi
12356 echo "$as_me:12356: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12357 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12358 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12359   cat >>confdefs.h <<EOF
12360 #define HAVE_LIBDBMALLOC 1
12361 EOF
12362
12363   LIBS="-ldbmalloc $LIBS"
12364
12365 fi
12366
12367 fi
12368
12369 fi
12370
12371 echo "$as_me:12371: checking if you want to use valgrind for testing" >&5
12372 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12373
12374 # Check whether --with-valgrind or --without-valgrind was given.
12375 if test "${with_valgrind+set}" = set; then
12376   withval="$with_valgrind"
12377   cat >>confdefs.h <<\EOF
12378 #define USE_VALGRIND 1
12379 EOF
12380
12381         : ${with_cflags:=-g}
12382         : ${with_no_leaks:=yes}
12383          with_valgrind=yes
12384 else
12385   with_valgrind=
12386 fi;
12387 echo "$as_me:12387: result: ${with_valgrind:-no}" >&5
12388 echo "${ECHO_T}${with_valgrind:-no}" >&6
12389
12390 case .$with_cflags in #(vi
12391 .*-g*)
12392         case .$CFLAGS in #(vi
12393         .*-g*) #(vi
12394                 ;;
12395         *)
12396
12397 cf_fix_cppflags=no
12398 cf_new_cflags=
12399 cf_new_cppflags=
12400 cf_new_extra_cppflags=
12401
12402 for cf_add_cflags in -g
12403 do
12404 case $cf_fix_cppflags in
12405 no)
12406         case $cf_add_cflags in #(vi
12407         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12408                 case $cf_add_cflags in
12409                 -D*)
12410                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12411
12412                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12413                                 && test -z "${cf_tst_cflags}" \
12414                                 && cf_fix_cppflags=yes
12415
12416                         if test $cf_fix_cppflags = yes ; then
12417                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12418                                 continue
12419                         elif test "${cf_tst_cflags}" = "\"'" ; then
12420                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12421                                 continue
12422                         fi
12423                         ;;
12424                 esac
12425                 case "$CPPFLAGS" in
12426                 *$cf_add_cflags) #(vi
12427                         ;;
12428                 *) #(vi
12429                         case $cf_add_cflags in #(vi
12430                         -D*)
12431                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12432
12433 CPPFLAGS=`echo "$CPPFLAGS" | \
12434         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12435                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12436
12437                                 ;;
12438                         esac
12439                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12440                         ;;
12441                 esac
12442                 ;;
12443         *)
12444                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12445                 ;;
12446         esac
12447         ;;
12448 yes)
12449         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12450
12451         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12452
12453         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12454                 && test -z "${cf_tst_cflags}" \
12455                 && cf_fix_cppflags=no
12456         ;;
12457 esac
12458 done
12459
12460 if test -n "$cf_new_cflags" ; then
12461
12462         CFLAGS="$CFLAGS $cf_new_cflags"
12463 fi
12464
12465 if test -n "$cf_new_cppflags" ; then
12466
12467         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12468 fi
12469
12470 if test -n "$cf_new_extra_cppflags" ; then
12471
12472         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12473 fi
12474
12475                 ;;
12476         esac
12477         ;;
12478 esac
12479
12480 echo "$as_me:12480: checking if you want to perform memory-leak testing" >&5
12481 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12482
12483 # Check whether --enable-leaks or --disable-leaks was given.
12484 if test "${enable_leaks+set}" = set; then
12485   enableval="$enable_leaks"
12486   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12487 else
12488   : ${with_no_leaks:=no}
12489 fi;
12490 echo "$as_me:12490: result: $with_no_leaks" >&5
12491 echo "${ECHO_T}$with_no_leaks" >&6
12492
12493 if test "$with_no_leaks" = yes ; then
12494         cat >>confdefs.h <<\EOF
12495 #define NO_LEAKS 1
12496 EOF
12497
12498         cat >>confdefs.h <<\EOF
12499 #define YY_NO_LEAKS 1
12500 EOF
12501
12502 fi
12503
12504 cat >>confdefs.h <<\EOF
12505 #define HAVE_NC_ALLOC_H 1
12506 EOF
12507
12508 ###     use option --enable-expanded to generate certain macros as functions
12509
12510 # Check whether --enable-expanded or --disable-expanded was given.
12511 if test "${enable_expanded+set}" = set; then
12512   enableval="$enable_expanded"
12513   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12514 #define NCURSES_EXPANDED 1
12515 EOF
12516
12517 fi;
12518
12519 ###     use option --disable-macros to suppress macros in favor of functions
12520
12521 # Check whether --enable-macros or --disable-macros was given.
12522 if test "${enable_macros+set}" = set; then
12523   enableval="$enable_macros"
12524   test "$enableval" = no && cat >>confdefs.h <<\EOF
12525 #define NCURSES_NOMACROS 1
12526 EOF
12527
12528 fi;
12529
12530 # Normally we only add trace() to the debug-library.  Allow this to be
12531 # extended to all models of the ncurses library:
12532 cf_all_traces=no
12533 case "$CFLAGS $CPPFLAGS" in
12534 *-DTRACE*)
12535         cf_all_traces=yes
12536         ;;
12537 esac
12538
12539 echo "$as_me:12539: checking whether to add trace feature to all models" >&5
12540 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12541
12542 # Check whether --with-trace or --without-trace was given.
12543 if test "${with_trace+set}" = set; then
12544   withval="$with_trace"
12545   cf_with_trace=$withval
12546 else
12547   cf_with_trace=$cf_all_traces
12548 fi;
12549 echo "$as_me:12549: result: $cf_with_trace" >&5
12550 echo "${ECHO_T}$cf_with_trace" >&6
12551
12552 if test "$cf_with_trace" = yes ; then
12553         LIB_TRACING=all
12554         ADA_TRACE=TRUE
12555
12556 cf_fix_cppflags=no
12557 cf_new_cflags=
12558 cf_new_cppflags=
12559 cf_new_extra_cppflags=
12560
12561 for cf_add_cflags in -DTRACE
12562 do
12563 case $cf_fix_cppflags in
12564 no)
12565         case $cf_add_cflags in #(vi
12566         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12567                 case $cf_add_cflags in
12568                 -D*)
12569                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12570
12571                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12572                                 && test -z "${cf_tst_cflags}" \
12573                                 && cf_fix_cppflags=yes
12574
12575                         if test $cf_fix_cppflags = yes ; then
12576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12577                                 continue
12578                         elif test "${cf_tst_cflags}" = "\"'" ; then
12579                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12580                                 continue
12581                         fi
12582                         ;;
12583                 esac
12584                 case "$CPPFLAGS" in
12585                 *$cf_add_cflags) #(vi
12586                         ;;
12587                 *) #(vi
12588                         case $cf_add_cflags in #(vi
12589                         -D*)
12590                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12591
12592 CPPFLAGS=`echo "$CPPFLAGS" | \
12593         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12594                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12595
12596                                 ;;
12597                         esac
12598                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12599                         ;;
12600                 esac
12601                 ;;
12602         *)
12603                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12604                 ;;
12605         esac
12606         ;;
12607 yes)
12608         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12609
12610         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12611
12612         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12613                 && test -z "${cf_tst_cflags}" \
12614                 && cf_fix_cppflags=no
12615         ;;
12616 esac
12617 done
12618
12619 if test -n "$cf_new_cflags" ; then
12620
12621         CFLAGS="$CFLAGS $cf_new_cflags"
12622 fi
12623
12624 if test -n "$cf_new_cppflags" ; then
12625
12626         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12627 fi
12628
12629 if test -n "$cf_new_extra_cppflags" ; then
12630
12631         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12632 fi
12633
12634 else
12635         LIB_TRACING=DEBUG
12636         ADA_TRACE=FALSE
12637 fi
12638
12639 ###     Checks for libraries.
12640 case $cf_cv_system_name in #(vi
12641 *mingw32*) #(vi
12642         ;;
12643 *)
12644 echo "$as_me:12644: checking for gettimeofday" >&5
12645 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12646 if test "${ac_cv_func_gettimeofday+set}" = set; then
12647   echo $ECHO_N "(cached) $ECHO_C" >&6
12648 else
12649   cat >conftest.$ac_ext <<_ACEOF
12650 #line 12650 "configure"
12651 #include "confdefs.h"
12652 /* System header to define __stub macros and hopefully few prototypes,
12653     which can conflict with char gettimeofday (); below.  */
12654 #include <assert.h>
12655 /* Override any gcc2 internal prototype to avoid an error.  */
12656 #ifdef __cplusplus
12657 extern "C"
12658 #endif
12659 /* We use char because int might match the return type of a gcc2
12660    builtin and then its argument prototype would still apply.  */
12661 char gettimeofday ();
12662 char (*f) ();
12663
12664 int
12665 main ()
12666 {
12667 /* The GNU C library defines this for functions which it implements
12668     to always fail with ENOSYS.  Some functions are actually named
12669     something starting with __ and the normal name is an alias.  */
12670 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12671 choke me
12672 #else
12673 f = gettimeofday;
12674 #endif
12675
12676   ;
12677   return 0;
12678 }
12679 _ACEOF
12680 rm -f conftest.$ac_objext conftest$ac_exeext
12681 if { (eval echo "$as_me:12681: \"$ac_link\"") >&5
12682   (eval $ac_link) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); } &&
12686          { ac_try='test -s conftest$ac_exeext'
12687   { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688   (eval $ac_try) 2>&5
12689   ac_status=$?
12690   echo "$as_me:12690: \$? = $ac_status" >&5
12691   (exit $ac_status); }; }; then
12692   ac_cv_func_gettimeofday=yes
12693 else
12694   echo "$as_me: failed program was:" >&5
12695 cat conftest.$ac_ext >&5
12696 ac_cv_func_gettimeofday=no
12697 fi
12698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12699 fi
12700 echo "$as_me:12700: result: $ac_cv_func_gettimeofday" >&5
12701 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12702 if test $ac_cv_func_gettimeofday = yes; then
12703   cat >>confdefs.h <<\EOF
12704 #define HAVE_GETTIMEOFDAY 1
12705 EOF
12706
12707 else
12708
12709 echo "$as_me:12709: checking for gettimeofday in -lbsd" >&5
12710 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12711 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12712   echo $ECHO_N "(cached) $ECHO_C" >&6
12713 else
12714   ac_check_lib_save_LIBS=$LIBS
12715 LIBS="-lbsd  $LIBS"
12716 cat >conftest.$ac_ext <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719
12720 /* Override any gcc2 internal prototype to avoid an error.  */
12721 #ifdef __cplusplus
12722 extern "C"
12723 #endif
12724 /* We use char because int might match the return type of a gcc2
12725    builtin and then its argument prototype would still apply.  */
12726 char gettimeofday ();
12727 int
12728 main ()
12729 {
12730 gettimeofday ();
12731   ;
12732   return 0;
12733 }
12734 _ACEOF
12735 rm -f conftest.$ac_objext conftest$ac_exeext
12736 if { (eval echo "$as_me:12736: \"$ac_link\"") >&5
12737   (eval $ac_link) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit $ac_status); } &&
12741          { ac_try='test -s conftest$ac_exeext'
12742   { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743   (eval $ac_try) 2>&5
12744   ac_status=$?
12745   echo "$as_me:12745: \$? = $ac_status" >&5
12746   (exit $ac_status); }; }; then
12747   ac_cv_lib_bsd_gettimeofday=yes
12748 else
12749   echo "$as_me: failed program was:" >&5
12750 cat conftest.$ac_ext >&5
12751 ac_cv_lib_bsd_gettimeofday=no
12752 fi
12753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12754 LIBS=$ac_check_lib_save_LIBS
12755 fi
12756 echo "$as_me:12756: result: $ac_cv_lib_bsd_gettimeofday" >&5
12757 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12758 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12759   cat >>confdefs.h <<\EOF
12760 #define HAVE_GETTIMEOFDAY 1
12761 EOF
12762
12763         LIBS="-lbsd $LIBS"
12764 fi
12765
12766 fi
12767         ;;
12768 esac
12769
12770 echo "$as_me:12770: checking if -lm needed for math functions" >&5
12771 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12772 if test "${cf_cv_need_libm+set}" = set; then
12773   echo $ECHO_N "(cached) $ECHO_C" >&6
12774 else
12775
12776         cat >conftest.$ac_ext <<_ACEOF
12777 #line 12777 "configure"
12778 #include "confdefs.h"
12779
12780         #include <stdio.h>
12781         #include <math.h>
12782
12783 int
12784 main ()
12785 {
12786 double x = rand(); printf("result = %g\n", sin(x))
12787   ;
12788   return 0;
12789 }
12790 _ACEOF
12791 rm -f conftest.$ac_objext conftest$ac_exeext
12792 if { (eval echo "$as_me:12792: \"$ac_link\"") >&5
12793   (eval $ac_link) 2>&5
12794   ac_status=$?
12795   echo "$as_me:12795: \$? = $ac_status" >&5
12796   (exit $ac_status); } &&
12797          { ac_try='test -s conftest$ac_exeext'
12798   { (eval echo "$as_me:12798: \"$ac_try\"") >&5
12799   (eval $ac_try) 2>&5
12800   ac_status=$?
12801   echo "$as_me:12801: \$? = $ac_status" >&5
12802   (exit $ac_status); }; }; then
12803   cf_cv_need_libm=no
12804 else
12805   echo "$as_me: failed program was:" >&5
12806 cat conftest.$ac_ext >&5
12807 cf_cv_need_libm=yes
12808 fi
12809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12810 fi
12811 echo "$as_me:12811: result: $cf_cv_need_libm" >&5
12812 echo "${ECHO_T}$cf_cv_need_libm" >&6
12813 if test "$cf_cv_need_libm" = yes
12814 then
12815 MATH_LIB=-lm
12816 fi
12817
12818 ###     Checks for header files.
12819 echo "$as_me:12819: checking for ANSI C header files" >&5
12820 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12821 if test "${ac_cv_header_stdc+set}" = set; then
12822   echo $ECHO_N "(cached) $ECHO_C" >&6
12823 else
12824   cat >conftest.$ac_ext <<_ACEOF
12825 #line 12825 "configure"
12826 #include "confdefs.h"
12827 #include <stdlib.h>
12828 #include <stdarg.h>
12829 #include <string.h>
12830 #include <float.h>
12831
12832 _ACEOF
12833 if { (eval echo "$as_me:12833: \"$ac_cpp conftest.$ac_ext\"") >&5
12834   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12835   ac_status=$?
12836   egrep -v '^ *\+' conftest.er1 >conftest.err
12837   rm -f conftest.er1
12838   cat conftest.err >&5
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit $ac_status); } >/dev/null; then
12841   if test -s conftest.err; then
12842     ac_cpp_err=$ac_c_preproc_warn_flag
12843   else
12844     ac_cpp_err=
12845   fi
12846 else
12847   ac_cpp_err=yes
12848 fi
12849 if test -z "$ac_cpp_err"; then
12850   ac_cv_header_stdc=yes
12851 else
12852   echo "$as_me: failed program was:" >&5
12853   cat conftest.$ac_ext >&5
12854   ac_cv_header_stdc=no
12855 fi
12856 rm -f conftest.err conftest.$ac_ext
12857
12858 if test $ac_cv_header_stdc = yes; then
12859   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12860   cat >conftest.$ac_ext <<_ACEOF
12861 #line 12861 "configure"
12862 #include "confdefs.h"
12863 #include <string.h>
12864
12865 _ACEOF
12866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12867   egrep "memchr" >/dev/null 2>&1; then
12868   :
12869 else
12870   ac_cv_header_stdc=no
12871 fi
12872 rm -rf conftest*
12873
12874 fi
12875
12876 if test $ac_cv_header_stdc = yes; then
12877   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12878   cat >conftest.$ac_ext <<_ACEOF
12879 #line 12879 "configure"
12880 #include "confdefs.h"
12881 #include <stdlib.h>
12882
12883 _ACEOF
12884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12885   egrep "free" >/dev/null 2>&1; then
12886   :
12887 else
12888   ac_cv_header_stdc=no
12889 fi
12890 rm -rf conftest*
12891
12892 fi
12893
12894 if test $ac_cv_header_stdc = yes; then
12895   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12896   if test "$cross_compiling" = yes; then
12897   :
12898 else
12899   cat >conftest.$ac_ext <<_ACEOF
12900 #line 12900 "configure"
12901 #include "confdefs.h"
12902 #include <ctype.h>
12903 #if ((' ' & 0x0FF) == 0x020)
12904 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12905 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12906 #else
12907 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12908                      || ('j' <= (c) && (c) <= 'r') \
12909                      || ('s' <= (c) && (c) <= 'z'))
12910 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12911 #endif
12912
12913 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12914 int
12915 main ()
12916 {
12917   int i;
12918   for (i = 0; i < 256; i++)
12919     if (XOR (islower (i), ISLOWER (i))
12920         || toupper (i) != TOUPPER (i))
12921       $ac_main_return(2);
12922   $ac_main_return (0);
12923 }
12924 _ACEOF
12925 rm -f conftest$ac_exeext
12926 if { (eval echo "$as_me:12926: \"$ac_link\"") >&5
12927   (eval $ac_link) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12931   { (eval echo "$as_me:12931: \"$ac_try\"") >&5
12932   (eval $ac_try) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); }; }; then
12936   :
12937 else
12938   echo "$as_me: program exited with status $ac_status" >&5
12939 echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 ac_cv_header_stdc=no
12942 fi
12943 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12944 fi
12945 fi
12946 fi
12947 echo "$as_me:12947: result: $ac_cv_header_stdc" >&5
12948 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12949 if test $ac_cv_header_stdc = yes; then
12950
12951 cat >>confdefs.h <<\EOF
12952 #define STDC_HEADERS 1
12953 EOF
12954
12955 fi
12956
12957 ac_header_dirent=no
12958 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12959   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12960 echo "$as_me:12960: checking for $ac_hdr that defines DIR" >&5
12961 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12963   echo $ECHO_N "(cached) $ECHO_C" >&6
12964 else
12965   cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968 #include <sys/types.h>
12969 #include <$ac_hdr>
12970
12971 int
12972 main ()
12973 {
12974 if ((DIR *) 0)
12975 return 0;
12976   ;
12977   return 0;
12978 }
12979 _ACEOF
12980 rm -f conftest.$ac_objext
12981 if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
12982   (eval $ac_compile) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); } &&
12986          { ac_try='test -s conftest.$ac_objext'
12987   { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12988   (eval $ac_try) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); }; }; then
12992   eval "$as_ac_Header=yes"
12993 else
12994   echo "$as_me: failed program was:" >&5
12995 cat conftest.$ac_ext >&5
12996 eval "$as_ac_Header=no"
12997 fi
12998 rm -f conftest.$ac_objext conftest.$ac_ext
12999 fi
13000 echo "$as_me:13000: result: `eval echo '${'$as_ac_Header'}'`" >&5
13001 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13002 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13003   cat >>confdefs.h <<EOF
13004 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13005 EOF
13006
13007 ac_header_dirent=$ac_hdr; break
13008 fi
13009
13010 done
13011 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13012 if test $ac_header_dirent = dirent.h; then
13013   echo "$as_me:13013: checking for opendir in -ldir" >&5
13014 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13015 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13016   echo $ECHO_N "(cached) $ECHO_C" >&6
13017 else
13018   ac_check_lib_save_LIBS=$LIBS
13019 LIBS="-ldir  $LIBS"
13020 cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023
13024 /* Override any gcc2 internal prototype to avoid an error.  */
13025 #ifdef __cplusplus
13026 extern "C"
13027 #endif
13028 /* We use char because int might match the return type of a gcc2
13029    builtin and then its argument prototype would still apply.  */
13030 char opendir ();
13031 int
13032 main ()
13033 {
13034 opendir ();
13035   ;
13036   return 0;
13037 }
13038 _ACEOF
13039 rm -f conftest.$ac_objext conftest$ac_exeext
13040 if { (eval echo "$as_me:13040: \"$ac_link\"") >&5
13041   (eval $ac_link) 2>&5
13042   ac_status=$?
13043   echo "$as_me:13043: \$? = $ac_status" >&5
13044   (exit $ac_status); } &&
13045          { ac_try='test -s conftest$ac_exeext'
13046   { (eval echo "$as_me:13046: \"$ac_try\"") >&5
13047   (eval $ac_try) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit $ac_status); }; }; then
13051   ac_cv_lib_dir_opendir=yes
13052 else
13053   echo "$as_me: failed program was:" >&5
13054 cat conftest.$ac_ext >&5
13055 ac_cv_lib_dir_opendir=no
13056 fi
13057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13058 LIBS=$ac_check_lib_save_LIBS
13059 fi
13060 echo "$as_me:13060: result: $ac_cv_lib_dir_opendir" >&5
13061 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13062 if test $ac_cv_lib_dir_opendir = yes; then
13063   LIBS="$LIBS -ldir"
13064 fi
13065
13066 else
13067   echo "$as_me:13067: checking for opendir in -lx" >&5
13068 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13069 if test "${ac_cv_lib_x_opendir+set}" = set; then
13070   echo $ECHO_N "(cached) $ECHO_C" >&6
13071 else
13072   ac_check_lib_save_LIBS=$LIBS
13073 LIBS="-lx  $LIBS"
13074 cat >conftest.$ac_ext <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13077
13078 /* Override any gcc2 internal prototype to avoid an error.  */
13079 #ifdef __cplusplus
13080 extern "C"
13081 #endif
13082 /* We use char because int might match the return type of a gcc2
13083    builtin and then its argument prototype would still apply.  */
13084 char opendir ();
13085 int
13086 main ()
13087 {
13088 opendir ();
13089   ;
13090   return 0;
13091 }
13092 _ACEOF
13093 rm -f conftest.$ac_objext conftest$ac_exeext
13094 if { (eval echo "$as_me:13094: \"$ac_link\"") >&5
13095   (eval $ac_link) 2>&5
13096   ac_status=$?
13097   echo "$as_me:13097: \$? = $ac_status" >&5
13098   (exit $ac_status); } &&
13099          { ac_try='test -s conftest$ac_exeext'
13100   { (eval echo "$as_me:13100: \"$ac_try\"") >&5
13101   (eval $ac_try) 2>&5
13102   ac_status=$?
13103   echo "$as_me:13103: \$? = $ac_status" >&5
13104   (exit $ac_status); }; }; then
13105   ac_cv_lib_x_opendir=yes
13106 else
13107   echo "$as_me: failed program was:" >&5
13108 cat conftest.$ac_ext >&5
13109 ac_cv_lib_x_opendir=no
13110 fi
13111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13112 LIBS=$ac_check_lib_save_LIBS
13113 fi
13114 echo "$as_me:13114: result: $ac_cv_lib_x_opendir" >&5
13115 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13116 if test $ac_cv_lib_x_opendir = yes; then
13117   LIBS="$LIBS -lx"
13118 fi
13119
13120 fi
13121
13122 echo "$as_me:13122: checking whether time.h and sys/time.h may both be included" >&5
13123 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13124 if test "${ac_cv_header_time+set}" = set; then
13125   echo $ECHO_N "(cached) $ECHO_C" >&6
13126 else
13127   cat >conftest.$ac_ext <<_ACEOF
13128 #line 13128 "configure"
13129 #include "confdefs.h"
13130 #include <sys/types.h>
13131 #include <sys/time.h>
13132 #include <time.h>
13133
13134 int
13135 main ()
13136 {
13137 if ((struct tm *) 0)
13138 return 0;
13139   ;
13140   return 0;
13141 }
13142 _ACEOF
13143 rm -f conftest.$ac_objext
13144 if { (eval echo "$as_me:13144: \"$ac_compile\"") >&5
13145   (eval $ac_compile) 2>&5
13146   ac_status=$?
13147   echo "$as_me:13147: \$? = $ac_status" >&5
13148   (exit $ac_status); } &&
13149          { ac_try='test -s conftest.$ac_objext'
13150   { (eval echo "$as_me:13150: \"$ac_try\"") >&5
13151   (eval $ac_try) 2>&5
13152   ac_status=$?
13153   echo "$as_me:13153: \$? = $ac_status" >&5
13154   (exit $ac_status); }; }; then
13155   ac_cv_header_time=yes
13156 else
13157   echo "$as_me: failed program was:" >&5
13158 cat conftest.$ac_ext >&5
13159 ac_cv_header_time=no
13160 fi
13161 rm -f conftest.$ac_objext conftest.$ac_ext
13162 fi
13163 echo "$as_me:13163: result: $ac_cv_header_time" >&5
13164 echo "${ECHO_T}$ac_cv_header_time" >&6
13165 if test $ac_cv_header_time = yes; then
13166
13167 cat >>confdefs.h <<\EOF
13168 #define TIME_WITH_SYS_TIME 1
13169 EOF
13170
13171 fi
13172
13173 cf_regex_func=no
13174
13175 cf_regex_libs="regex re"
13176 case $host_os in #(vi
13177 mingw*)
13178         cf_regex_libs="regex.dll $cf_regex_libs"
13179         ;;
13180 esac
13181
13182 echo "$as_me:13182: checking for regcomp" >&5
13183 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13184 if test "${ac_cv_func_regcomp+set}" = set; then
13185   echo $ECHO_N "(cached) $ECHO_C" >&6
13186 else
13187   cat >conftest.$ac_ext <<_ACEOF
13188 #line 13188 "configure"
13189 #include "confdefs.h"
13190 /* System header to define __stub macros and hopefully few prototypes,
13191     which can conflict with char regcomp (); below.  */
13192 #include <assert.h>
13193 /* Override any gcc2 internal prototype to avoid an error.  */
13194 #ifdef __cplusplus
13195 extern "C"
13196 #endif
13197 /* We use char because int might match the return type of a gcc2
13198    builtin and then its argument prototype would still apply.  */
13199 char regcomp ();
13200 char (*f) ();
13201
13202 int
13203 main ()
13204 {
13205 /* The GNU C library defines this for functions which it implements
13206     to always fail with ENOSYS.  Some functions are actually named
13207     something starting with __ and the normal name is an alias.  */
13208 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13209 choke me
13210 #else
13211 f = regcomp;
13212 #endif
13213
13214   ;
13215   return 0;
13216 }
13217 _ACEOF
13218 rm -f conftest.$ac_objext conftest$ac_exeext
13219 if { (eval echo "$as_me:13219: \"$ac_link\"") >&5
13220   (eval $ac_link) 2>&5
13221   ac_status=$?
13222   echo "$as_me:13222: \$? = $ac_status" >&5
13223   (exit $ac_status); } &&
13224          { ac_try='test -s conftest$ac_exeext'
13225   { (eval echo "$as_me:13225: \"$ac_try\"") >&5
13226   (eval $ac_try) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit $ac_status); }; }; then
13230   ac_cv_func_regcomp=yes
13231 else
13232   echo "$as_me: failed program was:" >&5
13233 cat conftest.$ac_ext >&5
13234 ac_cv_func_regcomp=no
13235 fi
13236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13237 fi
13238 echo "$as_me:13238: result: $ac_cv_func_regcomp" >&5
13239 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13240 if test $ac_cv_func_regcomp = yes; then
13241   cf_regex_func=regcomp
13242 else
13243
13244         for cf_regex_lib in $cf_regex_libs
13245         do
13246                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13247 echo "$as_me:13247: checking for regcomp in -l$cf_regex_lib" >&5
13248 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13249 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13250   echo $ECHO_N "(cached) $ECHO_C" >&6
13251 else
13252   ac_check_lib_save_LIBS=$LIBS
13253 LIBS="-l$cf_regex_lib  $LIBS"
13254 cat >conftest.$ac_ext <<_ACEOF
13255 #line 13255 "configure"
13256 #include "confdefs.h"
13257
13258 /* Override any gcc2 internal prototype to avoid an error.  */
13259 #ifdef __cplusplus
13260 extern "C"
13261 #endif
13262 /* We use char because int might match the return type of a gcc2
13263    builtin and then its argument prototype would still apply.  */
13264 char regcomp ();
13265 int
13266 main ()
13267 {
13268 regcomp ();
13269   ;
13270   return 0;
13271 }
13272 _ACEOF
13273 rm -f conftest.$ac_objext conftest$ac_exeext
13274 if { (eval echo "$as_me:13274: \"$ac_link\"") >&5
13275   (eval $ac_link) 2>&5
13276   ac_status=$?
13277   echo "$as_me:13277: \$? = $ac_status" >&5
13278   (exit $ac_status); } &&
13279          { ac_try='test -s conftest$ac_exeext'
13280   { (eval echo "$as_me:13280: \"$ac_try\"") >&5
13281   (eval $ac_try) 2>&5
13282   ac_status=$?
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit $ac_status); }; }; then
13285   eval "$as_ac_Lib=yes"
13286 else
13287   echo "$as_me: failed program was:" >&5
13288 cat conftest.$ac_ext >&5
13289 eval "$as_ac_Lib=no"
13290 fi
13291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13292 LIBS=$ac_check_lib_save_LIBS
13293 fi
13294 echo "$as_me:13294: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13295 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13296 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13297
13298                                 LIBS="-l$cf_regex_lib $LIBS"
13299                                 cf_regex_func=regcomp
13300                                 break
13301 fi
13302
13303         done
13304
13305 fi
13306
13307 if test "$cf_regex_func" = no ; then
13308         echo "$as_me:13308: checking for compile" >&5
13309 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13310 if test "${ac_cv_func_compile+set}" = set; then
13311   echo $ECHO_N "(cached) $ECHO_C" >&6
13312 else
13313   cat >conftest.$ac_ext <<_ACEOF
13314 #line 13314 "configure"
13315 #include "confdefs.h"
13316 /* System header to define __stub macros and hopefully few prototypes,
13317     which can conflict with char compile (); below.  */
13318 #include <assert.h>
13319 /* Override any gcc2 internal prototype to avoid an error.  */
13320 #ifdef __cplusplus
13321 extern "C"
13322 #endif
13323 /* We use char because int might match the return type of a gcc2
13324    builtin and then its argument prototype would still apply.  */
13325 char compile ();
13326 char (*f) ();
13327
13328 int
13329 main ()
13330 {
13331 /* The GNU C library defines this for functions which it implements
13332     to always fail with ENOSYS.  Some functions are actually named
13333     something starting with __ and the normal name is an alias.  */
13334 #if defined (__stub_compile) || defined (__stub___compile)
13335 choke me
13336 #else
13337 f = compile;
13338 #endif
13339
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 rm -f conftest.$ac_objext conftest$ac_exeext
13345 if { (eval echo "$as_me:13345: \"$ac_link\"") >&5
13346   (eval $ac_link) 2>&5
13347   ac_status=$?
13348   echo "$as_me:13348: \$? = $ac_status" >&5
13349   (exit $ac_status); } &&
13350          { ac_try='test -s conftest$ac_exeext'
13351   { (eval echo "$as_me:13351: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:13354: \$? = $ac_status" >&5
13355   (exit $ac_status); }; }; then
13356   ac_cv_func_compile=yes
13357 else
13358   echo "$as_me: failed program was:" >&5
13359 cat conftest.$ac_ext >&5
13360 ac_cv_func_compile=no
13361 fi
13362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13363 fi
13364 echo "$as_me:13364: result: $ac_cv_func_compile" >&5
13365 echo "${ECHO_T}$ac_cv_func_compile" >&6
13366 if test $ac_cv_func_compile = yes; then
13367   cf_regex_func=compile
13368 else
13369
13370                 echo "$as_me:13370: checking for compile in -lgen" >&5
13371 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13372 if test "${ac_cv_lib_gen_compile+set}" = set; then
13373   echo $ECHO_N "(cached) $ECHO_C" >&6
13374 else
13375   ac_check_lib_save_LIBS=$LIBS
13376 LIBS="-lgen  $LIBS"
13377 cat >conftest.$ac_ext <<_ACEOF
13378 #line 13378 "configure"
13379 #include "confdefs.h"
13380
13381 /* Override any gcc2 internal prototype to avoid an error.  */
13382 #ifdef __cplusplus
13383 extern "C"
13384 #endif
13385 /* We use char because int might match the return type of a gcc2
13386    builtin and then its argument prototype would still apply.  */
13387 char compile ();
13388 int
13389 main ()
13390 {
13391 compile ();
13392   ;
13393   return 0;
13394 }
13395 _ACEOF
13396 rm -f conftest.$ac_objext conftest$ac_exeext
13397 if { (eval echo "$as_me:13397: \"$ac_link\"") >&5
13398   (eval $ac_link) 2>&5
13399   ac_status=$?
13400   echo "$as_me:13400: \$? = $ac_status" >&5
13401   (exit $ac_status); } &&
13402          { ac_try='test -s conftest$ac_exeext'
13403   { (eval echo "$as_me:13403: \"$ac_try\"") >&5
13404   (eval $ac_try) 2>&5
13405   ac_status=$?
13406   echo "$as_me:13406: \$? = $ac_status" >&5
13407   (exit $ac_status); }; }; then
13408   ac_cv_lib_gen_compile=yes
13409 else
13410   echo "$as_me: failed program was:" >&5
13411 cat conftest.$ac_ext >&5
13412 ac_cv_lib_gen_compile=no
13413 fi
13414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13415 LIBS=$ac_check_lib_save_LIBS
13416 fi
13417 echo "$as_me:13417: result: $ac_cv_lib_gen_compile" >&5
13418 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13419 if test $ac_cv_lib_gen_compile = yes; then
13420
13421                                 LIBS="-lgen $LIBS"
13422                                 cf_regex_func=compile
13423 fi
13424
13425 fi
13426
13427 fi
13428
13429 if test "$cf_regex_func" = no ; then
13430         { echo "$as_me:13430: WARNING: cannot find regular expression library" >&5
13431 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13432 fi
13433
13434 echo "$as_me:13434: checking for regular-expression headers" >&5
13435 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13436 if test "${cf_cv_regex_hdrs+set}" = set; then
13437   echo $ECHO_N "(cached) $ECHO_C" >&6
13438 else
13439
13440 cf_cv_regex_hdrs=no
13441 case $cf_regex_func in #(vi
13442 compile) #(vi
13443         for cf_regex_hdr in regexp.h regexpr.h
13444         do
13445                 cat >conftest.$ac_ext <<_ACEOF
13446 #line 13446 "configure"
13447 #include "confdefs.h"
13448 #include <$cf_regex_hdr>
13449 int
13450 main ()
13451 {
13452
13453                         char *p = compile("", "", "", 0);
13454                         int x = step("", "");
13455
13456   ;
13457   return 0;
13458 }
13459 _ACEOF
13460 rm -f conftest.$ac_objext conftest$ac_exeext
13461 if { (eval echo "$as_me:13461: \"$ac_link\"") >&5
13462   (eval $ac_link) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit $ac_status); } &&
13466          { ac_try='test -s conftest$ac_exeext'
13467   { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); }; }; then
13472
13473                         cf_cv_regex_hdrs=$cf_regex_hdr
13474                         break
13475
13476 else
13477   echo "$as_me: failed program was:" >&5
13478 cat conftest.$ac_ext >&5
13479 fi
13480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13481         done
13482         ;;
13483 *)
13484         for cf_regex_hdr in regex.h
13485         do
13486                 cat >conftest.$ac_ext <<_ACEOF
13487 #line 13487 "configure"
13488 #include "confdefs.h"
13489 #include <sys/types.h>
13490 #include <$cf_regex_hdr>
13491 int
13492 main ()
13493 {
13494
13495                         regex_t *p;
13496                         int x = regcomp(p, "", 0);
13497                         int y = regexec(p, "", 0, 0, 0);
13498                         regfree(p);
13499
13500   ;
13501   return 0;
13502 }
13503 _ACEOF
13504 rm -f conftest.$ac_objext conftest$ac_exeext
13505 if { (eval echo "$as_me:13505: \"$ac_link\"") >&5
13506   (eval $ac_link) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit $ac_status); } &&
13510          { ac_try='test -s conftest$ac_exeext'
13511   { (eval echo "$as_me:13511: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516
13517                         cf_cv_regex_hdrs=$cf_regex_hdr
13518                         break
13519
13520 else
13521   echo "$as_me: failed program was:" >&5
13522 cat conftest.$ac_ext >&5
13523 fi
13524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13525         done
13526         ;;
13527 esac
13528
13529 fi
13530 echo "$as_me:13530: result: $cf_cv_regex_hdrs" >&5
13531 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13532
13533 case $cf_cv_regex_hdrs in #(vi
13534     no)        { echo "$as_me:13534: WARNING: no regular expression header found" >&5
13535 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13536     regex.h)   cat >>confdefs.h <<\EOF
13537 #define HAVE_REGEX_H_FUNCS 1
13538 EOF
13539  ;; #(vi
13540     regexp.h)  cat >>confdefs.h <<\EOF
13541 #define HAVE_REGEXP_H_FUNCS 1
13542 EOF
13543  ;; #(vi
13544     regexpr.h) cat >>confdefs.h <<\EOF
13545 #define HAVE_REGEXPR_H_FUNCS 1
13546 EOF
13547  ;;
13548 esac
13549
13550 for ac_header in \
13551 fcntl.h \
13552 getopt.h \
13553 limits.h \
13554 locale.h \
13555 math.h \
13556 poll.h \
13557 sys/bsdtypes.h \
13558 sys/ioctl.h \
13559 sys/param.h \
13560 sys/poll.h \
13561 sys/select.h \
13562 sys/time.h \
13563 sys/times.h \
13564 ttyent.h \
13565 unistd.h \
13566 wctype.h \
13567
13568 do
13569 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13570 echo "$as_me:13570: checking for $ac_header" >&5
13571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13573   echo $ECHO_N "(cached) $ECHO_C" >&6
13574 else
13575   cat >conftest.$ac_ext <<_ACEOF
13576 #line 13576 "configure"
13577 #include "confdefs.h"
13578 #include <$ac_header>
13579 _ACEOF
13580 if { (eval echo "$as_me:13580: \"$ac_cpp conftest.$ac_ext\"") >&5
13581   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13582   ac_status=$?
13583   egrep -v '^ *\+' conftest.er1 >conftest.err
13584   rm -f conftest.er1
13585   cat conftest.err >&5
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit $ac_status); } >/dev/null; then
13588   if test -s conftest.err; then
13589     ac_cpp_err=$ac_c_preproc_warn_flag
13590   else
13591     ac_cpp_err=
13592   fi
13593 else
13594   ac_cpp_err=yes
13595 fi
13596 if test -z "$ac_cpp_err"; then
13597   eval "$as_ac_Header=yes"
13598 else
13599   echo "$as_me: failed program was:" >&5
13600   cat conftest.$ac_ext >&5
13601   eval "$as_ac_Header=no"
13602 fi
13603 rm -f conftest.err conftest.$ac_ext
13604 fi
13605 echo "$as_me:13605: result: `eval echo '${'$as_ac_Header'}'`" >&5
13606 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13608   cat >>confdefs.h <<EOF
13609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13610 EOF
13611
13612 fi
13613 done
13614
13615 for ac_header in unistd.h getopt.h
13616 do
13617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13618 echo "$as_me:13618: checking for $ac_header" >&5
13619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13621   echo $ECHO_N "(cached) $ECHO_C" >&6
13622 else
13623   cat >conftest.$ac_ext <<_ACEOF
13624 #line 13624 "configure"
13625 #include "confdefs.h"
13626 #include <$ac_header>
13627 _ACEOF
13628 if { (eval echo "$as_me:13628: \"$ac_cpp conftest.$ac_ext\"") >&5
13629   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13630   ac_status=$?
13631   egrep -v '^ *\+' conftest.er1 >conftest.err
13632   rm -f conftest.er1
13633   cat conftest.err >&5
13634   echo "$as_me:13634: \$? = $ac_status" >&5
13635   (exit $ac_status); } >/dev/null; then
13636   if test -s conftest.err; then
13637     ac_cpp_err=$ac_c_preproc_warn_flag
13638   else
13639     ac_cpp_err=
13640   fi
13641 else
13642   ac_cpp_err=yes
13643 fi
13644 if test -z "$ac_cpp_err"; then
13645   eval "$as_ac_Header=yes"
13646 else
13647   echo "$as_me: failed program was:" >&5
13648   cat conftest.$ac_ext >&5
13649   eval "$as_ac_Header=no"
13650 fi
13651 rm -f conftest.err conftest.$ac_ext
13652 fi
13653 echo "$as_me:13653: result: `eval echo '${'$as_ac_Header'}'`" >&5
13654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13655 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13656   cat >>confdefs.h <<EOF
13657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13658 EOF
13659
13660 fi
13661 done
13662
13663 echo "$as_me:13663: checking for header declaring getopt variables" >&5
13664 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13665 if test "${cf_cv_getopt_header+set}" = set; then
13666   echo $ECHO_N "(cached) $ECHO_C" >&6
13667 else
13668
13669 cf_cv_getopt_header=none
13670 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13671 do
13672 cat >conftest.$ac_ext <<_ACEOF
13673 #line 13673 "configure"
13674 #include "confdefs.h"
13675
13676 #include <$cf_header>
13677 int
13678 main ()
13679 {
13680 int x = optind; char *y = optarg
13681   ;
13682   return 0;
13683 }
13684 _ACEOF
13685 rm -f conftest.$ac_objext
13686 if { (eval echo "$as_me:13686: \"$ac_compile\"") >&5
13687   (eval $ac_compile) 2>&5
13688   ac_status=$?
13689   echo "$as_me:13689: \$? = $ac_status" >&5
13690   (exit $ac_status); } &&
13691          { ac_try='test -s conftest.$ac_objext'
13692   { (eval echo "$as_me:13692: \"$ac_try\"") >&5
13693   (eval $ac_try) 2>&5
13694   ac_status=$?
13695   echo "$as_me:13695: \$? = $ac_status" >&5
13696   (exit $ac_status); }; }; then
13697   cf_cv_getopt_header=$cf_header
13698  break
13699 else
13700   echo "$as_me: failed program was:" >&5
13701 cat conftest.$ac_ext >&5
13702 fi
13703 rm -f conftest.$ac_objext conftest.$ac_ext
13704 done
13705
13706 fi
13707 echo "$as_me:13707: result: $cf_cv_getopt_header" >&5
13708 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13709 if test $cf_cv_getopt_header != none ; then
13710         cat >>confdefs.h <<\EOF
13711 #define HAVE_GETOPT_HEADER 1
13712 EOF
13713
13714 fi
13715
13716 # check for ISC (this may also define _POSIX_SOURCE)
13717 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13718 if test "$ISC" = yes ; then
13719
13720 echo "$as_me:13720: checking for main in -lcposix" >&5
13721 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13722 if test "${ac_cv_lib_cposix_main+set}" = set; then
13723   echo $ECHO_N "(cached) $ECHO_C" >&6
13724 else
13725   ac_check_lib_save_LIBS=$LIBS
13726 LIBS="-lcposix  $LIBS"
13727 cat >conftest.$ac_ext <<_ACEOF
13728 #line 13728 "configure"
13729 #include "confdefs.h"
13730
13731 int
13732 main ()
13733 {
13734 main ();
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f conftest.$ac_objext conftest$ac_exeext
13740 if { (eval echo "$as_me:13740: \"$ac_link\"") >&5
13741   (eval $ac_link) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit $ac_status); } &&
13745          { ac_try='test -s conftest$ac_exeext'
13746   { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); }; }; then
13751   ac_cv_lib_cposix_main=yes
13752 else
13753   echo "$as_me: failed program was:" >&5
13754 cat conftest.$ac_ext >&5
13755 ac_cv_lib_cposix_main=no
13756 fi
13757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13758 LIBS=$ac_check_lib_save_LIBS
13759 fi
13760 echo "$as_me:13760: result: $ac_cv_lib_cposix_main" >&5
13761 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13762 if test $ac_cv_lib_cposix_main = yes; then
13763   cat >>confdefs.h <<EOF
13764 #define HAVE_LIBCPOSIX 1
13765 EOF
13766
13767   LIBS="-lcposix $LIBS"
13768
13769 fi
13770
13771         echo "$as_me:13771: checking for bzero in -linet" >&5
13772 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13773 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13774   echo $ECHO_N "(cached) $ECHO_C" >&6
13775 else
13776   ac_check_lib_save_LIBS=$LIBS
13777 LIBS="-linet  $LIBS"
13778 cat >conftest.$ac_ext <<_ACEOF
13779 #line 13779 "configure"
13780 #include "confdefs.h"
13781
13782 /* Override any gcc2 internal prototype to avoid an error.  */
13783 #ifdef __cplusplus
13784 extern "C"
13785 #endif
13786 /* We use char because int might match the return type of a gcc2
13787    builtin and then its argument prototype would still apply.  */
13788 char bzero ();
13789 int
13790 main ()
13791 {
13792 bzero ();
13793   ;
13794   return 0;
13795 }
13796 _ACEOF
13797 rm -f conftest.$ac_objext conftest$ac_exeext
13798 if { (eval echo "$as_me:13798: \"$ac_link\"") >&5
13799   (eval $ac_link) 2>&5
13800   ac_status=$?
13801   echo "$as_me:13801: \$? = $ac_status" >&5
13802   (exit $ac_status); } &&
13803          { ac_try='test -s conftest$ac_exeext'
13804   { (eval echo "$as_me:13804: \"$ac_try\"") >&5
13805   (eval $ac_try) 2>&5
13806   ac_status=$?
13807   echo "$as_me:13807: \$? = $ac_status" >&5
13808   (exit $ac_status); }; }; then
13809   ac_cv_lib_inet_bzero=yes
13810 else
13811   echo "$as_me: failed program was:" >&5
13812 cat conftest.$ac_ext >&5
13813 ac_cv_lib_inet_bzero=no
13814 fi
13815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13816 LIBS=$ac_check_lib_save_LIBS
13817 fi
13818 echo "$as_me:13818: result: $ac_cv_lib_inet_bzero" >&5
13819 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13820 if test $ac_cv_lib_inet_bzero = yes; then
13821   LIBS="-linet $LIBS"
13822 fi
13823 fi
13824
13825 echo "$as_me:13825: checking if sys/time.h works with sys/select.h" >&5
13826 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13827 if test "${cf_cv_sys_time_select+set}" = set; then
13828   echo $ECHO_N "(cached) $ECHO_C" >&6
13829 else
13830
13831 cat >conftest.$ac_ext <<_ACEOF
13832 #line 13832 "configure"
13833 #include "confdefs.h"
13834
13835 #include <sys/types.h>
13836 #ifdef HAVE_SYS_TIME_H
13837 #include <sys/time.h>
13838 #endif
13839 #ifdef HAVE_SYS_SELECT_H
13840 #include <sys/select.h>
13841 #endif
13842
13843 int
13844 main ()
13845 {
13846
13847   ;
13848   return 0;
13849 }
13850 _ACEOF
13851 rm -f conftest.$ac_objext
13852 if { (eval echo "$as_me:13852: \"$ac_compile\"") >&5
13853   (eval $ac_compile) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); } &&
13857          { ac_try='test -s conftest.$ac_objext'
13858   { (eval echo "$as_me:13858: \"$ac_try\"") >&5
13859   (eval $ac_try) 2>&5
13860   ac_status=$?
13861   echo "$as_me:13861: \$? = $ac_status" >&5
13862   (exit $ac_status); }; }; then
13863   cf_cv_sys_time_select=yes
13864 else
13865   echo "$as_me: failed program was:" >&5
13866 cat conftest.$ac_ext >&5
13867 cf_cv_sys_time_select=no
13868 fi
13869 rm -f conftest.$ac_objext conftest.$ac_ext
13870
13871 fi
13872
13873 echo "$as_me:13873: result: $cf_cv_sys_time_select" >&5
13874 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13875 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13876 #define HAVE_SYS_TIME_SELECT 1
13877 EOF
13878
13879 ###     checks for compiler characteristics
13880 ac_ext=c
13881 ac_cpp='$CPP $CPPFLAGS'
13882 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13883 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13884 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13885 ac_main_return=return
13886
13887 echo "$as_me:13887: checking for $CC option to accept ANSI C" >&5
13888 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13889 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13890   echo $ECHO_N "(cached) $ECHO_C" >&6
13891 else
13892   ac_cv_prog_cc_stdc=no
13893 ac_save_CC=$CC
13894 cat >conftest.$ac_ext <<_ACEOF
13895 #line 13895 "configure"
13896 #include "confdefs.h"
13897 #include <stdarg.h>
13898 #include <stdio.h>
13899 #include <sys/types.h>
13900 #include <sys/stat.h>
13901 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13902 struct buf { int x; };
13903 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13904 static char *e (p, i)
13905      char **p;
13906      int i;
13907 {
13908   return p[i];
13909 }
13910 static char *f (char * (*g) (char **, int), char **p, ...)
13911 {
13912   char *s;
13913   va_list v;
13914   va_start (v,p);
13915   s = g (p, va_arg (v,int));
13916   va_end (v);
13917   return s;
13918 }
13919 int test (int i, double x);
13920 struct s1 {int (*f) (int a);};
13921 struct s2 {int (*f) (double a);};
13922 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13923 int argc;
13924 char **argv;
13925 int
13926 main ()
13927 {
13928 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13929   ;
13930   return 0;
13931 }
13932 _ACEOF
13933 # Don't try gcc -ansi; that turns off useful extensions and
13934 # breaks some systems' header files.
13935 # AIX                   -qlanglvl=ansi
13936 # Ultrix and OSF/1      -std1
13937 # HP-UX 10.20 and later -Ae
13938 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13939 # SVR4                  -Xc -D__EXTENSIONS__
13940 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13941 do
13942   CC="$ac_save_CC $ac_arg"
13943   rm -f conftest.$ac_objext
13944 if { (eval echo "$as_me:13944: \"$ac_compile\"") >&5
13945   (eval $ac_compile) 2>&5
13946   ac_status=$?
13947   echo "$as_me:13947: \$? = $ac_status" >&5
13948   (exit $ac_status); } &&
13949          { ac_try='test -s conftest.$ac_objext'
13950   { (eval echo "$as_me:13950: \"$ac_try\"") >&5
13951   (eval $ac_try) 2>&5
13952   ac_status=$?
13953   echo "$as_me:13953: \$? = $ac_status" >&5
13954   (exit $ac_status); }; }; then
13955   ac_cv_prog_cc_stdc=$ac_arg
13956 break
13957 else
13958   echo "$as_me: failed program was:" >&5
13959 cat conftest.$ac_ext >&5
13960 fi
13961 rm -f conftest.$ac_objext
13962 done
13963 rm -f conftest.$ac_ext conftest.$ac_objext
13964 CC=$ac_save_CC
13965
13966 fi
13967
13968 case "x$ac_cv_prog_cc_stdc" in
13969   x|xno)
13970     echo "$as_me:13970: result: none needed" >&5
13971 echo "${ECHO_T}none needed" >&6 ;;
13972   *)
13973     echo "$as_me:13973: result: $ac_cv_prog_cc_stdc" >&5
13974 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13975     CC="$CC $ac_cv_prog_cc_stdc" ;;
13976 esac
13977
13978 echo "$as_me:13978: checking for an ANSI C-conforming const" >&5
13979 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13980 if test "${ac_cv_c_const+set}" = set; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983   cat >conftest.$ac_ext <<_ACEOF
13984 #line 13984 "configure"
13985 #include "confdefs.h"
13986
13987 int
13988 main ()
13989 {
13990 /* FIXME: Include the comments suggested by Paul. */
13991 #ifndef __cplusplus
13992   /* Ultrix mips cc rejects this.  */
13993   typedef int charset[2];
13994   const charset x;
13995   /* SunOS 4.1.1 cc rejects this.  */
13996   char const *const *ccp;
13997   char **p;
13998   /* NEC SVR4.0.2 mips cc rejects this.  */
13999   struct point {int x, y;};
14000   static struct point const zero = {0,0};
14001   /* AIX XL C 1.02.0.0 rejects this.
14002      It does not let you subtract one const X* pointer from another in
14003      an arm of an if-expression whose if-part is not a constant
14004      expression */
14005   const char *g = "string";
14006   ccp = &g + (g ? g-g : 0);
14007   /* HPUX 7.0 cc rejects these. */
14008   ++ccp;
14009   p = (char**) ccp;
14010   ccp = (char const *const *) p;
14011   { /* SCO 3.2v4 cc rejects this.  */
14012     char *t;
14013     char const *s = 0 ? (char *) 0 : (char const *) 0;
14014
14015     *t++ = 0;
14016   }
14017   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14018     int x[] = {25, 17};
14019     const int *foo = &x[0];
14020     ++foo;
14021   }
14022   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14023     typedef const int *iptr;
14024     iptr p = 0;
14025     ++p;
14026   }
14027   { /* AIX XL C 1.02.0.0 rejects this saying
14028        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14029     struct s { int j; const int *ap[3]; };
14030     struct s *b; b->j = 5;
14031   }
14032   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14033     const int foo = 10;
14034   }
14035 #endif
14036
14037   ;
14038   return 0;
14039 }
14040 _ACEOF
14041 rm -f conftest.$ac_objext
14042 if { (eval echo "$as_me:14042: \"$ac_compile\"") >&5
14043   (eval $ac_compile) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -s conftest.$ac_objext'
14048   { (eval echo "$as_me:14048: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); }; }; then
14053   ac_cv_c_const=yes
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14057 ac_cv_c_const=no
14058 fi
14059 rm -f conftest.$ac_objext conftest.$ac_ext
14060 fi
14061 echo "$as_me:14061: result: $ac_cv_c_const" >&5
14062 echo "${ECHO_T}$ac_cv_c_const" >&6
14063 if test $ac_cv_c_const = no; then
14064
14065 cat >>confdefs.h <<\EOF
14066 #define const
14067 EOF
14068
14069 fi
14070
14071 echo "$as_me:14071: checking for inline" >&5
14072 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14073 if test "${ac_cv_c_inline+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076   ac_cv_c_inline=no
14077 for ac_kw in inline __inline__ __inline; do
14078   cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081 #ifndef __cplusplus
14082 static $ac_kw int static_foo () {return 0; }
14083 $ac_kw int foo () {return 0; }
14084 #endif
14085
14086 _ACEOF
14087 rm -f conftest.$ac_objext
14088 if { (eval echo "$as_me:14088: \"$ac_compile\"") >&5
14089   (eval $ac_compile) 2>&5
14090   ac_status=$?
14091   echo "$as_me:14091: \$? = $ac_status" >&5
14092   (exit $ac_status); } &&
14093          { ac_try='test -s conftest.$ac_objext'
14094   { (eval echo "$as_me:14094: \"$ac_try\"") >&5
14095   (eval $ac_try) 2>&5
14096   ac_status=$?
14097   echo "$as_me:14097: \$? = $ac_status" >&5
14098   (exit $ac_status); }; }; then
14099   ac_cv_c_inline=$ac_kw; break
14100 else
14101   echo "$as_me: failed program was:" >&5
14102 cat conftest.$ac_ext >&5
14103 fi
14104 rm -f conftest.$ac_objext conftest.$ac_ext
14105 done
14106
14107 fi
14108 echo "$as_me:14108: result: $ac_cv_c_inline" >&5
14109 echo "${ECHO_T}$ac_cv_c_inline" >&6
14110 case $ac_cv_c_inline in
14111   inline | yes) ;;
14112   no)
14113 cat >>confdefs.h <<\EOF
14114 #define inline
14115 EOF
14116  ;;
14117   *)  cat >>confdefs.h <<EOF
14118 #define inline $ac_cv_c_inline
14119 EOF
14120  ;;
14121 esac
14122
14123 NCURSES_INLINE=
14124 if test "$ac_cv_c_inline" != no ; then
14125   NCURSES_INLINE=inline
14126   if test "$INTEL_COMPILER" = yes
14127   then
14128     :
14129   elif test "$GCC" = yes
14130   then
14131     echo "$as_me:14131: checking if $CC supports options to tune inlining" >&5
14132 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14133 if test "${cf_cv_gcc_inline+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136
14137       cf_save_CFLAGS=$CFLAGS
14138       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14139       cat >conftest.$ac_ext <<_ACEOF
14140 #line 14140 "configure"
14141 #include "confdefs.h"
14142 inline int foo(void) { return 1; }
14143 int
14144 main ()
14145 {
14146 ${cf_cv_main_return:-return} foo()
14147   ;
14148   return 0;
14149 }
14150 _ACEOF
14151 rm -f conftest.$ac_objext
14152 if { (eval echo "$as_me:14152: \"$ac_compile\"") >&5
14153   (eval $ac_compile) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit $ac_status); } &&
14157          { ac_try='test -s conftest.$ac_objext'
14158   { (eval echo "$as_me:14158: \"$ac_try\"") >&5
14159   (eval $ac_try) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit $ac_status); }; }; then
14163   cf_cv_gcc_inline=yes
14164 else
14165   echo "$as_me: failed program was:" >&5
14166 cat conftest.$ac_ext >&5
14167 cf_cv_gcc_inline=no
14168 fi
14169 rm -f conftest.$ac_objext conftest.$ac_ext
14170       CFLAGS=$cf_save_CFLAGS
14171
14172 fi
14173 echo "$as_me:14173: result: $cf_cv_gcc_inline" >&5
14174 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14175     if test "$cf_cv_gcc_inline" = yes ; then
14176
14177 cf_fix_cppflags=no
14178 cf_new_cflags=
14179 cf_new_cppflags=
14180 cf_new_extra_cppflags=
14181
14182 for cf_add_cflags in --param max-inline-insns-single=1200
14183 do
14184 case $cf_fix_cppflags in
14185 no)
14186         case $cf_add_cflags in #(vi
14187         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14188                 case $cf_add_cflags in
14189                 -D*)
14190                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14191
14192                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14193                                 && test -z "${cf_tst_cflags}" \
14194                                 && cf_fix_cppflags=yes
14195
14196                         if test $cf_fix_cppflags = yes ; then
14197                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14198                                 continue
14199                         elif test "${cf_tst_cflags}" = "\"'" ; then
14200                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14201                                 continue
14202                         fi
14203                         ;;
14204                 esac
14205                 case "$CPPFLAGS" in
14206                 *$cf_add_cflags) #(vi
14207                         ;;
14208                 *) #(vi
14209                         case $cf_add_cflags in #(vi
14210                         -D*)
14211                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14212
14213 CPPFLAGS=`echo "$CPPFLAGS" | \
14214         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14215                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14216
14217                                 ;;
14218                         esac
14219                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14220                         ;;
14221                 esac
14222                 ;;
14223         *)
14224                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14225                 ;;
14226         esac
14227         ;;
14228 yes)
14229         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14230
14231         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14232
14233         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14234                 && test -z "${cf_tst_cflags}" \
14235                 && cf_fix_cppflags=no
14236         ;;
14237 esac
14238 done
14239
14240 if test -n "$cf_new_cflags" ; then
14241
14242         CFLAGS="$CFLAGS $cf_new_cflags"
14243 fi
14244
14245 if test -n "$cf_new_cppflags" ; then
14246
14247         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14248 fi
14249
14250 if test -n "$cf_new_extra_cppflags" ; then
14251
14252         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14253 fi
14254
14255     fi
14256   fi
14257 fi
14258
14259 echo "$as_me:14259: checking for signal global datatype" >&5
14260 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14261 if test "${cf_cv_sig_atomic_t+set}" = set; then
14262   echo $ECHO_N "(cached) $ECHO_C" >&6
14263 else
14264
14265         for cf_type in \
14266                 "volatile sig_atomic_t" \
14267                 "sig_atomic_t" \
14268                 "int"
14269         do
14270         cat >conftest.$ac_ext <<_ACEOF
14271 #line 14271 "configure"
14272 #include "confdefs.h"
14273
14274 #include <sys/types.h>
14275 #include <signal.h>
14276 #include <stdio.h>
14277
14278 extern $cf_type x;
14279 $cf_type x;
14280 static void handler(int sig)
14281 {
14282         x = 5;
14283 }
14284 int
14285 main ()
14286 {
14287 signal(SIGINT, handler);
14288                  x = 1
14289   ;
14290   return 0;
14291 }
14292 _ACEOF
14293 rm -f conftest.$ac_objext
14294 if { (eval echo "$as_me:14294: \"$ac_compile\"") >&5
14295   (eval $ac_compile) 2>&5
14296   ac_status=$?
14297   echo "$as_me:14297: \$? = $ac_status" >&5
14298   (exit $ac_status); } &&
14299          { ac_try='test -s conftest.$ac_objext'
14300   { (eval echo "$as_me:14300: \"$ac_try\"") >&5
14301   (eval $ac_try) 2>&5
14302   ac_status=$?
14303   echo "$as_me:14303: \$? = $ac_status" >&5
14304   (exit $ac_status); }; }; then
14305   cf_cv_sig_atomic_t=$cf_type
14306 else
14307   echo "$as_me: failed program was:" >&5
14308 cat conftest.$ac_ext >&5
14309 cf_cv_sig_atomic_t=no
14310 fi
14311 rm -f conftest.$ac_objext conftest.$ac_ext
14312                 test "$cf_cv_sig_atomic_t" != no && break
14313         done
14314
14315 fi
14316
14317 echo "$as_me:14317: result: $cf_cv_sig_atomic_t" >&5
14318 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14319 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14320 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14321 EOF
14322
14323 if test $NCURSES_CHTYPE = auto ; then
14324
14325 echo "$as_me:14325: checking for type of chtype" >&5
14326 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14327 if test "${cf_cv_typeof_chtype+set}" = set; then
14328   echo $ECHO_N "(cached) $ECHO_C" >&6
14329 else
14330
14331                 if test "$cross_compiling" = yes; then
14332   cf_cv_typeof_chtype=long
14333 else
14334   cat >conftest.$ac_ext <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14337
14338 #define WANT_BITS 31
14339 #include <stdio.h>
14340 int main()
14341 {
14342         FILE *fp = fopen("cf_test.out", "w");
14343         if (fp != 0) {
14344                 char *result = "long";
14345                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14346                         int n;
14347                         unsigned int x, y;
14348                         for (n = 0; n < WANT_BITS; n++) {
14349                                 x = (1 << n);
14350                                 y = (x >> n);
14351                                 if (y != 1 || x == 0) {
14352                                         x = 0;
14353                                         break;
14354                                 }
14355                         }
14356                         /*
14357                          * If x is nonzero, an int is big enough for the bits
14358                          * that we want.
14359                          */
14360                         result = (x != 0) ? "int" : "long";
14361                 }
14362                 fputs(result, fp);
14363                 fclose(fp);
14364         }
14365         ${cf_cv_main_return:-return}(0);
14366 }
14367
14368 _ACEOF
14369 rm -f conftest$ac_exeext
14370 if { (eval echo "$as_me:14370: \"$ac_link\"") >&5
14371   (eval $ac_link) 2>&5
14372   ac_status=$?
14373   echo "$as_me:14373: \$? = $ac_status" >&5
14374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14375   { (eval echo "$as_me:14375: \"$ac_try\"") >&5
14376   (eval $ac_try) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); }; }; then
14380   cf_cv_typeof_chtype=`cat cf_test.out`
14381 else
14382   echo "$as_me: program exited with status $ac_status" >&5
14383 echo "$as_me: failed program was:" >&5
14384 cat conftest.$ac_ext >&5
14385 cf_cv_typeof_chtype=long
14386 fi
14387 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14388 fi
14389                 rm -f cf_test.out
14390
14391 fi
14392
14393 echo "$as_me:14393: result: $cf_cv_typeof_chtype" >&5
14394 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14395
14396 cat >>confdefs.h <<EOF
14397 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14398 EOF
14399
14400 else
14401         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14402 fi
14403 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14404
14405 echo "$as_me:14405: checking if unsigned literals are legal" >&5
14406 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14407 if test "${cf_cv_unsigned_literals+set}" = set; then
14408   echo $ECHO_N "(cached) $ECHO_C" >&6
14409 else
14410
14411         cat >conftest.$ac_ext <<_ACEOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14414
14415 int
14416 main ()
14417 {
14418 long x = 1L + 1UL + 1U + 1
14419   ;
14420   return 0;
14421 }
14422 _ACEOF
14423 rm -f conftest.$ac_objext
14424 if { (eval echo "$as_me:14424: \"$ac_compile\"") >&5
14425   (eval $ac_compile) 2>&5
14426   ac_status=$?
14427   echo "$as_me:14427: \$? = $ac_status" >&5
14428   (exit $ac_status); } &&
14429          { ac_try='test -s conftest.$ac_objext'
14430   { (eval echo "$as_me:14430: \"$ac_try\"") >&5
14431   (eval $ac_try) 2>&5
14432   ac_status=$?
14433   echo "$as_me:14433: \$? = $ac_status" >&5
14434   (exit $ac_status); }; }; then
14435   cf_cv_unsigned_literals=yes
14436 else
14437   echo "$as_me: failed program was:" >&5
14438 cat conftest.$ac_ext >&5
14439 cf_cv_unsigned_literals=no
14440 fi
14441 rm -f conftest.$ac_objext conftest.$ac_ext
14442
14443 fi
14444
14445 echo "$as_me:14445: result: $cf_cv_unsigned_literals" >&5
14446 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14447
14448 cf_cv_1UL="1"
14449 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14450 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14451
14452 if test $NCURSES_MMASK_T = auto ; then
14453         cf_cv_typeof_mmask_t=long
14454 else
14455         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14456 fi
14457 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14458
14459 ###     Checks for external-data
14460
14461 echo "$as_me:14461: checking if external errno is declared" >&5
14462 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14463 if test "${cf_cv_dcl_errno+set}" = set; then
14464   echo $ECHO_N "(cached) $ECHO_C" >&6
14465 else
14466
14467     cat >conftest.$ac_ext <<_ACEOF
14468 #line 14468 "configure"
14469 #include "confdefs.h"
14470
14471 #ifdef HAVE_STDLIB_H
14472 #include <stdlib.h>
14473 #endif
14474 #include <stdio.h>
14475 #include <sys/types.h>
14476 #include <errno.h>
14477 int
14478 main ()
14479 {
14480 int x = (int) errno
14481   ;
14482   return 0;
14483 }
14484 _ACEOF
14485 rm -f conftest.$ac_objext
14486 if { (eval echo "$as_me:14486: \"$ac_compile\"") >&5
14487   (eval $ac_compile) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit $ac_status); } &&
14491          { ac_try='test -s conftest.$ac_objext'
14492   { (eval echo "$as_me:14492: \"$ac_try\"") >&5
14493   (eval $ac_try) 2>&5
14494   ac_status=$?
14495   echo "$as_me:14495: \$? = $ac_status" >&5
14496   (exit $ac_status); }; }; then
14497   cf_cv_dcl_errno=yes
14498 else
14499   echo "$as_me: failed program was:" >&5
14500 cat conftest.$ac_ext >&5
14501 cf_cv_dcl_errno=no
14502 fi
14503 rm -f conftest.$ac_objext conftest.$ac_ext
14504
14505 fi
14506 echo "$as_me:14506: result: $cf_cv_dcl_errno" >&5
14507 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14508
14509 if test "$cf_cv_dcl_errno" = no ; then
14510
14511 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14512
14513     cat >>confdefs.h <<EOF
14514 #define $cf_result 1
14515 EOF
14516
14517 fi
14518
14519 # It's possible (for near-UNIX clones) that the data doesn't exist
14520
14521 echo "$as_me:14521: checking if external errno exists" >&5
14522 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14523 if test "${cf_cv_have_errno+set}" = set; then
14524   echo $ECHO_N "(cached) $ECHO_C" >&6
14525 else
14526
14527     cat >conftest.$ac_ext <<_ACEOF
14528 #line 14528 "configure"
14529 #include "confdefs.h"
14530
14531 #undef errno
14532 extern int errno;
14533
14534 int
14535 main ()
14536 {
14537 errno = 2
14538   ;
14539   return 0;
14540 }
14541 _ACEOF
14542 rm -f conftest.$ac_objext conftest$ac_exeext
14543 if { (eval echo "$as_me:14543: \"$ac_link\"") >&5
14544   (eval $ac_link) 2>&5
14545   ac_status=$?
14546   echo "$as_me:14546: \$? = $ac_status" >&5
14547   (exit $ac_status); } &&
14548          { ac_try='test -s conftest$ac_exeext'
14549   { (eval echo "$as_me:14549: \"$ac_try\"") >&5
14550   (eval $ac_try) 2>&5
14551   ac_status=$?
14552   echo "$as_me:14552: \$? = $ac_status" >&5
14553   (exit $ac_status); }; }; then
14554   cf_cv_have_errno=yes
14555 else
14556   echo "$as_me: failed program was:" >&5
14557 cat conftest.$ac_ext >&5
14558 cf_cv_have_errno=no
14559 fi
14560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14561
14562 fi
14563 echo "$as_me:14563: result: $cf_cv_have_errno" >&5
14564 echo "${ECHO_T}$cf_cv_have_errno" >&6
14565
14566 if test "$cf_cv_have_errno" = yes ; then
14567
14568 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14569
14570     cat >>confdefs.h <<EOF
14571 #define $cf_result 1
14572 EOF
14573
14574 fi
14575
14576 echo "$as_me:14576: checking if data-only library module links" >&5
14577 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14578 if test "${cf_cv_link_dataonly+set}" = set; then
14579   echo $ECHO_N "(cached) $ECHO_C" >&6
14580 else
14581
14582         rm -f conftest.a
14583         cat >conftest.$ac_ext <<EOF
14584 #line 14584 "configure"
14585 int     testdata[3] = { 123, 456, 789 };
14586 EOF
14587         if { (eval echo "$as_me:14587: \"$ac_compile\"") >&5
14588   (eval $ac_compile) 2>&5
14589   ac_status=$?
14590   echo "$as_me:14590: \$? = $ac_status" >&5
14591   (exit $ac_status); } ; then
14592                 mv conftest.o data.o && \
14593                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14594         fi
14595         rm -f conftest.$ac_ext data.o
14596         cat >conftest.$ac_ext <<EOF
14597 #line 14597 "configure"
14598 int     testfunc()
14599 {
14600 #if defined(NeXT)
14601         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14602 #else
14603         extern int testdata[3];
14604         return testdata[0] == 123
14605            &&  testdata[1] == 456
14606            &&  testdata[2] == 789;
14607 #endif
14608 }
14609 EOF
14610         if { (eval echo "$as_me:14610: \"$ac_compile\"") >&5
14611   (eval $ac_compile) 2>&5
14612   ac_status=$?
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit $ac_status); }; then
14615                 mv conftest.o func.o && \
14616                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14617         fi
14618         rm -f conftest.$ac_ext func.o
14619         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14620         cf_saveLIBS="$LIBS"
14621         LIBS="conftest.a $LIBS"
14622         if test "$cross_compiling" = yes; then
14623   cf_cv_link_dataonly=unknown
14624 else
14625   cat >conftest.$ac_ext <<_ACEOF
14626 #line 14626 "configure"
14627 #include "confdefs.h"
14628
14629         int main()
14630         {
14631                 extern int testfunc();
14632                 ${cf_cv_main_return:-return} (!testfunc());
14633         }
14634
14635 _ACEOF
14636 rm -f conftest$ac_exeext
14637 if { (eval echo "$as_me:14637: \"$ac_link\"") >&5
14638   (eval $ac_link) 2>&5
14639   ac_status=$?
14640   echo "$as_me:14640: \$? = $ac_status" >&5
14641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14642   { (eval echo "$as_me:14642: \"$ac_try\"") >&5
14643   (eval $ac_try) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); }; }; then
14647   cf_cv_link_dataonly=yes
14648 else
14649   echo "$as_me: program exited with status $ac_status" >&5
14650 echo "$as_me: failed program was:" >&5
14651 cat conftest.$ac_ext >&5
14652 cf_cv_link_dataonly=no
14653 fi
14654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14655 fi
14656         LIBS="$cf_saveLIBS"
14657
14658 fi
14659
14660 echo "$as_me:14660: result: $cf_cv_link_dataonly" >&5
14661 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14662
14663 if test "$cf_cv_link_dataonly" = no ; then
14664         cat >>confdefs.h <<\EOF
14665 #define BROKEN_LINKER 1
14666 EOF
14667
14668         BROKEN_LINKER=1
14669 fi
14670
14671 ###     Checks for library functions.
14672
14673 for ac_func in \
14674 getcwd \
14675 getegid \
14676 geteuid \
14677 getttynam \
14678 issetugid \
14679 poll \
14680 remove \
14681 select \
14682 setbuf \
14683 setbuffer \
14684 setvbuf \
14685 sigaction \
14686 sigvec \
14687 strdup \
14688 strstr \
14689 tcgetpgrp \
14690 times \
14691 vsnprintf \
14692
14693 do
14694 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14695 echo "$as_me:14695: checking for $ac_func" >&5
14696 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14697 if eval "test \"\${$as_ac_var+set}\" = set"; then
14698   echo $ECHO_N "(cached) $ECHO_C" >&6
14699 else
14700   cat >conftest.$ac_ext <<_ACEOF
14701 #line 14701 "configure"
14702 #include "confdefs.h"
14703 /* System header to define __stub macros and hopefully few prototypes,
14704     which can conflict with char $ac_func (); below.  */
14705 #include <assert.h>
14706 /* Override any gcc2 internal prototype to avoid an error.  */
14707 #ifdef __cplusplus
14708 extern "C"
14709 #endif
14710 /* We use char because int might match the return type of a gcc2
14711    builtin and then its argument prototype would still apply.  */
14712 char $ac_func ();
14713 char (*f) ();
14714
14715 int
14716 main ()
14717 {
14718 /* The GNU C library defines this for functions which it implements
14719     to always fail with ENOSYS.  Some functions are actually named
14720     something starting with __ and the normal name is an alias.  */
14721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14722 choke me
14723 #else
14724 f = $ac_func;
14725 #endif
14726
14727   ;
14728   return 0;
14729 }
14730 _ACEOF
14731 rm -f conftest.$ac_objext conftest$ac_exeext
14732 if { (eval echo "$as_me:14732: \"$ac_link\"") >&5
14733   (eval $ac_link) 2>&5
14734   ac_status=$?
14735   echo "$as_me:14735: \$? = $ac_status" >&5
14736   (exit $ac_status); } &&
14737          { ac_try='test -s conftest$ac_exeext'
14738   { (eval echo "$as_me:14738: \"$ac_try\"") >&5
14739   (eval $ac_try) 2>&5
14740   ac_status=$?
14741   echo "$as_me:14741: \$? = $ac_status" >&5
14742   (exit $ac_status); }; }; then
14743   eval "$as_ac_var=yes"
14744 else
14745   echo "$as_me: failed program was:" >&5
14746 cat conftest.$ac_ext >&5
14747 eval "$as_ac_var=no"
14748 fi
14749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14750 fi
14751 echo "$as_me:14751: result: `eval echo '${'$as_ac_var'}'`" >&5
14752 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14753 if test `eval echo '${'$as_ac_var'}'` = yes; then
14754   cat >>confdefs.h <<EOF
14755 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14756 EOF
14757
14758 fi
14759 done
14760
14761 if test "$with_getcap" = "yes" ; then
14762
14763 echo "$as_me:14763: checking for terminal-capability database functions" >&5
14764 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14765 if test "${cf_cv_cgetent+set}" = set; then
14766   echo $ECHO_N "(cached) $ECHO_C" >&6
14767 else
14768
14769 cat >conftest.$ac_ext <<_ACEOF
14770 #line 14770 "configure"
14771 #include "confdefs.h"
14772
14773 #include <stdlib.h>
14774 int
14775 main ()
14776 {
14777
14778         char temp[128];
14779         char *buf = temp;
14780         char *db_array = temp;
14781         cgetent(&buf, &db_array, "vt100");
14782         cgetcap(buf, "tc", '=');
14783         cgetmatch(buf, "tc");
14784
14785   ;
14786   return 0;
14787 }
14788 _ACEOF
14789 rm -f conftest.$ac_objext conftest$ac_exeext
14790 if { (eval echo "$as_me:14790: \"$ac_link\"") >&5
14791   (eval $ac_link) 2>&5
14792   ac_status=$?
14793   echo "$as_me:14793: \$? = $ac_status" >&5
14794   (exit $ac_status); } &&
14795          { ac_try='test -s conftest$ac_exeext'
14796   { (eval echo "$as_me:14796: \"$ac_try\"") >&5
14797   (eval $ac_try) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); }; }; then
14801   cf_cv_cgetent=yes
14802 else
14803   echo "$as_me: failed program was:" >&5
14804 cat conftest.$ac_ext >&5
14805 cf_cv_cgetent=no
14806 fi
14807 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14808
14809 fi
14810 echo "$as_me:14810: result: $cf_cv_cgetent" >&5
14811 echo "${ECHO_T}$cf_cv_cgetent" >&6
14812
14813 if test "$cf_cv_cgetent" = yes
14814 then
14815         cat >>confdefs.h <<\EOF
14816 #define HAVE_BSD_CGETENT 1
14817 EOF
14818
14819 echo "$as_me:14819: checking if cgetent uses const parameter" >&5
14820 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
14821 if test "${cf_cv_cgetent_const+set}" = set; then
14822   echo $ECHO_N "(cached) $ECHO_C" >&6
14823 else
14824
14825 cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828
14829 #include <stdlib.h>
14830 int
14831 main ()
14832 {
14833
14834         char temp[128];
14835         char *buf = temp;
14836 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
14837         const char *db_array = temp;
14838         cgetent(&buf, &db_array, "vt100");
14839 #endif
14840         cgetcap(buf, "tc", '=');
14841         cgetmatch(buf, "tc");
14842
14843   ;
14844   return 0;
14845 }
14846 _ACEOF
14847 rm -f conftest.$ac_objext conftest$ac_exeext
14848 if { (eval echo "$as_me:14848: \"$ac_link\"") >&5
14849   (eval $ac_link) 2>&5
14850   ac_status=$?
14851   echo "$as_me:14851: \$? = $ac_status" >&5
14852   (exit $ac_status); } &&
14853          { ac_try='test -s conftest$ac_exeext'
14854   { (eval echo "$as_me:14854: \"$ac_try\"") >&5
14855   (eval $ac_try) 2>&5
14856   ac_status=$?
14857   echo "$as_me:14857: \$? = $ac_status" >&5
14858   (exit $ac_status); }; }; then
14859   cf_cv_cgetent_const=yes
14860 else
14861   echo "$as_me: failed program was:" >&5
14862 cat conftest.$ac_ext >&5
14863 cf_cv_cgetent_const=no
14864 fi
14865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14866
14867 fi
14868 echo "$as_me:14868: result: $cf_cv_cgetent_const" >&5
14869 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
14870         if test "$cf_cv_cgetent_const" = yes
14871         then
14872                 cat >>confdefs.h <<EOF
14873 #define CGETENT_CONST const
14874 EOF
14875
14876         fi
14877 fi
14878
14879 fi
14880
14881 echo "$as_me:14881: checking for isascii" >&5
14882 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14883 if test "${cf_cv_have_isascii+set}" = set; then
14884   echo $ECHO_N "(cached) $ECHO_C" >&6
14885 else
14886
14887         cat >conftest.$ac_ext <<_ACEOF
14888 #line 14888 "configure"
14889 #include "confdefs.h"
14890 #include <ctype.h>
14891 int
14892 main ()
14893 {
14894 int x = isascii(' ')
14895   ;
14896   return 0;
14897 }
14898 _ACEOF
14899 rm -f conftest.$ac_objext conftest$ac_exeext
14900 if { (eval echo "$as_me:14900: \"$ac_link\"") >&5
14901   (eval $ac_link) 2>&5
14902   ac_status=$?
14903   echo "$as_me:14903: \$? = $ac_status" >&5
14904   (exit $ac_status); } &&
14905          { ac_try='test -s conftest$ac_exeext'
14906   { (eval echo "$as_me:14906: \"$ac_try\"") >&5
14907   (eval $ac_try) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); }; }; then
14911   cf_cv_have_isascii=yes
14912 else
14913   echo "$as_me: failed program was:" >&5
14914 cat conftest.$ac_ext >&5
14915 cf_cv_have_isascii=no
14916 fi
14917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14918
14919 fi
14920 echo "$as_me:14920: result: $cf_cv_have_isascii" >&5
14921 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14922 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14923 #define HAVE_ISASCII 1
14924 EOF
14925
14926 if test "$ac_cv_func_sigaction" = yes; then
14927 echo "$as_me:14927: checking whether sigaction needs _POSIX_SOURCE" >&5
14928 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14929 cat >conftest.$ac_ext <<_ACEOF
14930 #line 14930 "configure"
14931 #include "confdefs.h"
14932
14933 #include <sys/types.h>
14934 #include <signal.h>
14935 int
14936 main ()
14937 {
14938 struct sigaction act
14939   ;
14940   return 0;
14941 }
14942 _ACEOF
14943 rm -f conftest.$ac_objext
14944 if { (eval echo "$as_me:14944: \"$ac_compile\"") >&5
14945   (eval $ac_compile) 2>&5
14946   ac_status=$?
14947   echo "$as_me:14947: \$? = $ac_status" >&5
14948   (exit $ac_status); } &&
14949          { ac_try='test -s conftest.$ac_objext'
14950   { (eval echo "$as_me:14950: \"$ac_try\"") >&5
14951   (eval $ac_try) 2>&5
14952   ac_status=$?
14953   echo "$as_me:14953: \$? = $ac_status" >&5
14954   (exit $ac_status); }; }; then
14955   sigact_bad=no
14956 else
14957   echo "$as_me: failed program was:" >&5
14958 cat conftest.$ac_ext >&5
14959
14960 cat >conftest.$ac_ext <<_ACEOF
14961 #line 14961 "configure"
14962 #include "confdefs.h"
14963
14964 #define _POSIX_SOURCE
14965 #include <sys/types.h>
14966 #include <signal.h>
14967 int
14968 main ()
14969 {
14970 struct sigaction act
14971   ;
14972   return 0;
14973 }
14974 _ACEOF
14975 rm -f conftest.$ac_objext
14976 if { (eval echo "$as_me:14976: \"$ac_compile\"") >&5
14977   (eval $ac_compile) 2>&5
14978   ac_status=$?
14979   echo "$as_me:14979: \$? = $ac_status" >&5
14980   (exit $ac_status); } &&
14981          { ac_try='test -s conftest.$ac_objext'
14982   { (eval echo "$as_me:14982: \"$ac_try\"") >&5
14983   (eval $ac_try) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); }; }; then
14987   sigact_bad=yes
14988          cat >>confdefs.h <<\EOF
14989 #define _POSIX_SOURCE 1
14990 EOF
14991
14992 else
14993   echo "$as_me: failed program was:" >&5
14994 cat conftest.$ac_ext >&5
14995 sigact_bad=unknown
14996 fi
14997 rm -f conftest.$ac_objext conftest.$ac_ext
14998 fi
14999 rm -f conftest.$ac_objext conftest.$ac_ext
15000 echo "$as_me:15000: result: $sigact_bad" >&5
15001 echo "${ECHO_T}$sigact_bad" >&6
15002 fi
15003
15004 echo "$as_me:15004: checking if nanosleep really works" >&5
15005 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15006 if test "${cf_cv_func_nanosleep+set}" = set; then
15007   echo $ECHO_N "(cached) $ECHO_C" >&6
15008 else
15009
15010 if test "$cross_compiling" = yes; then
15011   cf_cv_func_nanosleep=unknown
15012 else
15013   cat >conftest.$ac_ext <<_ACEOF
15014 #line 15014 "configure"
15015 #include "confdefs.h"
15016
15017 #include <stdio.h>
15018 #include <errno.h>
15019 #include <time.h>
15020
15021 #ifdef HAVE_SYS_TIME_H
15022 #include <sys/time.h>
15023 #endif
15024
15025 int main() {
15026         struct timespec ts1, ts2;
15027         int code;
15028         ts1.tv_sec  = 0;
15029         ts1.tv_nsec = 750000000;
15030         ts2.tv_sec  = 0;
15031         ts2.tv_nsec = 0;
15032         errno = 0;
15033         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15034         ${cf_cv_main_return:-return}(code != 0);
15035 }
15036
15037 _ACEOF
15038 rm -f conftest$ac_exeext
15039 if { (eval echo "$as_me:15039: \"$ac_link\"") >&5
15040   (eval $ac_link) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15044   { (eval echo "$as_me:15044: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   cf_cv_func_nanosleep=yes
15050 else
15051   echo "$as_me: program exited with status $ac_status" >&5
15052 echo "$as_me: failed program was:" >&5
15053 cat conftest.$ac_ext >&5
15054 cf_cv_func_nanosleep=no
15055 fi
15056 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15057 fi
15058 fi
15059 echo "$as_me:15059: result: $cf_cv_func_nanosleep" >&5
15060 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15061
15062 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15063 #define HAVE_NANOSLEEP 1
15064 EOF
15065
15066 for ac_header in \
15067 termio.h \
15068 termios.h \
15069 unistd.h \
15070
15071 do
15072 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15073 echo "$as_me:15073: checking for $ac_header" >&5
15074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15076   echo $ECHO_N "(cached) $ECHO_C" >&6
15077 else
15078   cat >conftest.$ac_ext <<_ACEOF
15079 #line 15079 "configure"
15080 #include "confdefs.h"
15081 #include <$ac_header>
15082 _ACEOF
15083 if { (eval echo "$as_me:15083: \"$ac_cpp conftest.$ac_ext\"") >&5
15084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15085   ac_status=$?
15086   egrep -v '^ *\+' conftest.er1 >conftest.err
15087   rm -f conftest.er1
15088   cat conftest.err >&5
15089   echo "$as_me:15089: \$? = $ac_status" >&5
15090   (exit $ac_status); } >/dev/null; then
15091   if test -s conftest.err; then
15092     ac_cpp_err=$ac_c_preproc_warn_flag
15093   else
15094     ac_cpp_err=
15095   fi
15096 else
15097   ac_cpp_err=yes
15098 fi
15099 if test -z "$ac_cpp_err"; then
15100   eval "$as_ac_Header=yes"
15101 else
15102   echo "$as_me: failed program was:" >&5
15103   cat conftest.$ac_ext >&5
15104   eval "$as_ac_Header=no"
15105 fi
15106 rm -f conftest.err conftest.$ac_ext
15107 fi
15108 echo "$as_me:15108: result: `eval echo '${'$as_ac_Header'}'`" >&5
15109 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15110 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15111   cat >>confdefs.h <<EOF
15112 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15113 EOF
15114
15115 fi
15116 done
15117
15118 if test "$ISC" = yes ; then
15119
15120 for ac_header in sys/termio.h
15121 do
15122 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15123 echo "$as_me:15123: checking for $ac_header" >&5
15124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15126   echo $ECHO_N "(cached) $ECHO_C" >&6
15127 else
15128   cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131 #include <$ac_header>
15132 _ACEOF
15133 if { (eval echo "$as_me:15133: \"$ac_cpp conftest.$ac_ext\"") >&5
15134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15135   ac_status=$?
15136   egrep -v '^ *\+' conftest.er1 >conftest.err
15137   rm -f conftest.er1
15138   cat conftest.err >&5
15139   echo "$as_me:15139: \$? = $ac_status" >&5
15140   (exit $ac_status); } >/dev/null; then
15141   if test -s conftest.err; then
15142     ac_cpp_err=$ac_c_preproc_warn_flag
15143   else
15144     ac_cpp_err=
15145   fi
15146 else
15147   ac_cpp_err=yes
15148 fi
15149 if test -z "$ac_cpp_err"; then
15150   eval "$as_ac_Header=yes"
15151 else
15152   echo "$as_me: failed program was:" >&5
15153   cat conftest.$ac_ext >&5
15154   eval "$as_ac_Header=no"
15155 fi
15156 rm -f conftest.err conftest.$ac_ext
15157 fi
15158 echo "$as_me:15158: result: `eval echo '${'$as_ac_Header'}'`" >&5
15159 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15160 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15161   cat >>confdefs.h <<EOF
15162 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15163 EOF
15164
15165 fi
15166 done
15167
15168 fi
15169 if test "$ac_cv_header_termios_h" = yes ; then
15170         case "$CFLAGS $CPPFLAGS" in
15171         *-D_POSIX_SOURCE*)
15172                 termios_bad=dunno ;;
15173         *)      termios_bad=maybe ;;
15174         esac
15175         if test "$termios_bad" = maybe ; then
15176         echo "$as_me:15176: checking whether termios.h needs _POSIX_SOURCE" >&5
15177 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15178         cat >conftest.$ac_ext <<_ACEOF
15179 #line 15179 "configure"
15180 #include "confdefs.h"
15181 #include <termios.h>
15182 int
15183 main ()
15184 {
15185 struct termios foo; int x = foo.c_iflag
15186   ;
15187   return 0;
15188 }
15189 _ACEOF
15190 rm -f conftest.$ac_objext
15191 if { (eval echo "$as_me:15191: \"$ac_compile\"") >&5
15192   (eval $ac_compile) 2>&5
15193   ac_status=$?
15194   echo "$as_me:15194: \$? = $ac_status" >&5
15195   (exit $ac_status); } &&
15196          { ac_try='test -s conftest.$ac_objext'
15197   { (eval echo "$as_me:15197: \"$ac_try\"") >&5
15198   (eval $ac_try) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); }; }; then
15202   termios_bad=no
15203 else
15204   echo "$as_me: failed program was:" >&5
15205 cat conftest.$ac_ext >&5
15206
15207                 cat >conftest.$ac_ext <<_ACEOF
15208 #line 15208 "configure"
15209 #include "confdefs.h"
15210
15211 #define _POSIX_SOURCE
15212 #include <termios.h>
15213 int
15214 main ()
15215 {
15216 struct termios foo; int x = foo.c_iflag
15217   ;
15218   return 0;
15219 }
15220 _ACEOF
15221 rm -f conftest.$ac_objext
15222 if { (eval echo "$as_me:15222: \"$ac_compile\"") >&5
15223   (eval $ac_compile) 2>&5
15224   ac_status=$?
15225   echo "$as_me:15225: \$? = $ac_status" >&5
15226   (exit $ac_status); } &&
15227          { ac_try='test -s conftest.$ac_objext'
15228   { (eval echo "$as_me:15228: \"$ac_try\"") >&5
15229   (eval $ac_try) 2>&5
15230   ac_status=$?
15231   echo "$as_me:15231: \$? = $ac_status" >&5
15232   (exit $ac_status); }; }; then
15233   termios_bad=unknown
15234 else
15235   echo "$as_me: failed program was:" >&5
15236 cat conftest.$ac_ext >&5
15237 termios_bad=yes cat >>confdefs.h <<\EOF
15238 #define _POSIX_SOURCE 1
15239 EOF
15240
15241 fi
15242 rm -f conftest.$ac_objext conftest.$ac_ext
15243
15244 fi
15245 rm -f conftest.$ac_objext conftest.$ac_ext
15246         echo "$as_me:15246: result: $termios_bad" >&5
15247 echo "${ECHO_T}$termios_bad" >&6
15248         fi
15249 fi
15250
15251 echo "$as_me:15251: checking for tcgetattr" >&5
15252 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15253 if test "${cf_cv_have_tcgetattr+set}" = set; then
15254   echo $ECHO_N "(cached) $ECHO_C" >&6
15255 else
15256
15257 cat >conftest.$ac_ext <<_ACEOF
15258 #line 15258 "configure"
15259 #include "confdefs.h"
15260
15261 #include <sys/types.h>
15262 #ifdef HAVE_UNISTD_H
15263 #include <unistd.h>
15264 #endif
15265 #ifdef HAVE_TERMIOS_H
15266 #include <termios.h>
15267 #define TTY struct termios
15268 #else
15269 #ifdef HAVE_TERMIO_H
15270 #include <termio.h>
15271 #define TTY struct termio
15272 #endif
15273 #endif
15274
15275 int
15276 main ()
15277 {
15278
15279 TTY foo;
15280 tcgetattr(1, &foo);
15281   ;
15282   return 0;
15283 }
15284 _ACEOF
15285 rm -f conftest.$ac_objext conftest$ac_exeext
15286 if { (eval echo "$as_me:15286: \"$ac_link\"") >&5
15287   (eval $ac_link) 2>&5
15288   ac_status=$?
15289   echo "$as_me:15289: \$? = $ac_status" >&5
15290   (exit $ac_status); } &&
15291          { ac_try='test -s conftest$ac_exeext'
15292   { (eval echo "$as_me:15292: \"$ac_try\"") >&5
15293   (eval $ac_try) 2>&5
15294   ac_status=$?
15295   echo "$as_me:15295: \$? = $ac_status" >&5
15296   (exit $ac_status); }; }; then
15297   cf_cv_have_tcgetattr=yes
15298 else
15299   echo "$as_me: failed program was:" >&5
15300 cat conftest.$ac_ext >&5
15301 cf_cv_have_tcgetattr=no
15302 fi
15303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15304 fi
15305 echo "$as_me:15305: result: $cf_cv_have_tcgetattr" >&5
15306 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15307 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15308 #define HAVE_TCGETATTR 1
15309 EOF
15310
15311 echo "$as_me:15311: checking for vsscanf function or workaround" >&5
15312 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15313 if test "${cf_cv_func_vsscanf+set}" = set; then
15314   echo $ECHO_N "(cached) $ECHO_C" >&6
15315 else
15316
15317 cat >conftest.$ac_ext <<_ACEOF
15318 #line 15318 "configure"
15319 #include "confdefs.h"
15320
15321 #include <stdarg.h>
15322 #include <stdio.h>
15323 int
15324 main ()
15325 {
15326
15327         va_list ap;
15328         vsscanf("from", "%d", ap)
15329   ;
15330   return 0;
15331 }
15332 _ACEOF
15333 rm -f conftest.$ac_objext conftest$ac_exeext
15334 if { (eval echo "$as_me:15334: \"$ac_link\"") >&5
15335   (eval $ac_link) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); } &&
15339          { ac_try='test -s conftest$ac_exeext'
15340   { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341   (eval $ac_try) 2>&5
15342   ac_status=$?
15343   echo "$as_me:15343: \$? = $ac_status" >&5
15344   (exit $ac_status); }; }; then
15345   cf_cv_func_vsscanf=vsscanf
15346 else
15347   echo "$as_me: failed program was:" >&5
15348 cat conftest.$ac_ext >&5
15349
15350 cat >conftest.$ac_ext <<_ACEOF
15351 #line 15351 "configure"
15352 #include "confdefs.h"
15353
15354 #include <stdarg.h>
15355 #include <stdio.h>
15356 int
15357 main ()
15358 {
15359
15360     FILE strbuf;
15361     char *str = "from";
15362
15363     strbuf._flag = _IOREAD;
15364     strbuf._ptr = strbuf._base = (unsigned char *) str;
15365     strbuf._cnt = strlen(str);
15366     strbuf._file = _NFILE;
15367     return (vfscanf(&strbuf, "%d", ap))
15368   ;
15369   return 0;
15370 }
15371 _ACEOF
15372 rm -f conftest.$ac_objext conftest$ac_exeext
15373 if { (eval echo "$as_me:15373: \"$ac_link\"") >&5
15374   (eval $ac_link) 2>&5
15375   ac_status=$?
15376   echo "$as_me:15376: \$? = $ac_status" >&5
15377   (exit $ac_status); } &&
15378          { ac_try='test -s conftest$ac_exeext'
15379   { (eval echo "$as_me:15379: \"$ac_try\"") >&5
15380   (eval $ac_try) 2>&5
15381   ac_status=$?
15382   echo "$as_me:15382: \$? = $ac_status" >&5
15383   (exit $ac_status); }; }; then
15384   cf_cv_func_vsscanf=vfscanf
15385 else
15386   echo "$as_me: failed program was:" >&5
15387 cat conftest.$ac_ext >&5
15388
15389 cat >conftest.$ac_ext <<_ACEOF
15390 #line 15390 "configure"
15391 #include "confdefs.h"
15392
15393 #include <stdarg.h>
15394 #include <stdio.h>
15395 int
15396 main ()
15397 {
15398
15399     FILE strbuf;
15400     char *str = "from";
15401
15402     strbuf._flag = _IOREAD;
15403     strbuf._ptr = strbuf._base = (unsigned char *) str;
15404     strbuf._cnt = strlen(str);
15405     strbuf._file = _NFILE;
15406     return (_doscan(&strbuf, "%d", ap))
15407   ;
15408   return 0;
15409 }
15410 _ACEOF
15411 rm -f conftest.$ac_objext conftest$ac_exeext
15412 if { (eval echo "$as_me:15412: \"$ac_link\"") >&5
15413   (eval $ac_link) 2>&5
15414   ac_status=$?
15415   echo "$as_me:15415: \$? = $ac_status" >&5
15416   (exit $ac_status); } &&
15417          { ac_try='test -s conftest$ac_exeext'
15418   { (eval echo "$as_me:15418: \"$ac_try\"") >&5
15419   (eval $ac_try) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); }; }; then
15423   cf_cv_func_vsscanf=_doscan
15424 else
15425   echo "$as_me: failed program was:" >&5
15426 cat conftest.$ac_ext >&5
15427
15428 cf_cv_func_vsscanf=no
15429 fi
15430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15431 fi
15432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15433 fi
15434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15435 fi
15436 echo "$as_me:15436: result: $cf_cv_func_vsscanf" >&5
15437 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15438
15439 case $cf_cv_func_vsscanf in #(vi
15440 vsscanf) cat >>confdefs.h <<\EOF
15441 #define HAVE_VSSCANF 1
15442 EOF
15443 ;; #(vi
15444 vfscanf) cat >>confdefs.h <<\EOF
15445 #define HAVE_VFSCANF 1
15446 EOF
15447 ;; #(vi
15448 _doscan) cat >>confdefs.h <<\EOF
15449 #define HAVE__DOSCAN 1
15450 EOF
15451 ;;
15452 esac
15453
15454 echo "$as_me:15454: checking for working mkstemp" >&5
15455 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15456 if test "${cf_cv_func_mkstemp+set}" = set; then
15457   echo $ECHO_N "(cached) $ECHO_C" >&6
15458 else
15459
15460 rm -rf conftest*
15461 if test "$cross_compiling" = yes; then
15462   echo "$as_me:15462: checking for mkstemp" >&5
15463 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15464 if test "${ac_cv_func_mkstemp+set}" = set; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   cat >conftest.$ac_ext <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470 /* System header to define __stub macros and hopefully few prototypes,
15471     which can conflict with char mkstemp (); below.  */
15472 #include <assert.h>
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 #ifdef __cplusplus
15475 extern "C"
15476 #endif
15477 /* We use char because int might match the return type of a gcc2
15478    builtin and then its argument prototype would still apply.  */
15479 char mkstemp ();
15480 char (*f) ();
15481
15482 int
15483 main ()
15484 {
15485 /* The GNU C library defines this for functions which it implements
15486     to always fail with ENOSYS.  Some functions are actually named
15487     something starting with __ and the normal name is an alias.  */
15488 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15489 choke me
15490 #else
15491 f = mkstemp;
15492 #endif
15493
15494   ;
15495   return 0;
15496 }
15497 _ACEOF
15498 rm -f conftest.$ac_objext conftest$ac_exeext
15499 if { (eval echo "$as_me:15499: \"$ac_link\"") >&5
15500   (eval $ac_link) 2>&5
15501   ac_status=$?
15502   echo "$as_me:15502: \$? = $ac_status" >&5
15503   (exit $ac_status); } &&
15504          { ac_try='test -s conftest$ac_exeext'
15505   { (eval echo "$as_me:15505: \"$ac_try\"") >&5
15506   (eval $ac_try) 2>&5
15507   ac_status=$?
15508   echo "$as_me:15508: \$? = $ac_status" >&5
15509   (exit $ac_status); }; }; then
15510   ac_cv_func_mkstemp=yes
15511 else
15512   echo "$as_me: failed program was:" >&5
15513 cat conftest.$ac_ext >&5
15514 ac_cv_func_mkstemp=no
15515 fi
15516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15517 fi
15518 echo "$as_me:15518: result: $ac_cv_func_mkstemp" >&5
15519 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15520
15521 else
15522   cat >conftest.$ac_ext <<_ACEOF
15523 #line 15523 "configure"
15524 #include "confdefs.h"
15525
15526 #include <sys/types.h>
15527 #include <stdlib.h>
15528 #include <stdio.h>
15529 #include <string.h>
15530 #include <sys/stat.h>
15531 int main()
15532 {
15533         char *tmpl = "conftestXXXXXX";
15534         char name[2][80];
15535         int n;
15536         int result = 0;
15537         int fd;
15538         struct stat sb;
15539
15540         umask(077);
15541         for (n = 0; n < 2; ++n) {
15542                 strcpy(name[n], tmpl);
15543                 if ((fd = mkstemp(name[n])) >= 0) {
15544                         if (!strcmp(name[n], tmpl)
15545                          || stat(name[n], &sb) != 0
15546                          || (sb.st_mode & S_IFMT) != S_IFREG
15547                          || (sb.st_mode & 077) != 0) {
15548                                 result = 1;
15549                         }
15550                         close(fd);
15551                 }
15552         }
15553         if (result == 0
15554          && !strcmp(name[0], name[1]))
15555                 result = 1;
15556         ${cf_cv_main_return:-return}(result);
15557 }
15558
15559 _ACEOF
15560 rm -f conftest$ac_exeext
15561 if { (eval echo "$as_me:15561: \"$ac_link\"") >&5
15562   (eval $ac_link) 2>&5
15563   ac_status=$?
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15566   { (eval echo "$as_me:15566: \"$ac_try\"") >&5
15567   (eval $ac_try) 2>&5
15568   ac_status=$?
15569   echo "$as_me:15569: \$? = $ac_status" >&5
15570   (exit $ac_status); }; }; then
15571   cf_cv_func_mkstemp=yes
15572
15573 else
15574   echo "$as_me: program exited with status $ac_status" >&5
15575 echo "$as_me: failed program was:" >&5
15576 cat conftest.$ac_ext >&5
15577 cf_cv_func_mkstemp=no
15578
15579 fi
15580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15581 fi
15582
15583 fi
15584 echo "$as_me:15584: result: $cf_cv_func_mkstemp" >&5
15585 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15586 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15587         cat >>confdefs.h <<\EOF
15588 #define HAVE_MKSTEMP 1
15589 EOF
15590
15591 fi
15592
15593 # setup for prototype of fallback for vsscanf()
15594
15595 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15596         HAVE_VSSCANF=1
15597 else
15598         HAVE_VSSCANF=0
15599 fi
15600
15601 if test "$cross_compiling" = yes ; then
15602         { echo "$as_me:15602: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15603 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15604 else
15605         echo "$as_me:15605: checking whether setvbuf arguments are reversed" >&5
15606 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15607 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15608   echo $ECHO_N "(cached) $ECHO_C" >&6
15609 else
15610   if test "$cross_compiling" = yes; then
15611   { { echo "$as_me:15611: error: cannot run test program while cross compiling" >&5
15612 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15613    { (exit 1); exit 1; }; }
15614 else
15615   cat >conftest.$ac_ext <<_ACEOF
15616 #line 15616 "configure"
15617 #include "confdefs.h"
15618 #include <stdio.h>
15619 /* If setvbuf has the reversed format, exit 0. */
15620 int
15621 main ()
15622 {
15623   /* This call has the arguments reversed.
15624      A reversed system may check and see that the address of main
15625      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15626   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15627     $ac_main_return(1);
15628   putc('\r', stdout);
15629   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15630 }
15631 _ACEOF
15632 rm -f conftest$ac_exeext
15633 if { (eval echo "$as_me:15633: \"$ac_link\"") >&5
15634   (eval $ac_link) 2>&5
15635   ac_status=$?
15636   echo "$as_me:15636: \$? = $ac_status" >&5
15637   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15638   { (eval echo "$as_me:15638: \"$ac_try\"") >&5
15639   (eval $ac_try) 2>&5
15640   ac_status=$?
15641   echo "$as_me:15641: \$? = $ac_status" >&5
15642   (exit $ac_status); }; }; then
15643   ac_cv_func_setvbuf_reversed=yes
15644 else
15645   echo "$as_me: program exited with status $ac_status" >&5
15646 echo "$as_me: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15648 ac_cv_func_setvbuf_reversed=no
15649 fi
15650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15651 fi
15652 rm -f core core.* *.core
15653 fi
15654 echo "$as_me:15654: result: $ac_cv_func_setvbuf_reversed" >&5
15655 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15656 if test $ac_cv_func_setvbuf_reversed = yes; then
15657
15658 cat >>confdefs.h <<\EOF
15659 #define SETVBUF_REVERSED 1
15660 EOF
15661
15662 fi
15663
15664 fi
15665 echo "$as_me:15665: checking return type of signal handlers" >&5
15666 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15667 if test "${ac_cv_type_signal+set}" = set; then
15668   echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670   cat >conftest.$ac_ext <<_ACEOF
15671 #line 15671 "configure"
15672 #include "confdefs.h"
15673 #include <sys/types.h>
15674 #include <signal.h>
15675 #ifdef signal
15676 # undef signal
15677 #endif
15678 #ifdef __cplusplus
15679 extern "C" void (*signal (int, void (*)(int)))(int);
15680 #else
15681 void (*signal ()) ();
15682 #endif
15683
15684 int
15685 main ()
15686 {
15687 int i;
15688   ;
15689   return 0;
15690 }
15691 _ACEOF
15692 rm -f conftest.$ac_objext
15693 if { (eval echo "$as_me:15693: \"$ac_compile\"") >&5
15694   (eval $ac_compile) 2>&5
15695   ac_status=$?
15696   echo "$as_me:15696: \$? = $ac_status" >&5
15697   (exit $ac_status); } &&
15698          { ac_try='test -s conftest.$ac_objext'
15699   { (eval echo "$as_me:15699: \"$ac_try\"") >&5
15700   (eval $ac_try) 2>&5
15701   ac_status=$?
15702   echo "$as_me:15702: \$? = $ac_status" >&5
15703   (exit $ac_status); }; }; then
15704   ac_cv_type_signal=void
15705 else
15706   echo "$as_me: failed program was:" >&5
15707 cat conftest.$ac_ext >&5
15708 ac_cv_type_signal=int
15709 fi
15710 rm -f conftest.$ac_objext conftest.$ac_ext
15711 fi
15712 echo "$as_me:15712: result: $ac_cv_type_signal" >&5
15713 echo "${ECHO_T}$ac_cv_type_signal" >&6
15714
15715 cat >>confdefs.h <<EOF
15716 #define RETSIGTYPE $ac_cv_type_signal
15717 EOF
15718
15719 echo "$as_me:15719: checking for type sigaction_t" >&5
15720 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15721 if test "${cf_cv_type_sigaction+set}" = set; then
15722   echo $ECHO_N "(cached) $ECHO_C" >&6
15723 else
15724
15725         cat >conftest.$ac_ext <<_ACEOF
15726 #line 15726 "configure"
15727 #include "confdefs.h"
15728
15729 #include <signal.h>
15730 int
15731 main ()
15732 {
15733 sigaction_t x
15734   ;
15735   return 0;
15736 }
15737 _ACEOF
15738 rm -f conftest.$ac_objext
15739 if { (eval echo "$as_me:15739: \"$ac_compile\"") >&5
15740   (eval $ac_compile) 2>&5
15741   ac_status=$?
15742   echo "$as_me:15742: \$? = $ac_status" >&5
15743   (exit $ac_status); } &&
15744          { ac_try='test -s conftest.$ac_objext'
15745   { (eval echo "$as_me:15745: \"$ac_try\"") >&5
15746   (eval $ac_try) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); }; }; then
15750   cf_cv_type_sigaction=yes
15751 else
15752   echo "$as_me: failed program was:" >&5
15753 cat conftest.$ac_ext >&5
15754 cf_cv_type_sigaction=no
15755 fi
15756 rm -f conftest.$ac_objext conftest.$ac_ext
15757 fi
15758
15759 echo "$as_me:15759: result: $cf_cv_type_sigaction" >&5
15760 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15761 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15762 #define HAVE_TYPE_SIGACTION 1
15763 EOF
15764
15765 echo "$as_me:15765: checking declaration of size-change" >&5
15766 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15767 if test "${cf_cv_sizechange+set}" = set; then
15768   echo $ECHO_N "(cached) $ECHO_C" >&6
15769 else
15770
15771     cf_cv_sizechange=unknown
15772     cf_save_CPPFLAGS="$CPPFLAGS"
15773
15774 for cf_opts in "" "NEED_PTEM_H"
15775 do
15776
15777     CPPFLAGS="$cf_save_CPPFLAGS"
15778     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15779     cat >conftest.$ac_ext <<_ACEOF
15780 #line 15780 "configure"
15781 #include "confdefs.h"
15782 #include <sys/types.h>
15783 #ifdef HAVE_TERMIOS_H
15784 #include <termios.h>
15785 #else
15786 #ifdef HAVE_TERMIO_H
15787 #include <termio.h>
15788 #endif
15789 #endif
15790 #ifdef NEED_PTEM_H
15791 /* This is a workaround for SCO:  they neglected to define struct winsize in
15792  * termios.h -- it's only in termio.h and ptem.h
15793  */
15794 #include        <sys/stream.h>
15795 #include        <sys/ptem.h>
15796 #endif
15797 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15798 #include <sys/ioctl.h>
15799 #endif
15800
15801 int
15802 main ()
15803 {
15804
15805 #ifdef TIOCGSIZE
15806         struct ttysize win;     /* FIXME: what system is this? */
15807         int y = win.ts_lines;
15808         int x = win.ts_cols;
15809 #else
15810 #ifdef TIOCGWINSZ
15811         struct winsize win;
15812         int y = win.ws_row;
15813         int x = win.ws_col;
15814 #else
15815         no TIOCGSIZE or TIOCGWINSZ
15816 #endif /* TIOCGWINSZ */
15817 #endif /* TIOCGSIZE */
15818
15819   ;
15820   return 0;
15821 }
15822 _ACEOF
15823 rm -f conftest.$ac_objext
15824 if { (eval echo "$as_me:15824: \"$ac_compile\"") >&5
15825   (eval $ac_compile) 2>&5
15826   ac_status=$?
15827   echo "$as_me:15827: \$? = $ac_status" >&5
15828   (exit $ac_status); } &&
15829          { ac_try='test -s conftest.$ac_objext'
15830   { (eval echo "$as_me:15830: \"$ac_try\"") >&5
15831   (eval $ac_try) 2>&5
15832   ac_status=$?
15833   echo "$as_me:15833: \$? = $ac_status" >&5
15834   (exit $ac_status); }; }; then
15835   cf_cv_sizechange=yes
15836 else
15837   echo "$as_me: failed program was:" >&5
15838 cat conftest.$ac_ext >&5
15839 cf_cv_sizechange=no
15840 fi
15841 rm -f conftest.$ac_objext conftest.$ac_ext
15842
15843         CPPFLAGS="$cf_save_CPPFLAGS"
15844         if test "$cf_cv_sizechange" = yes ; then
15845                 echo "size-change succeeded ($cf_opts)" >&5
15846                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15847                 break
15848         fi
15849 done
15850
15851 fi
15852 echo "$as_me:15852: result: $cf_cv_sizechange" >&5
15853 echo "${ECHO_T}$cf_cv_sizechange" >&6
15854 if test "$cf_cv_sizechange" != no ; then
15855         cat >>confdefs.h <<\EOF
15856 #define HAVE_SIZECHANGE 1
15857 EOF
15858
15859         case $cf_cv_sizechange in #(vi
15860         NEED*)
15861                 cat >>confdefs.h <<EOF
15862 #define $cf_cv_sizechange  1
15863 EOF
15864
15865                 ;;
15866         esac
15867 fi
15868
15869 echo "$as_me:15869: checking for memmove" >&5
15870 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15871 if test "${ac_cv_func_memmove+set}" = set; then
15872   echo $ECHO_N "(cached) $ECHO_C" >&6
15873 else
15874   cat >conftest.$ac_ext <<_ACEOF
15875 #line 15875 "configure"
15876 #include "confdefs.h"
15877 /* System header to define __stub macros and hopefully few prototypes,
15878     which can conflict with char memmove (); below.  */
15879 #include <assert.h>
15880 /* Override any gcc2 internal prototype to avoid an error.  */
15881 #ifdef __cplusplus
15882 extern "C"
15883 #endif
15884 /* We use char because int might match the return type of a gcc2
15885    builtin and then its argument prototype would still apply.  */
15886 char memmove ();
15887 char (*f) ();
15888
15889 int
15890 main ()
15891 {
15892 /* The GNU C library defines this for functions which it implements
15893     to always fail with ENOSYS.  Some functions are actually named
15894     something starting with __ and the normal name is an alias.  */
15895 #if defined (__stub_memmove) || defined (__stub___memmove)
15896 choke me
15897 #else
15898 f = memmove;
15899 #endif
15900
15901   ;
15902   return 0;
15903 }
15904 _ACEOF
15905 rm -f conftest.$ac_objext conftest$ac_exeext
15906 if { (eval echo "$as_me:15906: \"$ac_link\"") >&5
15907   (eval $ac_link) 2>&5
15908   ac_status=$?
15909   echo "$as_me:15909: \$? = $ac_status" >&5
15910   (exit $ac_status); } &&
15911          { ac_try='test -s conftest$ac_exeext'
15912   { (eval echo "$as_me:15912: \"$ac_try\"") >&5
15913   (eval $ac_try) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); }; }; then
15917   ac_cv_func_memmove=yes
15918 else
15919   echo "$as_me: failed program was:" >&5
15920 cat conftest.$ac_ext >&5
15921 ac_cv_func_memmove=no
15922 fi
15923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15924 fi
15925 echo "$as_me:15925: result: $ac_cv_func_memmove" >&5
15926 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15927 if test $ac_cv_func_memmove = yes; then
15928   :
15929 else
15930
15931 echo "$as_me:15931: checking for bcopy" >&5
15932 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15933 if test "${ac_cv_func_bcopy+set}" = set; then
15934   echo $ECHO_N "(cached) $ECHO_C" >&6
15935 else
15936   cat >conftest.$ac_ext <<_ACEOF
15937 #line 15937 "configure"
15938 #include "confdefs.h"
15939 /* System header to define __stub macros and hopefully few prototypes,
15940     which can conflict with char bcopy (); below.  */
15941 #include <assert.h>
15942 /* Override any gcc2 internal prototype to avoid an error.  */
15943 #ifdef __cplusplus
15944 extern "C"
15945 #endif
15946 /* We use char because int might match the return type of a gcc2
15947    builtin and then its argument prototype would still apply.  */
15948 char bcopy ();
15949 char (*f) ();
15950
15951 int
15952 main ()
15953 {
15954 /* The GNU C library defines this for functions which it implements
15955     to always fail with ENOSYS.  Some functions are actually named
15956     something starting with __ and the normal name is an alias.  */
15957 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15958 choke me
15959 #else
15960 f = bcopy;
15961 #endif
15962
15963   ;
15964   return 0;
15965 }
15966 _ACEOF
15967 rm -f conftest.$ac_objext conftest$ac_exeext
15968 if { (eval echo "$as_me:15968: \"$ac_link\"") >&5
15969   (eval $ac_link) 2>&5
15970   ac_status=$?
15971   echo "$as_me:15971: \$? = $ac_status" >&5
15972   (exit $ac_status); } &&
15973          { ac_try='test -s conftest$ac_exeext'
15974   { (eval echo "$as_me:15974: \"$ac_try\"") >&5
15975   (eval $ac_try) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit $ac_status); }; }; then
15979   ac_cv_func_bcopy=yes
15980 else
15981   echo "$as_me: failed program was:" >&5
15982 cat conftest.$ac_ext >&5
15983 ac_cv_func_bcopy=no
15984 fi
15985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15986 fi
15987 echo "$as_me:15987: result: $ac_cv_func_bcopy" >&5
15988 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15989 if test $ac_cv_func_bcopy = yes; then
15990
15991         echo "$as_me:15991: checking if bcopy does overlapping moves" >&5
15992 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15993 if test "${cf_cv_good_bcopy+set}" = set; then
15994   echo $ECHO_N "(cached) $ECHO_C" >&6
15995 else
15996
15997                 if test "$cross_compiling" = yes; then
15998   cf_cv_good_bcopy=unknown
15999 else
16000   cat >conftest.$ac_ext <<_ACEOF
16001 #line 16001 "configure"
16002 #include "confdefs.h"
16003
16004 int main() {
16005         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16006         char temp[40];
16007         bcopy(data, temp, sizeof(data));
16008         bcopy(temp+10, temp, 15);
16009         bcopy(temp+5, temp+15, 10);
16010         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16011 }
16012
16013 _ACEOF
16014 rm -f conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   cf_cv_good_bcopy=yes
16026 else
16027   echo "$as_me: program exited with status $ac_status" >&5
16028 echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 cf_cv_good_bcopy=no
16031 fi
16032 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16033 fi
16034
16035 fi
16036 echo "$as_me:16036: result: $cf_cv_good_bcopy" >&5
16037 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16038
16039 else
16040   cf_cv_good_bcopy=no
16041 fi
16042
16043         if test "$cf_cv_good_bcopy" = yes ; then
16044                 cat >>confdefs.h <<\EOF
16045 #define USE_OK_BCOPY 1
16046 EOF
16047
16048         else
16049                 cat >>confdefs.h <<\EOF
16050 #define USE_MY_MEMMOVE 1
16051 EOF
16052
16053         fi
16054
16055 fi
16056
16057 echo "$as_me:16057: checking if poll really works" >&5
16058 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16059 if test "${cf_cv_working_poll+set}" = set; then
16060   echo $ECHO_N "(cached) $ECHO_C" >&6
16061 else
16062
16063 if test "$cross_compiling" = yes; then
16064   cf_cv_working_poll=unknown
16065 else
16066   cat >conftest.$ac_ext <<_ACEOF
16067 #line 16067 "configure"
16068 #include "confdefs.h"
16069
16070 #include <stdio.h>
16071 #ifdef HAVE_POLL_H
16072 #include <poll.h>
16073 #else
16074 #include <sys/poll.h>
16075 #endif
16076 int main() {
16077         struct pollfd myfds;
16078         int ret;
16079
16080         myfds.fd = 0;
16081         myfds.events = POLLIN;
16082
16083         ret = poll(&myfds, 1, 100);
16084         ${cf_cv_main_return:-return}(ret != 0);
16085 }
16086 _ACEOF
16087 rm -f conftest$ac_exeext
16088 if { (eval echo "$as_me:16088: \"$ac_link\"") >&5
16089   (eval $ac_link) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16093   { (eval echo "$as_me:16093: \"$ac_try\"") >&5
16094   (eval $ac_try) 2>&5
16095   ac_status=$?
16096   echo "$as_me:16096: \$? = $ac_status" >&5
16097   (exit $ac_status); }; }; then
16098   cf_cv_working_poll=yes
16099 else
16100   echo "$as_me: program exited with status $ac_status" >&5
16101 echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16103 cf_cv_working_poll=no
16104 fi
16105 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16106 fi
16107 fi
16108 echo "$as_me:16108: result: $cf_cv_working_poll" >&5
16109 echo "${ECHO_T}$cf_cv_working_poll" >&6
16110 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16111 #define HAVE_WORKING_POLL 1
16112 EOF
16113
16114 echo "$as_me:16114: checking for va_copy" >&5
16115 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16116 if test "${cf_cv_have_va_copy+set}" = set; then
16117   echo $ECHO_N "(cached) $ECHO_C" >&6
16118 else
16119
16120 cat >conftest.$ac_ext <<_ACEOF
16121 #line 16121 "configure"
16122 #include "confdefs.h"
16123
16124 #include <stdarg.h>
16125
16126 int
16127 main ()
16128 {
16129
16130         static va_list dst;
16131         static va_list src;
16132         va_copy(dst, src)
16133   ;
16134   return 0;
16135 }
16136 _ACEOF
16137 rm -f conftest.$ac_objext conftest$ac_exeext
16138 if { (eval echo "$as_me:16138: \"$ac_link\"") >&5
16139   (eval $ac_link) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); } &&
16143          { ac_try='test -s conftest$ac_exeext'
16144   { (eval echo "$as_me:16144: \"$ac_try\"") >&5
16145   (eval $ac_try) 2>&5
16146   ac_status=$?
16147   echo "$as_me:16147: \$? = $ac_status" >&5
16148   (exit $ac_status); }; }; then
16149   cf_cv_have_va_copy=yes
16150 else
16151   echo "$as_me: failed program was:" >&5
16152 cat conftest.$ac_ext >&5
16153 cf_cv_have_va_copy=no
16154 fi
16155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16156 fi
16157 echo "$as_me:16157: result: $cf_cv_have_va_copy" >&5
16158 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16159
16160 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16161 #define HAVE_VA_COPY 1
16162 EOF
16163
16164 echo "$as_me:16164: checking for __va_copy" >&5
16165 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16166 if test "${cf_cv_have___va_copy+set}" = set; then
16167   echo $ECHO_N "(cached) $ECHO_C" >&6
16168 else
16169
16170 cat >conftest.$ac_ext <<_ACEOF
16171 #line 16171 "configure"
16172 #include "confdefs.h"
16173
16174 #include <stdarg.h>
16175
16176 int
16177 main ()
16178 {
16179
16180         static va_list dst;
16181         static va_list src;
16182         __va_copy(dst, src)
16183   ;
16184   return 0;
16185 }
16186 _ACEOF
16187 rm -f conftest.$ac_objext conftest$ac_exeext
16188 if { (eval echo "$as_me:16188: \"$ac_link\"") >&5
16189   (eval $ac_link) 2>&5
16190   ac_status=$?
16191   echo "$as_me:16191: \$? = $ac_status" >&5
16192   (exit $ac_status); } &&
16193          { ac_try='test -s conftest$ac_exeext'
16194   { (eval echo "$as_me:16194: \"$ac_try\"") >&5
16195   (eval $ac_try) 2>&5
16196   ac_status=$?
16197   echo "$as_me:16197: \$? = $ac_status" >&5
16198   (exit $ac_status); }; }; then
16199   cf_cv_have___va_copy=yes
16200 else
16201   echo "$as_me: failed program was:" >&5
16202 cat conftest.$ac_ext >&5
16203 cf_cv_have___va_copy=no
16204 fi
16205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16206 fi
16207 echo "$as_me:16207: result: $cf_cv_have___va_copy" >&5
16208 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16209
16210 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16211 #define HAVE___VA_COPY 1
16212 EOF
16213
16214 echo "$as_me:16214: checking for pid_t" >&5
16215 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16216 if test "${ac_cv_type_pid_t+set}" = set; then
16217   echo $ECHO_N "(cached) $ECHO_C" >&6
16218 else
16219   cat >conftest.$ac_ext <<_ACEOF
16220 #line 16220 "configure"
16221 #include "confdefs.h"
16222 $ac_includes_default
16223 int
16224 main ()
16225 {
16226 if ((pid_t *) 0)
16227   return 0;
16228 if (sizeof (pid_t))
16229   return 0;
16230   ;
16231   return 0;
16232 }
16233 _ACEOF
16234 rm -f conftest.$ac_objext
16235 if { (eval echo "$as_me:16235: \"$ac_compile\"") >&5
16236   (eval $ac_compile) 2>&5
16237   ac_status=$?
16238   echo "$as_me:16238: \$? = $ac_status" >&5
16239   (exit $ac_status); } &&
16240          { ac_try='test -s conftest.$ac_objext'
16241   { (eval echo "$as_me:16241: \"$ac_try\"") >&5
16242   (eval $ac_try) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); }; }; then
16246   ac_cv_type_pid_t=yes
16247 else
16248   echo "$as_me: failed program was:" >&5
16249 cat conftest.$ac_ext >&5
16250 ac_cv_type_pid_t=no
16251 fi
16252 rm -f conftest.$ac_objext conftest.$ac_ext
16253 fi
16254 echo "$as_me:16254: result: $ac_cv_type_pid_t" >&5
16255 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16256 if test $ac_cv_type_pid_t = yes; then
16257   :
16258 else
16259
16260 cat >>confdefs.h <<EOF
16261 #define pid_t int
16262 EOF
16263
16264 fi
16265
16266 for ac_header in unistd.h vfork.h
16267 do
16268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16269 echo "$as_me:16269: checking for $ac_header" >&5
16270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16272   echo $ECHO_N "(cached) $ECHO_C" >&6
16273 else
16274   cat >conftest.$ac_ext <<_ACEOF
16275 #line 16275 "configure"
16276 #include "confdefs.h"
16277 #include <$ac_header>
16278 _ACEOF
16279 if { (eval echo "$as_me:16279: \"$ac_cpp conftest.$ac_ext\"") >&5
16280   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16281   ac_status=$?
16282   egrep -v '^ *\+' conftest.er1 >conftest.err
16283   rm -f conftest.er1
16284   cat conftest.err >&5
16285   echo "$as_me:16285: \$? = $ac_status" >&5
16286   (exit $ac_status); } >/dev/null; then
16287   if test -s conftest.err; then
16288     ac_cpp_err=$ac_c_preproc_warn_flag
16289   else
16290     ac_cpp_err=
16291   fi
16292 else
16293   ac_cpp_err=yes
16294 fi
16295 if test -z "$ac_cpp_err"; then
16296   eval "$as_ac_Header=yes"
16297 else
16298   echo "$as_me: failed program was:" >&5
16299   cat conftest.$ac_ext >&5
16300   eval "$as_ac_Header=no"
16301 fi
16302 rm -f conftest.err conftest.$ac_ext
16303 fi
16304 echo "$as_me:16304: result: `eval echo '${'$as_ac_Header'}'`" >&5
16305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16307   cat >>confdefs.h <<EOF
16308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16309 EOF
16310
16311 fi
16312 done
16313
16314 for ac_func in fork vfork
16315 do
16316 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16317 echo "$as_me:16317: checking for $ac_func" >&5
16318 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16319 if eval "test \"\${$as_ac_var+set}\" = set"; then
16320   echo $ECHO_N "(cached) $ECHO_C" >&6
16321 else
16322   cat >conftest.$ac_ext <<_ACEOF
16323 #line 16323 "configure"
16324 #include "confdefs.h"
16325 /* System header to define __stub macros and hopefully few prototypes,
16326     which can conflict with char $ac_func (); below.  */
16327 #include <assert.h>
16328 /* Override any gcc2 internal prototype to avoid an error.  */
16329 #ifdef __cplusplus
16330 extern "C"
16331 #endif
16332 /* We use char because int might match the return type of a gcc2
16333    builtin and then its argument prototype would still apply.  */
16334 char $ac_func ();
16335 char (*f) ();
16336
16337 int
16338 main ()
16339 {
16340 /* The GNU C library defines this for functions which it implements
16341     to always fail with ENOSYS.  Some functions are actually named
16342     something starting with __ and the normal name is an alias.  */
16343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16344 choke me
16345 #else
16346 f = $ac_func;
16347 #endif
16348
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f conftest.$ac_objext conftest$ac_exeext
16354 if { (eval echo "$as_me:16354: \"$ac_link\"") >&5
16355   (eval $ac_link) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); } &&
16359          { ac_try='test -s conftest$ac_exeext'
16360   { (eval echo "$as_me:16360: \"$ac_try\"") >&5
16361   (eval $ac_try) 2>&5
16362   ac_status=$?
16363   echo "$as_me:16363: \$? = $ac_status" >&5
16364   (exit $ac_status); }; }; then
16365   eval "$as_ac_var=yes"
16366 else
16367   echo "$as_me: failed program was:" >&5
16368 cat conftest.$ac_ext >&5
16369 eval "$as_ac_var=no"
16370 fi
16371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16372 fi
16373 echo "$as_me:16373: result: `eval echo '${'$as_ac_var'}'`" >&5
16374 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16375 if test `eval echo '${'$as_ac_var'}'` = yes; then
16376   cat >>confdefs.h <<EOF
16377 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16378 EOF
16379
16380 fi
16381 done
16382
16383 ac_cv_func_fork_works=$ac_cv_func_fork
16384 if test "x$ac_cv_func_fork" = xyes; then
16385   echo "$as_me:16385: checking for working fork" >&5
16386 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16387 if test "${ac_cv_func_fork_works+set}" = set; then
16388   echo $ECHO_N "(cached) $ECHO_C" >&6
16389 else
16390   if test "$cross_compiling" = yes; then
16391   ac_cv_func_fork_works=cross
16392 else
16393   cat >conftest.$ac_ext <<_ACEOF
16394 /* By Rüdiger Kuhlmann. */
16395       #include <sys/types.h>
16396       #if HAVE_UNISTD_H
16397       # include <unistd.h>
16398       #endif
16399       /* Some systems only have a dummy stub for fork() */
16400       int main ()
16401       {
16402         if (fork() < 0)
16403           $ac_main_return (1);
16404         $ac_main_return (0);
16405       }
16406 _ACEOF
16407 rm -f conftest$ac_exeext
16408 if { (eval echo "$as_me:16408: \"$ac_link\"") >&5
16409   (eval $ac_link) 2>&5
16410   ac_status=$?
16411   echo "$as_me:16411: \$? = $ac_status" >&5
16412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16413   { (eval echo "$as_me:16413: \"$ac_try\"") >&5
16414   (eval $ac_try) 2>&5
16415   ac_status=$?
16416   echo "$as_me:16416: \$? = $ac_status" >&5
16417   (exit $ac_status); }; }; then
16418   ac_cv_func_fork_works=yes
16419 else
16420   echo "$as_me: program exited with status $ac_status" >&5
16421 echo "$as_me: failed program was:" >&5
16422 cat conftest.$ac_ext >&5
16423 ac_cv_func_fork_works=no
16424 fi
16425 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16426 fi
16427 fi
16428 echo "$as_me:16428: result: $ac_cv_func_fork_works" >&5
16429 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16430
16431 fi
16432 if test "x$ac_cv_func_fork_works" = xcross; then
16433   case $host in
16434     *-*-amigaos* | *-*-msdosdjgpp*)
16435       # Override, as these systems have only a dummy fork() stub
16436       ac_cv_func_fork_works=no
16437       ;;
16438     *)
16439       ac_cv_func_fork_works=yes
16440       ;;
16441   esac
16442   { echo "$as_me:16442: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16443 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16444 fi
16445 ac_cv_func_vfork_works=$ac_cv_func_vfork
16446 if test "x$ac_cv_func_vfork" = xyes; then
16447   echo "$as_me:16447: checking for working vfork" >&5
16448 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16449 if test "${ac_cv_func_vfork_works+set}" = set; then
16450   echo $ECHO_N "(cached) $ECHO_C" >&6
16451 else
16452   if test "$cross_compiling" = yes; then
16453   ac_cv_func_vfork_works=cross
16454 else
16455   cat >conftest.$ac_ext <<_ACEOF
16456 #line 16456 "configure"
16457 #include "confdefs.h"
16458 /* Thanks to Paul Eggert for this test.  */
16459 #include <stdio.h>
16460 #include <sys/types.h>
16461 #include <sys/stat.h>
16462 #if HAVE_UNISTD_H
16463 # include <unistd.h>
16464 #endif
16465 #if HAVE_VFORK_H
16466 # include <vfork.h>
16467 #endif
16468 /* On some sparc systems, changes by the child to local and incoming
16469    argument registers are propagated back to the parent.  The compiler
16470    is told about this with #include <vfork.h>, but some compilers
16471    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16472    static variable whose address is put into a register that is
16473    clobbered by the vfork.  */
16474 static
16475 #ifdef __cplusplus
16476 sparc_address_test (int arg)
16477 # else
16478 sparc_address_test (arg) int arg;
16479 #endif
16480 {
16481   static pid_t child;
16482   if (!child) {
16483     child = vfork ();
16484     if (child < 0) {
16485       perror ("vfork");
16486       _exit(2);
16487     }
16488     if (!child) {
16489       arg = getpid();
16490       write(-1, "", 0);
16491       _exit (arg);
16492     }
16493   }
16494 }
16495
16496 int
16497 main ()
16498 {
16499   pid_t parent = getpid ();
16500   pid_t child;
16501
16502   sparc_address_test ();
16503
16504   child = vfork ();
16505
16506   if (child == 0) {
16507     /* Here is another test for sparc vfork register problems.  This
16508        test uses lots of local variables, at least as many local
16509        variables as main has allocated so far including compiler
16510        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16511        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16512        reuse the register of parent for one of the local variables,
16513        since it will think that parent can't possibly be used any more
16514        in this routine.  Assigning to the local variable will thus
16515        munge parent in the parent process.  */
16516     pid_t
16517       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16518       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16519     /* Convince the compiler that p..p7 are live; otherwise, it might
16520        use the same hardware register for all 8 local variables.  */
16521     if (p != p1 || p != p2 || p != p3 || p != p4
16522         || p != p5 || p != p6 || p != p7)
16523       _exit(1);
16524
16525     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16526        from child file descriptors.  If the child closes a descriptor
16527        before it execs or exits, this munges the parent's descriptor
16528        as well.  Test for this by closing stdout in the child.  */
16529     _exit(close(fileno(stdout)) != 0);
16530   } else {
16531     int status;
16532     struct stat st;
16533
16534     while (wait(&status) != child)
16535       ;
16536     $ac_main_return(
16537          /* Was there some problem with vforking?  */
16538          child < 0
16539
16540          /* Did the child fail?  (This shouldn't happen.)  */
16541          || status
16542
16543          /* Did the vfork/compiler bug occur?  */
16544          || parent != getpid()
16545
16546          /* Did the file descriptor bug occur?  */
16547          || fstat(fileno(stdout), &st) != 0
16548          );
16549   }
16550 }
16551 _ACEOF
16552 rm -f conftest$ac_exeext
16553 if { (eval echo "$as_me:16553: \"$ac_link\"") >&5
16554   (eval $ac_link) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16558   { (eval echo "$as_me:16558: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:16561: \$? = $ac_status" >&5
16562   (exit $ac_status); }; }; then
16563   ac_cv_func_vfork_works=yes
16564 else
16565   echo "$as_me: program exited with status $ac_status" >&5
16566 echo "$as_me: failed program was:" >&5
16567 cat conftest.$ac_ext >&5
16568 ac_cv_func_vfork_works=no
16569 fi
16570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16571 fi
16572 fi
16573 echo "$as_me:16573: result: $ac_cv_func_vfork_works" >&5
16574 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16575
16576 fi;
16577 if test "x$ac_cv_func_fork_works" = xcross; then
16578   ac_cv_func_vfork_works=ac_cv_func_vfork
16579   { echo "$as_me:16579: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16580 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16581 fi
16582
16583 if test "x$ac_cv_func_vfork_works" = xyes; then
16584
16585 cat >>confdefs.h <<\EOF
16586 #define HAVE_WORKING_VFORK 1
16587 EOF
16588
16589 else
16590
16591 cat >>confdefs.h <<\EOF
16592 #define vfork fork
16593 EOF
16594
16595 fi
16596 if test "x$ac_cv_func_fork_works" = xyes; then
16597
16598 cat >>confdefs.h <<\EOF
16599 #define HAVE_WORKING_FORK 1
16600 EOF
16601
16602 fi
16603
16604 # special check for test/ditto.c
16605
16606 echo "$as_me:16606: checking for openpty in -lutil" >&5
16607 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16608 if test "${ac_cv_lib_util_openpty+set}" = set; then
16609   echo $ECHO_N "(cached) $ECHO_C" >&6
16610 else
16611   ac_check_lib_save_LIBS=$LIBS
16612 LIBS="-lutil  $LIBS"
16613 cat >conftest.$ac_ext <<_ACEOF
16614 #line 16614 "configure"
16615 #include "confdefs.h"
16616
16617 /* Override any gcc2 internal prototype to avoid an error.  */
16618 #ifdef __cplusplus
16619 extern "C"
16620 #endif
16621 /* We use char because int might match the return type of a gcc2
16622    builtin and then its argument prototype would still apply.  */
16623 char openpty ();
16624 int
16625 main ()
16626 {
16627 openpty ();
16628   ;
16629   return 0;
16630 }
16631 _ACEOF
16632 rm -f conftest.$ac_objext conftest$ac_exeext
16633 if { (eval echo "$as_me:16633: \"$ac_link\"") >&5
16634   (eval $ac_link) 2>&5
16635   ac_status=$?
16636   echo "$as_me:16636: \$? = $ac_status" >&5
16637   (exit $ac_status); } &&
16638          { ac_try='test -s conftest$ac_exeext'
16639   { (eval echo "$as_me:16639: \"$ac_try\"") >&5
16640   (eval $ac_try) 2>&5
16641   ac_status=$?
16642   echo "$as_me:16642: \$? = $ac_status" >&5
16643   (exit $ac_status); }; }; then
16644   ac_cv_lib_util_openpty=yes
16645 else
16646   echo "$as_me: failed program was:" >&5
16647 cat conftest.$ac_ext >&5
16648 ac_cv_lib_util_openpty=no
16649 fi
16650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16651 LIBS=$ac_check_lib_save_LIBS
16652 fi
16653 echo "$as_me:16653: result: $ac_cv_lib_util_openpty" >&5
16654 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16655 if test $ac_cv_lib_util_openpty = yes; then
16656   cf_cv_lib_util=yes
16657 else
16658   cf_cv_lib_util=no
16659 fi
16660
16661 echo "$as_me:16661: checking for openpty header" >&5
16662 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16663 if test "${cf_cv_func_openpty+set}" = set; then
16664   echo $ECHO_N "(cached) $ECHO_C" >&6
16665 else
16666
16667     cf_save_LIBS="$LIBS"
16668     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16669     for cf_header in pty.h libutil.h util.h
16670     do
16671     cat >conftest.$ac_ext <<_ACEOF
16672 #line 16672 "configure"
16673 #include "confdefs.h"
16674
16675 #include <$cf_header>
16676
16677 int
16678 main ()
16679 {
16680
16681     int x = openpty((int *)0, (int *)0, (char *)0,
16682                    (struct termios *)0, (struct winsize *)0);
16683
16684   ;
16685   return 0;
16686 }
16687 _ACEOF
16688 rm -f conftest.$ac_objext conftest$ac_exeext
16689 if { (eval echo "$as_me:16689: \"$ac_link\"") >&5
16690   (eval $ac_link) 2>&5
16691   ac_status=$?
16692   echo "$as_me:16692: \$? = $ac_status" >&5
16693   (exit $ac_status); } &&
16694          { ac_try='test -s conftest$ac_exeext'
16695   { (eval echo "$as_me:16695: \"$ac_try\"") >&5
16696   (eval $ac_try) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); }; }; then
16700
16701         cf_cv_func_openpty=$cf_header
16702         break
16703
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16707
16708         cf_cv_func_openpty=no
16709
16710 fi
16711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16712     done
16713     LIBS="$cf_save_LIBS"
16714
16715 fi
16716 echo "$as_me:16716: result: $cf_cv_func_openpty" >&5
16717 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16718
16719 if test "$cf_cv_func_openpty" != no ; then
16720     cat >>confdefs.h <<EOF
16721 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16722 EOF
16723
16724     cat >>confdefs.h <<\EOF
16725 #define USE_XTERM_PTY 1
16726 EOF
16727
16728     if test "$cf_cv_lib_util" = yes ; then
16729         TEST_LIBS="-lutil $TEST_LIBS"
16730     fi
16731 fi
16732
16733 if test "$with_hashed_db" != no ; then
16734         cat >>confdefs.h <<\EOF
16735 #define USE_HASHED_DB 1
16736 EOF
16737
16738 case $with_hashed_db in #(vi
16739 yes|*able*) #(vi
16740     ;;
16741 *)
16742     if test -d "$with_hashed_db" ; then
16743
16744 if test -n "$with_hashed_db/include" ; then
16745   for cf_add_incdir in $with_hashed_db/include
16746   do
16747         while test $cf_add_incdir != /usr/include
16748         do
16749           if test -d $cf_add_incdir
16750           then
16751                 cf_have_incdir=no
16752                 if test -n "$CFLAGS$CPPFLAGS" ; then
16753                   # a loop is needed to ensure we can add subdirs of existing dirs
16754                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16755                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16756                           cf_have_incdir=yes; break
16757                         fi
16758                   done
16759                 fi
16760
16761                 if test "$cf_have_incdir" = no ; then
16762                   if test "$cf_add_incdir" = /usr/local/include ; then
16763                         if test "$GCC" = yes
16764                         then
16765                           cf_save_CPPFLAGS=$CPPFLAGS
16766                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16767                           cat >conftest.$ac_ext <<_ACEOF
16768 #line 16768 "configure"
16769 #include "confdefs.h"
16770 #include <stdio.h>
16771 int
16772 main ()
16773 {
16774 printf("Hello")
16775   ;
16776   return 0;
16777 }
16778 _ACEOF
16779 rm -f conftest.$ac_objext
16780 if { (eval echo "$as_me:16780: \"$ac_compile\"") >&5
16781   (eval $ac_compile) 2>&5
16782   ac_status=$?
16783   echo "$as_me:16783: \$? = $ac_status" >&5
16784   (exit $ac_status); } &&
16785          { ac_try='test -s conftest.$ac_objext'
16786   { (eval echo "$as_me:16786: \"$ac_try\"") >&5
16787   (eval $ac_try) 2>&5
16788   ac_status=$?
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); }; }; then
16791   :
16792 else
16793   echo "$as_me: failed program was:" >&5
16794 cat conftest.$ac_ext >&5
16795 cf_have_incdir=yes
16796 fi
16797 rm -f conftest.$ac_objext conftest.$ac_ext
16798                           CPPFLAGS=$cf_save_CPPFLAGS
16799                         fi
16800                   fi
16801                 fi
16802
16803                 if test "$cf_have_incdir" = no ; then
16804                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16805
16806 echo "${as_me:-configure}:16806: testing adding $cf_add_incdir to include-path ..." 1>&5
16807
16808                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16809
16810                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16811                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16812                   cf_add_incdir="$cf_top_incdir"
16813                 else
16814                   break
16815                 fi
16816           fi
16817         done
16818   done
16819 fi
16820
16821 if test -n "$with_hashed_db/lib" ; then
16822   for cf_add_libdir in $with_hashed_db/lib
16823   do
16824     if test $cf_add_libdir = /usr/lib ; then
16825       :
16826     elif test -d $cf_add_libdir
16827     then
16828       cf_have_libdir=no
16829       if test -n "$LDFLAGS$LIBS" ; then
16830         # a loop is needed to ensure we can add subdirs of existing dirs
16831         for cf_test_libdir in $LDFLAGS $LIBS ; do
16832           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16833             cf_have_libdir=yes; break
16834           fi
16835         done
16836       fi
16837       if test "$cf_have_libdir" = no ; then
16838         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16839
16840 echo "${as_me:-configure}:16840: testing adding $cf_add_libdir to library-path ..." 1>&5
16841
16842         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16843       fi
16844     fi
16845   done
16846 fi
16847
16848     fi
16849 esac
16850
16851 echo "$as_me:16851: checking for db.h" >&5
16852 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16853 if test "${ac_cv_header_db_h+set}" = set; then
16854   echo $ECHO_N "(cached) $ECHO_C" >&6
16855 else
16856   cat >conftest.$ac_ext <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859 #include <db.h>
16860 _ACEOF
16861 if { (eval echo "$as_me:16861: \"$ac_cpp conftest.$ac_ext\"") >&5
16862   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16863   ac_status=$?
16864   egrep -v '^ *\+' conftest.er1 >conftest.err
16865   rm -f conftest.er1
16866   cat conftest.err >&5
16867   echo "$as_me:16867: \$? = $ac_status" >&5
16868   (exit $ac_status); } >/dev/null; then
16869   if test -s conftest.err; then
16870     ac_cpp_err=$ac_c_preproc_warn_flag
16871   else
16872     ac_cpp_err=
16873   fi
16874 else
16875   ac_cpp_err=yes
16876 fi
16877 if test -z "$ac_cpp_err"; then
16878   ac_cv_header_db_h=yes
16879 else
16880   echo "$as_me: failed program was:" >&5
16881   cat conftest.$ac_ext >&5
16882   ac_cv_header_db_h=no
16883 fi
16884 rm -f conftest.err conftest.$ac_ext
16885 fi
16886 echo "$as_me:16886: result: $ac_cv_header_db_h" >&5
16887 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16888 if test $ac_cv_header_db_h = yes; then
16889
16890 echo "$as_me:16890: checking for version of db" >&5
16891 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16892 if test "${cf_cv_hashed_db_version+set}" = set; then
16893   echo $ECHO_N "(cached) $ECHO_C" >&6
16894 else
16895
16896 cf_cv_hashed_db_version=unknown
16897
16898 for cf_db_version in 1 2 3 4 5
16899 do
16900
16901 echo "${as_me:-configure}:16901: testing checking for db version $cf_db_version ..." 1>&5
16902
16903         cat >conftest.$ac_ext <<_ACEOF
16904 #line 16904 "configure"
16905 #include "confdefs.h"
16906
16907 $ac_includes_default
16908 #include <db.h>
16909
16910 #ifdef DB_VERSION_MAJOR
16911         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16912 #if $cf_db_version == DB_VERSION_MAJOR
16913         /* ok */
16914 #else
16915         make an error
16916 #endif
16917 #else
16918 #if $cf_db_version == 1
16919         /* ok: assuming this is DB 1.8.5 */
16920 #else
16921         make an error
16922 #endif
16923 #endif
16924
16925 int
16926 main ()
16927 {
16928 DBT *foo = 0
16929   ;
16930   return 0;
16931 }
16932 _ACEOF
16933 rm -f conftest.$ac_objext
16934 if { (eval echo "$as_me:16934: \"$ac_compile\"") >&5
16935   (eval $ac_compile) 2>&5
16936   ac_status=$?
16937   echo "$as_me:16937: \$? = $ac_status" >&5
16938   (exit $ac_status); } &&
16939          { ac_try='test -s conftest.$ac_objext'
16940   { (eval echo "$as_me:16940: \"$ac_try\"") >&5
16941   (eval $ac_try) 2>&5
16942   ac_status=$?
16943   echo "$as_me:16943: \$? = $ac_status" >&5
16944   (exit $ac_status); }; }; then
16945
16946         cf_cv_hashed_db_version=$cf_db_version
16947         break
16948
16949 else
16950   echo "$as_me: failed program was:" >&5
16951 cat conftest.$ac_ext >&5
16952 fi
16953 rm -f conftest.$ac_objext conftest.$ac_ext
16954 done
16955
16956 fi
16957 echo "$as_me:16957: result: $cf_cv_hashed_db_version" >&5
16958 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16959
16960 if test "$cf_cv_hashed_db_version" = unknown ; then
16961         { { echo "$as_me:16961: error: Cannot determine version of db" >&5
16962 echo "$as_me: error: Cannot determine version of db" >&2;}
16963    { (exit 1); exit 1; }; }
16964 else
16965
16966 echo "$as_me:16966: checking for db libraries" >&5
16967 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16968 if test "${cf_cv_hashed_db_libs+set}" = set; then
16969   echo $ECHO_N "(cached) $ECHO_C" >&6
16970 else
16971
16972 cf_cv_hashed_db_libs=unknown
16973 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16974 do
16975         cf_save_libs="$LIBS"
16976         if test -n "$cf_db_libs"; then
16977                 LIBS="-l$cf_db_libs $LIBS"
16978         fi
16979
16980 echo "${as_me:-configure}:16980: testing checking for library "$cf_db_libs" ..." 1>&5
16981
16982         cat >conftest.$ac_ext <<_ACEOF
16983 #line 16983 "configure"
16984 #include "confdefs.h"
16985
16986 $ac_includes_default
16987 #include <db.h>
16988
16989 int
16990 main ()
16991 {
16992
16993         char *path = "/tmp/foo";
16994 #ifdef DB_VERSION_MAJOR
16995 #if DB_VERSION_MAJOR >= 4
16996         DB *result = 0;
16997         db_create(&result, NULL, 0);
16998         result->open(result,
16999                 NULL,
17000                 path,
17001                 path,
17002                 DB_HASH,
17003                 DB_CREATE,
17004                 0644);
17005 #elif DB_VERSION_MAJOR >= 3
17006         DB *result = 0;
17007         db_create(&result, NULL, 0);
17008         result->open(result,
17009                 path,
17010                 path,
17011                 DB_HASH,
17012                 DB_CREATE,
17013                 0644);
17014 #elif DB_VERSION_MAJOR >= 2
17015         DB *result = 0;
17016         db_open(path,
17017                 DB_HASH,
17018                 DB_CREATE,
17019                 0644,
17020                 (DB_ENV *) 0,
17021                 (DB_INFO *) 0,
17022                 &result);
17023 #endif /* DB_VERSION_MAJOR */
17024 #else
17025         DB *result = dbopen(path,
17026                      2,
17027                      0644,
17028                      DB_HASH,
17029                      0);
17030 #endif
17031         ${cf_cv_main_return:-return}(result != 0)
17032
17033   ;
17034   return 0;
17035 }
17036 _ACEOF
17037 rm -f conftest.$ac_objext conftest$ac_exeext
17038 if { (eval echo "$as_me:17038: \"$ac_link\"") >&5
17039   (eval $ac_link) 2>&5
17040   ac_status=$?
17041   echo "$as_me:17041: \$? = $ac_status" >&5
17042   (exit $ac_status); } &&
17043          { ac_try='test -s conftest$ac_exeext'
17044   { (eval echo "$as_me:17044: \"$ac_try\"") >&5
17045   (eval $ac_try) 2>&5
17046   ac_status=$?
17047   echo "$as_me:17047: \$? = $ac_status" >&5
17048   (exit $ac_status); }; }; then
17049
17050         if test -n "$cf_db_libs" ; then
17051                 cf_cv_hashed_db_libs=$cf_db_libs
17052         else
17053                 cf_cv_hashed_db_libs=default
17054         fi
17055         LIBS="$cf_save_libs"
17056         break
17057
17058 else
17059   echo "$as_me: failed program was:" >&5
17060 cat conftest.$ac_ext >&5
17061 fi
17062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17063         LIBS="$cf_save_libs"
17064 done
17065
17066 fi
17067 echo "$as_me:17067: result: $cf_cv_hashed_db_libs" >&5
17068 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17069
17070         if test "$cf_cv_hashed_db_libs" = unknown ; then
17071                 { { echo "$as_me:17071: error: Cannot determine library for db" >&5
17072 echo "$as_me: error: Cannot determine library for db" >&2;}
17073    { (exit 1); exit 1; }; }
17074         elif test "$cf_cv_hashed_db_libs" != default ; then
17075                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17076         fi
17077 fi
17078
17079 else
17080
17081         { { echo "$as_me:17081: error: Cannot find db.h" >&5
17082 echo "$as_me: error: Cannot find db.h" >&2;}
17083    { (exit 1); exit 1; }; }
17084
17085 fi
17086
17087 fi
17088
17089 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17090         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17091         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17092 fi
17093
17094 # Just in case, check if the C compiler has a bool type.
17095
17096 echo "$as_me:17096: checking if we should include stdbool.h" >&5
17097 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17098
17099 if test "${cf_cv_header_stdbool_h+set}" = set; then
17100   echo $ECHO_N "(cached) $ECHO_C" >&6
17101 else
17102
17103         cat >conftest.$ac_ext <<_ACEOF
17104 #line 17104 "configure"
17105 #include "confdefs.h"
17106
17107 int
17108 main ()
17109 {
17110 bool foo = false
17111   ;
17112   return 0;
17113 }
17114 _ACEOF
17115 rm -f conftest.$ac_objext
17116 if { (eval echo "$as_me:17116: \"$ac_compile\"") >&5
17117   (eval $ac_compile) 2>&5
17118   ac_status=$?
17119   echo "$as_me:17119: \$? = $ac_status" >&5
17120   (exit $ac_status); } &&
17121          { ac_try='test -s conftest.$ac_objext'
17122   { (eval echo "$as_me:17122: \"$ac_try\"") >&5
17123   (eval $ac_try) 2>&5
17124   ac_status=$?
17125   echo "$as_me:17125: \$? = $ac_status" >&5
17126   (exit $ac_status); }; }; then
17127   cf_cv_header_stdbool_h=0
17128 else
17129   echo "$as_me: failed program was:" >&5
17130 cat conftest.$ac_ext >&5
17131 cat >conftest.$ac_ext <<_ACEOF
17132 #line 17132 "configure"
17133 #include "confdefs.h"
17134
17135 #ifndef __BEOS__
17136 #include <stdbool.h>
17137 #endif
17138
17139 int
17140 main ()
17141 {
17142 bool foo = false
17143   ;
17144   return 0;
17145 }
17146 _ACEOF
17147 rm -f conftest.$ac_objext
17148 if { (eval echo "$as_me:17148: \"$ac_compile\"") >&5
17149   (eval $ac_compile) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); } &&
17153          { ac_try='test -s conftest.$ac_objext'
17154   { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159   cf_cv_header_stdbool_h=1
17160 else
17161   echo "$as_me: failed program was:" >&5
17162 cat conftest.$ac_ext >&5
17163 cf_cv_header_stdbool_h=0
17164 fi
17165 rm -f conftest.$ac_objext conftest.$ac_ext
17166 fi
17167 rm -f conftest.$ac_objext conftest.$ac_ext
17168 fi
17169
17170 if test "$cf_cv_header_stdbool_h" = 1
17171 then    echo "$as_me:17171: result: yes" >&5
17172 echo "${ECHO_T}yes" >&6
17173 else    echo "$as_me:17173: result: no" >&5
17174 echo "${ECHO_T}no" >&6
17175 fi
17176
17177 echo "$as_me:17177: checking for builtin bool type" >&5
17178 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17179
17180 if test "${cf_cv_cc_bool_type+set}" = set; then
17181   echo $ECHO_N "(cached) $ECHO_C" >&6
17182 else
17183
17184         cat >conftest.$ac_ext <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187
17188 #include <stdio.h>
17189 #include <sys/types.h>
17190
17191 int
17192 main ()
17193 {
17194 bool x = false
17195   ;
17196   return 0;
17197 }
17198 _ACEOF
17199 rm -f conftest.$ac_objext
17200 if { (eval echo "$as_me:17200: \"$ac_compile\"") >&5
17201   (eval $ac_compile) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit $ac_status); } &&
17205          { ac_try='test -s conftest.$ac_objext'
17206   { (eval echo "$as_me:17206: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   cf_cv_cc_bool_type=1
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 cat conftest.$ac_ext >&5
17215 cf_cv_cc_bool_type=0
17216 fi
17217 rm -f conftest.$ac_objext conftest.$ac_ext
17218
17219 fi
17220
17221 if test "$cf_cv_cc_bool_type" = 1
17222 then    echo "$as_me:17222: result: yes" >&5
17223 echo "${ECHO_T}yes" >&6
17224 else    echo "$as_me:17224: result: no" >&5
17225 echo "${ECHO_T}no" >&6
17226 fi
17227
17228 # Check for C++ compiler characteristics (and ensure that it's there!)
17229 if test -n "$CXX" ; then
17230         ac_ext=cc
17231 ac_cpp='$CXXCPP $CPPFLAGS'
17232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17233 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17235 ac_main_return=return
17236
17237 if test -n "$GXX" ; then
17238 case $cf_cv_system_name in #(vi
17239 os2*) #(vi
17240         cf_stdcpp_libname=stdcpp
17241         ;;
17242 *)
17243         cf_stdcpp_libname=stdc++
17244         ;;
17245 esac
17246 echo "$as_me:17246: checking for library $cf_stdcpp_libname" >&5
17247 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17248 if test "${cf_cv_libstdcpp+set}" = set; then
17249   echo $ECHO_N "(cached) $ECHO_C" >&6
17250 else
17251
17252         cf_save="$LIBS"
17253         LIBS="-l$cf_stdcpp_libname $LIBS"
17254 cat >conftest.$ac_ext <<_ACEOF
17255 #line 17255 "configure"
17256 #include "confdefs.h"
17257
17258 #include <strstream.h>
17259 int
17260 main ()
17261 {
17262
17263 char buf[80];
17264 strstreambuf foo(buf, sizeof(buf))
17265
17266   ;
17267   return 0;
17268 }
17269 _ACEOF
17270 rm -f conftest.$ac_objext conftest$ac_exeext
17271 if { (eval echo "$as_me:17271: \"$ac_link\"") >&5
17272   (eval $ac_link) 2>&5
17273   ac_status=$?
17274   echo "$as_me:17274: \$? = $ac_status" >&5
17275   (exit $ac_status); } &&
17276          { ac_try='test -s conftest$ac_exeext'
17277   { (eval echo "$as_me:17277: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:17280: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   cf_cv_libstdcpp=yes
17283 else
17284   echo "$as_me: failed program was:" >&5
17285 cat conftest.$ac_ext >&5
17286 cf_cv_libstdcpp=no
17287 fi
17288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17289         LIBS="$cf_save"
17290
17291 fi
17292 echo "$as_me:17292: result: $cf_cv_libstdcpp" >&5
17293 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17294 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17295 fi
17296
17297         echo "$as_me:17297: checking whether $CXX understands -c and -o together" >&5
17298 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17299 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17300   echo $ECHO_N "(cached) $ECHO_C" >&6
17301 else
17302
17303 cat > conftest.$ac_ext <<CF_EOF
17304 #include <stdio.h>
17305 int main()
17306 {
17307         ${cf_cv_main_return:-return}(0);
17308 }
17309 CF_EOF
17310 # We do the test twice because some compilers refuse to overwrite an
17311 # existing .o file with -o, though they will create one.
17312 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17313 if { (eval echo "$as_me:17313: \"$ac_try\"") >&5
17314   (eval $ac_try) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); } &&
17318   test -f conftest2.$ac_objext && { (eval echo "$as_me:17318: \"$ac_try\"") >&5
17319   (eval $ac_try) 2>&5
17320   ac_status=$?
17321   echo "$as_me:17321: \$? = $ac_status" >&5
17322   (exit $ac_status); };
17323 then
17324   eval cf_cv_prog_CXX_c_o=yes
17325 else
17326   eval cf_cv_prog_CXX_c_o=no
17327 fi
17328 rm -rf conftest*
17329
17330 fi
17331 if test $cf_cv_prog_CXX_c_o = yes; then
17332   echo "$as_me:17332: result: yes" >&5
17333 echo "${ECHO_T}yes" >&6
17334 else
17335   echo "$as_me:17335: result: no" >&5
17336 echo "${ECHO_T}no" >&6
17337 fi
17338
17339         case $GXX_VERSION in
17340         1*|2.0-6*)
17341                 cf_cxx_library=yes
17342                 ;;
17343         *-2.7*|2.7*)
17344
17345 cf_cxx_library=unknown
17346 case $cf_cv_system_name in #(vi
17347 os2*) #(vi
17348         cf_gpp_libname=gpp
17349         ;;
17350 *)
17351         cf_gpp_libname=g++
17352         ;;
17353 esac
17354 if test "$GXX" = yes; then
17355         echo "$as_me:17355: checking for lib$cf_gpp_libname" >&5
17356 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17357         cf_save="$LIBS"
17358         LIBS="-l$cf_gpp_libname $LIBS"
17359         cat >conftest.$ac_ext <<_ACEOF
17360 #line 17360 "configure"
17361 #include "confdefs.h"
17362
17363 #include <$cf_gpp_libname/builtin.h>
17364
17365 int
17366 main ()
17367 {
17368 two_arg_error_handler_t foo2 = lib_error_handler
17369   ;
17370   return 0;
17371 }
17372 _ACEOF
17373 rm -f conftest.$ac_objext conftest$ac_exeext
17374 if { (eval echo "$as_me:17374: \"$ac_link\"") >&5
17375   (eval $ac_link) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); } &&
17379          { ac_try='test -s conftest$ac_exeext'
17380   { (eval echo "$as_me:17380: \"$ac_try\"") >&5
17381   (eval $ac_try) 2>&5
17382   ac_status=$?
17383   echo "$as_me:17383: \$? = $ac_status" >&5
17384   (exit $ac_status); }; }; then
17385   cf_cxx_library=yes
17386          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17387          if test "$cf_gpp_libname" = cpp ; then
17388             cat >>confdefs.h <<\EOF
17389 #define HAVE_GPP_BUILTIN_H 1
17390 EOF
17391
17392          else
17393             cat >>confdefs.h <<\EOF
17394 #define HAVE_GXX_BUILTIN_H 1
17395 EOF
17396
17397          fi
17398 else
17399   echo "$as_me: failed program was:" >&5
17400 cat conftest.$ac_ext >&5
17401 cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404
17405 #include <builtin.h>
17406
17407 int
17408 main ()
17409 {
17410 two_arg_error_handler_t foo2 = lib_error_handler
17411   ;
17412   return 0;
17413 }
17414 _ACEOF
17415 rm -f conftest.$ac_objext conftest$ac_exeext
17416 if { (eval echo "$as_me:17416: \"$ac_link\"") >&5
17417   (eval $ac_link) 2>&5
17418   ac_status=$?
17419   echo "$as_me:17419: \$? = $ac_status" >&5
17420   (exit $ac_status); } &&
17421          { ac_try='test -s conftest$ac_exeext'
17422   { (eval echo "$as_me:17422: \"$ac_try\"") >&5
17423   (eval $ac_try) 2>&5
17424   ac_status=$?
17425   echo "$as_me:17425: \$? = $ac_status" >&5
17426   (exit $ac_status); }; }; then
17427   cf_cxx_library=yes
17428          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17429          cat >>confdefs.h <<\EOF
17430 #define HAVE_BUILTIN_H 1
17431 EOF
17432
17433 else
17434   echo "$as_me: failed program was:" >&5
17435 cat conftest.$ac_ext >&5
17436 cf_cxx_library=no
17437 fi
17438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17439 fi
17440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17441         LIBS="$cf_save"
17442         echo "$as_me:17442: result: $cf_cxx_library" >&5
17443 echo "${ECHO_T}$cf_cxx_library" >&6
17444 fi
17445
17446                 ;;
17447         *)
17448                 cf_cxx_library=no
17449                 ;;
17450         esac
17451
17452         ac_ext=cc
17453 ac_cpp='$CXXCPP $CPPFLAGS'
17454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17455 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17457 ac_main_return=return
17458 echo "$as_me:17458: checking how to run the C++ preprocessor" >&5
17459 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17460 if test -z "$CXXCPP"; then
17461   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17462   echo $ECHO_N "(cached) $ECHO_C" >&6
17463 else
17464       # Double quotes because CXXCPP needs to be expanded
17465     for CXXCPP in "$CXX -E" "/lib/cpp"
17466     do
17467       ac_preproc_ok=false
17468 for ac_cxx_preproc_warn_flag in '' yes
17469 do
17470   # Use a header file that comes with gcc, so configuring glibc
17471   # with a fresh cross-compiler works.
17472   # On the NeXT, cc -E runs the code through the compiler's parser,
17473   # not just through cpp. "Syntax error" is here to catch this case.
17474   cat >conftest.$ac_ext <<_ACEOF
17475 #line 17475 "configure"
17476 #include "confdefs.h"
17477 #include <assert.h>
17478                      Syntax error
17479 _ACEOF
17480 if { (eval echo "$as_me:17480: \"$ac_cpp conftest.$ac_ext\"") >&5
17481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17482   ac_status=$?
17483   egrep -v '^ *\+' conftest.er1 >conftest.err
17484   rm -f conftest.er1
17485   cat conftest.err >&5
17486   echo "$as_me:17486: \$? = $ac_status" >&5
17487   (exit $ac_status); } >/dev/null; then
17488   if test -s conftest.err; then
17489     ac_cpp_err=$ac_cxx_preproc_warn_flag
17490   else
17491     ac_cpp_err=
17492   fi
17493 else
17494   ac_cpp_err=yes
17495 fi
17496 if test -z "$ac_cpp_err"; then
17497   :
17498 else
17499   echo "$as_me: failed program was:" >&5
17500   cat conftest.$ac_ext >&5
17501   # Broken: fails on valid input.
17502 continue
17503 fi
17504 rm -f conftest.err conftest.$ac_ext
17505
17506   # OK, works on sane cases.  Now check whether non-existent headers
17507   # can be detected and how.
17508   cat >conftest.$ac_ext <<_ACEOF
17509 #line 17509 "configure"
17510 #include "confdefs.h"
17511 #include <ac_nonexistent.h>
17512 _ACEOF
17513 if { (eval echo "$as_me:17513: \"$ac_cpp conftest.$ac_ext\"") >&5
17514   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17515   ac_status=$?
17516   egrep -v '^ *\+' conftest.er1 >conftest.err
17517   rm -f conftest.er1
17518   cat conftest.err >&5
17519   echo "$as_me:17519: \$? = $ac_status" >&5
17520   (exit $ac_status); } >/dev/null; then
17521   if test -s conftest.err; then
17522     ac_cpp_err=$ac_cxx_preproc_warn_flag
17523   else
17524     ac_cpp_err=
17525   fi
17526 else
17527   ac_cpp_err=yes
17528 fi
17529 if test -z "$ac_cpp_err"; then
17530   # Broken: success on invalid input.
17531 continue
17532 else
17533   echo "$as_me: failed program was:" >&5
17534   cat conftest.$ac_ext >&5
17535   # Passes both tests.
17536 ac_preproc_ok=:
17537 break
17538 fi
17539 rm -f conftest.err conftest.$ac_ext
17540
17541 done
17542 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17543 rm -f conftest.err conftest.$ac_ext
17544 if $ac_preproc_ok; then
17545   break
17546 fi
17547
17548     done
17549     ac_cv_prog_CXXCPP=$CXXCPP
17550
17551 fi
17552   CXXCPP=$ac_cv_prog_CXXCPP
17553 else
17554   ac_cv_prog_CXXCPP=$CXXCPP
17555 fi
17556 echo "$as_me:17556: result: $CXXCPP" >&5
17557 echo "${ECHO_T}$CXXCPP" >&6
17558 ac_preproc_ok=false
17559 for ac_cxx_preproc_warn_flag in '' yes
17560 do
17561   # Use a header file that comes with gcc, so configuring glibc
17562   # with a fresh cross-compiler works.
17563   # On the NeXT, cc -E runs the code through the compiler's parser,
17564   # not just through cpp. "Syntax error" is here to catch this case.
17565   cat >conftest.$ac_ext <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568 #include <assert.h>
17569                      Syntax error
17570 _ACEOF
17571 if { (eval echo "$as_me:17571: \"$ac_cpp conftest.$ac_ext\"") >&5
17572   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17573   ac_status=$?
17574   egrep -v '^ *\+' conftest.er1 >conftest.err
17575   rm -f conftest.er1
17576   cat conftest.err >&5
17577   echo "$as_me:17577: \$? = $ac_status" >&5
17578   (exit $ac_status); } >/dev/null; then
17579   if test -s conftest.err; then
17580     ac_cpp_err=$ac_cxx_preproc_warn_flag
17581   else
17582     ac_cpp_err=
17583   fi
17584 else
17585   ac_cpp_err=yes
17586 fi
17587 if test -z "$ac_cpp_err"; then
17588   :
17589 else
17590   echo "$as_me: failed program was:" >&5
17591   cat conftest.$ac_ext >&5
17592   # Broken: fails on valid input.
17593 continue
17594 fi
17595 rm -f conftest.err conftest.$ac_ext
17596
17597   # OK, works on sane cases.  Now check whether non-existent headers
17598   # can be detected and how.
17599   cat >conftest.$ac_ext <<_ACEOF
17600 #line 17600 "configure"
17601 #include "confdefs.h"
17602 #include <ac_nonexistent.h>
17603 _ACEOF
17604 if { (eval echo "$as_me:17604: \"$ac_cpp conftest.$ac_ext\"") >&5
17605   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17606   ac_status=$?
17607   egrep -v '^ *\+' conftest.er1 >conftest.err
17608   rm -f conftest.er1
17609   cat conftest.err >&5
17610   echo "$as_me:17610: \$? = $ac_status" >&5
17611   (exit $ac_status); } >/dev/null; then
17612   if test -s conftest.err; then
17613     ac_cpp_err=$ac_cxx_preproc_warn_flag
17614   else
17615     ac_cpp_err=
17616   fi
17617 else
17618   ac_cpp_err=yes
17619 fi
17620 if test -z "$ac_cpp_err"; then
17621   # Broken: success on invalid input.
17622 continue
17623 else
17624   echo "$as_me: failed program was:" >&5
17625   cat conftest.$ac_ext >&5
17626   # Passes both tests.
17627 ac_preproc_ok=:
17628 break
17629 fi
17630 rm -f conftest.err conftest.$ac_ext
17631
17632 done
17633 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17634 rm -f conftest.err conftest.$ac_ext
17635 if $ac_preproc_ok; then
17636   :
17637 else
17638   { { echo "$as_me:17638: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17639 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17640    { (exit 1); exit 1; }; }
17641 fi
17642
17643 ac_ext=cc
17644 ac_cpp='$CXXCPP $CPPFLAGS'
17645 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17646 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17647 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17648 ac_main_return=return
17649
17650 for ac_header in iostream typeinfo
17651 do
17652 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17653 echo "$as_me:17653: checking for $ac_header" >&5
17654 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17655 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658   cat >conftest.$ac_ext <<_ACEOF
17659 #line 17659 "configure"
17660 #include "confdefs.h"
17661 #include <$ac_header>
17662 _ACEOF
17663 if { (eval echo "$as_me:17663: \"$ac_cpp conftest.$ac_ext\"") >&5
17664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17665   ac_status=$?
17666   egrep -v '^ *\+' conftest.er1 >conftest.err
17667   rm -f conftest.er1
17668   cat conftest.err >&5
17669   echo "$as_me:17669: \$? = $ac_status" >&5
17670   (exit $ac_status); } >/dev/null; then
17671   if test -s conftest.err; then
17672     ac_cpp_err=$ac_cxx_preproc_warn_flag
17673   else
17674     ac_cpp_err=
17675   fi
17676 else
17677   ac_cpp_err=yes
17678 fi
17679 if test -z "$ac_cpp_err"; then
17680   eval "$as_ac_Header=yes"
17681 else
17682   echo "$as_me: failed program was:" >&5
17683   cat conftest.$ac_ext >&5
17684   eval "$as_ac_Header=no"
17685 fi
17686 rm -f conftest.err conftest.$ac_ext
17687 fi
17688 echo "$as_me:17688: result: `eval echo '${'$as_ac_Header'}'`" >&5
17689 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17690 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17691   cat >>confdefs.h <<EOF
17692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17693 EOF
17694
17695 fi
17696 done
17697
17698     if test x"$ac_cv_header_iostream" = xyes ; then
17699         echo "$as_me:17699: checking if iostream uses std-namespace" >&5
17700 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17701         cat >conftest.$ac_ext <<_ACEOF
17702 #line 17702 "configure"
17703 #include "confdefs.h"
17704
17705 #include <iostream>
17706 using std::endl;
17707 using std::cerr;
17708 int
17709 main ()
17710 {
17711
17712 cerr << "testing" << endl;
17713
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f conftest.$ac_objext
17719 if { (eval echo "$as_me:17719: \"$ac_compile\"") >&5
17720   (eval $ac_compile) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit $ac_status); } &&
17724          { ac_try='test -s conftest.$ac_objext'
17725   { (eval echo "$as_me:17725: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit $ac_status); }; }; then
17730   cf_iostream_namespace=yes
17731 else
17732   echo "$as_me: failed program was:" >&5
17733 cat conftest.$ac_ext >&5
17734 cf_iostream_namespace=no
17735 fi
17736 rm -f conftest.$ac_objext conftest.$ac_ext
17737         echo "$as_me:17737: result: $cf_iostream_namespace" >&5
17738 echo "${ECHO_T}$cf_iostream_namespace" >&6
17739         if test "$cf_iostream_namespace" = yes ; then
17740             cat >>confdefs.h <<\EOF
17741 #define IOSTREAM_NAMESPACE 1
17742 EOF
17743
17744         fi
17745     fi
17746
17747 echo "$as_me:17747: checking if we should include stdbool.h" >&5
17748 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17749
17750 if test "${cf_cv_header_stdbool_h+set}" = set; then
17751   echo $ECHO_N "(cached) $ECHO_C" >&6
17752 else
17753
17754         cat >conftest.$ac_ext <<_ACEOF
17755 #line 17755 "configure"
17756 #include "confdefs.h"
17757
17758 int
17759 main ()
17760 {
17761 bool foo = false
17762   ;
17763   return 0;
17764 }
17765 _ACEOF
17766 rm -f conftest.$ac_objext
17767 if { (eval echo "$as_me:17767: \"$ac_compile\"") >&5
17768   (eval $ac_compile) 2>&5
17769   ac_status=$?
17770   echo "$as_me:17770: \$? = $ac_status" >&5
17771   (exit $ac_status); } &&
17772          { ac_try='test -s conftest.$ac_objext'
17773   { (eval echo "$as_me:17773: \"$ac_try\"") >&5
17774   (eval $ac_try) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit $ac_status); }; }; then
17778   cf_cv_header_stdbool_h=0
17779 else
17780   echo "$as_me: failed program was:" >&5
17781 cat conftest.$ac_ext >&5
17782 cat >conftest.$ac_ext <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17785
17786 #ifndef __BEOS__
17787 #include <stdbool.h>
17788 #endif
17789
17790 int
17791 main ()
17792 {
17793 bool foo = false
17794   ;
17795   return 0;
17796 }
17797 _ACEOF
17798 rm -f conftest.$ac_objext
17799 if { (eval echo "$as_me:17799: \"$ac_compile\"") >&5
17800   (eval $ac_compile) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); } &&
17804          { ac_try='test -s conftest.$ac_objext'
17805   { (eval echo "$as_me:17805: \"$ac_try\"") >&5
17806   (eval $ac_try) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit $ac_status); }; }; then
17810   cf_cv_header_stdbool_h=1
17811 else
17812   echo "$as_me: failed program was:" >&5
17813 cat conftest.$ac_ext >&5
17814 cf_cv_header_stdbool_h=0
17815 fi
17816 rm -f conftest.$ac_objext conftest.$ac_ext
17817 fi
17818 rm -f conftest.$ac_objext conftest.$ac_ext
17819 fi
17820
17821 if test "$cf_cv_header_stdbool_h" = 1
17822 then    echo "$as_me:17822: result: yes" >&5
17823 echo "${ECHO_T}yes" >&6
17824 else    echo "$as_me:17824: result: no" >&5
17825 echo "${ECHO_T}no" >&6
17826 fi
17827
17828 echo "$as_me:17828: checking for builtin bool type" >&5
17829 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17830
17831 if test "${cf_cv_builtin_bool+set}" = set; then
17832   echo $ECHO_N "(cached) $ECHO_C" >&6
17833 else
17834
17835         cat >conftest.$ac_ext <<_ACEOF
17836 #line 17836 "configure"
17837 #include "confdefs.h"
17838
17839 #include <stdio.h>
17840 #include <sys/types.h>
17841
17842 int
17843 main ()
17844 {
17845 bool x = false
17846   ;
17847   return 0;
17848 }
17849 _ACEOF
17850 rm -f conftest.$ac_objext
17851 if { (eval echo "$as_me:17851: \"$ac_compile\"") >&5
17852   (eval $ac_compile) 2>&5
17853   ac_status=$?
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit $ac_status); } &&
17856          { ac_try='test -s conftest.$ac_objext'
17857   { (eval echo "$as_me:17857: \"$ac_try\"") >&5
17858   (eval $ac_try) 2>&5
17859   ac_status=$?
17860   echo "$as_me:17860: \$? = $ac_status" >&5
17861   (exit $ac_status); }; }; then
17862   cf_cv_builtin_bool=1
17863 else
17864   echo "$as_me: failed program was:" >&5
17865 cat conftest.$ac_ext >&5
17866 cf_cv_builtin_bool=0
17867 fi
17868 rm -f conftest.$ac_objext conftest.$ac_ext
17869
17870 fi
17871
17872 if test "$cf_cv_builtin_bool" = 1
17873 then    echo "$as_me:17873: result: yes" >&5
17874 echo "${ECHO_T}yes" >&6
17875 else    echo "$as_me:17875: result: no" >&5
17876 echo "${ECHO_T}no" >&6
17877 fi
17878
17879 echo "$as_me:17879: checking for size of bool" >&5
17880 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17881 if test "${cf_cv_type_of_bool+set}" = set; then
17882   echo $ECHO_N "(cached) $ECHO_C" >&6
17883 else
17884
17885         rm -f cf_test.out
17886         if test "$cross_compiling" = yes; then
17887   cf_cv_type_of_bool=unknown
17888 else
17889   cat >conftest.$ac_ext <<_ACEOF
17890 #line 17890 "configure"
17891 #include "confdefs.h"
17892
17893 #include <stdlib.h>
17894 #include <stdio.h>
17895
17896 #if defined(__cplusplus)
17897
17898 #ifdef HAVE_GXX_BUILTIN_H
17899 #include <g++/builtin.h>
17900 #elif HAVE_GPP_BUILTIN_H
17901 #include <gpp/builtin.h>
17902 #elif HAVE_BUILTIN_H
17903 #include <builtin.h>
17904 #endif
17905
17906 #else
17907
17908 #if $cf_cv_header_stdbool_h
17909 #include <stdbool.h>
17910 #endif
17911
17912 #endif
17913
17914 main()
17915 {
17916         FILE *fp = fopen("cf_test.out", "w");
17917         if (fp != 0) {
17918                 bool x = true;
17919                 if ((bool)(-x) >= 0)
17920                         fputs("unsigned ", fp);
17921                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17922                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17923                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17924                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17925                 fclose(fp);
17926         }
17927         ${cf_cv_main_return:-return}(0);
17928 }
17929
17930 _ACEOF
17931 rm -f conftest$ac_exeext
17932 if { (eval echo "$as_me:17932: \"$ac_link\"") >&5
17933   (eval $ac_link) 2>&5
17934   ac_status=$?
17935   echo "$as_me:17935: \$? = $ac_status" >&5
17936   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17937   { (eval echo "$as_me:17937: \"$ac_try\"") >&5
17938   (eval $ac_try) 2>&5
17939   ac_status=$?
17940   echo "$as_me:17940: \$? = $ac_status" >&5
17941   (exit $ac_status); }; }; then
17942   cf_cv_type_of_bool=`cat cf_test.out`
17943                  if test -z "$cf_cv_type_of_bool"; then
17944                    cf_cv_type_of_bool=unknown
17945                  fi
17946 else
17947   echo "$as_me: program exited with status $ac_status" >&5
17948 echo "$as_me: failed program was:" >&5
17949 cat conftest.$ac_ext >&5
17950 cf_cv_type_of_bool=unknown
17951 fi
17952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17953 fi
17954
17955 fi
17956
17957         rm -f cf_test.out
17958 echo "$as_me:17958: result: $cf_cv_type_of_bool" >&5
17959 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17960 if test "$cf_cv_type_of_bool" = unknown ; then
17961         case .$NCURSES_BOOL in #(vi
17962         .auto|.) NCURSES_BOOL=unsigned;;
17963         esac
17964         { echo "$as_me:17964: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17965 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17966         cf_cv_type_of_bool=$NCURSES_BOOL
17967 fi
17968
17969 echo "$as_me:17969: checking for special defines needed for etip.h" >&5
17970 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17971 cf_save_CXXFLAGS="$CXXFLAGS"
17972 cf_result="none"
17973 for cf_math in "" MATH_H
17974 do
17975 for cf_excp in "" MATH_EXCEPTION
17976 do
17977         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17978         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17979         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17980 cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983
17984 #include <etip.h.in>
17985
17986 int
17987 main ()
17988 {
17989
17990   ;
17991   return 0;
17992 }
17993 _ACEOF
17994 rm -f conftest.$ac_objext
17995 if { (eval echo "$as_me:17995: \"$ac_compile\"") >&5
17996   (eval $ac_compile) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); } &&
18000          { ac_try='test -s conftest.$ac_objext'
18001   { (eval echo "$as_me:18001: \"$ac_try\"") >&5
18002   (eval $ac_try) 2>&5
18003   ac_status=$?
18004   echo "$as_me:18004: \$? = $ac_status" >&5
18005   (exit $ac_status); }; }; then
18006
18007         test -n "$cf_math" && cat >>confdefs.h <<EOF
18008 #define ETIP_NEEDS_${cf_math} 1
18009 EOF
18010
18011         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18012 #define ETIP_NEEDS_${cf_excp} 1
18013 EOF
18014
18015         cf_result="$cf_math $cf_excp"
18016         break
18017
18018 else
18019   echo "$as_me: failed program was:" >&5
18020 cat conftest.$ac_ext >&5
18021 fi
18022 rm -f conftest.$ac_objext conftest.$ac_ext
18023 done
18024 done
18025 echo "$as_me:18025: result: $cf_result" >&5
18026 echo "${ECHO_T}$cf_result" >&6
18027 CXXFLAGS="$cf_save_CXXFLAGS"
18028
18029 if test -n "$CXX"; then
18030 echo "$as_me:18030: checking if $CXX accepts parameter initialization" >&5
18031 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18032 if test "${cf_cv_cpp_param_init+set}" = set; then
18033   echo $ECHO_N "(cached) $ECHO_C" >&6
18034 else
18035
18036         ac_ext=cc
18037 ac_cpp='$CXXCPP $CPPFLAGS'
18038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18041 ac_main_return=return
18042
18043         if test "$cross_compiling" = yes; then
18044   cf_cv_cpp_param_init=unknown
18045 else
18046   cat >conftest.$ac_ext <<_ACEOF
18047 #line 18047 "configure"
18048 #include "confdefs.h"
18049
18050 class TEST {
18051 private:
18052         int value;
18053 public:
18054         TEST(int x = 1);
18055         ~TEST();
18056 };
18057
18058 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18059 {
18060         value = x;
18061 }
18062 void main() { }
18063
18064 _ACEOF
18065 rm -f conftest$ac_exeext
18066 if { (eval echo "$as_me:18066: \"$ac_link\"") >&5
18067   (eval $ac_link) 2>&5
18068   ac_status=$?
18069   echo "$as_me:18069: \$? = $ac_status" >&5
18070   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18071   { (eval echo "$as_me:18071: \"$ac_try\"") >&5
18072   (eval $ac_try) 2>&5
18073   ac_status=$?
18074   echo "$as_me:18074: \$? = $ac_status" >&5
18075   (exit $ac_status); }; }; then
18076   cf_cv_cpp_param_init=yes
18077 else
18078   echo "$as_me: program exited with status $ac_status" >&5
18079 echo "$as_me: failed program was:" >&5
18080 cat conftest.$ac_ext >&5
18081 cf_cv_cpp_param_init=no
18082 fi
18083 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18084 fi
18085         ac_ext=cc
18086 ac_cpp='$CXXCPP $CPPFLAGS'
18087 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18088 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18089 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18090 ac_main_return=return
18091
18092 fi
18093 echo "$as_me:18093: result: $cf_cv_cpp_param_init" >&5
18094 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18095 fi
18096 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18097 #define CPP_HAS_PARAM_INIT 1
18098 EOF
18099
18100 if test -n "$CXX"; then
18101
18102 echo "$as_me:18102: checking if $CXX accepts static_cast" >&5
18103 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18104 if test "${cf_cv_cpp_static_cast+set}" = set; then
18105   echo $ECHO_N "(cached) $ECHO_C" >&6
18106 else
18107
18108         ac_ext=cc
18109 ac_cpp='$CXXCPP $CPPFLAGS'
18110 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18111 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18112 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18113 ac_main_return=return
18114
18115         cat >conftest.$ac_ext <<_ACEOF
18116 #line 18116 "configure"
18117 #include "confdefs.h"
18118
18119 class NCursesPanel
18120 {
18121 public:
18122   NCursesPanel(int nlines,
18123                int ncols,
18124                int begin_y = 0,
18125                int begin_x = 0)
18126   {
18127   }
18128
18129   ~NCursesPanel();
18130 };
18131
18132 template<class T> class NCursesUserPanel : public NCursesPanel
18133 {
18134 public:
18135   NCursesUserPanel (int nlines,
18136                     int ncols,
18137                     int begin_y = 0,
18138                     int begin_x = 0,
18139                     const T* p_UserData = static_cast<T*>(0))
18140     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18141   {
18142   };
18143   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18144   {
18145   };
18146
18147   virtual ~NCursesUserPanel() {};
18148 };
18149
18150 int
18151 main ()
18152 {
18153
18154         const char* p_UserData = static_cast<char*>(0)
18155   ;
18156   return 0;
18157 }
18158 _ACEOF
18159 rm -f conftest.$ac_objext
18160 if { (eval echo "$as_me:18160: \"$ac_compile\"") >&5
18161   (eval $ac_compile) 2>&5
18162   ac_status=$?
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit $ac_status); } &&
18165          { ac_try='test -s conftest.$ac_objext'
18166   { (eval echo "$as_me:18166: \"$ac_try\"") >&5
18167   (eval $ac_try) 2>&5
18168   ac_status=$?
18169   echo "$as_me:18169: \$? = $ac_status" >&5
18170   (exit $ac_status); }; }; then
18171   cf_cv_cpp_static_cast=yes
18172 else
18173   echo "$as_me: failed program was:" >&5
18174 cat conftest.$ac_ext >&5
18175 cf_cv_cpp_static_cast=no
18176 fi
18177 rm -f conftest.$ac_objext conftest.$ac_ext
18178
18179         ac_ext=cc
18180 ac_cpp='$CXXCPP $CPPFLAGS'
18181 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18182 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18183 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18184 ac_main_return=return
18185
18186 fi
18187 echo "$as_me:18187: result: $cf_cv_cpp_static_cast" >&5
18188 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18189
18190 fi
18191
18192 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18193 #define CPP_HAS_STATIC_CAST 1
18194 EOF
18195
18196         CXX_AR='$(AR)'
18197         CXX_ARFLAGS='$(ARFLAGS)'
18198         case $cf_cv_system_name in #(vi
18199         irix*) #(vi
18200             if test "$GXX" != yes ; then
18201                 CXX_AR='$(CXX)'
18202                 CXX_ARFLAGS='-ar -o'
18203             fi
18204             ;;
18205         sco3.2v5*) #(vi
18206             CXXLDFLAGS="-u main"
18207             ;;
18208         solaris2*)
18209             if test "$GXX" != yes ; then
18210                 CXX_AR='$(CXX)'
18211                 CXX_ARFLAGS='-xar -o'
18212             fi
18213             ;;
18214         esac
18215
18216 else
18217         cf_cxx_library=no
18218         cf_cv_builtin_bool=1
18219
18220         # Just because we are not configuring against C++ right now does not
18221         # mean that a user will not want to use C++.  Some distributors disable
18222         # the C++ portion of this configuration as a shortcut (or just to avoid
18223         # compiling the demo in the c++ directory).  So we need a reasonable
18224         # default for the 'bool' type.
18225         #
18226         # Caveat: since the storage of the bool type is not standardized, it
18227         # may change.
18228
18229         if test "$NCURSES_BOOL" != auto ; then
18230                 cf_cv_type_of_bool=$NCURSES_BOOL
18231                 cf_cv_header_stdbool_h=0
18232         else
18233                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18234
18235 echo "$as_me:18235: checking for size of bool" >&5
18236 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18237 if test "${cf_cv_type_of_bool+set}" = set; then
18238   echo $ECHO_N "(cached) $ECHO_C" >&6
18239 else
18240
18241         rm -f cf_test.out
18242         if test "$cross_compiling" = yes; then
18243   cf_cv_type_of_bool=unknown
18244 else
18245   cat >conftest.$ac_ext <<_ACEOF
18246 #line 18246 "configure"
18247 #include "confdefs.h"
18248
18249 #include <stdlib.h>
18250 #include <stdio.h>
18251
18252 #if defined(__cplusplus)
18253
18254 #ifdef HAVE_GXX_BUILTIN_H
18255 #include <g++/builtin.h>
18256 #elif HAVE_GPP_BUILTIN_H
18257 #include <gpp/builtin.h>
18258 #elif HAVE_BUILTIN_H
18259 #include <builtin.h>
18260 #endif
18261
18262 #else
18263
18264 #if $cf_cv_header_stdbool_h
18265 #include <stdbool.h>
18266 #endif
18267
18268 #endif
18269
18270 main()
18271 {
18272         FILE *fp = fopen("cf_test.out", "w");
18273         if (fp != 0) {
18274                 bool x = true;
18275                 if ((bool)(-x) >= 0)
18276                         fputs("unsigned ", fp);
18277                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18278                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18279                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18280                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18281                 fclose(fp);
18282         }
18283         ${cf_cv_main_return:-return}(0);
18284 }
18285
18286 _ACEOF
18287 rm -f conftest$ac_exeext
18288 if { (eval echo "$as_me:18288: \"$ac_link\"") >&5
18289   (eval $ac_link) 2>&5
18290   ac_status=$?
18291   echo "$as_me:18291: \$? = $ac_status" >&5
18292   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18293   { (eval echo "$as_me:18293: \"$ac_try\"") >&5
18294   (eval $ac_try) 2>&5
18295   ac_status=$?
18296   echo "$as_me:18296: \$? = $ac_status" >&5
18297   (exit $ac_status); }; }; then
18298   cf_cv_type_of_bool=`cat cf_test.out`
18299                  if test -z "$cf_cv_type_of_bool"; then
18300                    cf_cv_type_of_bool=unknown
18301                  fi
18302 else
18303   echo "$as_me: program exited with status $ac_status" >&5
18304 echo "$as_me: failed program was:" >&5
18305 cat conftest.$ac_ext >&5
18306 cf_cv_type_of_bool=unknown
18307 fi
18308 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18309 fi
18310
18311 fi
18312
18313         rm -f cf_test.out
18314 echo "$as_me:18314: result: $cf_cv_type_of_bool" >&5
18315 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18316 if test "$cf_cv_type_of_bool" = unknown ; then
18317         case .$NCURSES_BOOL in #(vi
18318         .auto|.) NCURSES_BOOL=unsigned;;
18319         esac
18320         { echo "$as_me:18320: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18321 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18322         cf_cv_type_of_bool=$NCURSES_BOOL
18323 fi
18324
18325                 else
18326                         echo "$as_me:18326: checking for fallback type of bool" >&5
18327 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18328                         case "$host_cpu" in #(vi
18329                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18330                         *)      cf_cv_type_of_bool=int  ;;
18331                         esac
18332                         echo "$as_me:18332: result: $cf_cv_type_of_bool" >&5
18333 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18334                 fi
18335         fi
18336 fi
18337
18338 # If the C compiler did not declare bool, and we did not determine that the C++
18339 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18340 # ncurses library use the same type as C++ bool.  Note that this allows one to
18341 # specify the type of bool in a configure-script option and postpone
18342 # integration with the C++ compiler provided that the types are compatible.
18343 USE_CXX_BOOL=1
18344 if test $cf_cv_cc_bool_type = 1
18345 then
18346         # oops: C has a bool.  Unlikely, but C++ could differ.
18347         USE_CXX_BOOL=0
18348 elif test $cf_cv_builtin_bool = 0
18349 then
18350         # C++ has no bool
18351         USE_CXX_BOOL=0
18352 else
18353         # this is the normal case
18354         USE_CXX_BOOL='defined(__cplusplus)'
18355 fi
18356
18357 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18358
18359         if test "$cf_with_ada" != "no" ; then
18360                 if test "$with_libtool" != "no"; then
18361                         { echo "$as_me:18361: WARNING: libtool does not support Ada - disabling feature" >&5
18362 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18363                         cf_with_ada=no
18364                 fi
18365         fi
18366
18367         if test "$cf_with_ada" != "no" ; then
18368
18369 cf_ada_make=gnatmake
18370 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18371 set dummy $cf_ada_make; ac_word=$2
18372 echo "$as_me:18372: checking for $ac_word" >&5
18373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18374 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18375   echo $ECHO_N "(cached) $ECHO_C" >&6
18376 else
18377   if test -n "$gnat_exists"; then
18378   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18379 else
18380   ac_save_IFS=$IFS; IFS=$ac_path_separator
18381 ac_dummy="$PATH"
18382 for ac_dir in $ac_dummy; do
18383   IFS=$ac_save_IFS
18384   test -z "$ac_dir" && ac_dir=.
18385   $as_executable_p "$ac_dir/$ac_word" || continue
18386 ac_cv_prog_gnat_exists="yes"
18387 echo "$as_me:18387: found $ac_dir/$ac_word" >&5
18388 break
18389 done
18390
18391   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18392 fi
18393 fi
18394 gnat_exists=$ac_cv_prog_gnat_exists
18395 if test -n "$gnat_exists"; then
18396   echo "$as_me:18396: result: $gnat_exists" >&5
18397 echo "${ECHO_T}$gnat_exists" >&6
18398 else
18399   echo "$as_me:18399: result: no" >&5
18400 echo "${ECHO_T}no" >&6
18401 fi
18402
18403 if test "$ac_cv_prog_gnat_exists" = no; then
18404    cf_ada_make=
18405 else
18406
18407 echo "$as_me:18407: checking for gnat version" >&5
18408 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18409 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18410         grep '[0-9].[0-9][0-9]*' |\
18411     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18412 echo "$as_me:18412: result: $cf_gnat_version" >&5
18413 echo "${ECHO_T}$cf_gnat_version" >&6
18414
18415 case $cf_gnat_version in #(vi
18416 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18417         cf_cv_prog_gnat_correct=yes
18418         ;;
18419 *)
18420         { echo "$as_me:18420: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18421 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18422         cf_cv_prog_gnat_correct=no
18423         ;;
18424 esac
18425
18426    # Extract the first word of "m4", so it can be a program name with args.
18427 set dummy m4; ac_word=$2
18428 echo "$as_me:18428: checking for $ac_word" >&5
18429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18430 if test "${ac_cv_prog_M4_exists+set}" = set; then
18431   echo $ECHO_N "(cached) $ECHO_C" >&6
18432 else
18433   if test -n "$M4_exists"; then
18434   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18435 else
18436   ac_save_IFS=$IFS; IFS=$ac_path_separator
18437 ac_dummy="$PATH"
18438 for ac_dir in $ac_dummy; do
18439   IFS=$ac_save_IFS
18440   test -z "$ac_dir" && ac_dir=.
18441   $as_executable_p "$ac_dir/$ac_word" || continue
18442 ac_cv_prog_M4_exists="yes"
18443 echo "$as_me:18443: found $ac_dir/$ac_word" >&5
18444 break
18445 done
18446
18447   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18448 fi
18449 fi
18450 M4_exists=$ac_cv_prog_M4_exists
18451 if test -n "$M4_exists"; then
18452   echo "$as_me:18452: result: $M4_exists" >&5
18453 echo "${ECHO_T}$M4_exists" >&6
18454 else
18455   echo "$as_me:18455: result: no" >&5
18456 echo "${ECHO_T}no" >&6
18457 fi
18458
18459    if test "$ac_cv_prog_M4_exists" = no; then
18460       cf_cv_prog_gnat_correct=no
18461       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18462    fi
18463    if test "$cf_cv_prog_gnat_correct" = yes; then
18464       echo "$as_me:18464: checking if GNAT works" >&5
18465 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18466
18467 rm -rf conftest* *~conftest*
18468 cat >>conftest.ads <<CF_EOF
18469 procedure conftest;
18470 CF_EOF
18471 cat >>conftest.adb <<CF_EOF
18472 with Text_IO;
18473 with GNAT.OS_Lib;
18474 procedure conftest is
18475 begin
18476    Text_IO.Put ("Hello World");
18477    Text_IO.New_Line;
18478    GNAT.OS_Lib.OS_Exit (0);
18479 end conftest;
18480 CF_EOF
18481 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18482    if ( ./conftest 1>&5 2>&1 ) ; then
18483       cf_cv_prog_gnat_correct=yes
18484    else
18485       cf_cv_prog_gnat_correct=no
18486    fi
18487 else
18488    cf_cv_prog_gnat_correct=no
18489 fi
18490 rm -rf conftest* *~conftest*
18491
18492       echo "$as_me:18492: result: $cf_cv_prog_gnat_correct" >&5
18493 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18494    fi
18495 fi
18496
18497                 if test "$cf_cv_prog_gnat_correct" = yes; then
18498
18499         ADAFLAGS="$ADAFLAGS -gnatpn"
18500
18501                         # make ADAFLAGS consistent with CFLAGS
18502                         case "$CFLAGS" in
18503                         *-g*)
18504
18505         ADAFLAGS="$ADAFLAGS -g"
18506
18507                                 ;;
18508                         esac
18509                         case "$CFLAGS" in
18510                         *-O*)
18511
18512         ADAFLAGS="$ADAFLAGS -O3"
18513
18514                                 ;;
18515                         esac
18516
18517 echo "$as_me:18517: checking if GNAT supports generics" >&5
18518 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18519 case $cf_gnat_version in #(vi
18520 3.[1-9]*|[4-9].*) #(vi
18521         cf_gnat_generics=yes
18522         ;;
18523 *)
18524         cf_gnat_generics=no
18525         ;;
18526 esac
18527 echo "$as_me:18527: result: $cf_gnat_generics" >&5
18528 echo "${ECHO_T}$cf_gnat_generics" >&6
18529
18530 if test "$cf_gnat_generics" = yes
18531 then
18532         cf_compile_generics=generics
18533         cf_generic_objects="\${GENOBJS}"
18534 else
18535         cf_compile_generics=
18536         cf_generic_objects=
18537 fi
18538
18539 echo "$as_me:18539: checking if GNAT supports SIGINT" >&5
18540 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18541 if test "${cf_cv_gnat_sigint+set}" = set; then
18542   echo $ECHO_N "(cached) $ECHO_C" >&6
18543 else
18544
18545 rm -rf conftest* *~conftest*
18546 cat >>conftest.ads <<CF_EOF
18547 with Ada.Interrupts.Names;
18548
18549 package ConfTest is
18550
18551    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18552    pragma Unreserve_All_Interrupts;
18553    pragma Warnings (On);
18554
18555    protected Process is
18556       procedure Stop;
18557       function Continue return Boolean;
18558       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18559    private
18560       Done : Boolean := False;
18561    end Process;
18562
18563 end ConfTest;
18564 CF_EOF
18565 cat >>conftest.adb <<CF_EOF
18566 package body ConfTest is
18567    protected body Process is
18568       procedure Stop is
18569       begin
18570          Done := True;
18571       end Stop;
18572       function Continue return Boolean is
18573       begin
18574          return not Done;
18575       end Continue;
18576    end Process;
18577 end ConfTest;
18578 CF_EOF
18579 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18580       cf_cv_gnat_sigint=yes
18581 else
18582    cf_cv_gnat_sigint=no
18583 fi
18584 rm -rf conftest* *~conftest*
18585
18586 fi
18587 echo "$as_me:18587: result: $cf_cv_gnat_sigint" >&5
18588 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18589
18590 if test $cf_cv_gnat_sigint = yes ; then
18591         USE_GNAT_SIGINT=""
18592 else
18593         USE_GNAT_SIGINT="#"
18594 fi
18595
18596 echo "$as_me:18596: checking if GNAT pragma Unreferenced works" >&5
18597 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18598 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18599   echo $ECHO_N "(cached) $ECHO_C" >&6
18600 else
18601
18602 rm -rf conftest* *~conftest*
18603 cat >>conftest.ads <<CF_EOF
18604 procedure conftest;
18605 CF_EOF
18606 cat >>conftest.adb <<CF_EOF
18607 with Text_IO;
18608 with GNAT.OS_Lib;
18609 procedure conftest is
18610    test : Integer;
18611    pragma Unreferenced (test);
18612 begin
18613    test := 1;
18614    Text_IO.Put ("Hello World");
18615    Text_IO.New_Line;
18616    GNAT.OS_Lib.OS_Exit (0);
18617 end conftest;
18618 CF_EOF
18619 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18620       cf_cv_pragma_unreferenced=yes
18621 else
18622    cf_cv_pragma_unreferenced=no
18623 fi
18624 rm -rf conftest* *~conftest*
18625
18626 fi
18627 echo "$as_me:18627: result: $cf_cv_pragma_unreferenced" >&5
18628 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18629
18630 # if the pragma is supported, use it (needed in the Trace code).
18631 if test $cf_cv_pragma_unreferenced = yes ; then
18632         PRAGMA_UNREF=TRUE
18633 else
18634         PRAGMA_UNREF=FALSE
18635 fi
18636
18637 cf_gnat_libraries=no
18638 cf_gnat_projects=no
18639
18640 echo "$as_me:18640: checking if GNAT supports project files" >&5
18641 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18642 case $cf_gnat_version in #(vi
18643 3.[0-9]*) #(vi
18644         ;;
18645 *)
18646         case $cf_cv_system_name in #(vi
18647         cygwin*) #(vi
18648                 ;;
18649         *)
18650                 mkdir conftest.src conftest.bin conftest.lib
18651                 cd conftest.src
18652                 rm -rf conftest* *~conftest*
18653                 cat >>library.gpr <<CF_EOF
18654 project Library is
18655   Kind := External ("LIB_KIND");
18656   for Library_Name use "ConfTest";
18657   for Object_Dir use ".";
18658   for Library_ALI_Dir use External("LIBRARY_DIR");
18659   for Library_Version use External ("SONAME");
18660   for Library_Kind use Kind;
18661   for Library_Dir use External("BUILD_DIR");
18662   Source_Dir := External ("SOURCE_DIR");
18663   for Source_Dirs use (Source_Dir);
18664   package Compiler is
18665      for Default_Switches ("Ada") use
18666        ("-g",
18667         "-O2",
18668         "-gnatafno",
18669         "-gnatVa",   -- All validity checks
18670         "-gnatwa");  -- Activate all optional errors
18671   end Compiler;
18672 end Library;
18673 CF_EOF
18674                 cat >>confpackage.ads <<CF_EOF
18675 package ConfPackage is
18676    procedure conftest;
18677 end ConfPackage;
18678 CF_EOF
18679                 cat >>confpackage.adb <<CF_EOF
18680 with Text_IO;
18681 package body ConfPackage is
18682    procedure conftest is
18683    begin
18684       Text_IO.Put ("Hello World");
18685       Text_IO.New_Line;
18686    end conftest;
18687 end ConfPackage;
18688 CF_EOF
18689                 if ( $cf_ada_make $ADAFLAGS \
18690                                 -Plibrary.gpr \
18691                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18692                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18693                                 -XSOURCE_DIR=`pwd` \
18694                                 -XSONAME=libConfTest.so.1 \
18695                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18696                         cf_gnat_projects=yes
18697                 fi
18698                 cd ..
18699                 if test -f conftest.lib/confpackage.ali
18700                 then
18701                         cf_gnat_libraries=yes
18702                 fi
18703                 rm -rf conftest* *~conftest*
18704                 ;;
18705         esac
18706         ;;
18707 esac
18708 echo "$as_me:18708: result: $cf_gnat_projects" >&5
18709 echo "${ECHO_T}$cf_gnat_projects" >&6
18710
18711 if test $cf_gnat_projects = yes
18712 then
18713         echo "$as_me:18713: checking if GNAT supports libraries" >&5
18714 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18715         echo "$as_me:18715: result: $cf_gnat_libraries" >&5
18716 echo "${ECHO_T}$cf_gnat_libraries" >&6
18717 fi
18718
18719 if test "$cf_gnat_projects" = yes
18720 then
18721         USE_OLD_MAKERULES="#"
18722         USE_GNAT_PROJECTS=""
18723 else
18724         USE_OLD_MAKERULES=""
18725         USE_GNAT_PROJECTS="#"
18726 fi
18727
18728 if test "$cf_gnat_libraries" = yes
18729 then
18730         USE_GNAT_LIBRARIES=""
18731 else
18732         USE_GNAT_LIBRARIES="#"
18733 fi
18734
18735 echo "$as_me:18735: checking for ada-compiler" >&5
18736 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18737
18738 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18739 if test "${with_ada_compiler+set}" = set; then
18740   withval="$with_ada_compiler"
18741   cf_ada_compiler=$withval
18742 else
18743   cf_ada_compiler=gnatmake
18744 fi;
18745
18746 echo "$as_me:18746: result: $cf_ada_compiler" >&5
18747 echo "${ECHO_T}$cf_ada_compiler" >&6
18748
18749                         cf_ada_package=terminal_interface
18750
18751 echo "$as_me:18751: checking for ada-include" >&5
18752 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18753
18754 # Check whether --with-ada-include or --without-ada-include was given.
18755 if test "${with_ada_include+set}" = set; then
18756   withval="$with_ada_include"
18757
18758 else
18759   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18760 fi; if test -n "$prefix/share/ada/adainclude" ; then
18761
18762 if test "x$prefix" != xNONE; then
18763   cf_path_syntax="$prefix"
18764 else
18765   cf_path_syntax="$ac_default_prefix"
18766 fi
18767
18768 case ".$withval" in #(vi
18769 .\$\(*\)*|.\'*\'*) #(vi
18770   ;;
18771 ..|./*|.\\*) #(vi
18772   ;;
18773 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18774   ;;
18775 .\${*prefix}*) #(vi
18776   eval withval="$withval"
18777   case ".$withval" in #(vi
18778   .NONE/*)
18779     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18780     ;;
18781   esac
18782   ;; #(vi
18783 .no|.NONE/*)
18784   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18785   ;;
18786 *)
18787   { { echo "$as_me:18787: error: expected a pathname, not \"$withval\"" >&5
18788 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18789    { (exit 1); exit 1; }; }
18790   ;;
18791 esac
18792
18793 fi
18794 ADA_INCLUDE="$withval"
18795
18796 echo "$as_me:18796: result: $ADA_INCLUDE" >&5
18797 echo "${ECHO_T}$ADA_INCLUDE" >&6
18798
18799 echo "$as_me:18799: checking for ada-objects" >&5
18800 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18801
18802 # Check whether --with-ada-objects or --without-ada-objects was given.
18803 if test "${with_ada_objects+set}" = set; then
18804   withval="$with_ada_objects"
18805
18806 else
18807   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18808 fi; if test -n "$prefix/lib/ada/adalib" ; then
18809
18810 if test "x$prefix" != xNONE; then
18811   cf_path_syntax="$prefix"
18812 else
18813   cf_path_syntax="$ac_default_prefix"
18814 fi
18815
18816 case ".$withval" in #(vi
18817 .\$\(*\)*|.\'*\'*) #(vi
18818   ;;
18819 ..|./*|.\\*) #(vi
18820   ;;
18821 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18822   ;;
18823 .\${*prefix}*) #(vi
18824   eval withval="$withval"
18825   case ".$withval" in #(vi
18826   .NONE/*)
18827     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18828     ;;
18829   esac
18830   ;; #(vi
18831 .no|.NONE/*)
18832   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18833   ;;
18834 *)
18835   { { echo "$as_me:18835: error: expected a pathname, not \"$withval\"" >&5
18836 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18837    { (exit 1); exit 1; }; }
18838   ;;
18839 esac
18840
18841 fi
18842 ADA_OBJECTS="$withval"
18843
18844 echo "$as_me:18844: result: $ADA_OBJECTS" >&5
18845 echo "${ECHO_T}$ADA_OBJECTS" >&6
18846
18847 echo "$as_me:18847: checking if an Ada95 shared-library should be built" >&5
18848 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18849
18850 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18851 if test "${with_ada_sharedlib+set}" = set; then
18852   withval="$with_ada_sharedlib"
18853   with_ada_sharedlib=$withval
18854 else
18855   with_ada_sharedlib=no
18856 fi;
18857 echo "$as_me:18857: result: $with_ada_sharedlib" >&5
18858 echo "${ECHO_T}$with_ada_sharedlib" >&6
18859
18860 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18861 MAKE_ADA_SHAREDLIB="#"
18862
18863 if test "x$with_ada_sharedlib" != xno
18864 then
18865         MAKE_ADA_SHAREDLIB=
18866         if test "x$with_ada_sharedlib" != xyes
18867         then
18868                 ADA_SHAREDLIB="$with_ada_sharedlib"
18869         fi
18870 fi
18871
18872                 fi
18873         fi
18874 else
18875         cf_with_ada=no
18876 fi
18877
18878 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18879 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18880 ###
18881 ### ticlib modules may be a separate library, otherwise contained in termlib.
18882 ### termlib modules may be a separate library, otherwise contained in ncurses.
18883 ###
18884 ### The of "+" or " " between the tokens controls the way the script
18885 ### chooses to split module lists into libraries.
18886 ###
18887 ### (see CF_LIB_RULES).
18888 echo "$as_me:18888: checking for library subsets" >&5
18889 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18890 LIB_SUBSETS=
18891
18892 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18893         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18894         if test "$with_ticlib" != no ; then
18895                 LIB_SUBSETS="${LIB_SUBSETS} "
18896         else
18897                 LIB_SUBSETS="${LIB_SUBSETS}+"
18898         fi
18899 fi
18900
18901 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18902 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18903
18904 if test "$with_termlib" != no ; then
18905         LIB_SUBSETS="${LIB_SUBSETS} "
18906 else
18907         LIB_SUBSETS="${LIB_SUBSETS}+"
18908 fi
18909
18910 LIB_SUBSETS="${LIB_SUBSETS}base"
18911
18912 # Most term-driver calls are to tinfo, but some like init_pair are to the
18913 # base library (so it resides in base).
18914 if test "$with_term_driver" != no ; then
18915         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18916         case $cf_cv_system_name in #(vi
18917         *mingw32*) #(vi
18918                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18919                 ;;
18920         *) #(vi
18921                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18922                 ;;
18923         esac
18924 fi
18925
18926 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18927 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18928
18929 echo "$as_me:18929: result: $LIB_SUBSETS" >&5
18930 echo "${ECHO_T}$LIB_SUBSETS" >&6
18931
18932 ### Construct the list of include-directories to be generated
18933
18934 CPPFLAGS="$CPPFLAGS -I. -I../include"
18935 if test "$srcdir" != "."; then
18936         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18937 fi
18938 if test "$GCC" != yes; then
18939         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18940 elif test "$includedir" != "/usr/include"; then
18941         if test "$includedir" = '${prefix}/include' ; then
18942                 if test $prefix != /usr ; then
18943                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18944                 fi
18945         else
18946                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18947         fi
18948 fi
18949
18950 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18951 if test "$srcdir" != "."; then
18952         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18953 fi
18954 if test "$GCC" != yes; then
18955         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18956 elif test "$includedir" != "/usr/include"; then
18957         if test "$includedir" = '${prefix}/include' ; then
18958                 if test $prefix != /usr ; then
18959                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18960                 fi
18961         else
18962                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18963         fi
18964 fi
18965
18966 ### Build up pieces for makefile rules
18967 echo "$as_me:18967: checking default library suffix" >&5
18968 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18969
18970         case $DFT_LWR_MODEL in
18971         libtool) DFT_ARG_SUFFIX=''   ;;
18972         normal)  DFT_ARG_SUFFIX=''   ;;
18973         debug)   DFT_ARG_SUFFIX='_g' ;;
18974         profile) DFT_ARG_SUFFIX='_p' ;;
18975         shared)  DFT_ARG_SUFFIX=''   ;;
18976         esac
18977         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18978 echo "$as_me:18978: result: $DFT_ARG_SUFFIX" >&5
18979 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18980
18981 echo "$as_me:18981: checking default library-dependency suffix" >&5
18982 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18983
18984         case $DFT_LWR_MODEL in #(vi
18985         libtool) #(vi
18986                 DFT_LIB_SUFFIX='.la'
18987                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18988                 ;;
18989         normal) #(vi
18990                 DFT_LIB_SUFFIX='.a'
18991                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18992                 ;;
18993         debug) #(vi
18994                 DFT_LIB_SUFFIX='_g.a'
18995                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18996                 ;;
18997         profile) #(vi
18998                 DFT_LIB_SUFFIX='_p.a'
18999                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19000                 ;;
19001         shared) #(vi
19002                 case $cf_cv_system_name in
19003                 aix[5-7]*) #(vi
19004                         DFT_LIB_SUFFIX='.a'
19005                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19006                         ;;
19007                 cygwin*) #(vi
19008                         DFT_LIB_SUFFIX='.dll'
19009                         DFT_DEP_SUFFIX='.dll.a'
19010                         ;;
19011                 darwin*) #(vi
19012                         DFT_LIB_SUFFIX='.dylib'
19013                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19014                         ;;
19015                 hpux*) #(vi
19016                         case $target in
19017                         ia64*) #(vi
19018                                 DFT_LIB_SUFFIX='.so'
19019                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19020                                 ;;
19021                         *) #(vi
19022                                 DFT_LIB_SUFFIX='.sl'
19023                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19024                                 ;;
19025                         esac
19026                         ;;
19027                 *)      DFT_LIB_SUFFIX='.so'
19028                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19029                         ;;
19030                 esac
19031         esac
19032         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19033         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19034 echo "$as_me:19034: result: $DFT_DEP_SUFFIX" >&5
19035 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19036
19037 echo "$as_me:19037: checking default object directory" >&5
19038 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19039
19040         case $DFT_LWR_MODEL in
19041         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19042         normal)  DFT_OBJ_SUBDIR='objects' ;;
19043         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19044         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19045         shared)
19046                 case $cf_cv_system_name in #(vi
19047                 cygwin) #(vi
19048                         DFT_OBJ_SUBDIR='objects' ;;
19049                 *)
19050                         DFT_OBJ_SUBDIR='obj_s' ;;
19051                 esac
19052         esac
19053 echo "$as_me:19053: result: $DFT_OBJ_SUBDIR" >&5
19054 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19055
19056 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19057 if test "$cf_with_cxx" = yes ; then
19058 echo "$as_me:19058: checking c++ library-dependency suffix" >&5
19059 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19060 if test "$with_libtool" != "no"; then
19061         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19062 else
19063
19064         case normal in #(vi
19065         libtool) #(vi
19066                 CXX_LIB_SUFFIX='.la'
19067                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19068                 ;;
19069         normal) #(vi
19070                 CXX_LIB_SUFFIX='.a'
19071                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19072                 ;;
19073         debug) #(vi
19074                 CXX_LIB_SUFFIX='_g.a'
19075                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19076                 ;;
19077         profile) #(vi
19078                 CXX_LIB_SUFFIX='_p.a'
19079                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19080                 ;;
19081         shared) #(vi
19082                 case $cf_cv_system_name in
19083                 aix[5-7]*) #(vi
19084                         CXX_LIB_SUFFIX='.a'
19085                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19086                         ;;
19087                 cygwin*) #(vi
19088                         CXX_LIB_SUFFIX='.dll'
19089                         CXX_DEP_SUFFIX='.dll.a'
19090                         ;;
19091                 darwin*) #(vi
19092                         CXX_LIB_SUFFIX='.dylib'
19093                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19094                         ;;
19095                 hpux*) #(vi
19096                         case $target in
19097                         ia64*) #(vi
19098                                 CXX_LIB_SUFFIX='.so'
19099                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19100                                 ;;
19101                         *) #(vi
19102                                 CXX_LIB_SUFFIX='.sl'
19103                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19104                                 ;;
19105                         esac
19106                         ;;
19107                 *)      CXX_LIB_SUFFIX='.so'
19108                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19109                         ;;
19110                 esac
19111         esac
19112         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19113         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19114 fi
19115 echo "$as_me:19115: result: $CXX_LIB_SUFFIX" >&5
19116 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19117
19118 fi
19119
19120 # do not want -ldl in build except as needed for -lncurses dependency
19121 if test "$with_dlsym" = yes ; then
19122 if test $DFT_LWR_MODEL = shared || \
19123    test $DFT_LWR_MODEL = libtool ; then
19124
19125 # remove dl library from $LIBS
19126 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19127
19128 fi
19129 fi
19130 ### Set up low-level terminfo dependencies for makefiles.
19131
19132 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19133 # do not need libdl
19134 TICS_LIST=
19135 if test "$with_dlsym" = yes ; then
19136
19137 # remove dl library from $SHLIB_LIST
19138 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19139
19140 fi
19141
19142 if test "$with_ticlib" != no ; then
19143
19144         if test "$with_ticlib" != yes ; then
19145                 TICS_NAME=$with_ticlib
19146                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19147                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19148                 TICS_LIB_SUFFIX="${with_ticlib}"
19149         else
19150                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19151                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19152                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19153         fi
19154         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
19155 else
19156         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19157 fi
19158
19159 if test "$with_termlib" != no ; then
19160
19161         if test "$with_termlib" != yes ; then
19162                 TINFO_NAME=$with_termlib
19163                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19164                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19165                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19166                 TINFO_LIB_SUFFIX="${with_termlib}"
19167         else
19168                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19169                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19170                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19171                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19172         fi
19173
19174         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19175         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19176         if test "$DFT_LWR_MODEL" = "libtool"; then
19177                 TEST_ARGS="${TEST_DEPS}"
19178                 TEST_ARG2="${TEST_DEP2}"
19179                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19180                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19181                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19182         else
19183                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19184                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19185                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19186                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19187                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19188         fi
19189 else
19190         # the next lines are needed for linking libtic over libncurses
19191         TINFO_NAME=${LIB_NAME}
19192         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19193         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19194         if test "$with_tic_depends" = yes ; then
19195                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19196         else
19197                 TICS_LIST="$SHLIB_LIST"
19198         fi
19199
19200         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19201 fi
19202
19203 if test "$DFT_LWR_MODEL" = shared ; then
19204         case $cf_cv_system_name in #(vi
19205         cygwin*)
19206                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19207                 TINFO_SUFFIX=.dll
19208                 ;;
19209         esac
19210 fi
19211
19212 if test "$with_dlsym" = yes ; then
19213
19214 # remove dl library from $TICS_LIST
19215 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19216
19217 fi
19218
19219 if test "$DFT_LWR_MODEL" = "libtool"; then
19220     OBJEXT=lo
19221 fi
19222
19223 # needed for Ada95
19224 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
19225
19226 case $DFT_LWR_MODEL in
19227 normal|debug|profile)
19228
19229 if test "$GCC" = yes ; then
19230         case $cf_cv_system_name in #(
19231         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19232                 LDFLAGS_STATIC=
19233                 LDFLAGS_SHARED=
19234                 ;;
19235     *)  #( normally, except when broken
19236         LDFLAGS_STATIC=-static
19237         LDFLAGS_SHARED=-dynamic
19238         ;;
19239     esac
19240 else
19241         case $cf_cv_system_name in #(
19242         aix[4-7]*)      #( from ld manpage
19243                 LDFLAGS_STATIC=-bstatic
19244                 LDFLAGS_SHARED=-bdynamic
19245                 ;;
19246         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19247                 # We could also use just "archive" and "shared".
19248                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19249                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19250                 ;;
19251         irix*)          #( from ld manpage IRIX64
19252                 LDFLAGS_STATIC=-Bstatic
19253                 LDFLAGS_SHARED=-Bdynamic
19254                 ;;
19255         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19256                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19257                 LDFLAGS_STATIC=-noso
19258                 LDFLAGS_SHARED=-so_archive
19259                 ;;
19260         solaris2*)
19261                 LDFLAGS_STATIC=-Bstatic
19262                 LDFLAGS_SHARED=-Bdynamic
19263                 ;;
19264         esac
19265 fi
19266
19267 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19268 then
19269         echo "$as_me:19269: checking if linker supports switching between static/dynamic" >&5
19270 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19271
19272         rm -f libconftest.a
19273         cat >conftest.$ac_ext <<EOF
19274 #line 19274 "configure"
19275 #include <stdio.h>
19276 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19277 EOF
19278         if { (eval echo "$as_me:19278: \"$ac_compile\"") >&5
19279   (eval $ac_compile) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit $ac_status); } ; then
19283                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19284                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19285         fi
19286         rm -f conftest.*
19287
19288         cf_save_LIBS="$LIBS"
19289
19290         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19291         cat >conftest.$ac_ext <<_ACEOF
19292 #line 19292 "configure"
19293 #include "confdefs.h"
19294
19295 #line 19295 "configure"
19296 #include <stdio.h>
19297 int cf_ldflags_static(FILE *fp);
19298
19299 int
19300 main ()
19301 {
19302
19303         return cf_ldflags_static(stdin);
19304
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f conftest.$ac_objext conftest$ac_exeext
19310 if { (eval echo "$as_me:19310: \"$ac_link\"") >&5
19311   (eval $ac_link) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit $ac_status); } &&
19315          { ac_try='test -s conftest$ac_exeext'
19316   { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit $ac_status); }; }; then
19321   cf_ldflags_static=yes
19322 else
19323   echo "$as_me: failed program was:" >&5
19324 cat conftest.$ac_ext >&5
19325 cf_ldflags_static=no
19326 fi
19327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19328
19329         rm -f libconftest.*
19330         LIBS="$cf_save_LIBS"
19331
19332         echo "$as_me:19332: result: $cf_ldflags_static" >&5
19333 echo "${ECHO_T}$cf_ldflags_static" >&6
19334
19335         if test $cf_ldflags_static != yes
19336         then
19337                 LDFLAGS_STATIC=
19338                 LDFLAGS_SHARED=
19339         fi
19340 else
19341         LDFLAGS_STATIC=
19342         LDFLAGS_SHARED=
19343 fi
19344
19345         ;;
19346 esac
19347
19348 echo "$as_me:19348: checking where we will install curses.h" >&5
19349 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19350 test "$with_overwrite" = no && \
19351 test "x$includedir" = 'x${prefix}/include' && \
19352         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19353 echo "$as_me:19353: result: $includedir" >&5
19354 echo "${ECHO_T}$includedir" >&6
19355
19356 ### Resolve a conflict between normal and wide-curses by forcing applications
19357 ### that will need libutf8 to add it to their configure script.
19358 if test "$with_overwrite" != no ; then
19359 if test "$NCURSES_LIBUTF8" = 1 ; then
19360         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19361         { echo "$as_me:19361: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19362 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19363 fi
19364 fi
19365 WITH_OVERWRITE=$with_overwrite
19366
19367 # used to separate tack out of the tree
19368 NCURSES_TREE=
19369
19370 ### predefined stuff for the test programs
19371 cat >>confdefs.h <<\EOF
19372 #define HAVE_SLK_COLOR 1
19373 EOF
19374
19375 ### Construct the list of subdirectories for which we'll customize makefiles
19376 ### with the appropriate compile-rules.
19377
19378 echo "$as_me:19378: checking for src modules" >&5
19379 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19380
19381 # dependencies and linker-arguments for test-programs
19382 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19383 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19384 if test "$DFT_LWR_MODEL" = "libtool"; then
19385         TEST_ARGS="${TEST_DEPS}"
19386         TEST_ARG2="${TEST_DEP2}"
19387 else
19388         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19389         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19390 fi
19391
19392 cf_cv_src_modules=
19393 for cf_dir in $modules_to_build
19394 do
19395         if test -f $srcdir/$cf_dir/modules; then
19396
19397                 # We may/may not have tack in the distribution, though the
19398                 # makefile is.
19399                 if test $cf_dir = tack ; then
19400                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19401                                 continue
19402                         fi
19403                 fi
19404
19405                 if test -z "$cf_cv_src_modules"; then
19406                         cf_cv_src_modules=$cf_dir
19407                 else
19408                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19409                 fi
19410
19411                 # Make the ncurses_cfg.h file record the library interface files as
19412                 # well.  These are header files that are the same name as their
19413                 # directory.  Ncurses is the only library that does not follow
19414                 # that pattern.
19415                 if test $cf_dir = tack ; then
19416                         continue
19417                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19418
19419 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19420
19421                         cat >>confdefs.h <<EOF
19422 #define HAVE_${cf_have_include}_H 1
19423 EOF
19424
19425                         cat >>confdefs.h <<EOF
19426 #define HAVE_LIB${cf_have_include} 1
19427 EOF
19428
19429                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19430                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19431                         if test "$DFT_LWR_MODEL" = "libtool"; then
19432                                 TEST_ARGS="${TEST_DEPS}"
19433                                 TEST_ARG2="${TEST_DEP2}"
19434                         else
19435                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19436                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19437                         fi
19438                 fi
19439         fi
19440 done
19441 echo "$as_me:19441: result: $cf_cv_src_modules" >&5
19442 echo "${ECHO_T}$cf_cv_src_modules" >&6
19443
19444 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19445 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19446
19447 SRC_SUBDIRS=
19448 if test "x$cf_with_manpages" != xno ; then
19449         SRC_SUBDIRS="$SRC_SUBDIRS man"
19450 fi
19451 SRC_SUBDIRS="$SRC_SUBDIRS include"
19452 for cf_dir in $cf_cv_src_modules
19453 do
19454         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19455 done
19456 if test "x$cf_with_tests" != "xno" ; then
19457         SRC_SUBDIRS="$SRC_SUBDIRS test"
19458 fi
19459 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19460 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19461
19462 ADA_SUBDIRS=
19463 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19464         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19465         ADA_SUBDIRS="gen src"
19466         if test "x$cf_with_tests" != "xno" ; then
19467                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19468         fi
19469 fi
19470
19471 SUB_MAKEFILES=
19472 for cf_dir in $SRC_SUBDIRS
19473 do
19474         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19475 done
19476
19477 if test -n "$ADA_SUBDIRS"; then
19478         for cf_dir in $ADA_SUBDIRS
19479         do
19480                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19481         done
19482
19483 fi
19484
19485 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19486    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19487    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19488 fi
19489
19490 DIRS_TO_MAKE="lib"
19491 for cf_item in $cf_list_models
19492 do
19493
19494         case $cf_item in
19495         libtool) cf_subdir='obj_lo'  ;;
19496         normal)  cf_subdir='objects' ;;
19497         debug)   cf_subdir='obj_g' ;;
19498         profile) cf_subdir='obj_p' ;;
19499         shared)
19500                 case $cf_cv_system_name in #(vi
19501                 cygwin) #(vi
19502                         cf_subdir='objects' ;;
19503                 *)
19504                         cf_subdir='obj_s' ;;
19505                 esac
19506         esac
19507
19508         for cf_item2 in $DIRS_TO_MAKE
19509         do
19510                 test $cf_item2 = $cf_subdir && break
19511         done
19512         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19513 done
19514 for cf_dir in $DIRS_TO_MAKE
19515 do
19516         test ! -d $cf_dir && mkdir $cf_dir
19517 done
19518
19519 # symbols that differ when compiling Ada95 by itself.
19520 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19521
19522 # values to use as strings
19523 cat >>confdefs.h <<EOF
19524 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19525 EOF
19526
19527 cat >>confdefs.h <<EOF
19528 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19529 EOF
19530
19531 ### Now that we're done running tests, add the compiler-warnings, if any
19532
19533 cf_fix_cppflags=no
19534 cf_new_cflags=
19535 cf_new_cppflags=
19536 cf_new_extra_cppflags=
19537
19538 for cf_add_cflags in $EXTRA_CFLAGS
19539 do
19540 case $cf_fix_cppflags in
19541 no)
19542         case $cf_add_cflags in #(vi
19543         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19544                 case $cf_add_cflags in
19545                 -D*)
19546                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19547
19548                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19549                                 && test -z "${cf_tst_cflags}" \
19550                                 && cf_fix_cppflags=yes
19551
19552                         if test $cf_fix_cppflags = yes ; then
19553                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19554                                 continue
19555                         elif test "${cf_tst_cflags}" = "\"'" ; then
19556                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19557                                 continue
19558                         fi
19559                         ;;
19560                 esac
19561                 case "$CPPFLAGS" in
19562                 *$cf_add_cflags) #(vi
19563                         ;;
19564                 *) #(vi
19565                         case $cf_add_cflags in #(vi
19566                         -D*)
19567                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19568
19569 CPPFLAGS=`echo "$CPPFLAGS" | \
19570         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19571                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19572
19573                                 ;;
19574                         esac
19575                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19576                         ;;
19577                 esac
19578                 ;;
19579         *)
19580                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19581                 ;;
19582         esac
19583         ;;
19584 yes)
19585         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19586
19587         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19588
19589         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19590                 && test -z "${cf_tst_cflags}" \
19591                 && cf_fix_cppflags=no
19592         ;;
19593 esac
19594 done
19595
19596 if test -n "$cf_new_cflags" ; then
19597
19598         CFLAGS="$CFLAGS $cf_new_cflags"
19599 fi
19600
19601 if test -n "$cf_new_cppflags" ; then
19602
19603         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19604 fi
19605
19606 if test -n "$cf_new_extra_cppflags" ; then
19607
19608         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19609 fi
19610
19611 ### Define substitutions for header files to avoid name-pollution
19612
19613 if test "$cf_cv_have_tcgetattr" = yes ; then
19614         HAVE_TCGETATTR=1
19615 else
19616         HAVE_TCGETATTR=0
19617 fi
19618
19619 if test "$ac_cv_header_termio_h" = yes ; then
19620         HAVE_TERMIO_H=1
19621 else
19622         HAVE_TERMIO_H=0
19623 fi
19624
19625 if test "$ac_cv_header_termios_h" = yes ; then
19626         HAVE_TERMIOS_H=1
19627 else
19628         HAVE_TERMIOS_H=0
19629 fi
19630
19631 ################################################################################
19632 test "$use_database" = yes && \
19633 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19634
19635 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19636 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19637
19638 if test x"$enable_pc_files" = xyes ; then \
19639 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19640 MAKE_PC_FILES=
19641 else
19642 MAKE_PC_FILES="#"
19643 fi
19644
19645 # Extract the first word of "tic", so it can be a program name with args.
19646 set dummy tic; ac_word=$2
19647 echo "$as_me:19647: checking for $ac_word" >&5
19648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19649 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19650   echo $ECHO_N "(cached) $ECHO_C" >&6
19651 else
19652   case $TIC_PATH in
19653   [\\/]* | ?:[\\/]*)
19654   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19655   ;;
19656   *)
19657   ac_save_IFS=$IFS; IFS=$ac_path_separator
19658 ac_dummy="$PATH:/usr/local/ncurses/bin"
19659 for ac_dir in $ac_dummy; do
19660   IFS=$ac_save_IFS
19661   test -z "$ac_dir" && ac_dir=.
19662   if $as_executable_p "$ac_dir/$ac_word"; then
19663    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19664    echo "$as_me:19664: found $ac_dir/$ac_word" >&5
19665    break
19666 fi
19667 done
19668
19669   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19670   ;;
19671 esac
19672 fi
19673 TIC_PATH=$ac_cv_path_TIC_PATH
19674
19675 if test -n "$TIC_PATH"; then
19676   echo "$as_me:19676: result: $TIC_PATH" >&5
19677 echo "${ECHO_T}$TIC_PATH" >&6
19678 else
19679   echo "$as_me:19679: result: no" >&5
19680 echo "${ECHO_T}no" >&6
19681 fi
19682
19683 if test -n "$FALLBACK_LIST"
19684 then
19685         if test "$TIC_PATH" = unknown
19686         then
19687                 { echo "$as_me:19687: WARNING: no tic program found for fallbacks" >&5
19688 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19689         fi
19690 fi
19691
19692 if test "x$cf_with_tests" != xno ; then
19693         MAKE_TESTS=
19694 else
19695         MAKE_TESTS="#"
19696 fi
19697
19698 ADAHTML_DIR=../../doc/html/ada
19699
19700 SUB_SCRIPTS=
19701 case $cf_cv_system_name in #(vi
19702 *mingw32*) #(vi
19703         SUB_SCRIPTS="mk-dlls.sh"
19704         ;;
19705 esac
19706
19707 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"
19708 ac_config_commands="$ac_config_commands default"
19709 cat >confcache <<\_ACEOF
19710 # This file is a shell script that caches the results of configure
19711 # tests run on this system so they can be shared between configure
19712 # scripts and configure runs, see configure's option --config-cache.
19713 # It is not useful on other systems.  If it contains results you don't
19714 # want to keep, you may remove or edit it.
19715 #
19716 # config.status only pays attention to the cache file if you give it
19717 # the --recheck option to rerun configure.
19718 #
19719 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19720 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19721 # following values.
19722
19723 _ACEOF
19724
19725 # The following way of writing the cache mishandles newlines in values,
19726 # but we know of no workaround that is simple, portable, and efficient.
19727 # So, don't put newlines in cache variables' values.
19728 # Ultrix sh set writes to stderr and can't be redirected directly,
19729 # and sets the high bit in the cache file unless we assign to the vars.
19730 {
19731   (set) 2>&1 |
19732     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19733     *ac_space=\ *)
19734       # `set' does not quote correctly, so add quotes (double-quote
19735       # substitution turns \\\\ into \\, and sed turns \\ into \).
19736       sed -n \
19737         "s/'/'\\\\''/g;
19738           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19739       ;;
19740     *)
19741       # `set' quotes correctly as required by POSIX, so do not add quotes.
19742       sed -n \
19743         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19744       ;;
19745     esac;
19746 } |
19747   sed '
19748      t clear
19749      : clear
19750      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19751      t end
19752      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19753      : end' >>confcache
19754 if cmp -s $cache_file confcache; then :; else
19755   if test -w $cache_file; then
19756     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19757     cat confcache >$cache_file
19758   else
19759     echo "not updating unwritable cache $cache_file"
19760   fi
19761 fi
19762 rm -f confcache
19763
19764 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19765 # Let make expand exec_prefix.
19766 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19767
19768 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19769 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19770 # trailing colons and then remove the whole line if VPATH becomes empty
19771 # (actually we leave an empty line to preserve line numbers).
19772 if test "x$srcdir" = x.; then
19773   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19774 s/:*\$(srcdir):*/:/;
19775 s/:*\${srcdir}:*/:/;
19776 s/:*@srcdir@:*/:/;
19777 s/^\([^=]*=[    ]*\):*/\1/;
19778 s/:*$//;
19779 s/^[^=]*=[      ]*$//;
19780 }'
19781 fi
19782
19783 DEFS=-DHAVE_CONFIG_H
19784
19785 : ${CONFIG_STATUS=./config.status}
19786 ac_clean_files_save=$ac_clean_files
19787 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19788 { echo "$as_me:19788: creating $CONFIG_STATUS" >&5
19789 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19790 cat >$CONFIG_STATUS <<_ACEOF
19791 #! $SHELL
19792 # Generated automatically by configure.
19793 # Run this file to recreate the current configuration.
19794 # Compiler output produced by configure, useful for debugging
19795 # configure, is in config.log if it exists.
19796
19797 debug=false
19798 SHELL=\${CONFIG_SHELL-$SHELL}
19799 ac_cs_invocation="\$0 \$@"
19800
19801 _ACEOF
19802
19803 cat >>$CONFIG_STATUS <<\_ACEOF
19804 # Be Bourne compatible
19805 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19806   emulate sh
19807   NULLCMD=:
19808 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19809   set -o posix
19810 fi
19811
19812 # Name of the executable.
19813 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19814
19815 if expr a : '\(a\)' >/dev/null 2>&1; then
19816   as_expr=expr
19817 else
19818   as_expr=false
19819 fi
19820
19821 rm -f conf$$ conf$$.exe conf$$.file
19822 echo >conf$$.file
19823 if ln -s conf$$.file conf$$ 2>/dev/null; then
19824   # We could just check for DJGPP; but this test a) works b) is more generic
19825   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19826   if test -f conf$$.exe; then
19827     # Don't use ln at all; we don't have any links
19828     as_ln_s='cp -p'
19829   else
19830     as_ln_s='ln -s'
19831   fi
19832 elif ln conf$$.file conf$$ 2>/dev/null; then
19833   as_ln_s=ln
19834 else
19835   as_ln_s='cp -p'
19836 fi
19837 rm -f conf$$ conf$$.exe conf$$.file
19838
19839 as_executable_p="test -f"
19840
19841 # Support unset when possible.
19842 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19843   as_unset=unset
19844 else
19845   as_unset=false
19846 fi
19847
19848 # NLS nuisances.
19849 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19850 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19851 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19852 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19853 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19854 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19855 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19856 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19857
19858 # IFS
19859 # We need space, tab and new line, in precisely that order.
19860 as_nl='
19861 '
19862 IFS="   $as_nl"
19863
19864 # CDPATH.
19865 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19866
19867 exec 6>&1
19868
19869 _ACEOF
19870
19871 # Files that config.status was made for.
19872 if test -n "$ac_config_files"; then
19873   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19874 fi
19875
19876 if test -n "$ac_config_headers"; then
19877   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19878 fi
19879
19880 if test -n "$ac_config_links"; then
19881   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19882 fi
19883
19884 if test -n "$ac_config_commands"; then
19885   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19886 fi
19887
19888 cat >>$CONFIG_STATUS <<\EOF
19889
19890 ac_cs_usage="\
19891 \`$as_me' instantiates files from templates according to the
19892 current configuration.
19893
19894 Usage: $0 [OPTIONS] [FILE]...
19895
19896   -h, --help       print this help, then exit
19897   -V, --version    print version number, then exit
19898   -d, --debug      don't remove temporary files
19899       --recheck    update $as_me by reconfiguring in the same conditions
19900   --file=FILE[:TEMPLATE]
19901                    instantiate the configuration file FILE
19902   --header=FILE[:TEMPLATE]
19903                    instantiate the configuration header FILE
19904
19905 Configuration files:
19906 $config_files
19907
19908 Configuration headers:
19909 $config_headers
19910
19911 Configuration commands:
19912 $config_commands
19913
19914 Report bugs to <dickey@invisible-island.net>."
19915 EOF
19916
19917 cat >>$CONFIG_STATUS <<EOF
19918 ac_cs_version="\\
19919 config.status
19920 configured by $0, generated by GNU Autoconf 2.52.20101002,
19921   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19922
19923 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19924 Free Software Foundation, Inc.
19925 This config.status script is free software; the Free Software Foundation
19926 gives unlimited permission to copy, distribute and modify it."
19927 srcdir=$srcdir
19928 INSTALL="$INSTALL"
19929 EOF
19930
19931 cat >>$CONFIG_STATUS <<\EOF
19932 # If no file are specified by the user, then we need to provide default
19933 # value.  By we need to know if files were specified by the user.
19934 ac_need_defaults=:
19935 while test $# != 0
19936 do
19937   case $1 in
19938   --*=*)
19939     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19940     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19941     shift
19942     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19943     shift
19944     ;;
19945   -*);;
19946   *) # This is not an option, so the user has probably given explicit
19947      # arguments.
19948      ac_need_defaults=false;;
19949   esac
19950
19951   case $1 in
19952   # Handling of the options.
19953 EOF
19954 cat >>$CONFIG_STATUS <<EOF
19955   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19956     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19957     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19958 EOF
19959 cat >>$CONFIG_STATUS <<\EOF
19960   --version | --vers* | -V )
19961     echo "$ac_cs_version"; exit 0 ;;
19962   --he | --h)
19963     # Conflict between --help and --header
19964     { { echo "$as_me:19964: error: ambiguous option: $1
19965 Try \`$0 --help' for more information." >&5
19966 echo "$as_me: error: ambiguous option: $1
19967 Try \`$0 --help' for more information." >&2;}
19968    { (exit 1); exit 1; }; };;
19969   --help | --hel | -h )
19970     echo "$ac_cs_usage"; exit 0 ;;
19971   --debug | --d* | -d )
19972     debug=: ;;
19973   --file | --fil | --fi | --f )
19974     shift
19975     CONFIG_FILES="$CONFIG_FILES $1"
19976     ac_need_defaults=false;;
19977   --header | --heade | --head | --hea )
19978     shift
19979     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19980     ac_need_defaults=false;;
19981
19982   # This is an error.
19983   -*) { { echo "$as_me:19983: error: unrecognized option: $1
19984 Try \`$0 --help' for more information." >&5
19985 echo "$as_me: error: unrecognized option: $1
19986 Try \`$0 --help' for more information." >&2;}
19987    { (exit 1); exit 1; }; } ;;
19988
19989   *) ac_config_targets="$ac_config_targets $1" ;;
19990
19991   esac
19992   shift
19993 done
19994
19995 exec 5>>config.log
19996 cat >&5 << _ACEOF
19997
19998 ## ----------------------- ##
19999 ## Running config.status.  ##
20000 ## ----------------------- ##
20001
20002 This file was extended by $as_me 2.52.20101002, executed with
20003   CONFIG_FILES    = $CONFIG_FILES
20004   CONFIG_HEADERS  = $CONFIG_HEADERS
20005   CONFIG_LINKS    = $CONFIG_LINKS
20006   CONFIG_COMMANDS = $CONFIG_COMMANDS
20007   > $ac_cs_invocation
20008 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20009
20010 _ACEOF
20011 EOF
20012
20013 cat >>$CONFIG_STATUS <<EOF
20014 #
20015 # INIT-COMMANDS section.
20016 #
20017
20018 ### Special initialization commands, used to pass information from the
20019 ### configuration-run into config.status
20020
20021 AWK="$AWK"
20022 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20023 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20024 ECHO_LINK="$ECHO_LINK"
20025 LDCONFIG="$LDCONFIG"
20026 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20027 LIB_NAME="$LIB_NAME"
20028 LIB_SUBSETS="$LIB_SUBSETS"
20029 LIB_SUFFIX="$LIB_SUFFIX"
20030 LIB_TRACING="$LIB_TRACING"
20031 LN_S="$LN_S"
20032 MAKE_TERMINFO="$MAKE_TERMINFO"
20033 NCURSES_MAJOR="$NCURSES_MAJOR"
20034 NCURSES_MINOR="$NCURSES_MINOR"
20035 NCURSES_OSPEED="$NCURSES_OSPEED"
20036 NCURSES_PATCH="$NCURSES_PATCH"
20037 SRC_SUBDIRS="$SRC_SUBDIRS"
20038 TERMINFO="$TERMINFO"
20039 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20040 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20041 TICS_NAME="$TICS_NAME"
20042 TIC_PATH="$TIC_PATH"
20043 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20044 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20045 TINFO_NAME="$TINFO_NAME"
20046 TINFO_SUFFIX="$TINFO_SUFFIX"
20047 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20048 WITH_CURSES_H="$with_curses_h"
20049 WITH_ECHO="$with_echo"
20050 WITH_OVERWRITE="$with_overwrite"
20051 cf_LIST_MODELS="$cf_list_models"
20052 cf_cv_abi_version="$cf_cv_abi_version"
20053 cf_cv_do_relink="$cf_cv_do_relink"
20054 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20055 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20056 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20057 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20058 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20059 cf_cv_rel_version="$cf_cv_rel_version"
20060 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20061 cf_cv_shared_soname='$cf_cv_shared_soname'
20062 cf_cv_shlib_version="$cf_cv_shlib_version"
20063 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20064 cf_cv_system_name="$cf_cv_system_name"
20065 cf_with_ada="$cf_with_ada"
20066 cf_with_cxx_binding="$cf_with_cxx_binding"
20067 cf_with_manpages="$cf_with_manpages"
20068 cf_with_tests="$cf_with_tests"
20069 host="$host"
20070 target="$target"
20071
20072 EOF
20073
20074 cat >>$CONFIG_STATUS <<\EOF
20075 for ac_config_target in $ac_config_targets
20076 do
20077   case "$ac_config_target" in
20078   # Handling of arguments.
20079   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20080   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20081   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20082   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20083   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20084   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20085   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20086   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20087   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20088   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20089   *) { { echo "$as_me:20089: error: invalid argument: $ac_config_target" >&5
20090 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20091    { (exit 1); exit 1; }; };;
20092   esac
20093 done
20094
20095 # If the user did not use the arguments to specify the items to instantiate,
20096 # then the envvar interface is used.  Set only those that are not.
20097 # We use the long form for the default assignment because of an extremely
20098 # bizarre bug on SunOS 4.1.3.
20099 if $ac_need_defaults; then
20100   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20101   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20102   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20103 fi
20104
20105 # Create a temporary directory, and hook for its removal unless debugging.
20106 $debug ||
20107 {
20108   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20109   trap '{ (exit 1); exit 1; }' 1 2 13 15
20110 }
20111
20112 # Create a (secure) tmp directory for tmp files.
20113 : ${TMPDIR=/tmp}
20114 {
20115   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20116   test -n "$tmp" && test -d "$tmp"
20117 }  ||
20118 {
20119   tmp=$TMPDIR/cs$$-$RANDOM
20120   (umask 077 && mkdir $tmp)
20121 } ||
20122 {
20123    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20124    { (exit 1); exit 1; }
20125 }
20126
20127 EOF
20128
20129 cat >>$CONFIG_STATUS <<EOF
20130
20131 #
20132 # CONFIG_FILES section.
20133 #
20134
20135 # No need to generate the scripts if there are no CONFIG_FILES.
20136 # This happens for instance when ./config.status config.h
20137 if test -n "\$CONFIG_FILES"; then
20138   # Protect against being on the right side of a sed subst in config.status.
20139   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20140    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20141 s,@SHELL@,$SHELL,;t t
20142 s,@exec_prefix@,$exec_prefix,;t t
20143 s,@prefix@,$prefix,;t t
20144 s,@program_transform_name@,$program_transform_name,;t t
20145 s,@bindir@,$bindir,;t t
20146 s,@sbindir@,$sbindir,;t t
20147 s,@libexecdir@,$libexecdir,;t t
20148 s,@datadir@,$datadir,;t t
20149 s,@sysconfdir@,$sysconfdir,;t t
20150 s,@sharedstatedir@,$sharedstatedir,;t t
20151 s,@localstatedir@,$localstatedir,;t t
20152 s,@libdir@,$libdir,;t t
20153 s,@includedir@,$includedir,;t t
20154 s,@oldincludedir@,$oldincludedir,;t t
20155 s,@infodir@,$infodir,;t t
20156 s,@mandir@,$mandir,;t t
20157 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20158 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20159 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20160 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20161 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20162 s,@build_alias@,$build_alias,;t t
20163 s,@host_alias@,$host_alias,;t t
20164 s,@target_alias@,$target_alias,;t t
20165 s,@ECHO_C@,$ECHO_C,;t t
20166 s,@ECHO_N@,$ECHO_N,;t t
20167 s,@ECHO_T@,$ECHO_T,;t t
20168 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20169 s,@DEFS@,$DEFS,;t t
20170 s,@LIBS@,$LIBS,;t t
20171 s,@top_builddir@,$top_builddir,;t t
20172 s,@EGREP@,$EGREP,;t t
20173 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20174 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20175 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20176 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20177 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20178 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20179 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20180 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20181 s,@build@,$build,;t t
20182 s,@build_cpu@,$build_cpu,;t t
20183 s,@build_vendor@,$build_vendor,;t t
20184 s,@build_os@,$build_os,;t t
20185 s,@host@,$host,;t t
20186 s,@host_cpu@,$host_cpu,;t t
20187 s,@host_vendor@,$host_vendor,;t t
20188 s,@host_os@,$host_os,;t t
20189 s,@target@,$target,;t t
20190 s,@target_cpu@,$target_cpu,;t t
20191 s,@target_vendor@,$target_vendor,;t t
20192 s,@target_os@,$target_os,;t t
20193 s,@CC@,$CC,;t t
20194 s,@CFLAGS@,$CFLAGS,;t t
20195 s,@LDFLAGS@,$LDFLAGS,;t t
20196 s,@CPPFLAGS@,$CPPFLAGS,;t t
20197 s,@ac_ct_CC@,$ac_ct_CC,;t t
20198 s,@EXEEXT@,$EXEEXT,;t t
20199 s,@OBJEXT@,$OBJEXT,;t t
20200 s,@CPP@,$CPP,;t t
20201 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20202 s,@PROG_EXT@,$PROG_EXT,;t t
20203 s,@LDCONFIG@,$LDCONFIG,;t t
20204 s,@CXX@,$CXX,;t t
20205 s,@CXXFLAGS@,$CXXFLAGS,;t t
20206 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20207 s,@AWK@,$AWK,;t t
20208 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20209 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20210 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20211 s,@LINT@,$LINT,;t t
20212 s,@LINT_OPTS@,$LINT_OPTS,;t t
20213 s,@LN_S@,$LN_S,;t t
20214 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20215 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20216 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20217 s,@SET_MAKE@,$SET_MAKE,;t t
20218 s,@CTAGS@,$CTAGS,;t t
20219 s,@ETAGS@,$ETAGS,;t t
20220 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20221 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20222 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20223 s,@RANLIB@,$RANLIB,;t t
20224 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20225 s,@LD@,$LD,;t t
20226 s,@ac_ct_LD@,$ac_ct_LD,;t t
20227 s,@AR@,$AR,;t t
20228 s,@ac_ct_AR@,$ac_ct_AR,;t t
20229 s,@ARFLAGS@,$ARFLAGS,;t t
20230 s,@DESTDIR@,$DESTDIR,;t t
20231 s,@BUILD_CC@,$BUILD_CC,;t t
20232 s,@BUILD_CPP@,$BUILD_CPP,;t t
20233 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20234 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20235 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20236 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20237 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20238 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20239 s,@cf_list_models@,$cf_list_models,;t t
20240 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20241 s,@LIBTOOL@,$LIBTOOL,;t t
20242 s,@LT_UNDEF@,$LT_UNDEF,;t t
20243 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20244 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20245 s,@LIB_CREATE@,$LIB_CREATE,;t t
20246 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20247 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20248 s,@LIB_PREP@,$LIB_PREP,;t t
20249 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20250 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20251 s,@LIB_LINK@,$LIB_LINK,;t t
20252 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20253 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20254 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20255 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20256 s,@TICS_NAME@,$TICS_NAME,;t t
20257 s,@TINFO_NAME@,$TINFO_NAME,;t t
20258 s,@LIB_NAME@,$LIB_NAME,;t t
20259 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20260 s,@CC_G_OPT@,$CC_G_OPT,;t t
20261 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20262 s,@LD_MODEL@,$LD_MODEL,;t t
20263 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20264 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20265 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20266 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20267 s,@LINK_PROGS@,$LINK_PROGS,;t t
20268 s,@LINK_TESTS@,$LINK_TESTS,;t t
20269 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20270 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20271 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20272 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20273 s,@RPATH_LIST@,$RPATH_LIST,;t t
20274 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20275 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20276 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20277 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20278 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20279 s,@TERMINFO@,$TERMINFO,;t t
20280 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20281 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20282 s,@TERMPATH@,$TERMPATH,;t t
20283 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20284 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20285 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20286 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20287 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20288 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20289 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20290 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20291 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20292 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20293 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20294 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20295 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20296 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20297 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20298 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20299 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20300 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20301 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20302 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20303 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20304 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20305 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20306 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20307 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20308 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20309 s,@PTHREAD@,$PTHREAD,;t t
20310 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20311 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20312 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20313 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20314 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20315 s,@ECHO_LINK@,$ECHO_LINK,;t t
20316 s,@ADAFLAGS@,$ADAFLAGS,;t t
20317 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20318 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20319 s,@ADA_TRACE@,$ADA_TRACE,;t t
20320 s,@MATH_LIB@,$MATH_LIB,;t t
20321 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20322 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20323 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20324 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20325 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20326 s,@TEST_LIBS@,$TEST_LIBS,;t t
20327 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20328 s,@CXXCPP@,$CXXCPP,;t t
20329 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20330 s,@CXX_AR@,$CXX_AR,;t t
20331 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20332 s,@CXXLIBS@,$CXXLIBS,;t t
20333 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20334 s,@gnat_exists@,$gnat_exists,;t t
20335 s,@M4_exists@,$M4_exists,;t t
20336 s,@cf_ada_make@,$cf_ada_make,;t t
20337 s,@cf_compile_generics@,$cf_compile_generics,;t t
20338 s,@cf_generic_objects@,$cf_generic_objects,;t t
20339 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20340 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20341 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20342 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20343 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20344 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20345 s,@cf_ada_package@,$cf_ada_package,;t t
20346 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20347 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20348 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20349 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20350 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20351 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20352 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20353 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20354 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20355 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20356 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20357 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20358 s,@TICS_ARGS@,$TICS_ARGS,;t t
20359 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20360 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20361 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20362 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20363 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20364 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20365 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20366 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20367 s,@TICS_LIST@,$TICS_LIST,;t t
20368 s,@TINFO_LIST@,$TINFO_LIST,;t t
20369 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20370 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20371 s,@TEST_ARGS@,$TEST_ARGS,;t t
20372 s,@TEST_DEPS@,$TEST_DEPS,;t t
20373 s,@TEST_ARG2@,$TEST_ARG2,;t t
20374 s,@TEST_DEP2@,$TEST_DEP2,;t t
20375 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20376 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20377 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20378 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20379 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20380 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20381 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20382 s,@cross_compiling@,$cross_compiling,;t t
20383 s,@TIC_PATH@,$TIC_PATH,;t t
20384 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20385 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20386 CEOF
20387
20388 EOF
20389
20390   cat >>$CONFIG_STATUS <<\EOF
20391   # Split the substitutions into bite-sized pieces for seds with
20392   # small command number limits, like on Digital OSF/1 and HP-UX.
20393   ac_max_sed_lines=48
20394   ac_sed_frag=1 # Number of current file.
20395   ac_beg=1 # First line for current file.
20396   ac_end=$ac_max_sed_lines # Line after last line for current file.
20397   ac_more_lines=:
20398   ac_sed_cmds=
20399   while $ac_more_lines; do
20400     if test $ac_beg -gt 1; then
20401       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20402     else
20403       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20404     fi
20405     if test ! -s $tmp/subs.frag; then
20406       ac_more_lines=false
20407     else
20408       # The purpose of the label and of the branching condition is to
20409       # speed up the sed processing (if there are no `@' at all, there
20410       # is no need to browse any of the substitutions).
20411       # These are the two extra sed commands mentioned above.
20412       (echo ':t
20413   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20414       if test -z "$ac_sed_cmds"; then
20415         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20416       else
20417         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20418       fi
20419       ac_sed_frag=`expr $ac_sed_frag + 1`
20420       ac_beg=$ac_end
20421       ac_end=`expr $ac_end + $ac_max_sed_lines`
20422     fi
20423   done
20424   if test -z "$ac_sed_cmds"; then
20425     ac_sed_cmds=cat
20426   fi
20427 fi # test -n "$CONFIG_FILES"
20428
20429 EOF
20430 cat >>$CONFIG_STATUS <<\EOF
20431 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20432   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20433   case $ac_file in
20434   - | *:- | *:-:* ) # input from stdin
20435         cat >$tmp/stdin
20436         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20437         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20438   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20439         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20440   * )   ac_file_in=$ac_file.in ;;
20441   esac
20442
20443   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20444   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20445          X"$ac_file" : 'X\(//\)[^/]' \| \
20446          X"$ac_file" : 'X\(//\)$' \| \
20447          X"$ac_file" : 'X\(/\)' \| \
20448          .     : '\(.\)' 2>/dev/null ||
20449 echo X"$ac_file" |
20450     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20451           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20452           /^X\(\/\/\)$/{ s//\1/; q; }
20453           /^X\(\/\).*/{ s//\1/; q; }
20454           s/.*/./; q'`
20455   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20456     { case "$ac_dir" in
20457   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20458   *)                      as_incr_dir=.;;
20459 esac
20460 as_dummy="$ac_dir"
20461 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20462   case $as_mkdir_dir in
20463     # Skip DOS drivespec
20464     ?:) as_incr_dir=$as_mkdir_dir ;;
20465     *)
20466       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20467       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20468     ;;
20469   esac
20470 done; }
20471
20472     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20473     # A "../" for each directory in $ac_dir_suffix.
20474     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20475   else
20476     ac_dir_suffix= ac_dots=
20477   fi
20478
20479   case $srcdir in
20480   .)  ac_srcdir=.
20481       if test -z "$ac_dots"; then
20482          ac_top_srcdir=.
20483       else
20484          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20485       fi ;;
20486   [\\/]* | ?:[\\/]* )
20487       ac_srcdir=$srcdir$ac_dir_suffix;
20488       ac_top_srcdir=$srcdir ;;
20489   *) # Relative path.
20490     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20491     ac_top_srcdir=$ac_dots$srcdir ;;
20492   esac
20493
20494   case $INSTALL in
20495   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20496   *) ac_INSTALL=$ac_dots$INSTALL ;;
20497   esac
20498
20499   if test x"$ac_file" != x-; then
20500     { echo "$as_me:20500: creating $ac_file" >&5
20501 echo "$as_me: creating $ac_file" >&6;}
20502     rm -f "$ac_file"
20503   fi
20504   # Let's still pretend it is `configure' which instantiates (i.e., don't
20505   # use $as_me), people would be surprised to read:
20506   #    /* config.h.  Generated automatically by config.status.  */
20507   configure_input="Generated automatically from `echo $ac_file_in |
20508                                                  sed 's,.*/,,'` by configure."
20509
20510   # First look for the input files in the build tree, otherwise in the
20511   # src tree.
20512   ac_file_inputs=`IFS=:
20513     for f in $ac_file_in; do
20514       case $f in
20515       -) echo $tmp/stdin ;;
20516       [\\/$]*)
20517          # Absolute (can't be DOS-style, as IFS=:)
20518          test -f "$f" || { { echo "$as_me:20518: error: cannot find input file: $f" >&5
20519 echo "$as_me: error: cannot find input file: $f" >&2;}
20520    { (exit 1); exit 1; }; }
20521          echo $f;;
20522       *) # Relative
20523          if test -f "$f"; then
20524            # Build tree
20525            echo $f
20526          elif test -f "$srcdir/$f"; then
20527            # Source tree
20528            echo $srcdir/$f
20529          else
20530            # /dev/null tree
20531            { { echo "$as_me:20531: error: cannot find input file: $f" >&5
20532 echo "$as_me: error: cannot find input file: $f" >&2;}
20533    { (exit 1); exit 1; }; }
20534          fi;;
20535       esac
20536     done` || { (exit 1); exit 1; }
20537 EOF
20538 cat >>$CONFIG_STATUS <<EOF
20539   sed "$ac_vpsub
20540 $extrasub
20541 EOF
20542 cat >>$CONFIG_STATUS <<\EOF
20543 :t
20544 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20545 s,@configure_input@,$configure_input,;t t
20546 s,@srcdir@,$ac_srcdir,;t t
20547 s,@top_srcdir@,$ac_top_srcdir,;t t
20548 s,@INSTALL@,$ac_INSTALL,;t t
20549 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20550   rm -f $tmp/stdin
20551   if test x"$ac_file" != x-; then
20552     mv $tmp/out $ac_file
20553   else
20554     cat $tmp/out
20555     rm -f $tmp/out
20556   fi
20557
20558 done
20559 EOF
20560 cat >>$CONFIG_STATUS <<\EOF
20561
20562 #
20563 # CONFIG_HEADER section.
20564 #
20565
20566 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20567 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20568 #
20569 # ac_d sets the value in "#define NAME VALUE" lines.
20570 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20571 ac_dB='[        ].*$,\1#\2'
20572 ac_dC=' '
20573 ac_dD=',;t'
20574 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20575 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20576 ac_iB='\([      ]\),\1#\2define\3'
20577 ac_iC=' '
20578 ac_iD='\4,;t'
20579 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20580 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20581 ac_uB='$,\1#\2define\3'
20582 ac_uC=' '
20583 ac_uD=',;t'
20584
20585 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20586   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20587   case $ac_file in
20588   - | *:- | *:-:* ) # input from stdin
20589         cat >$tmp/stdin
20590         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20591         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20592   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20593         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20594   * )   ac_file_in=$ac_file.in ;;
20595   esac
20596
20597   test x"$ac_file" != x- && { echo "$as_me:20597: creating $ac_file" >&5
20598 echo "$as_me: creating $ac_file" >&6;}
20599
20600   # First look for the input files in the build tree, otherwise in the
20601   # src tree.
20602   ac_file_inputs=`IFS=:
20603     for f in $ac_file_in; do
20604       case $f in
20605       -) echo $tmp/stdin ;;
20606       [\\/$]*)
20607          # Absolute (can't be DOS-style, as IFS=:)
20608          test -f "$f" || { { echo "$as_me:20608: error: cannot find input file: $f" >&5
20609 echo "$as_me: error: cannot find input file: $f" >&2;}
20610    { (exit 1); exit 1; }; }
20611          echo $f;;
20612       *) # Relative
20613          if test -f "$f"; then
20614            # Build tree
20615            echo $f
20616          elif test -f "$srcdir/$f"; then
20617            # Source tree
20618            echo $srcdir/$f
20619          else
20620            # /dev/null tree
20621            { { echo "$as_me:20621: error: cannot find input file: $f" >&5
20622 echo "$as_me: error: cannot find input file: $f" >&2;}
20623    { (exit 1); exit 1; }; }
20624          fi;;
20625       esac
20626     done` || { (exit 1); exit 1; }
20627   # Remove the trailing spaces.
20628   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20629
20630 EOF
20631
20632 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20633 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20634 # be either 'cat' or 'sort'.
20635 cat confdefs.h | uniq >conftest.vals
20636
20637 # Break up conftest.vals because some shells have a limit on
20638 # the size of here documents, and old seds have small limits too.
20639
20640 rm -f conftest.tail
20641 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20642 while grep . conftest.vals >/dev/null
20643 do
20644   # Write chunks of a limited-size here document to conftest.frag.
20645   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20646   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20647   echo 'CEOF' >> $CONFIG_STATUS
20648   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20649   rm -f conftest.vals
20650   mv conftest.tail conftest.vals
20651 done
20652 rm -f conftest.vals
20653
20654 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20655 # marker @DEFS@.
20656 echo '  cat >> conftest.edit <<CEOF
20657 /@DEFS@/r conftest.frag
20658 /@DEFS@/d
20659 CEOF
20660 sed -f conftest.edit $tmp/in > $tmp/out
20661 rm -f $tmp/in
20662 mv $tmp/out $tmp/in
20663 rm -f conftest.edit conftest.frag
20664 ' >> $CONFIG_STATUS
20665
20666 cat >>$CONFIG_STATUS <<\EOF
20667   # Let's still pretend it is `configure' which instantiates (i.e., don't
20668   # use $as_me), people would be surprised to read:
20669   #    /* config.h.  Generated automatically by config.status.  */
20670   if test x"$ac_file" = x-; then
20671     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20672   else
20673     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20674   fi
20675   cat $tmp/in >>$tmp/config.h
20676   rm -f $tmp/in
20677   if test x"$ac_file" != x-; then
20678     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20679       { echo "$as_me:20679: $ac_file is unchanged" >&5
20680 echo "$as_me: $ac_file is unchanged" >&6;}
20681     else
20682       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20683          X"$ac_file" : 'X\(//\)[^/]' \| \
20684          X"$ac_file" : 'X\(//\)$' \| \
20685          X"$ac_file" : 'X\(/\)' \| \
20686          .     : '\(.\)' 2>/dev/null ||
20687 echo X"$ac_file" |
20688     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20689           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20690           /^X\(\/\/\)$/{ s//\1/; q; }
20691           /^X\(\/\).*/{ s//\1/; q; }
20692           s/.*/./; q'`
20693       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20694         { case "$ac_dir" in
20695   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20696   *)                      as_incr_dir=.;;
20697 esac
20698 as_dummy="$ac_dir"
20699 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20700   case $as_mkdir_dir in
20701     # Skip DOS drivespec
20702     ?:) as_incr_dir=$as_mkdir_dir ;;
20703     *)
20704       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20705       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20706     ;;
20707   esac
20708 done; }
20709
20710       fi
20711       rm -f $ac_file
20712       mv $tmp/config.h $ac_file
20713     fi
20714   else
20715     cat $tmp/config.h
20716     rm -f $tmp/config.h
20717   fi
20718 done
20719 EOF
20720 cat >>$CONFIG_STATUS <<\EOF
20721 #
20722 # CONFIG_COMMANDS section.
20723 #
20724 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20725   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20726   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20727
20728   case $ac_dest in
20729     default )
20730 if test "x$cf_with_tests" != xno ; then
20731
20732 for cf_dir in test
20733 do
20734         if test ! -d $srcdir/$cf_dir; then
20735                 continue
20736         elif test -f $srcdir/$cf_dir/programs; then
20737                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20738         fi
20739 done
20740
20741 fi
20742
20743         case $cf_cv_system_name in #(vi
20744         OS/2*|os2*) #(vi
20745         LIB_PREFIX=''
20746         ;;
20747         *)      LIB_PREFIX='lib'
20748         ;;
20749         esac
20750 cf_prefix=$LIB_PREFIX
20751
20752 if test $cf_cv_shlib_version = cygdll ; then
20753         TINFO_NAME=$TINFO_ARG_SUFFIX
20754         TINFO_SUFFIX=.dll
20755 fi
20756
20757 if test -n "$TINFO_SUFFIX" ; then
20758         case $TINFO_SUFFIX in
20759         tw*)
20760                 TINFO_NAME="${TINFO_NAME}tw"
20761                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20762                 ;;
20763         t*)
20764                 TINFO_NAME="${TINFO_NAME}t"
20765                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20766                 ;;
20767         w*)
20768                 TINFO_NAME="${TINFO_NAME}w"
20769                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20770                 ;;
20771         esac
20772 fi
20773
20774 for cf_dir in $SRC_SUBDIRS
20775 do
20776         if test ! -d $srcdir/$cf_dir ; then
20777                 continue
20778         elif test -f $srcdir/$cf_dir/modules; then
20779
20780                 SHARED_LIB=
20781                 LIBS_TO_MAKE=
20782                 for cf_item in $cf_LIST_MODELS
20783                 do
20784
20785         case $cf_item in #(vi
20786         libtool) #(vi
20787                 cf_suffix='.la'
20788                 cf_depsuf=$cf_suffix
20789                 ;;
20790         normal) #(vi
20791                 cf_suffix='.a'
20792                 cf_depsuf=$cf_suffix
20793                 ;;
20794         debug) #(vi
20795                 cf_suffix='_g.a'
20796                 cf_depsuf=$cf_suffix
20797                 ;;
20798         profile) #(vi
20799                 cf_suffix='_p.a'
20800                 cf_depsuf=$cf_suffix
20801                 ;;
20802         shared) #(vi
20803                 case $cf_cv_system_name in
20804                 aix[5-7]*) #(vi
20805                         cf_suffix='.a'
20806                         cf_depsuf=$cf_suffix
20807                         ;;
20808                 cygwin*) #(vi
20809                         cf_suffix='.dll'
20810                         cf_depsuf='.dll.a'
20811                         ;;
20812                 darwin*) #(vi
20813                         cf_suffix='.dylib'
20814                         cf_depsuf=$cf_suffix
20815                         ;;
20816                 hpux*) #(vi
20817                         case $target in
20818                         ia64*) #(vi
20819                                 cf_suffix='.so'
20820                                 cf_depsuf=$cf_suffix
20821                                 ;;
20822                         *) #(vi
20823                                 cf_suffix='.sl'
20824                                 cf_depsuf=$cf_suffix
20825                                 ;;
20826                         esac
20827                         ;;
20828                 *)      cf_suffix='.so'
20829                         cf_depsuf=$cf_suffix
20830                         ;;
20831                 esac
20832         esac
20833         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20834         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20835
20836                         if test $cf_item = shared ; then
20837                         if test "$cf_cv_do_symlinks" = yes ; then
20838                                 case "$cf_cv_shlib_version" in #(vi
20839                                 rel) #(vi
20840                                         case "$cf_cv_system_name" in #(vi
20841                                         darwin*)
20842                                         case .${LIB_SUFFIX} in
20843                                         .tw*)
20844                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20845                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20846                                                 ;;
20847                                         .t*)
20848                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20849                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20850                                                 ;;
20851                                         .w*)
20852                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20853                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20854                                                 ;;
20855                                         *)
20856                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20857                                                 ;;
20858                                         esac
20859                                         ;; #(vi
20860                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20861                                         esac
20862                                         ;;
20863                                 abi)
20864                                         case "$cf_cv_system_name" in #(vi
20865                                         darwin*)
20866                                         case .${LIB_SUFFIX} in
20867                                         .tw*)
20868                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20869                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20870                                                 ;;
20871                                         .t*)
20872                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20873                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20874                                                 ;;
20875                                         .w*)
20876                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20877                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20878                                                 ;;
20879                                         *)
20880                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20881                                                 ;;
20882                                         esac
20883                                         ;; #(vi
20884                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20885                                         esac
20886                                         ;;
20887                                 esac
20888                         fi
20889                         # cygwin needs import library, and has unique naming convention
20890                         # use autodetected ${cf_prefix} for import lib and static lib, but
20891                         # use 'cyg' prefix for shared lib.
20892                         if test $cf_cv_shlib_version = cygdll ; then
20893                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20894                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20895                                 continue
20896                         fi
20897                         fi
20898                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20899                 done
20900
20901                 if test $cf_dir = ncurses ; then
20902                         cf_subsets="$LIB_SUBSETS"
20903                         cf_r_parts="$cf_subsets"
20904                         cf_liblist="$LIBS_TO_MAKE"
20905
20906                         while test -n "$cf_r_parts"
20907                         do
20908                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20909                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20910                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20911                                         cf_item=
20912                                         case $cf_l_parts in #(vi
20913                                         *termlib*) #(vi
20914                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20915                                                 ;;
20916                                         *ticlib*)
20917                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20918                                                 ;;
20919                                         *)
20920                                                 break
20921                                                 ;;
20922                                         esac
20923                                         if test -n "$cf_item"; then
20924                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20925                                         fi
20926                                 else
20927                                         break
20928                                 fi
20929                         done
20930                 else
20931                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20932                 fi
20933
20934                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20935                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20936                         $cf_dir/Makefile >$cf_dir/Makefile.out
20937                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20938
20939                 $AWK -f $srcdir/mk-0th.awk \
20940                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20941                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20942
20943                 for cf_subset in $cf_subsets
20944                 do
20945                         cf_subdirs=
20946                         for cf_item in $cf_LIST_MODELS
20947                         do
20948                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20949
20950 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20951
20952         case $cf_item in #(vi
20953         libtool) #(vi
20954                 cf_suffix='.la'
20955                 cf_depsuf=$cf_suffix
20956                 ;;
20957         normal) #(vi
20958                 cf_suffix='.a'
20959                 cf_depsuf=$cf_suffix
20960                 ;;
20961         debug) #(vi
20962                 cf_suffix='_g.a'
20963                 cf_depsuf=$cf_suffix
20964                 ;;
20965         profile) #(vi
20966                 cf_suffix='_p.a'
20967                 cf_depsuf=$cf_suffix
20968                 ;;
20969         shared) #(vi
20970                 case $cf_cv_system_name in
20971                 aix[5-7]*) #(vi
20972                         cf_suffix='.a'
20973                         cf_depsuf=$cf_suffix
20974                         ;;
20975                 cygwin*) #(vi
20976                         cf_suffix='.dll'
20977                         cf_depsuf='.dll.a'
20978                         ;;
20979                 darwin*) #(vi
20980                         cf_suffix='.dylib'
20981                         cf_depsuf=$cf_suffix
20982                         ;;
20983                 hpux*) #(vi
20984                         case $target in
20985                         ia64*) #(vi
20986                                 cf_suffix='.so'
20987                                 cf_depsuf=$cf_suffix
20988                                 ;;
20989                         *) #(vi
20990                                 cf_suffix='.sl'
20991                                 cf_depsuf=$cf_suffix
20992                                 ;;
20993                         esac
20994                         ;;
20995                 *)      cf_suffix='.so'
20996                         cf_depsuf=$cf_suffix
20997                         ;;
20998                 esac
20999         esac
21000         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21001         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21002
21003         case $cf_item in
21004         libtool) cf_subdir='obj_lo'  ;;
21005         normal)  cf_subdir='objects' ;;
21006         debug)   cf_subdir='obj_g' ;;
21007         profile) cf_subdir='obj_p' ;;
21008         shared)
21009                 case $cf_cv_system_name in #(vi
21010                 cygwin) #(vi
21011                         cf_subdir='objects' ;;
21012                 *)
21013                         cf_subdir='obj_s' ;;
21014                 esac
21015         esac
21016
21017                         # Test for case where we build libtinfo with a different name.
21018                         cf_libname=$cf_dir
21019                         if test $cf_dir = ncurses ; then
21020                                 case $cf_subset in
21021                                 *base*)
21022                                         cf_libname=${cf_libname}$LIB_SUFFIX
21023                                         ;;
21024                                 *termlib*)
21025                                         cf_libname=$TINFO_LIB_SUFFIX
21026                                         ;;
21027                                 ticlib*)
21028                                         cf_libname=$TICS_LIB_SUFFIX
21029                                         ;;
21030                                 esac
21031                         else
21032                                 cf_libname=${cf_libname}$LIB_SUFFIX
21033                         fi
21034                         if test -n "${DFT_ARG_SUFFIX}" ; then
21035                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21036                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21037                         fi
21038
21039                         # These dependencies really are for development, not
21040                         # builds, but they are useful in porting, too.
21041                         cf_depend="../include/ncurses_cfg.h"
21042                         if test "$srcdir" = "."; then
21043                                 cf_reldir="."
21044                         else
21045                                 cf_reldir="\${srcdir}"
21046                         fi
21047
21048                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21049                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21050                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21051                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21052                         fi
21053
21054                         cf_dir_suffix=
21055                         old_cf_suffix="$cf_suffix"
21056                         if test "$cf_cv_shlib_version_infix" = yes ; then
21057                         if test -n "$LIB_SUFFIX" ; then
21058                                 case $LIB_SUFFIX in
21059                                 tw*)
21060                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21061                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21062                                         cf_dir_suffix=tw
21063                                         ;;
21064                                 t*)
21065                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21066                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21067                                         cf_dir_suffix=t
21068                                         ;;
21069                                 w*)
21070                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21071                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21072                                         cf_dir_suffix=w
21073                                         ;;
21074                                 esac
21075                         fi
21076                         fi
21077
21078                         $AWK -f $srcdir/mk-1st.awk \
21079                                 name=${cf_libname}${cf_dir_suffix} \
21080                                 traces=$LIB_TRACING \
21081                                 MODEL=$cf_ITEM \
21082                                 model=$cf_subdir \
21083                                 prefix=$cf_prefix \
21084                                 suffix=$cf_suffix \
21085                                 subset=$cf_subset \
21086                                 SymLink="$LN_S" \
21087                                 TermlibRoot=$TINFO_NAME \
21088                                 TermlibSuffix=$TINFO_SUFFIX \
21089                                 ShlibVer=$cf_cv_shlib_version \
21090                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21091                                 ReLink=${cf_cv_do_relink:-no} \
21092                                 DoLinks=$cf_cv_do_symlinks \
21093                                 rmSoLocs=$cf_cv_rm_so_locs \
21094                                 ldconfig="$LDCONFIG" \
21095                                 overwrite=$WITH_OVERWRITE \
21096                                 depend="$cf_depend" \
21097                                 host="$host" \
21098                                 libtool_version="$LIBTOOL_VERSION" \
21099                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21100
21101                         cf_suffix="$old_cf_suffix"
21102
21103                         for cf_subdir2 in $cf_subdirs lib
21104                         do
21105                                 test $cf_subdir = $cf_subdir2 && break
21106                         done
21107                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21108                         $AWK -f $srcdir/mk-2nd.awk \
21109                                 name=$cf_dir \
21110                                 traces=$LIB_TRACING \
21111                                 MODEL=$cf_ITEM \
21112                                 model=$cf_subdir \
21113                                 subset=$cf_subset \
21114                                 srcdir=$srcdir \
21115                                 echo=$WITH_ECHO \
21116                                 crenames=$cf_cv_prog_CC_c_o \
21117                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21118                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21119                         cf_subdirs="$cf_subdirs $cf_subdir"
21120                         done
21121                 done
21122         fi
21123
21124         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21125 done
21126
21127 for cf_dir in $SRC_SUBDIRS
21128 do
21129         if test ! -d $srcdir/$cf_dir ; then
21130                 continue
21131         fi
21132
21133         if test -f $cf_dir/Makefile ; then
21134                 case "$cf_dir" in
21135                 Ada95) #(vi
21136                         echo 'libs \' >> Makefile
21137                         echo 'install.libs \' >> Makefile
21138                         echo 'uninstall.libs ::' >> Makefile
21139                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21140                         ;;
21141                 esac
21142         fi
21143
21144         if test -f $srcdir/$cf_dir/modules; then
21145                 echo >> Makefile
21146                 if test -f $srcdir/$cf_dir/headers; then
21147 cat >> Makefile <<CF_EOF
21148 install.includes \\
21149 uninstall.includes \\
21150 CF_EOF
21151                 fi
21152 if test "$cf_dir" != "c++" ; then
21153 echo 'lint \' >> Makefile
21154 fi
21155 cat >> Makefile <<CF_EOF
21156 libs \\
21157 lintlib \\
21158 install.libs \\
21159 uninstall.libs \\
21160 install.$cf_dir \\
21161 uninstall.$cf_dir ::
21162         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21163 CF_EOF
21164         elif test -f $srcdir/$cf_dir/headers; then
21165 cat >> Makefile <<CF_EOF
21166
21167 libs \\
21168 install.libs \\
21169 uninstall.libs \\
21170 install.includes \\
21171 uninstall.includes ::
21172         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21173 CF_EOF
21174 fi
21175 done
21176
21177 cat >> Makefile <<CF_EOF
21178
21179 install.libs uninstall.libs \\
21180 install.data uninstall.data ::
21181 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21182 CF_EOF
21183
21184 if test "x$cf_with_manpages" = xyes; then
21185 cat >> Makefile <<CF_EOF
21186
21187 install.man \\
21188 uninstall.man ::
21189         cd man && \${MAKE} \${CF_MFLAGS} \$@
21190 CF_EOF
21191 fi
21192
21193 cat >> Makefile <<CF_EOF
21194
21195 distclean ::
21196         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21197         rm -f headers.sh headers.sed mk_shared_lib.sh
21198         rm -f edit_man.* man_alias.*
21199         rm -rf \${DIRS_TO_MAKE}
21200 CF_EOF
21201
21202 # Special case: tack's manpage lives in its own directory.
21203 if test "x$cf_with_manpages" = xyes; then
21204 if test -d tack ; then
21205 if test -f $srcdir/$tack.h; then
21206 cat >> Makefile <<CF_EOF
21207
21208 install.man \\
21209 uninstall.man ::
21210         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21211 CF_EOF
21212 fi
21213 fi
21214 fi
21215
21216 rm -f headers.sed headers.sh
21217
21218 echo creating headers.sh
21219 cat >headers.sh <<CF_EOF
21220 #! /bin/sh
21221 # This shell script is generated by the 'configure' script.  It is invoked in a
21222 # subdirectory of the build tree.  It generates a sed-script in the parent
21223 # directory that is used to adjust includes for header files that reside in a
21224 # subdirectory of /usr/include, etc.
21225 PRG=""
21226 while test \$# != 3
21227 do
21228 PRG="\$PRG \$1"; shift
21229 done
21230 DST=\$1
21231 REF=\$2
21232 SRC=\$3
21233 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21234 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21235 echo installing \$SRC in \$DST
21236 CF_EOF
21237
21238 if test $WITH_CURSES_H = yes; then
21239         cat >>headers.sh <<CF_EOF
21240 case \$DST in
21241 /*/include/*)
21242         END=\`basename \$DST\`
21243         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21244         do
21245                 NAME=\`basename \$i\`
21246                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21247         done
21248         ;;
21249 *)
21250         echo "" >> \$TMPSED
21251         ;;
21252 esac
21253 CF_EOF
21254
21255 else
21256         cat >>headers.sh <<CF_EOF
21257 case \$DST in
21258 /*/include/*)
21259         END=\`basename \$DST\`
21260         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21261         do
21262                 NAME=\`basename \$i\`
21263                 if test "\$NAME" = "curses.h"
21264                 then
21265                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21266                         NAME=ncurses.h
21267                 fi
21268                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21269         done
21270         ;;
21271 *)
21272         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21273         ;;
21274 esac
21275 CF_EOF
21276 fi
21277 cat >>headers.sh <<CF_EOF
21278 rm -f \$TMPSRC
21279 sed -f \$TMPSED \$SRC > \$TMPSRC
21280 NAME=\`basename \$SRC\`
21281 CF_EOF
21282 if test $WITH_CURSES_H != yes; then
21283         cat >>headers.sh <<CF_EOF
21284 test "\$NAME" = "curses.h" && NAME=ncurses.h
21285 CF_EOF
21286 fi
21287 cat >>headers.sh <<CF_EOF
21288 # Just in case someone gzip'd manpages, remove the conflicting copy.
21289 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21290
21291 eval \$PRG \$TMPSRC \$DST/\$NAME
21292 rm -f \$TMPSRC \$TMPSED
21293 CF_EOF
21294
21295 chmod 0755 headers.sh
21296
21297 for cf_dir in $SRC_SUBDIRS
21298 do
21299         if test ! -d $srcdir/$cf_dir ; then
21300                 continue
21301         fi
21302
21303         if test -f $srcdir/$cf_dir/headers; then
21304                 $AWK -f $srcdir/mk-hdr.awk \
21305                         subset="$LIB_SUBSETS" \
21306                         compat="$WITH_CURSES_H" \
21307                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21308         fi
21309
21310         if test -f $srcdir/$cf_dir/modules; then
21311                 if test "$cf_dir" != "c++" ; then
21312                         cat >>$cf_dir/Makefile <<"CF_EOF"
21313 depend : ${AUTO_SRC}
21314         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21315
21316 # DO NOT DELETE THIS LINE -- make depend depends on it.
21317 CF_EOF
21318                 fi
21319         fi
21320 done
21321
21322 if test "x$cf_with_ada" != xno ; then
21323 if test -z "$USE_OLD_MAKERULES" ; then
21324         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21325 fi
21326 fi
21327  ;;
21328   esac
21329 done
21330 EOF
21331
21332 cat >>$CONFIG_STATUS <<\EOF
21333
21334 { (exit 0); exit 0; }
21335 EOF
21336 chmod +x $CONFIG_STATUS
21337 ac_clean_files=$ac_clean_files_save
21338
21339 # configure is writing to config.log, and then calls config.status.
21340 # config.status does its own redirection, appending to config.log.
21341 # Unfortunately, on DOS this fails, as config.log is still kept open
21342 # by configure, so config.status won't be able to write to it; its
21343 # output is simply discarded.  So we exec the FD to /dev/null,
21344 # effectively closing config.log, so it can be properly (re)opened and
21345 # appended to by config.status.  When coming back to configure, we
21346 # need to make the FD available again.
21347 if test "$no_create" != yes; then
21348   ac_cs_success=:
21349   exec 5>/dev/null
21350   $SHELL $CONFIG_STATUS || ac_cs_success=false
21351   exec 5>>config.log
21352   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21353   # would make configure fail if this is the last instruction.
21354   $ac_cs_success || { (exit 1); exit 1; }
21355 fi
21356 ${MAKE:-make} preinstall