]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
5cc603316633d26051718937c5d8c7d07d259748
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.535 .
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" != none ; 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" != none ; then
3768         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3769                 echo "$as_me:3769: checking if we should install .pc files for $PKG_CONFIG" >&5
3770 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3771
3772 # Check whether --enable-pc-files or --disable-pc-files was given.
3773 if test "${enable_pc_files+set}" = set; then
3774   enableval="$enable_pc_files"
3775   enable_pc_files=$enableval
3776 else
3777   enable_pc_files=no
3778 fi;
3779                 echo "$as_me:3779: result: $enable_pc_files" >&5
3780 echo "${ECHO_T}$enable_pc_files" >&6
3781         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3782                 enable_pc_files=no
3783                 { echo "$as_me:3783: WARNING: did not find $PKG_CONFIG library" >&5
3784 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3785         fi
3786 else
3787         enable_pc_files=no
3788 fi
3789
3790 echo "$as_me:3790: checking if we should assume mixed-case filenames" >&5
3791 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3792
3793 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3794 if test "${enable_mixed_case+set}" = set; then
3795   enableval="$enable_mixed_case"
3796   enable_mixedcase=$enableval
3797 else
3798   enable_mixedcase=auto
3799 fi;
3800 echo "$as_me:3800: result: $enable_mixedcase" >&5
3801 echo "${ECHO_T}$enable_mixedcase" >&6
3802 if test "$enable_mixedcase" = "auto" ; then
3803
3804 echo "$as_me:3804: checking if filesystem supports mixed-case filenames" >&5
3805 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3806 if test "${cf_cv_mixedcase+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809
3810 if test "$cross_compiling" = yes ; then
3811         case $target_alias in #(vi
3812         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3813                 cf_cv_mixedcase=no
3814                 ;;
3815         *)
3816                 cf_cv_mixedcase=yes
3817                 ;;
3818         esac
3819 else
3820         rm -f conftest CONFTEST
3821         echo test >conftest
3822         if test -f CONFTEST ; then
3823                 cf_cv_mixedcase=no
3824         else
3825                 cf_cv_mixedcase=yes
3826         fi
3827         rm -f conftest CONFTEST
3828 fi
3829
3830 fi
3831 echo "$as_me:3831: result: $cf_cv_mixedcase" >&5
3832 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3833 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3834 #define MIXEDCASE_FILENAMES 1
3835 EOF
3836
3837 else
3838     cf_cv_mixedcase=$enable_mixedcase
3839     if test "$enable_mixedcase" = "yes" ; then
3840         cat >>confdefs.h <<\EOF
3841 #define MIXEDCASE_FILENAMES 1
3842 EOF
3843
3844     fi
3845 fi
3846
3847 # do this after mixed-case option (tags/TAGS is not as important as tic).
3848 echo "$as_me:3848: checking whether ${MAKE-make} sets \${MAKE}" >&5
3849 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3850 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3851 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   cat >conftest.make <<\EOF
3855 all:
3856         @echo 'ac_maketemp="${MAKE}"'
3857 EOF
3858 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3859 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3860 if test -n "$ac_maketemp"; then
3861   eval ac_cv_prog_make_${ac_make}_set=yes
3862 else
3863   eval ac_cv_prog_make_${ac_make}_set=no
3864 fi
3865 rm -f conftest.make
3866 fi
3867 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3868   echo "$as_me:3868: result: yes" >&5
3869 echo "${ECHO_T}yes" >&6
3870   SET_MAKE=
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874   SET_MAKE="MAKE=${MAKE-make}"
3875 fi
3876
3877 for ac_prog in exctags ctags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_CTAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$CTAGS"; then
3887   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_CTAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 CTAGS=$ac_cv_prog_CTAGS
3903 if test -n "$CTAGS"; then
3904   echo "$as_me:3904: result: $CTAGS" >&5
3905 echo "${ECHO_T}$CTAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$CTAGS" && break
3912 done
3913
3914 for ac_prog in exetags etags
3915 do
3916   # Extract the first word of "$ac_prog", so it can be a program name with args.
3917 set dummy $ac_prog; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ETAGS+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ETAGS"; then
3924   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ETAGS="$ac_prog"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937 fi
3938 fi
3939 ETAGS=$ac_cv_prog_ETAGS
3940 if test -n "$ETAGS"; then
3941   echo "$as_me:3941: result: $ETAGS" >&5
3942 echo "${ECHO_T}$ETAGS" >&6
3943 else
3944   echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3946 fi
3947
3948   test -n "$ETAGS" && break
3949 done
3950
3951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3952 set dummy ${CTAGS:-ctags}; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3956   echo $ECHO_N "(cached) $ECHO_C" >&6
3957 else
3958   if test -n "$MAKE_LOWER_TAGS"; then
3959   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3960 else
3961   ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 ac_dummy="$PATH"
3963 for ac_dir in $ac_dummy; do
3964   IFS=$ac_save_IFS
3965   test -z "$ac_dir" && ac_dir=.
3966   $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3969 break
3970 done
3971
3972   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3973 fi
3974 fi
3975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3976 if test -n "$MAKE_LOWER_TAGS"; then
3977   echo "$as_me:3977: result: $MAKE_LOWER_TAGS" >&5
3978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3979 else
3980   echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3982 fi
3983
3984 if test "$cf_cv_mixedcase" = yes ; then
3985         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3986 set dummy ${ETAGS:-etags}; ac_word=$2
3987 echo "$as_me:3987: checking for $ac_word" >&5
3988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3990   echo $ECHO_N "(cached) $ECHO_C" >&6
3991 else
3992   if test -n "$MAKE_UPPER_TAGS"; then
3993   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3994 else
3995   ac_save_IFS=$IFS; IFS=$ac_path_separator
3996 ac_dummy="$PATH"
3997 for ac_dir in $ac_dummy; do
3998   IFS=$ac_save_IFS
3999   test -z "$ac_dir" && ac_dir=.
4000   $as_executable_p "$ac_dir/$ac_word" || continue
4001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4002 echo "$as_me:4002: found $ac_dir/$ac_word" >&5
4003 break
4004 done
4005
4006   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4007 fi
4008 fi
4009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4010 if test -n "$MAKE_UPPER_TAGS"; then
4011   echo "$as_me:4011: result: $MAKE_UPPER_TAGS" >&5
4012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4013 else
4014   echo "$as_me:4014: result: no" >&5
4015 echo "${ECHO_T}no" >&6
4016 fi
4017
4018 else
4019         MAKE_UPPER_TAGS=no
4020 fi
4021
4022 if test "$MAKE_UPPER_TAGS" = yes ; then
4023         MAKE_UPPER_TAGS=
4024 else
4025         MAKE_UPPER_TAGS="#"
4026 fi
4027
4028 if test "$MAKE_LOWER_TAGS" = yes ; then
4029         MAKE_LOWER_TAGS=
4030 else
4031         MAKE_LOWER_TAGS="#"
4032 fi
4033
4034 echo "$as_me:4034: checking for makeflags variable" >&5
4035 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4036 if test "${cf_cv_makeflags+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039
4040         cf_cv_makeflags=''
4041         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4042         do
4043                 cat >cf_makeflags.tmp <<CF_EOF
4044 SHELL = /bin/sh
4045 all :
4046         @ echo '.$cf_option'
4047 CF_EOF
4048                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4049                 case "$cf_result" in
4050                 .*k)
4051                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4052                         case "$cf_result" in
4053                         .*CC=*) cf_cv_makeflags=
4054                                 ;;
4055                         *)      cf_cv_makeflags=$cf_option
4056                                 ;;
4057                         esac
4058                         break
4059                         ;;
4060                 .-)     ;;
4061                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4062                         ;;
4063                 esac
4064         done
4065         rm -f cf_makeflags.tmp
4066
4067 fi
4068 echo "$as_me:4068: result: $cf_cv_makeflags" >&5
4069 echo "${ECHO_T}$cf_cv_makeflags" >&6
4070
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_RANLIB+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 RANLIB=$ac_cv_prog_RANLIB
4096 if test -n "$RANLIB"; then
4097   echo "$as_me:4097: result: $RANLIB" >&5
4098 echo "${ECHO_T}$RANLIB" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104 fi
4105 if test -z "$ac_cv_prog_RANLIB"; then
4106   ac_ct_RANLIB=$RANLIB
4107   # Extract the first word of "ranlib", so it can be a program name with args.
4108 set dummy ranlib; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_RANLIB"; then
4115   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ac_ct_RANLIB="ranlib"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4129 fi
4130 fi
4131 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4132 if test -n "$ac_ct_RANLIB"; then
4133   echo "$as_me:4133: result: $ac_ct_RANLIB" >&5
4134 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   RANLIB=$ac_ct_RANLIB
4141 else
4142   RANLIB="$ac_cv_prog_RANLIB"
4143 fi
4144
4145 if test -n "$ac_tool_prefix"; then
4146   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}ld; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_LD+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$LD"; then
4154   ac_cv_prog_LD="$LD" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_LD="${ac_tool_prefix}ld"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167 fi
4168 fi
4169 LD=$ac_cv_prog_LD
4170 if test -n "$LD"; then
4171   echo "$as_me:4171: result: $LD" >&5
4172 echo "${ECHO_T}$LD" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178 fi
4179 if test -z "$ac_cv_prog_LD"; then
4180   ac_ct_LD=$LD
4181   # Extract the first word of "ld", so it can be a program name with args.
4182 set dummy ld; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$ac_ct_LD"; then
4189   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_ac_ct_LD="ld"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4203 fi
4204 fi
4205 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4206 if test -n "$ac_ct_LD"; then
4207   echo "$as_me:4207: result: $ac_ct_LD" >&5
4208 echo "${ECHO_T}$ac_ct_LD" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214   LD=$ac_ct_LD
4215 else
4216   LD="$ac_cv_prog_LD"
4217 fi
4218
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4221 set dummy ${ac_tool_prefix}ar; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_AR+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$AR"; then
4228   ac_cv_prog_AR="$AR" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_AR="${ac_tool_prefix}ar"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241 fi
4242 fi
4243 AR=$ac_cv_prog_AR
4244 if test -n "$AR"; then
4245   echo "$as_me:4245: result: $AR" >&5
4246 echo "${ECHO_T}$AR" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252 fi
4253 if test -z "$ac_cv_prog_AR"; then
4254   ac_ct_AR=$AR
4255   # Extract the first word of "ar", so it can be a program name with args.
4256 set dummy ar; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$ac_ct_AR"; then
4263   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_ac_ct_AR="ar"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4277 fi
4278 fi
4279 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4280 if test -n "$ac_ct_AR"; then
4281   echo "$as_me:4281: result: $ac_ct_AR" >&5
4282 echo "${ECHO_T}$ac_ct_AR" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   AR=$ac_ct_AR
4289 else
4290   AR="$ac_cv_prog_AR"
4291 fi
4292
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$AR"; then
4302   ac_cv_prog_AR="$AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_AR="${ac_tool_prefix}ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 AR=$ac_cv_prog_AR
4318 if test -n "$AR"; then
4319   echo "$as_me:4319: result: $AR" >&5
4320 echo "${ECHO_T}$AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 fi
4327 if test -z "$ac_cv_prog_AR"; then
4328   ac_ct_AR=$AR
4329   # Extract the first word of "ar", so it can be a program name with args.
4330 set dummy ar; ac_word=$2
4331 echo "$as_me:4331: checking for $ac_word" >&5
4332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if test -n "$ac_ct_AR"; then
4337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4338 else
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   $as_executable_p "$ac_dir/$ac_word" || continue
4345 ac_cv_prog_ac_ct_AR="ar"
4346 echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347 break
4348 done
4349
4350   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4351 fi
4352 fi
4353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4354 if test -n "$ac_ct_AR"; then
4355   echo "$as_me:4355: result: $ac_ct_AR" >&5
4356 echo "${ECHO_T}$ac_ct_AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362   AR=$ac_ct_AR
4363 else
4364   AR="$ac_cv_prog_AR"
4365 fi
4366
4367 echo "$as_me:4367: checking for options to update archives" >&5
4368 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4369 if test "${cf_cv_ar_flags+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372
4373         cf_cv_ar_flags=unknown
4374         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4375         do
4376
4377                 # check if $ARFLAGS already contains this choice
4378                 if test "x$ARFLAGS" != "x" ; then
4379                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4380                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4381                                 cf_cv_ar_flags=
4382                                 break
4383                         fi
4384                 fi
4385
4386                 rm -f conftest.$ac_cv_objext
4387                 rm -f conftest.a
4388
4389                 cat >conftest.$ac_ext <<EOF
4390 #line 4390 "configure"
4391 int     testdata[3] = { 123, 456, 789 };
4392 EOF
4393                 if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } ; then
4398                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4399                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4400                         if test -f conftest.a ; then
4401                                 cf_cv_ar_flags=$cf_ar_flags
4402                                 break
4403                         fi
4404                 else
4405                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4406
4407 echo "${as_me:-configure}:4407: testing cannot compile test-program ..." 1>&5
4408
4409                         break
4410                 fi
4411         done
4412         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4413
4414 fi
4415 echo "$as_me:4415: result: $cf_cv_ar_flags" >&5
4416 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4417
4418 if test -n "$ARFLAGS" ; then
4419         if test -n "$cf_cv_ar_flags" ; then
4420                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4421         fi
4422 else
4423         ARFLAGS=$cf_cv_ar_flags
4424 fi
4425
4426 echo "$as_me:4426: checking if you have specified an install-prefix" >&5
4427 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4428
4429 # Check whether --with-install-prefix or --without-install-prefix was given.
4430 if test "${with_install_prefix+set}" = set; then
4431   withval="$with_install_prefix"
4432   case "$withval" in #(vi
4433         yes|no) #(vi
4434                 ;;
4435         *)      DESTDIR="$withval"
4436                 ;;
4437         esac
4438 fi;
4439 echo "$as_me:4439: result: $DESTDIR" >&5
4440 echo "${ECHO_T}$DESTDIR" >&6
4441
4442 ###############################################################################
4443
4444 # If we're cross-compiling, allow the user to override the tools and their
4445 # options.  The configure script is oriented toward identifying the host
4446 # compiler, etc., but we need a build compiler to generate parts of the source.
4447
4448 if test "$cross_compiling" = yes ; then
4449
4450         # defaults that we might want to override
4451         : ${BUILD_CFLAGS:=''}
4452         : ${BUILD_CPPFLAGS:=''}
4453         : ${BUILD_LDFLAGS:=''}
4454         : ${BUILD_LIBS:=''}
4455         : ${BUILD_EXEEXT:='$x'}
4456         : ${BUILD_OBJEXT:='o'}
4457
4458 # Check whether --with-build-cc or --without-build-cc was given.
4459 if test "${with_build_cc+set}" = set; then
4460   withval="$with_build_cc"
4461   BUILD_CC="$withval"
4462 else
4463   for ac_prog in gcc cc cl
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$BUILD_CC"; then
4473   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_BUILD_CC="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 BUILD_CC=$ac_cv_prog_BUILD_CC
4489 if test -n "$BUILD_CC"; then
4490   echo "$as_me:4490: result: $BUILD_CC" >&5
4491 echo "${ECHO_T}$BUILD_CC" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$BUILD_CC" && break
4498 done
4499
4500 fi;
4501         echo "$as_me:4501: checking for native build C compiler" >&5
4502 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4503         echo "$as_me:4503: result: $BUILD_CC" >&5
4504 echo "${ECHO_T}$BUILD_CC" >&6
4505
4506         echo "$as_me:4506: checking for native build C preprocessor" >&5
4507 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4508
4509 # Check whether --with-build-cpp or --without-build-cpp was given.
4510 if test "${with_build_cpp+set}" = set; then
4511   withval="$with_build_cpp"
4512   BUILD_CPP="$withval"
4513 else
4514   BUILD_CPP='${BUILD_CC} -E'
4515 fi;
4516         echo "$as_me:4516: result: $BUILD_CPP" >&5
4517 echo "${ECHO_T}$BUILD_CPP" >&6
4518
4519         echo "$as_me:4519: checking for native build C flags" >&5
4520 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4521
4522 # Check whether --with-build-cflags or --without-build-cflags was given.
4523 if test "${with_build_cflags+set}" = set; then
4524   withval="$with_build_cflags"
4525   BUILD_CFLAGS="$withval"
4526 fi;
4527         echo "$as_me:4527: result: $BUILD_CFLAGS" >&5
4528 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4529
4530         echo "$as_me:4530: checking for native build C preprocessor-flags" >&5
4531 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4532
4533 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4534 if test "${with_build_cppflags+set}" = set; then
4535   withval="$with_build_cppflags"
4536   BUILD_CPPFLAGS="$withval"
4537 fi;
4538         echo "$as_me:4538: result: $BUILD_CPPFLAGS" >&5
4539 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4540
4541         echo "$as_me:4541: checking for native build linker-flags" >&5
4542 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4543
4544 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4545 if test "${with_build_ldflags+set}" = set; then
4546   withval="$with_build_ldflags"
4547   BUILD_LDFLAGS="$withval"
4548 fi;
4549         echo "$as_me:4549: result: $BUILD_LDFLAGS" >&5
4550 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4551
4552         echo "$as_me:4552: checking for native build linker-libraries" >&5
4553 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4554
4555 # Check whether --with-build-libs or --without-build-libs was given.
4556 if test "${with_build_libs+set}" = set; then
4557   withval="$with_build_libs"
4558   BUILD_LIBS="$withval"
4559 fi;
4560         echo "$as_me:4560: result: $BUILD_LIBS" >&5
4561 echo "${ECHO_T}$BUILD_LIBS" >&6
4562
4563         # this assumes we're on Unix.
4564         BUILD_EXEEXT=
4565         BUILD_OBJEXT=o
4566
4567         : ${BUILD_CC:='${CC}'}
4568
4569         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4570                 { { echo "$as_me:4570: error: Cross-build requires two compilers.
4571 Use --with-build-cc to specify the native compiler." >&5
4572 echo "$as_me: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576
4577 else
4578         : ${BUILD_CC:='${CC}'}
4579         : ${BUILD_CPP:='${CPP}'}
4580         : ${BUILD_CFLAGS:='${CFLAGS}'}
4581         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4582         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4583         : ${BUILD_LIBS:='${LIBS}'}
4584         : ${BUILD_EXEEXT:='$x'}
4585         : ${BUILD_OBJEXT:='o'}
4586 fi
4587
4588 ###############################################################################
4589
4590 ### Options to allow the user to specify the set of libraries which are used.
4591 ### Use "--without-normal --with-shared" to allow the default model to be
4592 ### shared, for example.
4593 cf_list_models=""
4594
4595 echo "$as_me:4595: checking if libtool -version-number should be used" >&5
4596 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4597
4598 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4599 if test "${enable_libtool_version+set}" = set; then
4600   enableval="$enable_libtool_version"
4601   test "$enableval" != no && enableval=yes
4602   if test "$enableval" != "yes" ; then
4603     cf_libtool_version=no
4604   else
4605     cf_libtool_version=yes
4606   fi
4607 else
4608   enableval=yes
4609   cf_libtool_version=yes
4610
4611 fi;
4612 echo "$as_me:4612: result: $cf_libtool_version" >&5
4613 echo "${ECHO_T}$cf_libtool_version" >&6
4614
4615 if test "$cf_libtool_version" = yes ; then
4616         LIBTOOL_VERSION="-version-number"
4617 else
4618         LIBTOOL_VERSION="-version-info"
4619 fi
4620
4621 LIBTOOL=
4622
4623 # common library maintenance symbols that are convenient for libtool scripts:
4624 LIB_CREATE='${AR} -cr'
4625 LIB_OBJECT='${OBJECTS}'
4626 LIB_SUFFIX=.a
4627 LIB_PREP="$RANLIB"
4628
4629 # symbols used to prop libtool up to enable it to determine what it should be
4630 # doing:
4631 LIB_CLEAN=
4632 LIB_COMPILE=
4633 LIB_LINK='${CC}'
4634 LIB_INSTALL=
4635 LIB_UNINSTALL=
4636
4637 echo "$as_me:4637: checking if you want to build libraries with libtool" >&5
4638 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4639
4640 # Check whether --with-libtool or --without-libtool was given.
4641 if test "${with_libtool+set}" = set; then
4642   withval="$with_libtool"
4643   with_libtool=$withval
4644 else
4645   with_libtool=no
4646 fi;
4647 echo "$as_me:4647: result: $with_libtool" >&5
4648 echo "${ECHO_T}$with_libtool" >&6
4649 if test "$with_libtool" != "no"; then
4650
4651         if test "$with_libtool" != "yes" ; then
4652
4653 if test "x$prefix" != xNONE; then
4654   cf_path_syntax="$prefix"
4655 else
4656   cf_path_syntax="$ac_default_prefix"
4657 fi
4658
4659 case ".$with_libtool" in #(vi
4660 .\$\(*\)*|.\'*\'*) #(vi
4661   ;;
4662 ..|./*|.\\*) #(vi
4663   ;;
4664 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4665   ;;
4666 .\${*prefix}*) #(vi
4667   eval with_libtool="$with_libtool"
4668   case ".$with_libtool" in #(vi
4669   .NONE/*)
4670     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671     ;;
4672   esac
4673   ;; #(vi
4674 .no|.NONE/*)
4675   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4676   ;;
4677 *)
4678   { { echo "$as_me:4678: error: expected a pathname, not \"$with_libtool\"" >&5
4679 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4680    { (exit 1); exit 1; }; }
4681   ;;
4682 esac
4683
4684                 LIBTOOL=$with_libtool
4685         else
4686                 # Extract the first word of "libtool", so it can be a program name with args.
4687 set dummy libtool; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   case $LIBTOOL in
4694   [\\/]* | ?:[\\/]*)
4695   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4696   ;;
4697   *)
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   if $as_executable_p "$ac_dir/$ac_word"; then
4704    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4705    echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706    break
4707 fi
4708 done
4709
4710   ;;
4711 esac
4712 fi
4713 LIBTOOL=$ac_cv_path_LIBTOOL
4714
4715 if test -n "$LIBTOOL"; then
4716   echo "$as_me:4716: result: $LIBTOOL" >&5
4717 echo "${ECHO_T}$LIBTOOL" >&6
4718 else
4719   echo "$as_me:4719: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723         fi
4724         if test -z "$LIBTOOL" ; then
4725                 { { echo "$as_me:4725: error: Cannot find libtool" >&5
4726 echo "$as_me: error: Cannot find libtool" >&2;}
4727    { (exit 1); exit 1; }; }
4728         fi
4729         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4730         LIB_OBJECT='${OBJECTS:.o=.lo}'
4731         LIB_SUFFIX=.la
4732         LIB_CLEAN='${LIBTOOL} --mode=clean'
4733         LIB_COMPILE='${LIBTOOL} --mode=compile'
4734         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4735         LIB_INSTALL='${LIBTOOL} --mode=install'
4736         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4737         LIB_PREP=:
4738
4739         # Show the version of libtool
4740         echo "$as_me:4740: checking version of libtool" >&5
4741 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4742
4743         # Save the version in a cache variable - this is not entirely a good
4744         # thing, but the version string from libtool is very ugly, and for
4745         # bug reports it might be useful to have the original string. "("
4746         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4747         echo "$as_me:4747: result: $cf_cv_libtool_version" >&5
4748 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4749         if test -z "$cf_cv_libtool_version" ; then
4750                 { { echo "$as_me:4750: error: This is not GNU libtool" >&5
4751 echo "$as_me: error: This is not GNU libtool" >&2;}
4752    { (exit 1); exit 1; }; }
4753         fi
4754
4755         # special hack to add -no-undefined (which libtool should do for itself)
4756         LT_UNDEF=
4757         case "$cf_cv_system_name" in #(vi
4758         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4759                 LT_UNDEF=-no-undefined
4760                 ;;
4761         esac
4762
4763         # special hack to add --tag option for C++ compiler
4764         case $cf_cv_libtool_version in #(vi
4765         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4766                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4767                 LIBTOOL="$LIBTOOL --tag=CC"
4768                 ;;
4769         *)
4770                 LIBTOOL_CXX="$LIBTOOL"
4771                 ;;
4772         esac
4773 else
4774         LIBTOOL=""
4775         LIBTOOL_CXX=""
4776 fi
4777
4778 test -z "$LIBTOOL" && ECHO_LT=
4779
4780 if test "$with_libtool" != "no" ; then
4781
4782 cf_list_models="$cf_list_models libtool"
4783
4784 else
4785
4786 echo "$as_me:4786: checking if you want to build shared libraries" >&5
4787 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4788
4789 # Check whether --with-shared or --without-shared was given.
4790 if test "${with_shared+set}" = set; then
4791   withval="$with_shared"
4792   with_shared=$withval
4793 else
4794   with_shared=no
4795 fi;
4796 echo "$as_me:4796: result: $with_shared" >&5
4797 echo "${ECHO_T}$with_shared" >&6
4798 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4799
4800 echo "$as_me:4800: checking if you want to build static libraries" >&5
4801 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-normal or --without-normal was given.
4804 if test "${with_normal+set}" = set; then
4805   withval="$with_normal"
4806   with_normal=$withval
4807 else
4808   with_normal=yes
4809 fi;
4810 echo "$as_me:4810: result: $with_normal" >&5
4811 echo "${ECHO_T}$with_normal" >&6
4812 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4813
4814 echo "$as_me:4814: checking if you want to build debug libraries" >&5
4815 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-debug or --without-debug was given.
4818 if test "${with_debug+set}" = set; then
4819   withval="$with_debug"
4820   with_debug=$withval
4821 else
4822   with_debug=yes
4823 fi;
4824 echo "$as_me:4824: result: $with_debug" >&5
4825 echo "${ECHO_T}$with_debug" >&6
4826 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4827
4828 echo "$as_me:4828: checking if you want to build profiling libraries" >&5
4829 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4830
4831 # Check whether --with-profile or --without-profile was given.
4832 if test "${with_profile+set}" = set; then
4833   withval="$with_profile"
4834   with_profile=$withval
4835 else
4836   with_profile=no
4837 fi;
4838 echo "$as_me:4838: result: $with_profile" >&5
4839 echo "${ECHO_T}$with_profile" >&6
4840 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4841
4842 fi
4843
4844 ###############################################################################
4845
4846 echo "$as_me:4846: checking for specified models" >&5
4847 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4848 test -z "$cf_list_models" && cf_list_models=normal
4849 test "$with_libtool" != "no" && cf_list_models=libtool
4850 echo "$as_me:4850: result: $cf_list_models" >&5
4851 echo "${ECHO_T}$cf_list_models" >&6
4852
4853 ### Use the first model as the default, and save its suffix for use in building
4854 ### up test-applications.
4855 echo "$as_me:4855: checking for default model" >&5
4856 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4857 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4858 echo "$as_me:4858: result: $DFT_LWR_MODEL" >&5
4859 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4860
4861 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4862
4863 TICS_NAME=tic
4864
4865 TINFO_NAME=tinfo
4866
4867 LIB_NAME=ncurses
4868
4869 LIB_DIR=../lib
4870 LIB_2ND=../../lib
4871
4872         case $cf_cv_system_name in #(vi
4873         OS/2*|os2*) #(vi
4874         LIB_PREFIX=''
4875         ;;
4876         *)      LIB_PREFIX='lib'
4877         ;;
4878         esac
4879 cf_prefix=$LIB_PREFIX
4880
4881 LIB_PREFIX=$cf_prefix
4882
4883 LIB_SUFFIX=
4884
4885 ###############################################################################
4886
4887 echo "$as_me:4887: checking if you want to build a separate terminfo library" >&5
4888 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4889
4890 # Check whether --with-termlib or --without-termlib was given.
4891 if test "${with_termlib+set}" = set; then
4892   withval="$with_termlib"
4893   with_termlib=$withval
4894 else
4895   with_termlib=no
4896 fi;
4897 echo "$as_me:4897: result: $with_termlib" >&5
4898 echo "${ECHO_T}$with_termlib" >&6
4899
4900 echo "$as_me:4900: checking if you want to build a separate tic library" >&5
4901 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4902
4903 # Check whether --with-ticlib or --without-ticlib was given.
4904 if test "${with_ticlib+set}" = set; then
4905   withval="$with_ticlib"
4906   with_ticlib=$withval
4907 else
4908   with_ticlib=no
4909 fi;
4910 echo "$as_me:4910: result: $with_ticlib" >&5
4911 echo "${ECHO_T}$with_ticlib" >&6
4912
4913 ### Checks for special libraries, must be done up-front.
4914 SHLIB_LIST=""
4915
4916 echo "$as_me:4916: checking if you want to link with the GPM mouse library" >&5
4917 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4918
4919 # Check whether --with-gpm or --without-gpm was given.
4920 if test "${with_gpm+set}" = set; then
4921   withval="$with_gpm"
4922   with_gpm=$withval
4923 else
4924   with_gpm=maybe
4925 fi;
4926 echo "$as_me:4926: result: $with_gpm" >&5
4927 echo "${ECHO_T}$with_gpm" >&6
4928
4929 if test "$with_gpm" != no ; then
4930         echo "$as_me:4930: checking for gpm.h" >&5
4931 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4932 if test "${ac_cv_header_gpm_h+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 #line 4936 "configure"
4937 #include "confdefs.h"
4938 #include <gpm.h>
4939 _ACEOF
4940 if { (eval echo "$as_me:4940: \"$ac_cpp conftest.$ac_ext\"") >&5
4941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4942   ac_status=$?
4943   egrep -v '^ *\+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null; then
4948   if test -s conftest.err; then
4949     ac_cpp_err=$ac_c_preproc_warn_flag
4950   else
4951     ac_cpp_err=
4952   fi
4953 else
4954   ac_cpp_err=yes
4955 fi
4956 if test -z "$ac_cpp_err"; then
4957   ac_cv_header_gpm_h=yes
4958 else
4959   echo "$as_me: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   ac_cv_header_gpm_h=no
4962 fi
4963 rm -f conftest.err conftest.$ac_ext
4964 fi
4965 echo "$as_me:4965: result: $ac_cv_header_gpm_h" >&5
4966 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4967 if test $ac_cv_header_gpm_h = yes; then
4968
4969                 cat >>confdefs.h <<\EOF
4970 #define HAVE_GPM_H 1
4971 EOF
4972
4973                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4974                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing assuming we really have GPM library ..." 1>&5
4977
4978                         cat >>confdefs.h <<\EOF
4979 #define HAVE_LIBGPM 1
4980 EOF
4981
4982                 else
4983                         echo "$as_me:4983: checking for Gpm_Open in -lgpm" >&5
4984 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4985 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   ac_check_lib_save_LIBS=$LIBS
4989 LIBS="-lgpm  $LIBS"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 #ifdef __cplusplus
4996 extern "C"
4997 #endif
4998 /* We use char because int might match the return type of a gcc2
4999    builtin and then its argument prototype would still apply.  */
5000 char Gpm_Open ();
5001 int
5002 main ()
5003 {
5004 Gpm_Open ();
5005   ;
5006   return 0;
5007 }
5008 _ACEOF
5009 rm -f conftest.$ac_objext conftest$ac_exeext
5010 if { (eval echo "$as_me:5010: \"$ac_link\"") >&5
5011   (eval $ac_link) 2>&5
5012   ac_status=$?
5013   echo "$as_me:5013: \$? = $ac_status" >&5
5014   (exit $ac_status); } &&
5015          { ac_try='test -s conftest$ac_exeext'
5016   { (eval echo "$as_me:5016: \"$ac_try\"") >&5
5017   (eval $ac_try) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); }; }; then
5021   ac_cv_lib_gpm_Gpm_Open=yes
5022 else
5023   echo "$as_me: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 ac_cv_lib_gpm_Gpm_Open=no
5026 fi
5027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5028 LIBS=$ac_check_lib_save_LIBS
5029 fi
5030 echo "$as_me:5030: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5031 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5032 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5033   :
5034 else
5035
5036                                 { { echo "$as_me:5036: error: Cannot link with GPM library" >&5
5037 echo "$as_me: error: Cannot link with GPM library" >&2;}
5038    { (exit 1); exit 1; }; }
5039                 fi
5040                 with_gpm=yes
5041
5042 fi
5043
5044 else
5045
5046                 test "$with_gpm" != maybe && { echo "$as_me:5046: WARNING: Cannot find GPM header" >&5
5047 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5048                 with_gpm=no
5049
5050 fi
5051
5052 fi
5053
5054 if test "$with_gpm" != no ; then
5055         echo "$as_me:5055: checking if you want to load GPM dynamically" >&5
5056 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5057
5058 # Check whether --with-dlsym or --without-dlsym was given.
5059 if test "${with_dlsym+set}" = set; then
5060   withval="$with_dlsym"
5061   with_dlsym=$withval
5062 else
5063   with_dlsym=yes
5064 fi;
5065         echo "$as_me:5065: result: $with_dlsym" >&5
5066 echo "${ECHO_T}$with_dlsym" >&6
5067         if test "$with_dlsym" = yes ; then
5068
5069 cf_have_dlsym=no
5070 echo "$as_me:5070: checking for dlsym" >&5
5071 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5072 if test "${ac_cv_func_dlsym+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   cat >conftest.$ac_ext <<_ACEOF
5076 #line 5076 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char dlsym (); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 #ifdef __cplusplus
5083 extern "C"
5084 #endif
5085 /* We use char because int might match the return type of a gcc2
5086    builtin and then its argument prototype would still apply.  */
5087 char dlsym ();
5088 char (*f) ();
5089
5090 int
5091 main ()
5092 {
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5097 choke me
5098 #else
5099 f = dlsym;
5100 #endif
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); } &&
5112          { ac_try='test -s conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118   ac_cv_func_dlsym=yes
5119 else
5120   echo "$as_me: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 ac_cv_func_dlsym=no
5123 fi
5124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5125 fi
5126 echo "$as_me:5126: result: $ac_cv_func_dlsym" >&5
5127 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5128 if test $ac_cv_func_dlsym = yes; then
5129   cf_have_dlsym=yes
5130 else
5131
5132 cf_have_libdl=no
5133 echo "$as_me:5133: checking for dlsym in -ldl" >&5
5134 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5135 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   ac_check_lib_save_LIBS=$LIBS
5139 LIBS="-ldl  $LIBS"
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 #ifdef __cplusplus
5146 extern "C"
5147 #endif
5148 /* We use char because int might match the return type of a gcc2
5149    builtin and then its argument prototype would still apply.  */
5150 char dlsym ();
5151 int
5152 main ()
5153 {
5154 dlsym ();
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161   (eval $ac_link) 2>&5
5162   ac_status=$?
5163   echo "$as_me:5163: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -s conftest$ac_exeext'
5166   { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5167   (eval $ac_try) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); }; }; then
5171   ac_cv_lib_dl_dlsym=yes
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175 ac_cv_lib_dl_dlsym=no
5176 fi
5177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5178 LIBS=$ac_check_lib_save_LIBS
5179 fi
5180 echo "$as_me:5180: result: $ac_cv_lib_dl_dlsym" >&5
5181 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5182 if test $ac_cv_lib_dl_dlsym = yes; then
5183
5184         cf_have_dlsym=yes
5185         cf_have_libdl=yes
5186 fi
5187
5188 fi
5189
5190 if test "$cf_have_dlsym" = yes ; then
5191         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5192
5193         echo "$as_me:5193: checking whether able to link to dl*() functions" >&5
5194 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5195         cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198 #include <dlfcn.h>
5199 int
5200 main ()
5201 {
5202
5203                 void *obj;
5204                 if ((obj = dlopen("filename", 0)) != 0) {
5205                         if (dlsym(obj, "symbolname") == 0) {
5206                         dlclose(obj);
5207                         }
5208                 }
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225
5226                 cat >>confdefs.h <<\EOF
5227 #define HAVE_LIBDL 1
5228 EOF
5229
5230 else
5231   echo "$as_me: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233
5234                 { { echo "$as_me:5234: error: Cannot link test program for libdl" >&5
5235 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5236    { (exit 1); exit 1; }; }
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         echo "$as_me:5239: result: ok" >&5
5240 echo "${ECHO_T}ok" >&6
5241 else
5242         { { echo "$as_me:5242: error: Cannot find dlsym function" >&5
5243 echo "$as_me: error: Cannot find dlsym function" >&2;}
5244    { (exit 1); exit 1; }; }
5245 fi
5246
5247                 if test "$with_gpm" != yes ; then
5248                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5249
5250 echo "${as_me:-configure}:5250: testing assuming soname for gpm is $with_gpm ..." 1>&5
5251
5252                         cf_cv_gpm_soname="$with_gpm"
5253                 else
5254
5255 echo "$as_me:5255: checking for soname of gpm library" >&5
5256 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5257 if test "${cf_cv_gpm_soname+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260
5261 cf_cv_gpm_soname=unknown
5262 if test "$cross_compiling" != yes ; then
5263 cat >conftest.$ac_ext <<CF_EOF
5264 #include <gpm.h>
5265 int main()
5266 {
5267 if (Gpm_Open(0,0)) Gpm_Close();
5268         ${cf_cv_main_return:-return}(0);
5269 }
5270 CF_EOF
5271 cf_save_LIBS="$LIBS"
5272         LIBS="-lgpm $LIBS"
5273         if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274   (eval $ac_compile) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); } ; then
5278                 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } ; then
5283                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5284                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5285                 fi
5286         fi
5287 rm -rf conftest*
5288 LIBS="$cf_save_LIBS"
5289 fi
5290
5291 fi
5292 echo "$as_me:5292: result: $cf_cv_gpm_soname" >&5
5293 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5294
5295                 fi
5296                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5297 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5298 EOF
5299
5300                 SHLIB_LIST="-ldl $SHLIB_LIST"
5301         else
5302                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5303                 TEST_LIBS="-lgpm $TEST_LIBS"
5304         fi
5305         cat >>confdefs.h <<\EOF
5306 #define HAVE_LIBGPM 1
5307 EOF
5308
5309 echo "$as_me:5309: checking for Gpm_Wgetch in -lgpm" >&5
5310 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5311 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5312   echo $ECHO_N "(cached) $ECHO_C" >&6
5313 else
5314   ac_check_lib_save_LIBS=$LIBS
5315 LIBS="-lgpm  $LIBS"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char Gpm_Wgetch ();
5327 int
5328 main ()
5329 {
5330 Gpm_Wgetch ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:5339: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_gpm_Gpm_Wgetch=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 ac_cv_lib_gpm_Gpm_Wgetch=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:5356: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5357 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5358 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5359
5360 echo "$as_me:5360: checking if GPM is weakly bound to curses library" >&5
5361 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5362 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366 cf_cv_check_gpm_wgetch=unknown
5367 if test "$cross_compiling" != yes ; then
5368
5369 cat >conftest.$ac_ext <<CF_EOF
5370 #include <gpm.h>
5371 int main()
5372 {
5373         Gpm_Wgetch();
5374         ${cf_cv_main_return:-return}(0);
5375 }
5376 CF_EOF
5377
5378         cf_save_LIBS="$LIBS"
5379         # This only works if we can look at the symbol table.  If a shared
5380         # library is stripped for install, we cannot use that.  So we're forced
5381         # to rely on the static library, noting that some packagers may not
5382         # include it.
5383         LIBS="-static -lgpm -dynamic $LIBS"
5384         if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
5385   (eval $ac_compile) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); } ; then
5389                 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } ; then
5394                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5395                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5396                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5397                 fi
5398         fi
5399         rm -rf conftest*
5400         LIBS="$cf_save_LIBS"
5401 fi
5402
5403 fi
5404 echo "$as_me:5404: result: $cf_cv_check_gpm_wgetch" >&5
5405 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5406
5407 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5408         { echo "$as_me:5408: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5409 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5410 fi
5411
5412 fi
5413
5414 fi
5415
5416 # not everyone has "test -c"
5417 if test -c /dev/sysmouse 2>/dev/null ; then
5418 echo "$as_me:5418: checking if you want to use sysmouse" >&5
5419 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5420
5421 # Check whether --with-sysmouse or --without-sysmouse was given.
5422 if test "${with_sysmouse+set}" = set; then
5423   withval="$with_sysmouse"
5424   cf_with_sysmouse=$withval
5425 else
5426   cf_with_sysmouse=maybe
5427 fi;
5428         if test "$cf_with_sysmouse" != no ; then
5429         cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 #include <osreldate.h>
5434 #if (__FreeBSD_version >= 400017)
5435 #include <sys/consio.h>
5436 #include <sys/fbio.h>
5437 #else
5438 #include <machine/console.h>
5439 #endif
5440
5441 int
5442 main ()
5443 {
5444
5445         struct mouse_info the_mouse;
5446         ioctl(0, CONS_MOUSECTL, &the_mouse);
5447
5448   ;
5449   return 0;
5450 }
5451 _ACEOF
5452 rm -f conftest.$ac_objext
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454   (eval $ac_compile) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -s conftest.$ac_objext'
5459   { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460   (eval $ac_try) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); }; }; then
5464   cf_with_sysmouse=yes
5465 else
5466   echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 cf_with_sysmouse=no
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471         fi
5472 echo "$as_me:5472: result: $cf_with_sysmouse" >&5
5473 echo "${ECHO_T}$cf_with_sysmouse" >&6
5474 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_SYSMOUSE 1
5476 EOF
5477
5478 fi
5479
5480 if test X"$CC_G_OPT" = X"" ; then
5481         CC_G_OPT='-g'
5482         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5483 fi
5484
5485 if test X"$CXX_G_OPT" = X"" ; then
5486         CXX_G_OPT='-g'
5487         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5488 fi
5489
5490 echo "$as_me:5490: checking for default loader flags" >&5
5491 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5492 case $DFT_LWR_MODEL in
5493 libtool) LD_MODEL=''   ;;
5494 normal)  LD_MODEL=''   ;;
5495 debug)   LD_MODEL=$CC_G_OPT ;;
5496 profile) LD_MODEL='-pg';;
5497 shared)  LD_MODEL=''   ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_MODEL" >&5
5500 echo "${ECHO_T}$LD_MODEL" >&6
5501
5502 case $DFT_LWR_MODEL in
5503 shared)
5504
5505 echo "$as_me:5505: checking if rpath option should be used" >&5
5506 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5507
5508 # Check whether --enable-rpath or --disable-rpath was given.
5509 if test "${enable_rpath+set}" = set; then
5510   enableval="$enable_rpath"
5511   cf_cv_enable_rpath=$enableval
5512 else
5513   cf_cv_enable_rpath=no
5514 fi;
5515 echo "$as_me:5515: result: $cf_cv_enable_rpath" >&5
5516 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5517
5518 echo "$as_me:5518: checking if shared libraries should be relinked during install" >&5
5519 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5520
5521 # Check whether --enable-relink or --disable-relink was given.
5522 if test "${enable_relink+set}" = set; then
5523   enableval="$enable_relink"
5524   cf_cv_do_relink=$enableval
5525 else
5526   cf_cv_do_relink=yes
5527 fi;
5528 echo "$as_me:5528: result: $cf_cv_do_relink" >&5
5529 echo "${ECHO_T}$cf_cv_do_relink" >&6
5530         ;;
5531 esac
5532
5533 LD_RPATH_OPT=
5534 echo "$as_me:5534: checking for an rpath option" >&5
5535 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5536 case $cf_cv_system_name in #(vi
5537 irix*) #(vi
5538         if test "$GCC" = yes; then
5539                 LD_RPATH_OPT="-Wl,-rpath,"
5540         else
5541                 LD_RPATH_OPT="-rpath "
5542         fi
5543         ;;
5544 linux*|gnu*|k*bsd*-gnu) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 openbsd[2-9].*|mirbsd*) #(vi
5548         LD_RPATH_OPT="-Wl,-rpath,"
5549         ;;
5550 dragonfly*|freebsd*) #(vi
5551         LD_RPATH_OPT="-rpath "
5552         ;;
5553 netbsd*) #(vi
5554         LD_RPATH_OPT="-Wl,-rpath,"
5555         ;;
5556 osf*|mls+*) #(vi
5557         LD_RPATH_OPT="-rpath "
5558         ;;
5559 solaris2*) #(vi
5560         LD_RPATH_OPT="-R"
5561         ;;
5562 *)
5563         ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_RPATH_OPT" >&5
5566 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5567
5568 case "x$LD_RPATH_OPT" in #(vi
5569 x-R*)
5570         echo "$as_me:5570: checking if we need a space after rpath option" >&5
5571 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5572         cf_save_LIBS="$LIBS"
5573         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5574         cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577
5578 int
5579 main ()
5580 {
5581
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   cf_rpath_space=no
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 cf_rpath_space=yes
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605         LIBS="$cf_save_LIBS"
5606         echo "$as_me:5606: result: $cf_rpath_space" >&5
5607 echo "${ECHO_T}$cf_rpath_space" >&6
5608         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5609         ;;
5610 esac
5611
5612         LOCAL_LDFLAGS=
5613         LOCAL_LDFLAGS2=
5614         LD_SHARED_OPTS=
5615         INSTALL_LIB="-m 644"
5616
5617         cf_cv_do_symlinks=no
5618         cf_ld_rpath_opt=
5619         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5620
5621         echo "$as_me:5621: checking if release/abi version should be used for shared libs" >&5
5622 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5623
5624 # Check whether --with-shlib-version or --without-shlib-version was given.
5625 if test "${with_shlib_version+set}" = set; then
5626   withval="$with_shlib_version"
5627   test -z "$withval" && withval=auto
5628         case $withval in #(vi
5629         yes) #(vi
5630                 cf_cv_shlib_version=auto
5631                 ;;
5632         rel|abi|auto|no) #(vi
5633                 cf_cv_shlib_version=$withval
5634                 ;;
5635         *)
5636                 { { echo "$as_me:5636: error: option value must be one of: rel, abi, auto or no" >&5
5637 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 ;;
5640         esac
5641
5642 else
5643   cf_cv_shlib_version=auto
5644 fi;
5645         echo "$as_me:5645: result: $cf_cv_shlib_version" >&5
5646 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5647
5648         cf_cv_rm_so_locs=no
5649
5650         # Some less-capable ports of gcc support only -fpic
5651         CC_SHARED_OPTS=
5652         if test "$GCC" = yes
5653         then
5654                 echo "$as_me:5654: checking which $CC option to use" >&5
5655 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5656                 cf_save_CFLAGS="$CFLAGS"
5657                 for CC_SHARED_OPTS in -fPIC -fpic ''
5658                 do
5659                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5660                         cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5663 #include <stdio.h>
5664 int
5665 main ()
5666 {
5667 int x = 1
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest.$ac_objext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   break
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 fi
5689 rm -f conftest.$ac_objext conftest.$ac_ext
5690                 done
5691                 echo "$as_me:5691: result: $CC_SHARED_OPTS" >&5
5692 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5693                 CFLAGS="$cf_save_CFLAGS"
5694         fi
5695
5696         cf_cv_shlib_version_infix=no
5697
5698         case $cf_cv_system_name in #(vi
5699         aix4.3-9*|aix[5-7]*) #(vi
5700                 if test "$GCC" = yes; then
5701                         CC_SHARED_OPTS=
5702                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5703                 else
5704                         # CC_SHARED_OPTS='-qpic=large -G'
5705                         # perhaps "-bM:SRE -bnoentry -bexpall"
5706                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5707                 fi
5708                 ;;
5709         beos*) #(vi
5710                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5711                 ;;
5712         cygwin*) #(vi
5713                 CC_SHARED_OPTS=
5714                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5715                 cf_cv_shlib_version=cygdll
5716                 cf_cv_shlib_version_infix=cygdll
5717                 cat >mk_shared_lib.sh <<-CF_EOF
5718                 #!/bin/sh
5719                 SHARED_LIB=\$1
5720                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5721                 shift
5722                 cat <<-EOF
5723                 Linking shared library
5724                 ** SHARED_LIB \$SHARED_LIB
5725                 ** IMPORT_LIB \$IMPORT_LIB
5726 EOF
5727                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5728 CF_EOF
5729                 chmod +x mk_shared_lib.sh
5730                 ;;
5731         darwin*) #(vi
5732                 EXTRA_CFLAGS="-no-cpp-precomp"
5733                 CC_SHARED_OPTS="-dynamic"
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5735                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5736                 cf_cv_shlib_version_infix=yes
5737                 echo "$as_me:5737: checking if ld -search_paths_first works" >&5
5738 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5739 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742
5743                         cf_save_LDFLAGS=$LDFLAGS
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                         cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748
5749 int
5750 main ()
5751 {
5752 int i;
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext conftest$ac_exeext
5758 if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
5759   (eval $ac_link) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ldflags_search_paths_first=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_cv_ldflags_search_paths_first=no
5774 fi
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776                                 LDFLAGS=$cf_save_LDFLAGS
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ldflags_search_paths_first" >&5
5779 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5780                 if test $cf_cv_ldflags_search_paths_first = yes; then
5781                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5782                 fi
5783                 ;;
5784         hpux*) #(vi
5785                 # (tested with gcc 2.7.2 -- I don't have c89)
5786                 if test "$GCC" = yes; then
5787                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5788                 else
5789                         CC_SHARED_OPTS='+Z'
5790                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5791                 fi
5792                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5793                 # HP-UX shared libraries must be executable, and should be
5794                 # readonly to exploit a quirk in the memory manager.
5795                 INSTALL_LIB="-m 555"
5796                 ;;
5797         interix*)
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 if test "$cf_cv_shlib_version" = rel; then
5800                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5801                 else
5802                         cf_shared_soname='`basename `'
5803                 fi
5804                 CC_SHARED_OPTS=
5805                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5806                 ;;
5807         irix*) #(vi
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5810                 fi
5811                 # tested with IRIX 5.2 and 'cc'.
5812                 if test "$GCC" != yes; then
5813                         CC_SHARED_OPTS='-KPIC'
5814                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5815                 else
5816                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5817                 fi
5818                 cf_cv_rm_so_locs=yes
5819                 ;;
5820         linux*|gnu*|k*bsd*-gnu) #(vi
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                 fi
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828
5829         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830         if test "$cf_cv_shlib_version" = rel; then
5831                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5832         else
5833                 cf_cv_shared_soname='`basename $@`'
5834         fi
5835
5836                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5837                 ;;
5838         openbsd[2-9].*|mirbsd*) #(vi
5839                 if test "$DFT_LWR_MODEL" = "shared" ; then
5840                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5841                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5842                 fi
5843                 if test "$cf_cv_enable_rpath" = yes ; then
5844                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5845                 fi
5846                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5847
5848         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5849         if test "$cf_cv_shlib_version" = rel; then
5850                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5851         else
5852                 cf_cv_shared_soname='`basename $@`'
5853         fi
5854
5855                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5856                 ;;
5857         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5858                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5859                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5860                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5861                 ;;
5862         dragonfly*|freebsd*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5865                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5866                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869
5870         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5871         if test "$cf_cv_shlib_version" = rel; then
5872                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5873         else
5874                 cf_cv_shared_soname='`basename $@`'
5875         fi
5876
5877                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5878                 ;;
5879         netbsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                         if test "$cf_cv_shlib_version" = auto; then
5886                         if test -f /usr/libexec/ld.elf_so; then
5887                                 cf_cv_shlib_version=abi
5888                         else
5889                                 cf_cv_shlib_version=rel
5890                         fi
5891                         fi
5892
5893         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5894         if test "$cf_cv_shlib_version" = rel; then
5895                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5896         else
5897                 cf_cv_shared_soname='`basename $@`'
5898         fi
5899
5900                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5901                 else
5902                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5903                 fi
5904                 ;;
5905         osf*|mls+*) #(vi
5906                 # tested with OSF/1 V3.2 and 'cc'
5907                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5908                 # link with shared libs).
5909                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5910                 case $host_os in #(vi
5911                 osf4*)
5912                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5913                         ;;
5914                 esac
5915                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5916                 if test "$DFT_LWR_MODEL" = "shared" ; then
5917                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5918                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5919                 fi
5920                 cf_cv_rm_so_locs=yes
5921                 ;;
5922         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5923                 # tested with osr5.0.5
5924                 if test "$GCC" != yes; then
5925                         CC_SHARED_OPTS='-belf -KPIC'
5926                 fi
5927                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         # only way is to set LD_RUN_PATH but no switch for it
5930                         RUN_PATH=$libdir
5931                 fi
5932                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5933                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5934                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5935                 ;;
5936         sunos4*) #(vi
5937                 # tested with SunOS 4.1.1 and gcc 2.7.0
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                 fi
5941                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5943                 ;;
5944         solaris2*) #(vi
5945                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5946                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5947                 if test "$DFT_LWR_MODEL" = "shared" ; then
5948                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 if test "$GCC" != yes; then
5963                         cf_save_CFLAGS="$CFLAGS"
5964                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5965                         do
5966                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5967                                 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #include <stdio.h>
5971 int
5972 main ()
5973 {
5974 printf("Hello\n");
5975   ;
5976   return 0;
5977 }
5978 _ACEOF
5979 rm -f conftest.$ac_objext
5980 if { (eval echo "$as_me:5980: \"$ac_compile\"") >&5
5981   (eval $ac_compile) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); } &&
5985          { ac_try='test -s conftest.$ac_objext'
5986   { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5987   (eval $ac_try) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); }; }; then
5991   break
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 fi
5996 rm -f conftest.$ac_objext conftest.$ac_ext
5997                         done
5998                         CFLAGS="$cf_save_CFLAGS"
5999                         CC_SHARED_OPTS=$cf_shared_opts
6000                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6001                 else
6002                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6003                 fi
6004                 ;;
6005         sysv5uw7*|unix_sv*) #(vi
6006                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6007                 if test "$GCC" != yes; then
6008                         CC_SHARED_OPTS='-KPIC'
6009                 fi
6010                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6011                 ;;
6012         *)
6013                 CC_SHARED_OPTS='unknown'
6014                 MK_SHARED_LIB='echo unknown'
6015                 ;;
6016         esac
6017
6018         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6019         case "$cf_cv_shlib_version" in #(vi
6020         rel|abi)
6021                 case "$MK_SHARED_LIB" in #(vi
6022                 *'-o $@') #(vi
6023                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6024                         ;;
6025                 *)
6026                         { echo "$as_me:6026: WARNING: ignored --with-shlib-version" >&5
6027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6028                         ;;
6029                 esac
6030                 ;;
6031         esac
6032
6033         # RPATH_LIST is a colon-separated list of directories
6034         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6035         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6036
6037 if test "$CC_SHARED_OPTS" = "unknown"; then
6038         for model in $cf_list_models; do
6039                 if test "$model" = "shared"; then
6040                         { { echo "$as_me:6040: error: Shared libraries are not supported in this version" >&5
6041 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6042    { (exit 1); exit 1; }; }
6043                 fi
6044         done
6045 fi
6046
6047 ### If we're building with rpath, try to link non-standard libs that way too.
6048 if test "$DFT_LWR_MODEL" = "shared"; then
6049
6050 echo "$as_me:6050: checking if rpath-hack should be disabled" >&5
6051 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6052
6053 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6054 if test "${enable_rpath_hack+set}" = set; then
6055   enableval="$enable_rpath_hack"
6056   test "$enableval" != no && enableval=yes
6057   if test "$enableval" != "yes" ; then
6058     cf_disable_rpath_hack=yes
6059   else
6060     cf_disable_rpath_hack=no
6061   fi
6062 else
6063   enableval=yes
6064   cf_disable_rpath_hack=no
6065
6066 fi;
6067 echo "$as_me:6067: result: $cf_disable_rpath_hack" >&5
6068 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6069 if test "$cf_disable_rpath_hack" = no ; then
6070
6071 echo "$as_me:6071: checking for updated LDFLAGS" >&5
6072 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6073 if test -n "$LD_RPATH_OPT" ; then
6074         echo "$as_me:6074: result: maybe" >&5
6075 echo "${ECHO_T}maybe" >&6
6076
6077         for ac_prog in ldd
6078 do
6079   # Extract the first word of "$ac_prog", so it can be a program name with args.
6080 set dummy $ac_prog; ac_word=$2
6081 echo "$as_me:6081: checking for $ac_word" >&5
6082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6083 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6084   echo $ECHO_N "(cached) $ECHO_C" >&6
6085 else
6086   if test -n "$cf_ldd_prog"; then
6087   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6088 else
6089   ac_save_IFS=$IFS; IFS=$ac_path_separator
6090 ac_dummy="$PATH"
6091 for ac_dir in $ac_dummy; do
6092   IFS=$ac_save_IFS
6093   test -z "$ac_dir" && ac_dir=.
6094   $as_executable_p "$ac_dir/$ac_word" || continue
6095 ac_cv_prog_cf_ldd_prog="$ac_prog"
6096 echo "$as_me:6096: found $ac_dir/$ac_word" >&5
6097 break
6098 done
6099
6100 fi
6101 fi
6102 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6103 if test -n "$cf_ldd_prog"; then
6104   echo "$as_me:6104: result: $cf_ldd_prog" >&5
6105 echo "${ECHO_T}$cf_ldd_prog" >&6
6106 else
6107   echo "$as_me:6107: result: no" >&5
6108 echo "${ECHO_T}no" >&6
6109 fi
6110
6111   test -n "$cf_ldd_prog" && break
6112 done
6113 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6114
6115         cf_rpath_list="/usr/lib /lib"
6116         if test "$cf_ldd_prog" != no
6117         then
6118                 cf_rpath_oops=
6119
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main ()
6126 {
6127 printf("Hello");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6145                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152                 # If we passed the link-test, but get a "not found" on a given library,
6153                 # this could be due to inept reconfiguration of gcc to make it only
6154                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6155                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6156                 # /usr/local libraries.
6157                 if test -n "$cf_rpath_oops"
6158                 then
6159                         for cf_rpath_src in $cf_rpath_oops
6160                         do
6161                                 for cf_rpath_dir in \
6162                                         /usr/local \
6163                                         /usr/pkg \
6164                                         /opt/sfw
6165                                 do
6166                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6167                                         then
6168                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6169
6170 echo "${as_me:-configure}:6170: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6171
6172                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6173                                                 break
6174                                         fi
6175                                 done
6176                         done
6177                 fi
6178         fi
6179
6180         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6187
6188 cf_rpath_dst=
6189 for cf_rpath_src in $LDFLAGS
6190 do
6191         case $cf_rpath_src in #(vi
6192         -L*) #(vi
6193
6194                 # check if this refers to a directory which we will ignore
6195                 cf_rpath_skip=no
6196                 if test -n "$cf_rpath_list"
6197                 then
6198                         for cf_rpath_item in $cf_rpath_list
6199                         do
6200                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6201                                 then
6202                                         cf_rpath_skip=yes
6203                                         break
6204                                 fi
6205                         done
6206                 fi
6207
6208                 if test "$cf_rpath_skip" = no
6209                 then
6210                         # transform the option
6211                         if test "$LD_RPATH_OPT" = "-R " ; then
6212                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6213                         else
6214                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6215                         fi
6216
6217                         # if we have not already added this, add it now
6218                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6219                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6220                         then
6221                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6222
6223 echo "${as_me:-configure}:6223: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6224
6225                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6226                         fi
6227                 fi
6228                 ;;
6229         esac
6230         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6231 done
6232 LDFLAGS=$cf_rpath_dst
6233
6234 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LIBS $LIBS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LIBS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LIBS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LIBS $LIBS ..." 1>&5
6291
6292         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6295
6296 fi
6297
6298 fi
6299
6300 fi
6301
6302 ###############################################################################
6303
6304 ###     use option --disable-overwrite to leave out the link to -lcurses
6305 echo "$as_me:6305: checking if you wish to install ncurses overwriting curses" >&5
6306 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6307
6308 # Check whether --enable-overwrite or --disable-overwrite was given.
6309 if test "${enable_overwrite+set}" = set; then
6310   enableval="$enable_overwrite"
6311   with_overwrite=$enableval
6312 else
6313   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6314 fi;
6315 echo "$as_me:6315: result: $with_overwrite" >&5
6316 echo "${ECHO_T}$with_overwrite" >&6
6317
6318 echo "$as_me:6318: checking if external terminfo-database is used" >&5
6319 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6320
6321 # Check whether --enable-database or --disable-database was given.
6322 if test "${enable_database+set}" = set; then
6323   enableval="$enable_database"
6324   use_database=$enableval
6325 else
6326   use_database=yes
6327 fi;
6328 echo "$as_me:6328: result: $use_database" >&5
6329 echo "${ECHO_T}$use_database" >&6
6330
6331 case $host_os in #(vi
6332 os2*) #(vi
6333         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6334         ;;
6335 *) #(vi
6336         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6337         ;;
6338 esac
6339
6340 if test "$use_database" != no ; then
6341         cat >>confdefs.h <<\EOF
6342 #define USE_DATABASE 1
6343 EOF
6344
6345         echo "$as_me:6345: checking which terminfo source-file will be installed" >&5
6346 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6347
6348 # Check whether --with-database or --without-database was given.
6349 if test "${with_database+set}" = set; then
6350   withval="$with_database"
6351   TERMINFO_SRC=$withval
6352 fi;
6353         echo "$as_me:6353: result: $TERMINFO_SRC" >&5
6354 echo "${ECHO_T}$TERMINFO_SRC" >&6
6355
6356         echo "$as_me:6356: checking whether to use hashed database instead of directory/tree" >&5
6357 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6358
6359 # Check whether --with-hashed-db or --without-hashed-db was given.
6360 if test "${with_hashed_db+set}" = set; then
6361   withval="$with_hashed_db"
6362
6363 else
6364   with_hashed_db=no
6365 fi;
6366         echo "$as_me:6366: result: $with_hashed_db" >&5
6367 echo "${ECHO_T}$with_hashed_db" >&6
6368 else
6369         with_hashed_db=no
6370 fi
6371
6372 echo "$as_me:6372: checking for list of fallback descriptions" >&5
6373 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6374
6375 # Check whether --with-fallbacks or --without-fallbacks was given.
6376 if test "${with_fallbacks+set}" = set; then
6377   withval="$with_fallbacks"
6378   with_fallback=$withval
6379 else
6380   with_fallback=
6381 fi;
6382 echo "$as_me:6382: result: $with_fallback" >&5
6383 echo "${ECHO_T}$with_fallback" >&6
6384 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6385
6386 echo "$as_me:6386: checking if you want modern xterm or antique" >&5
6387 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6388
6389 # Check whether --with-xterm-new or --without-xterm-new was given.
6390 if test "${with_xterm_new+set}" = set; then
6391   withval="$with_xterm_new"
6392   with_xterm_new=$withval
6393 else
6394   with_xterm_new=yes
6395 fi;
6396 case $with_xterm_new in
6397 no)     with_xterm_new=xterm-old;;
6398 *)      with_xterm_new=xterm-new;;
6399 esac
6400 echo "$as_me:6400: result: $with_xterm_new" >&5
6401 echo "${ECHO_T}$with_xterm_new" >&6
6402 WHICH_XTERM=$with_xterm_new
6403
6404 MAKE_TERMINFO=
6405 if test "$use_database" = no ; then
6406         TERMINFO="${datadir}/terminfo"
6407         MAKE_TERMINFO="#"
6408 else
6409
6410 echo "$as_me:6410: checking for list of terminfo directories" >&5
6411 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6412
6413         case $cf_cv_system_name in
6414         os2*)   PATH_SEPARATOR=';'  ;;
6415         *)      PATH_SEPARATOR=':'  ;;
6416         esac
6417
6418 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6419 if test "${with_terminfo_dirs+set}" = set; then
6420   withval="$with_terminfo_dirs"
6421
6422 else
6423   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6424 fi;
6425 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6426 cf_dst_path=
6427 for cf_src_path in $withval
6428 do
6429
6430 if test "x$prefix" != xNONE; then
6431   cf_path_syntax="$prefix"
6432 else
6433   cf_path_syntax="$ac_default_prefix"
6434 fi
6435
6436 case ".$cf_src_path" in #(vi
6437 .\$\(*\)*|.\'*\'*) #(vi
6438   ;;
6439 ..|./*|.\\*) #(vi
6440   ;;
6441 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6442   ;;
6443 .\${*prefix}*) #(vi
6444   eval cf_src_path="$cf_src_path"
6445   case ".$cf_src_path" in #(vi
6446   .NONE/*)
6447     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6448     ;;
6449   esac
6450   ;; #(vi
6451 .no|.NONE/*)
6452   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6453   ;;
6454 *)
6455   { { echo "$as_me:6455: error: expected a pathname, not \"$cf_src_path\"" >&5
6456 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6457    { (exit 1); exit 1; }; }
6458   ;;
6459 esac
6460
6461   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6462   cf_dst_path="${cf_dst_path}${cf_src_path}"
6463 done
6464 IFS="$ac_save_ifs"
6465
6466 eval 'TERMINFO_DIRS="$cf_dst_path"'
6467
6468 echo "$as_me:6468: result: $TERMINFO_DIRS" >&5
6469 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6470 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6471 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6472 EOF
6473
6474 echo "$as_me:6474: checking for default terminfo directory" >&5
6475 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6476
6477 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6478 if test "${with_default_terminfo_dir+set}" = set; then
6479   withval="$with_default_terminfo_dir"
6480
6481 else
6482   withval="${TERMINFO:-${datadir}/terminfo}"
6483 fi; if test -n "${datadir}/terminfo" ; then
6484
6485 if test "x$prefix" != xNONE; then
6486   cf_path_syntax="$prefix"
6487 else
6488   cf_path_syntax="$ac_default_prefix"
6489 fi
6490
6491 case ".$withval" in #(vi
6492 .\$\(*\)*|.\'*\'*) #(vi
6493   ;;
6494 ..|./*|.\\*) #(vi
6495   ;;
6496 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6497   ;;
6498 .\${*prefix}*) #(vi
6499   eval withval="$withval"
6500   case ".$withval" in #(vi
6501   .NONE/*)
6502     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6503     ;;
6504   esac
6505   ;; #(vi
6506 .no|.NONE/*)
6507   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6508   ;;
6509 *)
6510   { { echo "$as_me:6510: error: expected a pathname, not \"$withval\"" >&5
6511 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6512    { (exit 1); exit 1; }; }
6513   ;;
6514 esac
6515
6516 fi
6517 TERMINFO="$withval"
6518
6519 echo "$as_me:6519: result: $TERMINFO" >&5
6520 echo "${ECHO_T}$TERMINFO" >&6
6521 cat >>confdefs.h <<EOF
6522 #define TERMINFO "$TERMINFO"
6523 EOF
6524
6525 fi
6526
6527 ###     use option --disable-big-core to make tic run on small machines
6528 ###     We need 4Mb, check if we can allocate 50% more than that.
6529 echo "$as_me:6529: checking if big-core option selected" >&5
6530 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6531
6532 # Check whether --enable-big-core or --disable-big-core was given.
6533 if test "${enable_big_core+set}" = set; then
6534   enableval="$enable_big_core"
6535   with_big_core=$enableval
6536 else
6537   if test "$cross_compiling" = yes; then
6538   with_big_core=no
6539 else
6540   cat >conftest.$ac_ext <<_ACEOF
6541 #line 6541 "configure"
6542 #include "confdefs.h"
6543
6544 #include <stdlib.h>
6545 #include <string.h>
6546 int main() {
6547         unsigned long n = 6000000L;
6548         char *s = malloc(n);
6549         if (s != 0)
6550                 s[0] = s[n-1] = 0;
6551         ${cf_cv_main_return:-return}(s == 0);
6552 }
6553 _ACEOF
6554 rm -f conftest$ac_exeext
6555 if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
6556   (eval $ac_link) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6560   { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6561   (eval $ac_try) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); }; }; then
6565   with_big_core=yes
6566 else
6567   echo "$as_me: program exited with status $ac_status" >&5
6568 echo "$as_me: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 with_big_core=no
6571 fi
6572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6573 fi
6574 fi;
6575 echo "$as_me:6575: result: $with_big_core" >&5
6576 echo "${ECHO_T}$with_big_core" >&6
6577 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6578 #define HAVE_BIG_CORE 1
6579 EOF
6580
6581 ### ISO C only guarantees 512-char strings, we have tables which load faster
6582 ### when constructed using "big" strings.  More than the C compiler, the awk
6583 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6584 echo "$as_me:6584: checking if big-strings option selected" >&5
6585 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6586
6587 # Check whether --enable-big-strings or --disable-big-strings was given.
6588 if test "${enable_big_strings+set}" = set; then
6589   enableval="$enable_big_strings"
6590   with_big_strings=$enableval
6591 else
6592
6593         case x$AWK in #(vi
6594         x)
6595                 eval with_big_strings=no
6596                 ;;
6597         *) #(vi
6598                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6599                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6600                         eval with_big_strings=yes
6601                 else
6602                         eval with_big_strings=no
6603                 fi
6604                 ;;
6605         esac
6606
6607 fi;
6608 echo "$as_me:6608: result: $with_big_strings" >&5
6609 echo "${ECHO_T}$with_big_strings" >&6
6610
6611 USE_BIG_STRINGS=0
6612 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6613
6614 ###     use option --enable-termcap to compile in the termcap fallback support
6615 echo "$as_me:6615: checking if you want termcap-fallback support" >&5
6616 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6617
6618 # Check whether --enable-termcap or --disable-termcap was given.
6619 if test "${enable_termcap+set}" = set; then
6620   enableval="$enable_termcap"
6621   with_termcap=$enableval
6622 else
6623   with_termcap=no
6624 fi;
6625 echo "$as_me:6625: result: $with_termcap" >&5
6626 echo "${ECHO_T}$with_termcap" >&6
6627
6628 if test "$with_termcap" != "yes" ; then
6629         if test "$use_database" = no ; then
6630                 if test -z "$with_fallback" ; then
6631                         { { echo "$as_me:6631: error: You have disabled the database w/o specifying fallbacks" >&5
6632 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6633    { (exit 1); exit 1; }; }
6634                 fi
6635         fi
6636         cat >>confdefs.h <<\EOF
6637 #define PURE_TERMINFO 1
6638 EOF
6639
6640 else
6641
6642 if test "$with_ticlib" != no ; then
6643         { { echo "$as_me:6643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6644 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6645    { (exit 1); exit 1; }; }
6646 fi
6647
6648 cat >>confdefs.h <<\EOF
6649 #define USE_TERMCAP 1
6650 EOF
6651
6652 echo "$as_me:6652: checking for list of termcap files" >&5
6653 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6654
6655 # Check whether --with-termpath or --without-termpath was given.
6656 if test "${with_termpath+set}" = set; then
6657   withval="$with_termpath"
6658
6659 else
6660   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6661 fi;
6662 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6663 cf_dst_path=
6664 for cf_src_path in $withval
6665 do
6666
6667 if test "x$prefix" != xNONE; then
6668   cf_path_syntax="$prefix"
6669 else
6670   cf_path_syntax="$ac_default_prefix"
6671 fi
6672
6673 case ".$cf_src_path" in #(vi
6674 .\$\(*\)*|.\'*\'*) #(vi
6675   ;;
6676 ..|./*|.\\*) #(vi
6677   ;;
6678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6679   ;;
6680 .\${*prefix}*) #(vi
6681   eval cf_src_path="$cf_src_path"
6682   case ".$cf_src_path" in #(vi
6683   .NONE/*)
6684     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6685     ;;
6686   esac
6687   ;; #(vi
6688 .no|.NONE/*)
6689   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6690   ;;
6691 *)
6692   { { echo "$as_me:6692: error: expected a pathname, not \"$cf_src_path\"" >&5
6693 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6694    { (exit 1); exit 1; }; }
6695   ;;
6696 esac
6697
6698   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6699   cf_dst_path="${cf_dst_path}${cf_src_path}"
6700 done
6701 IFS="$ac_save_ifs"
6702
6703 eval 'TERMPATH="$cf_dst_path"'
6704
6705 echo "$as_me:6705: result: $TERMPATH" >&5
6706 echo "${ECHO_T}$TERMPATH" >&6
6707 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6708 #define TERMPATH "$TERMPATH"
6709 EOF
6710
6711 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6712 echo "$as_me:6712: checking if fast termcap-loader is needed" >&5
6713 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6714
6715 # Check whether --enable-getcap or --disable-getcap was given.
6716 if test "${enable_getcap+set}" = set; then
6717   enableval="$enable_getcap"
6718   with_getcap=$enableval
6719 else
6720   with_getcap=no
6721 fi;
6722 echo "$as_me:6722: result: $with_getcap" >&5
6723 echo "${ECHO_T}$with_getcap" >&6
6724 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6725 #define USE_GETCAP 1
6726 EOF
6727
6728 echo "$as_me:6728: checking if translated termcaps will be cached in ~/.terminfo" >&5
6729 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6730
6731 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6732 if test "${enable_getcap_cache+set}" = set; then
6733   enableval="$enable_getcap_cache"
6734   with_getcap_cache=$enableval
6735 else
6736   with_getcap_cache=no
6737 fi;
6738 echo "$as_me:6738: result: $with_getcap_cache" >&5
6739 echo "${ECHO_T}$with_getcap_cache" >&6
6740 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6741 #define USE_GETCAP_CACHE 1
6742 EOF
6743
6744 fi
6745
6746 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6747 echo "$as_me:6747: checking if ~/.terminfo is wanted" >&5
6748 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6749
6750 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6751 if test "${enable_home_terminfo+set}" = set; then
6752   enableval="$enable_home_terminfo"
6753   with_home_terminfo=$enableval
6754 else
6755   with_home_terminfo=yes
6756 fi;
6757 echo "$as_me:6757: result: $with_home_terminfo" >&5
6758 echo "${ECHO_T}$with_home_terminfo" >&6
6759 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6760 #define USE_HOME_TERMINFO 1
6761 EOF
6762
6763 echo "$as_me:6763: checking if you want to use restricted environment when running as root" >&5
6764 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6765
6766 # Check whether --enable-root-environ or --disable-root-environ was given.
6767 if test "${enable_root_environ+set}" = set; then
6768   enableval="$enable_root_environ"
6769   with_root_environ=$enableval
6770 else
6771   with_root_environ=yes
6772 fi;
6773 echo "$as_me:6773: result: $with_root_environ" >&5
6774 echo "${ECHO_T}$with_root_environ" >&6
6775 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6776 #define USE_ROOT_ENVIRON 1
6777 EOF
6778
6779 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6780 ###   to reduce storage requirements for the terminfo database.
6781
6782 for ac_func in \
6783         remove \
6784         unlink
6785 do
6786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6787 echo "$as_me:6787: checking for $ac_func" >&5
6788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6789 if eval "test \"\${$as_ac_var+set}\" = set"; then
6790   echo $ECHO_N "(cached) $ECHO_C" >&6
6791 else
6792   cat >conftest.$ac_ext <<_ACEOF
6793 #line 6793 "configure"
6794 #include "confdefs.h"
6795 /* System header to define __stub macros and hopefully few prototypes,
6796     which can conflict with char $ac_func (); below.  */
6797 #include <assert.h>
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 #ifdef __cplusplus
6800 extern "C"
6801 #endif
6802 /* We use char because int might match the return type of a gcc2
6803    builtin and then its argument prototype would still apply.  */
6804 char $ac_func ();
6805 char (*f) ();
6806
6807 int
6808 main ()
6809 {
6810 /* The GNU C library defines this for functions which it implements
6811     to always fail with ENOSYS.  Some functions are actually named
6812     something starting with __ and the normal name is an alias.  */
6813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6814 choke me
6815 #else
6816 f = $ac_func;
6817 #endif
6818
6819   ;
6820   return 0;
6821 }
6822 _ACEOF
6823 rm -f conftest.$ac_objext conftest$ac_exeext
6824 if { (eval echo "$as_me:6824: \"$ac_link\"") >&5
6825   (eval $ac_link) 2>&5
6826   ac_status=$?
6827   echo "$as_me:6827: \$? = $ac_status" >&5
6828   (exit $ac_status); } &&
6829          { ac_try='test -s conftest$ac_exeext'
6830   { (eval echo "$as_me:6830: \"$ac_try\"") >&5
6831   (eval $ac_try) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); }; }; then
6835   eval "$as_ac_var=yes"
6836 else
6837   echo "$as_me: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 eval "$as_ac_var=no"
6840 fi
6841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6842 fi
6843 echo "$as_me:6843: result: `eval echo '${'$as_ac_var'}'`" >&5
6844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6845 if test `eval echo '${'$as_ac_var'}'` = yes; then
6846   cat >>confdefs.h <<EOF
6847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6848 EOF
6849
6850 fi
6851 done
6852
6853 if test "$cross_compiling" = yes ; then
6854
6855 for ac_func in \
6856                 link \
6857                 symlink
6858 do
6859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6860 echo "$as_me:6860: checking for $ac_func" >&5
6861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6862 if eval "test \"\${$as_ac_var+set}\" = set"; then
6863   echo $ECHO_N "(cached) $ECHO_C" >&6
6864 else
6865   cat >conftest.$ac_ext <<_ACEOF
6866 #line 6866 "configure"
6867 #include "confdefs.h"
6868 /* System header to define __stub macros and hopefully few prototypes,
6869     which can conflict with char $ac_func (); below.  */
6870 #include <assert.h>
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 #ifdef __cplusplus
6873 extern "C"
6874 #endif
6875 /* We use char because int might match the return type of a gcc2
6876    builtin and then its argument prototype would still apply.  */
6877 char $ac_func ();
6878 char (*f) ();
6879
6880 int
6881 main ()
6882 {
6883 /* The GNU C library defines this for functions which it implements
6884     to always fail with ENOSYS.  Some functions are actually named
6885     something starting with __ and the normal name is an alias.  */
6886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6887 choke me
6888 #else
6889 f = $ac_func;
6890 #endif
6891
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   eval "$as_ac_var=yes"
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 eval "$as_ac_var=no"
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 fi
6916 echo "$as_me:6916: result: `eval echo '${'$as_ac_var'}'`" >&5
6917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6918 if test `eval echo '${'$as_ac_var'}'` = yes; then
6919   cat >>confdefs.h <<EOF
6920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 EOF
6922
6923 fi
6924 done
6925
6926 else
6927         echo "$as_me:6927: checking if link/symlink functions work" >&5
6928 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6929 if test "${cf_cv_link_funcs+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932
6933                 cf_cv_link_funcs=
6934                 for cf_func in link symlink ; do
6935                         if test "$cross_compiling" = yes; then
6936
6937                         eval 'ac_cv_func_'$cf_func'=error'
6938 else
6939   cat >conftest.$ac_ext <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6942
6943 #include <sys/types.h>
6944 #include <sys/stat.h>
6945 #ifdef HAVE_UNISTD_H
6946 #include <unistd.h>
6947 #endif
6948 int main()
6949 {
6950         int fail = 0;
6951         char *src = "config.log";
6952         char *dst = "conftest.chk";
6953         struct stat src_sb;
6954         struct stat dst_sb;
6955
6956         stat(src, &src_sb);
6957         fail = ($cf_func("config.log", "conftest.chk") < 0)
6958             || (stat(dst, &dst_sb) < 0)
6959             || (dst_sb.st_mtime != src_sb.st_mtime);
6960 #ifdef HAVE_UNLINK
6961         unlink(dst);
6962 #else
6963         remove(dst);
6964 #endif
6965         ${cf_cv_main_return:-return} (fail);
6966 }
6967
6968 _ACEOF
6969 rm -f conftest$ac_exeext
6970 if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
6971   (eval $ac_link) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6975   { (eval echo "$as_me:6975: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980
6981                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6982                         eval 'ac_cv_func_'$cf_func'=yes'
6983 else
6984   echo "$as_me: program exited with status $ac_status" >&5
6985 echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987
6988                         eval 'ac_cv_func_'$cf_func'=no'
6989 fi
6990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6991 fi
6992                 done
6993                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_link_funcs" >&5
6997 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6998         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6999 #define HAVE_LINK 1
7000 EOF
7001
7002         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7003 #define HAVE_SYMLINK 1
7004 EOF
7005
7006 fi
7007
7008 with_links=no
7009 with_symlinks=no
7010
7011 # soft links (symbolic links) are useful for some systems where hard links do
7012 # not work, or to make it simpler to copy terminfo trees around.
7013 if test "$ac_cv_func_symlink" = yes ; then
7014     echo "$as_me:7014: checking if tic should use symbolic links" >&5
7015 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7016
7017 # Check whether --enable-symlinks or --disable-symlinks was given.
7018 if test "${enable_symlinks+set}" = set; then
7019   enableval="$enable_symlinks"
7020   with_symlinks=$enableval
7021 else
7022   with_symlinks=no
7023 fi;
7024     echo "$as_me:7024: result: $with_symlinks" >&5
7025 echo "${ECHO_T}$with_symlinks" >&6
7026 fi
7027
7028 # If we have hard links and did not choose to use soft links instead, there is
7029 # no reason to make this choice optional - use the hard links.
7030 if test "$with_symlinks" = no ; then
7031     echo "$as_me:7031: checking if tic should use hard links" >&5
7032 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7033     if test "$ac_cv_func_link" = yes ; then
7034         with_links=yes
7035     else
7036         with_links=no
7037     fi
7038     echo "$as_me:7038: result: $with_links" >&5
7039 echo "${ECHO_T}$with_links" >&6
7040 fi
7041
7042 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7043 #define USE_LINKS 1
7044 EOF
7045
7046 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7047 #define USE_SYMLINKS 1
7048 EOF
7049
7050 ###   use option --enable-broken-linker to force on use of broken-linker support
7051 echo "$as_me:7051: checking if you want broken-linker support code" >&5
7052 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7053
7054 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7055 if test "${enable_broken_linker+set}" = set; then
7056   enableval="$enable_broken_linker"
7057   with_broken_linker=$enableval
7058 else
7059   with_broken_linker=${BROKEN_LINKER:-no}
7060 fi;
7061 echo "$as_me:7061: result: $with_broken_linker" >&5
7062 echo "${ECHO_T}$with_broken_linker" >&6
7063
7064 BROKEN_LINKER=0
7065 if test "$with_broken_linker" = yes ; then
7066         cat >>confdefs.h <<\EOF
7067 #define BROKEN_LINKER 1
7068 EOF
7069
7070         BROKEN_LINKER=1
7071 elif test "$DFT_LWR_MODEL" = shared ; then
7072         case $cf_cv_system_name in #(vi
7073         cygwin*)
7074                 cat >>confdefs.h <<\EOF
7075 #define BROKEN_LINKER 1
7076 EOF
7077
7078                 BROKEN_LINKER=1
7079                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7080
7081 echo "${as_me:-configure}:7081: testing cygwin linker is broken anyway ..." 1>&5
7082
7083                 ;;
7084         esac
7085 fi
7086
7087 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7088 echo "$as_me:7088: checking if tputs should process BSD-style prefix padding" >&5
7089 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7090
7091 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7092 if test "${enable_bsdpad+set}" = set; then
7093   enableval="$enable_bsdpad"
7094   with_bsdpad=$enableval
7095 else
7096   with_bsdpad=no
7097 fi;
7098 echo "$as_me:7098: result: $with_bsdpad" >&5
7099 echo "${ECHO_T}$with_bsdpad" >&6
7100 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7101 #define BSD_TPUTS 1
7102 EOF
7103
7104 ###   use option --enable-widec to turn on use of wide-character support
7105 NCURSES_CH_T=chtype
7106 NCURSES_LIBUTF8=0
7107
7108 NEED_WCHAR_H=0
7109 NCURSES_MBSTATE_T=0
7110 NCURSES_WCHAR_T=0
7111 NCURSES_WINT_T=0
7112
7113 # Check to define _XOPEN_SOURCE "automatically"
7114
7115 cf_XOPEN_SOURCE=500
7116 cf_POSIX_C_SOURCE=199506L
7117 cf_xopen_source=
7118
7119 case $host_os in #(vi
7120 aix[4-7]*) #(vi
7121         cf_xopen_source="-D_ALL_SOURCE"
7122         ;;
7123 cygwin) #(vi
7124         cf_XOPEN_SOURCE=600
7125         ;;
7126 darwin[0-8].*) #(vi
7127         cf_xopen_source="-D_APPLE_C_SOURCE"
7128         ;;
7129 darwin*) #(vi
7130         cf_xopen_source="-D_DARWIN_C_SOURCE"
7131         cf_XOPEN_SOURCE=
7132         ;;
7133 freebsd*|dragonfly*) #(vi
7134         # 5.x headers associate
7135         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7136         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7137         cf_POSIX_C_SOURCE=200112L
7138         cf_XOPEN_SOURCE=600
7139         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7140         ;;
7141 hpux11*) #(vi
7142         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7143         ;;
7144 hpux*) #(vi
7145         cf_xopen_source="-D_HPUX_SOURCE"
7146         ;;
7147 irix[56].*) #(vi
7148         cf_xopen_source="-D_SGI_SOURCE"
7149         cf_XOPEN_SOURCE=
7150         ;;
7151 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7152
7153 echo "$as_me:7153: checking if we must define _GNU_SOURCE" >&5
7154 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7155 if test "${cf_cv_gnu_source+set}" = set; then
7156   echo $ECHO_N "(cached) $ECHO_C" >&6
7157 else
7158
7159 cat >conftest.$ac_ext <<_ACEOF
7160 #line 7160 "configure"
7161 #include "confdefs.h"
7162 #include <sys/types.h>
7163 int
7164 main ()
7165 {
7166
7167 #ifndef _XOPEN_SOURCE
7168 make an error
7169 #endif
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 rm -f conftest.$ac_objext
7175 if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5
7176   (eval $ac_compile) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit $ac_status); } &&
7180          { ac_try='test -s conftest.$ac_objext'
7181   { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit $ac_status); }; }; then
7186   cf_cv_gnu_source=no
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7190 cf_save="$CPPFLAGS"
7191          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7192          cat >conftest.$ac_ext <<_ACEOF
7193 #line 7193 "configure"
7194 #include "confdefs.h"
7195 #include <sys/types.h>
7196 int
7197 main ()
7198 {
7199
7200 #ifdef _XOPEN_SOURCE
7201 make an error
7202 #endif
7203   ;
7204   return 0;
7205 }
7206 _ACEOF
7207 rm -f conftest.$ac_objext
7208 if { (eval echo "$as_me:7208: \"$ac_compile\"") >&5
7209   (eval $ac_compile) 2>&5
7210   ac_status=$?
7211   echo "$as_me:7211: \$? = $ac_status" >&5
7212   (exit $ac_status); } &&
7213          { ac_try='test -s conftest.$ac_objext'
7214   { (eval echo "$as_me:7214: \"$ac_try\"") >&5
7215   (eval $ac_try) 2>&5
7216   ac_status=$?
7217   echo "$as_me:7217: \$? = $ac_status" >&5
7218   (exit $ac_status); }; }; then
7219   cf_cv_gnu_source=no
7220 else
7221   echo "$as_me: failed program was:" >&5
7222 cat conftest.$ac_ext >&5
7223 cf_cv_gnu_source=yes
7224 fi
7225 rm -f conftest.$ac_objext conftest.$ac_ext
7226         CPPFLAGS="$cf_save"
7227
7228 fi
7229 rm -f conftest.$ac_objext conftest.$ac_ext
7230
7231 fi
7232 echo "$as_me:7232: result: $cf_cv_gnu_source" >&5
7233 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7234 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7235
7236         ;;
7237 mirbsd*) #(vi
7238         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7239         cf_XOPEN_SOURCE=
7240
7241 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7242
7243 cf_save_CFLAGS="$CFLAGS"
7244 cf_save_CPPFLAGS="$CPPFLAGS"
7245
7246 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7247         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7248                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7249
7250 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7251         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7252                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7253
7254 echo "$as_me:7254: checking if we should define _POSIX_C_SOURCE" >&5
7255 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7256 if test "${cf_cv_posix_c_source+set}" = set; then
7257   echo $ECHO_N "(cached) $ECHO_C" >&6
7258 else
7259
7260 echo "${as_me:-configure}:7260: testing if the symbol is already defined go no further ..." 1>&5
7261
7262         cat >conftest.$ac_ext <<_ACEOF
7263 #line 7263 "configure"
7264 #include "confdefs.h"
7265 #include <sys/types.h>
7266 int
7267 main ()
7268 {
7269
7270 #ifndef _POSIX_C_SOURCE
7271 make an error
7272 #endif
7273   ;
7274   return 0;
7275 }
7276 _ACEOF
7277 rm -f conftest.$ac_objext
7278 if { (eval echo "$as_me:7278: \"$ac_compile\"") >&5
7279   (eval $ac_compile) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -s conftest.$ac_objext'
7284   { (eval echo "$as_me:7284: \"$ac_try\"") >&5
7285   (eval $ac_try) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); }; }; then
7289   cf_cv_posix_c_source=no
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293 cf_want_posix_source=no
7294          case .$cf_POSIX_C_SOURCE in #(vi
7295          .[12]??*) #(vi
7296                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7297                 ;;
7298          .2) #(vi
7299                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7300                 cf_want_posix_source=yes
7301                 ;;
7302          .*)
7303                 cf_want_posix_source=yes
7304                 ;;
7305          esac
7306          if test "$cf_want_posix_source" = yes ; then
7307                 cat >conftest.$ac_ext <<_ACEOF
7308 #line 7308 "configure"
7309 #include "confdefs.h"
7310 #include <sys/types.h>
7311 int
7312 main ()
7313 {
7314
7315 #ifdef _POSIX_SOURCE
7316 make an error
7317 #endif
7318   ;
7319   return 0;
7320 }
7321 _ACEOF
7322 rm -f conftest.$ac_objext
7323 if { (eval echo "$as_me:7323: \"$ac_compile\"") >&5
7324   (eval $ac_compile) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); } &&
7328          { ac_try='test -s conftest.$ac_objext'
7329   { (eval echo "$as_me:7329: \"$ac_try\"") >&5
7330   (eval $ac_try) 2>&5
7331   ac_status=$?
7332   echo "$as_me:7332: \$? = $ac_status" >&5
7333   (exit $ac_status); }; }; then
7334   :
7335 else
7336   echo "$as_me: failed program was:" >&5
7337 cat conftest.$ac_ext >&5
7338 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7339 fi
7340 rm -f conftest.$ac_objext conftest.$ac_ext
7341          fi
7342
7343 echo "${as_me:-configure}:7343: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7344
7345          CFLAGS="$cf_trim_CFLAGS"
7346          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7347
7348 echo "${as_me:-configure}:7348: testing if the second compile does not leave our definition intact error ..." 1>&5
7349
7350          cat >conftest.$ac_ext <<_ACEOF
7351 #line 7351 "configure"
7352 #include "confdefs.h"
7353 #include <sys/types.h>
7354 int
7355 main ()
7356 {
7357
7358 #ifndef _POSIX_C_SOURCE
7359 make an error
7360 #endif
7361   ;
7362   return 0;
7363 }
7364 _ACEOF
7365 rm -f conftest.$ac_objext
7366 if { (eval echo "$as_me:7366: \"$ac_compile\"") >&5
7367   (eval $ac_compile) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit $ac_status); } &&
7371          { ac_try='test -s conftest.$ac_objext'
7372   { (eval echo "$as_me:7372: \"$ac_try\"") >&5
7373   (eval $ac_try) 2>&5
7374   ac_status=$?
7375   echo "$as_me:7375: \$? = $ac_status" >&5
7376   (exit $ac_status); }; }; then
7377   :
7378 else
7379   echo "$as_me: failed program was:" >&5
7380 cat conftest.$ac_ext >&5
7381 cf_cv_posix_c_source=no
7382 fi
7383 rm -f conftest.$ac_objext conftest.$ac_ext
7384          CFLAGS="$cf_save_CFLAGS"
7385          CPPFLAGS="$cf_save_CPPFLAGS"
7386
7387 fi
7388 rm -f conftest.$ac_objext conftest.$ac_ext
7389
7390 fi
7391 echo "$as_me:7391: result: $cf_cv_posix_c_source" >&5
7392 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7393
7394 if test "$cf_cv_posix_c_source" != no ; then
7395         CFLAGS="$cf_trim_CFLAGS"
7396         CPPFLAGS="$cf_trim_CPPFLAGS"
7397
7398 cf_fix_cppflags=no
7399 cf_new_cflags=
7400 cf_new_cppflags=
7401 cf_new_extra_cppflags=
7402
7403 for cf_add_cflags in $cf_cv_posix_c_source
7404 do
7405 case $cf_fix_cppflags in
7406 no)
7407         case $cf_add_cflags in #(vi
7408         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7409                 case $cf_add_cflags in
7410                 -D*)
7411                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7412
7413                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7414                                 && test -z "${cf_tst_cflags}" \
7415                                 && cf_fix_cppflags=yes
7416
7417                         if test $cf_fix_cppflags = yes ; then
7418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7419                                 continue
7420                         elif test "${cf_tst_cflags}" = "\"'" ; then
7421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7422                                 continue
7423                         fi
7424                         ;;
7425                 esac
7426                 case "$CPPFLAGS" in
7427                 *$cf_add_cflags) #(vi
7428                         ;;
7429                 *) #(vi
7430                         case $cf_add_cflags in #(vi
7431                         -D*)
7432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7433
7434 CPPFLAGS=`echo "$CPPFLAGS" | \
7435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7437
7438                                 ;;
7439                         esac
7440                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7441                         ;;
7442                 esac
7443                 ;;
7444         *)
7445                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7446                 ;;
7447         esac
7448         ;;
7449 yes)
7450         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7451
7452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7453
7454         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7455                 && test -z "${cf_tst_cflags}" \
7456                 && cf_fix_cppflags=no
7457         ;;
7458 esac
7459 done
7460
7461 if test -n "$cf_new_cflags" ; then
7462
7463         CFLAGS="$CFLAGS $cf_new_cflags"
7464 fi
7465
7466 if test -n "$cf_new_cppflags" ; then
7467
7468         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7469 fi
7470
7471 if test -n "$cf_new_extra_cppflags" ; then
7472
7473         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7474 fi
7475
7476 fi
7477
7478         ;;
7479 netbsd*) #(vi
7480         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7481         ;;
7482 openbsd[4-9]*) #(vi
7483         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7484         cf_xopen_source="-D_BSD_SOURCE"
7485         cf_XOPEN_SOURCE=600
7486         ;;
7487 openbsd*) #(vi
7488         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7489         ;;
7490 osf[45]*) #(vi
7491         cf_xopen_source="-D_OSF_SOURCE"
7492         ;;
7493 nto-qnx*) #(vi
7494         cf_xopen_source="-D_QNX_SOURCE"
7495         ;;
7496 sco*) #(vi
7497         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7498         ;;
7499 solaris2.*) #(vi
7500         cf_xopen_source="-D__EXTENSIONS__"
7501         ;;
7502 *)
7503
7504 echo "$as_me:7504: checking if we should define _XOPEN_SOURCE" >&5
7505 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7506 if test "${cf_cv_xopen_source+set}" = set; then
7507   echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509
7510         cat >conftest.$ac_ext <<_ACEOF
7511 #line 7511 "configure"
7512 #include "confdefs.h"
7513
7514 #include <stdlib.h>
7515 #include <string.h>
7516 #include <sys/types.h>
7517
7518 int
7519 main ()
7520 {
7521
7522 #ifndef _XOPEN_SOURCE
7523 make an error
7524 #endif
7525   ;
7526   return 0;
7527 }
7528 _ACEOF
7529 rm -f conftest.$ac_objext
7530 if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5
7531   (eval $ac_compile) 2>&5
7532   ac_status=$?
7533   echo "$as_me:7533: \$? = $ac_status" >&5
7534   (exit $ac_status); } &&
7535          { ac_try='test -s conftest.$ac_objext'
7536   { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7537   (eval $ac_try) 2>&5
7538   ac_status=$?
7539   echo "$as_me:7539: \$? = $ac_status" >&5
7540   (exit $ac_status); }; }; then
7541   cf_cv_xopen_source=no
7542 else
7543   echo "$as_me: failed program was:" >&5
7544 cat conftest.$ac_ext >&5
7545 cf_save="$CPPFLAGS"
7546          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7547          cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550
7551 #include <stdlib.h>
7552 #include <string.h>
7553 #include <sys/types.h>
7554
7555 int
7556 main ()
7557 {
7558
7559 #ifdef _XOPEN_SOURCE
7560 make an error
7561 #endif
7562   ;
7563   return 0;
7564 }
7565 _ACEOF
7566 rm -f conftest.$ac_objext
7567 if { (eval echo "$as_me:7567: \"$ac_compile\"") >&5
7568   (eval $ac_compile) 2>&5
7569   ac_status=$?
7570   echo "$as_me:7570: \$? = $ac_status" >&5
7571   (exit $ac_status); } &&
7572          { ac_try='test -s conftest.$ac_objext'
7573   { (eval echo "$as_me:7573: \"$ac_try\"") >&5
7574   (eval $ac_try) 2>&5
7575   ac_status=$?
7576   echo "$as_me:7576: \$? = $ac_status" >&5
7577   (exit $ac_status); }; }; then
7578   cf_cv_xopen_source=no
7579 else
7580   echo "$as_me: failed program was:" >&5
7581 cat conftest.$ac_ext >&5
7582 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7583 fi
7584 rm -f conftest.$ac_objext conftest.$ac_ext
7585         CPPFLAGS="$cf_save"
7586
7587 fi
7588 rm -f conftest.$ac_objext conftest.$ac_ext
7589
7590 fi
7591 echo "$as_me:7591: result: $cf_cv_xopen_source" >&5
7592 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7593
7594 if test "$cf_cv_xopen_source" != no ; then
7595
7596 CFLAGS=`echo "$CFLAGS" | \
7597         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7598                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7599
7600 CPPFLAGS=`echo "$CPPFLAGS" | \
7601         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7602                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7603
7604         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7605
7606 cf_fix_cppflags=no
7607 cf_new_cflags=
7608 cf_new_cppflags=
7609 cf_new_extra_cppflags=
7610
7611 for cf_add_cflags in $cf_temp_xopen_source
7612 do
7613 case $cf_fix_cppflags in
7614 no)
7615         case $cf_add_cflags in #(vi
7616         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7617                 case $cf_add_cflags in
7618                 -D*)
7619                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7620
7621                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7622                                 && test -z "${cf_tst_cflags}" \
7623                                 && cf_fix_cppflags=yes
7624
7625                         if test $cf_fix_cppflags = yes ; then
7626                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7627                                 continue
7628                         elif test "${cf_tst_cflags}" = "\"'" ; then
7629                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7630                                 continue
7631                         fi
7632                         ;;
7633                 esac
7634                 case "$CPPFLAGS" in
7635                 *$cf_add_cflags) #(vi
7636                         ;;
7637                 *) #(vi
7638                         case $cf_add_cflags in #(vi
7639                         -D*)
7640                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7641
7642 CPPFLAGS=`echo "$CPPFLAGS" | \
7643         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7644                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7645
7646                                 ;;
7647                         esac
7648                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7649                         ;;
7650                 esac
7651                 ;;
7652         *)
7653                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7654                 ;;
7655         esac
7656         ;;
7657 yes)
7658         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7659
7660         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7661
7662         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7663                 && test -z "${cf_tst_cflags}" \
7664                 && cf_fix_cppflags=no
7665         ;;
7666 esac
7667 done
7668
7669 if test -n "$cf_new_cflags" ; then
7670
7671         CFLAGS="$CFLAGS $cf_new_cflags"
7672 fi
7673
7674 if test -n "$cf_new_cppflags" ; then
7675
7676         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7677 fi
7678
7679 if test -n "$cf_new_extra_cppflags" ; then
7680
7681         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7682 fi
7683
7684 fi
7685
7686 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7687
7688 cf_save_CFLAGS="$CFLAGS"
7689 cf_save_CPPFLAGS="$CPPFLAGS"
7690
7691 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7692         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7693                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7694
7695 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7696         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7697                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7698
7699 echo "$as_me:7699: checking if we should define _POSIX_C_SOURCE" >&5
7700 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7701 if test "${cf_cv_posix_c_source+set}" = set; then
7702   echo $ECHO_N "(cached) $ECHO_C" >&6
7703 else
7704
7705 echo "${as_me:-configure}:7705: testing if the symbol is already defined go no further ..." 1>&5
7706
7707         cat >conftest.$ac_ext <<_ACEOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710 #include <sys/types.h>
7711 int
7712 main ()
7713 {
7714
7715 #ifndef _POSIX_C_SOURCE
7716 make an error
7717 #endif
7718   ;
7719   return 0;
7720 }
7721 _ACEOF
7722 rm -f conftest.$ac_objext
7723 if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
7724   (eval $ac_compile) 2>&5
7725   ac_status=$?
7726   echo "$as_me:7726: \$? = $ac_status" >&5
7727   (exit $ac_status); } &&
7728          { ac_try='test -s conftest.$ac_objext'
7729   { (eval echo "$as_me:7729: \"$ac_try\"") >&5
7730   (eval $ac_try) 2>&5
7731   ac_status=$?
7732   echo "$as_me:7732: \$? = $ac_status" >&5
7733   (exit $ac_status); }; }; then
7734   cf_cv_posix_c_source=no
7735 else
7736   echo "$as_me: failed program was:" >&5
7737 cat conftest.$ac_ext >&5
7738 cf_want_posix_source=no
7739          case .$cf_POSIX_C_SOURCE in #(vi
7740          .[12]??*) #(vi
7741                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7742                 ;;
7743          .2) #(vi
7744                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7745                 cf_want_posix_source=yes
7746                 ;;
7747          .*)
7748                 cf_want_posix_source=yes
7749                 ;;
7750          esac
7751          if test "$cf_want_posix_source" = yes ; then
7752                 cat >conftest.$ac_ext <<_ACEOF
7753 #line 7753 "configure"
7754 #include "confdefs.h"
7755 #include <sys/types.h>
7756 int
7757 main ()
7758 {
7759
7760 #ifdef _POSIX_SOURCE
7761 make an error
7762 #endif
7763   ;
7764   return 0;
7765 }
7766 _ACEOF
7767 rm -f conftest.$ac_objext
7768 if { (eval echo "$as_me:7768: \"$ac_compile\"") >&5
7769   (eval $ac_compile) 2>&5
7770   ac_status=$?
7771   echo "$as_me:7771: \$? = $ac_status" >&5
7772   (exit $ac_status); } &&
7773          { ac_try='test -s conftest.$ac_objext'
7774   { (eval echo "$as_me:7774: \"$ac_try\"") >&5
7775   (eval $ac_try) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit $ac_status); }; }; then
7779   :
7780 else
7781   echo "$as_me: failed program was:" >&5
7782 cat conftest.$ac_ext >&5
7783 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7784 fi
7785 rm -f conftest.$ac_objext conftest.$ac_ext
7786          fi
7787
7788 echo "${as_me:-configure}:7788: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7789
7790          CFLAGS="$cf_trim_CFLAGS"
7791          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7792
7793 echo "${as_me:-configure}:7793: testing if the second compile does not leave our definition intact error ..." 1>&5
7794
7795          cat >conftest.$ac_ext <<_ACEOF
7796 #line 7796 "configure"
7797 #include "confdefs.h"
7798 #include <sys/types.h>
7799 int
7800 main ()
7801 {
7802
7803 #ifndef _POSIX_C_SOURCE
7804 make an error
7805 #endif
7806   ;
7807   return 0;
7808 }
7809 _ACEOF
7810 rm -f conftest.$ac_objext
7811 if { (eval echo "$as_me:7811: \"$ac_compile\"") >&5
7812   (eval $ac_compile) 2>&5
7813   ac_status=$?
7814   echo "$as_me:7814: \$? = $ac_status" >&5
7815   (exit $ac_status); } &&
7816          { ac_try='test -s conftest.$ac_objext'
7817   { (eval echo "$as_me:7817: \"$ac_try\"") >&5
7818   (eval $ac_try) 2>&5
7819   ac_status=$?
7820   echo "$as_me:7820: \$? = $ac_status" >&5
7821   (exit $ac_status); }; }; then
7822   :
7823 else
7824   echo "$as_me: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
7826 cf_cv_posix_c_source=no
7827 fi
7828 rm -f conftest.$ac_objext conftest.$ac_ext
7829          CFLAGS="$cf_save_CFLAGS"
7830          CPPFLAGS="$cf_save_CPPFLAGS"
7831
7832 fi
7833 rm -f conftest.$ac_objext conftest.$ac_ext
7834
7835 fi
7836 echo "$as_me:7836: result: $cf_cv_posix_c_source" >&5
7837 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7838
7839 if test "$cf_cv_posix_c_source" != no ; then
7840         CFLAGS="$cf_trim_CFLAGS"
7841         CPPFLAGS="$cf_trim_CPPFLAGS"
7842
7843 cf_fix_cppflags=no
7844 cf_new_cflags=
7845 cf_new_cppflags=
7846 cf_new_extra_cppflags=
7847
7848 for cf_add_cflags in $cf_cv_posix_c_source
7849 do
7850 case $cf_fix_cppflags in
7851 no)
7852         case $cf_add_cflags in #(vi
7853         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7854                 case $cf_add_cflags in
7855                 -D*)
7856                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7857
7858                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7859                                 && test -z "${cf_tst_cflags}" \
7860                                 && cf_fix_cppflags=yes
7861
7862                         if test $cf_fix_cppflags = yes ; then
7863                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7864                                 continue
7865                         elif test "${cf_tst_cflags}" = "\"'" ; then
7866                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7867                                 continue
7868                         fi
7869                         ;;
7870                 esac
7871                 case "$CPPFLAGS" in
7872                 *$cf_add_cflags) #(vi
7873                         ;;
7874                 *) #(vi
7875                         case $cf_add_cflags in #(vi
7876                         -D*)
7877                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7878
7879 CPPFLAGS=`echo "$CPPFLAGS" | \
7880         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7881                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7882
7883                                 ;;
7884                         esac
7885                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7886                         ;;
7887                 esac
7888                 ;;
7889         *)
7890                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7891                 ;;
7892         esac
7893         ;;
7894 yes)
7895         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7896
7897         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7898
7899         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7900                 && test -z "${cf_tst_cflags}" \
7901                 && cf_fix_cppflags=no
7902         ;;
7903 esac
7904 done
7905
7906 if test -n "$cf_new_cflags" ; then
7907
7908         CFLAGS="$CFLAGS $cf_new_cflags"
7909 fi
7910
7911 if test -n "$cf_new_cppflags" ; then
7912
7913         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7914 fi
7915
7916 if test -n "$cf_new_extra_cppflags" ; then
7917
7918         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7919 fi
7920
7921 fi
7922
7923         ;;
7924 esac
7925
7926 if test -n "$cf_xopen_source" ; then
7927
7928 cf_fix_cppflags=no
7929 cf_new_cflags=
7930 cf_new_cppflags=
7931 cf_new_extra_cppflags=
7932
7933 for cf_add_cflags in $cf_xopen_source
7934 do
7935 case $cf_fix_cppflags in
7936 no)
7937         case $cf_add_cflags in #(vi
7938         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7939                 case $cf_add_cflags in
7940                 -D*)
7941                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7942
7943                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7944                                 && test -z "${cf_tst_cflags}" \
7945                                 && cf_fix_cppflags=yes
7946
7947                         if test $cf_fix_cppflags = yes ; then
7948                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7949                                 continue
7950                         elif test "${cf_tst_cflags}" = "\"'" ; then
7951                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7952                                 continue
7953                         fi
7954                         ;;
7955                 esac
7956                 case "$CPPFLAGS" in
7957                 *$cf_add_cflags) #(vi
7958                         ;;
7959                 *) #(vi
7960                         case $cf_add_cflags in #(vi
7961                         -D*)
7962                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7963
7964 CPPFLAGS=`echo "$CPPFLAGS" | \
7965         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7966                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7967
7968                                 ;;
7969                         esac
7970                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7971                         ;;
7972                 esac
7973                 ;;
7974         *)
7975                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7976                 ;;
7977         esac
7978         ;;
7979 yes)
7980         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7981
7982         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7983
7984         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7985                 && test -z "${cf_tst_cflags}" \
7986                 && cf_fix_cppflags=no
7987         ;;
7988 esac
7989 done
7990
7991 if test -n "$cf_new_cflags" ; then
7992
7993         CFLAGS="$CFLAGS $cf_new_cflags"
7994 fi
7995
7996 if test -n "$cf_new_cppflags" ; then
7997
7998         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7999 fi
8000
8001 if test -n "$cf_new_extra_cppflags" ; then
8002
8003         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8004 fi
8005
8006 fi
8007
8008 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8009         echo "$as_me:8009: checking if _XOPEN_SOURCE really is set" >&5
8010 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8011         cat >conftest.$ac_ext <<_ACEOF
8012 #line 8012 "configure"
8013 #include "confdefs.h"
8014 #include <stdlib.h>
8015 int
8016 main ()
8017 {
8018
8019 #ifndef _XOPEN_SOURCE
8020 make an error
8021 #endif
8022   ;
8023   return 0;
8024 }
8025 _ACEOF
8026 rm -f conftest.$ac_objext
8027 if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
8028   (eval $ac_compile) 2>&5
8029   ac_status=$?
8030   echo "$as_me:8030: \$? = $ac_status" >&5
8031   (exit $ac_status); } &&
8032          { ac_try='test -s conftest.$ac_objext'
8033   { (eval echo "$as_me:8033: \"$ac_try\"") >&5
8034   (eval $ac_try) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit $ac_status); }; }; then
8038   cf_XOPEN_SOURCE_set=yes
8039 else
8040   echo "$as_me: failed program was:" >&5
8041 cat conftest.$ac_ext >&5
8042 cf_XOPEN_SOURCE_set=no
8043 fi
8044 rm -f conftest.$ac_objext conftest.$ac_ext
8045         echo "$as_me:8045: result: $cf_XOPEN_SOURCE_set" >&5
8046 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8047         if test $cf_XOPEN_SOURCE_set = yes
8048         then
8049                 cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <stdlib.h>
8053 int
8054 main ()
8055 {
8056
8057 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8058 make an error
8059 #endif
8060   ;
8061   return 0;
8062 }
8063 _ACEOF
8064 rm -f conftest.$ac_objext
8065 if { (eval echo "$as_me:8065: \"$ac_compile\"") >&5
8066   (eval $ac_compile) 2>&5
8067   ac_status=$?
8068   echo "$as_me:8068: \$? = $ac_status" >&5
8069   (exit $ac_status); } &&
8070          { ac_try='test -s conftest.$ac_objext'
8071   { (eval echo "$as_me:8071: \"$ac_try\"") >&5
8072   (eval $ac_try) 2>&5
8073   ac_status=$?
8074   echo "$as_me:8074: \$? = $ac_status" >&5
8075   (exit $ac_status); }; }; then
8076   cf_XOPEN_SOURCE_set_ok=yes
8077 else
8078   echo "$as_me: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 cf_XOPEN_SOURCE_set_ok=no
8081 fi
8082 rm -f conftest.$ac_objext conftest.$ac_ext
8083                 if test $cf_XOPEN_SOURCE_set_ok = no
8084                 then
8085                         { echo "$as_me:8085: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8086 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8087                 fi
8088         else
8089
8090 echo "$as_me:8090: checking if we should define _XOPEN_SOURCE" >&5
8091 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8092 if test "${cf_cv_xopen_source+set}" = set; then
8093   echo $ECHO_N "(cached) $ECHO_C" >&6
8094 else
8095
8096         cat >conftest.$ac_ext <<_ACEOF
8097 #line 8097 "configure"
8098 #include "confdefs.h"
8099
8100 #include <stdlib.h>
8101 #include <string.h>
8102 #include <sys/types.h>
8103
8104 int
8105 main ()
8106 {
8107
8108 #ifndef _XOPEN_SOURCE
8109 make an error
8110 #endif
8111   ;
8112   return 0;
8113 }
8114 _ACEOF
8115 rm -f conftest.$ac_objext
8116 if { (eval echo "$as_me:8116: \"$ac_compile\"") >&5
8117   (eval $ac_compile) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); } &&
8121          { ac_try='test -s conftest.$ac_objext'
8122   { (eval echo "$as_me:8122: \"$ac_try\"") >&5
8123   (eval $ac_try) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit $ac_status); }; }; then
8127   cf_cv_xopen_source=no
8128 else
8129   echo "$as_me: failed program was:" >&5
8130 cat conftest.$ac_ext >&5
8131 cf_save="$CPPFLAGS"
8132          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8133          cat >conftest.$ac_ext <<_ACEOF
8134 #line 8134 "configure"
8135 #include "confdefs.h"
8136
8137 #include <stdlib.h>
8138 #include <string.h>
8139 #include <sys/types.h>
8140
8141 int
8142 main ()
8143 {
8144
8145 #ifdef _XOPEN_SOURCE
8146 make an error
8147 #endif
8148   ;
8149   return 0;
8150 }
8151 _ACEOF
8152 rm -f conftest.$ac_objext
8153 if { (eval echo "$as_me:8153: \"$ac_compile\"") >&5
8154   (eval $ac_compile) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); } &&
8158          { ac_try='test -s conftest.$ac_objext'
8159   { (eval echo "$as_me:8159: \"$ac_try\"") >&5
8160   (eval $ac_try) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); }; }; then
8164   cf_cv_xopen_source=no
8165 else
8166   echo "$as_me: failed program was:" >&5
8167 cat conftest.$ac_ext >&5
8168 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8169 fi
8170 rm -f conftest.$ac_objext conftest.$ac_ext
8171         CPPFLAGS="$cf_save"
8172
8173 fi
8174 rm -f conftest.$ac_objext conftest.$ac_ext
8175
8176 fi
8177 echo "$as_me:8177: result: $cf_cv_xopen_source" >&5
8178 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8179
8180 if test "$cf_cv_xopen_source" != no ; then
8181
8182 CFLAGS=`echo "$CFLAGS" | \
8183         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8184                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8185
8186 CPPFLAGS=`echo "$CPPFLAGS" | \
8187         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8188                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8189
8190         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8191
8192 cf_fix_cppflags=no
8193 cf_new_cflags=
8194 cf_new_cppflags=
8195 cf_new_extra_cppflags=
8196
8197 for cf_add_cflags in $cf_temp_xopen_source
8198 do
8199 case $cf_fix_cppflags in
8200 no)
8201         case $cf_add_cflags in #(vi
8202         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8203                 case $cf_add_cflags in
8204                 -D*)
8205                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8206
8207                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8208                                 && test -z "${cf_tst_cflags}" \
8209                                 && cf_fix_cppflags=yes
8210
8211                         if test $cf_fix_cppflags = yes ; then
8212                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8213                                 continue
8214                         elif test "${cf_tst_cflags}" = "\"'" ; then
8215                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8216                                 continue
8217                         fi
8218                         ;;
8219                 esac
8220                 case "$CPPFLAGS" in
8221                 *$cf_add_cflags) #(vi
8222                         ;;
8223                 *) #(vi
8224                         case $cf_add_cflags in #(vi
8225                         -D*)
8226                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8227
8228 CPPFLAGS=`echo "$CPPFLAGS" | \
8229         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8230                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8231
8232                                 ;;
8233                         esac
8234                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8235                         ;;
8236                 esac
8237                 ;;
8238         *)
8239                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8240                 ;;
8241         esac
8242         ;;
8243 yes)
8244         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8245
8246         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8247
8248         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8249                 && test -z "${cf_tst_cflags}" \
8250                 && cf_fix_cppflags=no
8251         ;;
8252 esac
8253 done
8254
8255 if test -n "$cf_new_cflags" ; then
8256
8257         CFLAGS="$CFLAGS $cf_new_cflags"
8258 fi
8259
8260 if test -n "$cf_new_cppflags" ; then
8261
8262         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8263 fi
8264
8265 if test -n "$cf_new_extra_cppflags" ; then
8266
8267         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8268 fi
8269
8270 fi
8271
8272         fi
8273 fi
8274
8275 # Work around breakage on OS X
8276
8277 echo "$as_me:8277: checking if SIGWINCH is defined" >&5
8278 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8279 if test "${cf_cv_define_sigwinch+set}" = set; then
8280   echo $ECHO_N "(cached) $ECHO_C" >&6
8281 else
8282
8283         cat >conftest.$ac_ext <<_ACEOF
8284 #line 8284 "configure"
8285 #include "confdefs.h"
8286
8287 #include <sys/types.h>
8288 #include <sys/signal.h>
8289
8290 int
8291 main ()
8292 {
8293 int x = SIGWINCH
8294   ;
8295   return 0;
8296 }
8297 _ACEOF
8298 rm -f conftest.$ac_objext
8299 if { (eval echo "$as_me:8299: \"$ac_compile\"") >&5
8300   (eval $ac_compile) 2>&5
8301   ac_status=$?
8302   echo "$as_me:8302: \$? = $ac_status" >&5
8303   (exit $ac_status); } &&
8304          { ac_try='test -s conftest.$ac_objext'
8305   { (eval echo "$as_me:8305: \"$ac_try\"") >&5
8306   (eval $ac_try) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit $ac_status); }; }; then
8310   cf_cv_define_sigwinch=yes
8311 else
8312   echo "$as_me: failed program was:" >&5
8313 cat conftest.$ac_ext >&5
8314 cat >conftest.$ac_ext <<_ACEOF
8315 #line 8315 "configure"
8316 #include "confdefs.h"
8317
8318 #undef _XOPEN_SOURCE
8319 #undef _POSIX_SOURCE
8320 #undef _POSIX_C_SOURCE
8321 #include <sys/types.h>
8322 #include <sys/signal.h>
8323
8324 int
8325 main ()
8326 {
8327 int x = SIGWINCH
8328   ;
8329   return 0;
8330 }
8331 _ACEOF
8332 rm -f conftest.$ac_objext
8333 if { (eval echo "$as_me:8333: \"$ac_compile\"") >&5
8334   (eval $ac_compile) 2>&5
8335   ac_status=$?
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit $ac_status); } &&
8338          { ac_try='test -s conftest.$ac_objext'
8339   { (eval echo "$as_me:8339: \"$ac_try\"") >&5
8340   (eval $ac_try) 2>&5
8341   ac_status=$?
8342   echo "$as_me:8342: \$? = $ac_status" >&5
8343   (exit $ac_status); }; }; then
8344   cf_cv_define_sigwinch=maybe
8345 else
8346   echo "$as_me: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8348 cf_cv_define_sigwinch=no
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351
8352 fi
8353 rm -f conftest.$ac_objext conftest.$ac_ext
8354
8355 fi
8356 echo "$as_me:8356: result: $cf_cv_define_sigwinch" >&5
8357 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8358
8359 if test "$cf_cv_define_sigwinch" = maybe ; then
8360 echo "$as_me:8360: checking for actual SIGWINCH definition" >&5
8361 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8362 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8363   echo $ECHO_N "(cached) $ECHO_C" >&6
8364 else
8365
8366 cf_cv_fixup_sigwinch=unknown
8367 cf_sigwinch=32
8368 while test $cf_sigwinch != 1
8369 do
8370         cat >conftest.$ac_ext <<_ACEOF
8371 #line 8371 "configure"
8372 #include "confdefs.h"
8373
8374 #undef _XOPEN_SOURCE
8375 #undef _POSIX_SOURCE
8376 #undef _POSIX_C_SOURCE
8377 #include <sys/types.h>
8378 #include <sys/signal.h>
8379
8380 int
8381 main ()
8382 {
8383
8384 #if SIGWINCH != $cf_sigwinch
8385 make an error
8386 #endif
8387 int x = SIGWINCH
8388   ;
8389   return 0;
8390 }
8391 _ACEOF
8392 rm -f conftest.$ac_objext
8393 if { (eval echo "$as_me:8393: \"$ac_compile\"") >&5
8394   (eval $ac_compile) 2>&5
8395   ac_status=$?
8396   echo "$as_me:8396: \$? = $ac_status" >&5
8397   (exit $ac_status); } &&
8398          { ac_try='test -s conftest.$ac_objext'
8399   { (eval echo "$as_me:8399: \"$ac_try\"") >&5
8400   (eval $ac_try) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit $ac_status); }; }; then
8404   cf_cv_fixup_sigwinch=$cf_sigwinch
8405          break
8406 else
8407   echo "$as_me: failed program was:" >&5
8408 cat conftest.$ac_ext >&5
8409 fi
8410 rm -f conftest.$ac_objext conftest.$ac_ext
8411
8412 cf_sigwinch=`expr $cf_sigwinch - 1`
8413 done
8414
8415 fi
8416 echo "$as_me:8416: result: $cf_cv_fixup_sigwinch" >&5
8417 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8418
8419         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8420                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8421         fi
8422 fi
8423
8424 # Checks for CODESET support.
8425
8426   echo "$as_me:8426: checking for nl_langinfo and CODESET" >&5
8427 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8428 if test "${am_cv_langinfo_codeset+set}" = set; then
8429   echo $ECHO_N "(cached) $ECHO_C" >&6
8430 else
8431   cat >conftest.$ac_ext <<_ACEOF
8432 #line 8432 "configure"
8433 #include "confdefs.h"
8434 #include <langinfo.h>
8435 int
8436 main ()
8437 {
8438 char* cs = nl_langinfo(CODESET);
8439   ;
8440   return 0;
8441 }
8442 _ACEOF
8443 rm -f conftest.$ac_objext conftest$ac_exeext
8444 if { (eval echo "$as_me:8444: \"$ac_link\"") >&5
8445   (eval $ac_link) 2>&5
8446   ac_status=$?
8447   echo "$as_me:8447: \$? = $ac_status" >&5
8448   (exit $ac_status); } &&
8449          { ac_try='test -s conftest$ac_exeext'
8450   { (eval echo "$as_me:8450: \"$ac_try\"") >&5
8451   (eval $ac_try) 2>&5
8452   ac_status=$?
8453   echo "$as_me:8453: \$? = $ac_status" >&5
8454   (exit $ac_status); }; }; then
8455   am_cv_langinfo_codeset=yes
8456 else
8457   echo "$as_me: failed program was:" >&5
8458 cat conftest.$ac_ext >&5
8459 am_cv_langinfo_codeset=no
8460 fi
8461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8462
8463 fi
8464 echo "$as_me:8464: result: $am_cv_langinfo_codeset" >&5
8465 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8466   if test $am_cv_langinfo_codeset = yes; then
8467
8468 cat >>confdefs.h <<\EOF
8469 #define HAVE_LANGINFO_CODESET 1
8470 EOF
8471
8472   fi
8473
8474 # use these variables to work around a defect in gcc's fixincludes.
8475 NCURSES_OK_WCHAR_T=
8476 NCURSES_OK_WINT_T=
8477
8478 echo "$as_me:8478: checking if you want wide-character code" >&5
8479 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8480
8481 # Check whether --enable-widec or --disable-widec was given.
8482 if test "${enable_widec+set}" = set; then
8483   enableval="$enable_widec"
8484   with_widec=$enableval
8485 else
8486   with_widec=no
8487 fi;
8488 echo "$as_me:8488: result: $with_widec" >&5
8489 echo "${ECHO_T}$with_widec" >&6
8490 if test "$with_widec" = yes ; then
8491         LIB_SUFFIX="w${LIB_SUFFIX}"
8492         cat >>confdefs.h <<\EOF
8493 #define USE_WIDEC_SUPPORT 1
8494 EOF
8495
8496         cat >>confdefs.h <<\EOF
8497 #define NCURSES_WIDECHAR 1
8498 EOF
8499
8500 echo "$as_me:8500: checking if wchar.h can be used as is" >&5
8501 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8502 if test "${cf_cv_wchar_h_okay+set}" = set; then
8503   echo $ECHO_N "(cached) $ECHO_C" >&6
8504 else
8505
8506 cat >conftest.$ac_ext <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8509
8510 #include <stdlib.h>
8511 #include <wchar.h>
8512
8513 int
8514 main ()
8515 {
8516
8517         wint_t foo = 0;
8518         int bar = iswpunct(foo)
8519   ;
8520   return 0;
8521 }
8522 _ACEOF
8523 rm -f conftest.$ac_objext
8524 if { (eval echo "$as_me:8524: \"$ac_compile\"") >&5
8525   (eval $ac_compile) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); } &&
8529          { ac_try='test -s conftest.$ac_objext'
8530   { (eval echo "$as_me:8530: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   cf_cv_wchar_h_okay=yes
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 cat conftest.$ac_ext >&5
8539 cf_cv_wchar_h_okay=no
8540 fi
8541 rm -f conftest.$ac_objext conftest.$ac_ext
8542 fi
8543 echo "$as_me:8543: result: $cf_cv_wchar_h_okay" >&5
8544 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8545
8546 if test $cf_cv_wchar_h_okay = no
8547 then
8548
8549 echo "$as_me:8549: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8550 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8551 cat >conftest.$ac_ext <<_ACEOF
8552 #line 8552 "configure"
8553 #include "confdefs.h"
8554 #include <sys/types.h>
8555
8556 int
8557 main ()
8558 {
8559
8560 #ifndef _XOPEN_SOURCE_EXTENDED
8561 make an error
8562 #endif
8563   ;
8564   return 0;
8565 }
8566 _ACEOF
8567 rm -f conftest.$ac_objext
8568 if { (eval echo "$as_me:8568: \"$ac_compile\"") >&5
8569   (eval $ac_compile) 2>&5
8570   ac_status=$?
8571   echo "$as_me:8571: \$? = $ac_status" >&5
8572   (exit $ac_status); } &&
8573          { ac_try='test -s conftest.$ac_objext'
8574   { (eval echo "$as_me:8574: \"$ac_try\"") >&5
8575   (eval $ac_try) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); }; }; then
8579   cf_result=no
8580 else
8581   echo "$as_me: failed program was:" >&5
8582 cat conftest.$ac_ext >&5
8583 cf_result=yes
8584 fi
8585 rm -f conftest.$ac_objext conftest.$ac_ext
8586 echo "$as_me:8586: result: $cf_result" >&5
8587 echo "${ECHO_T}$cf_result" >&6
8588
8589 if test "$cf_result" = yes ; then
8590         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8591 elif test "x" != "x" ; then
8592         echo "$as_me:8592: checking checking for compatible value versus " >&5
8593 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8594         cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597 #include <sys/types.h>
8598
8599 int
8600 main ()
8601 {
8602
8603 #if _XOPEN_SOURCE_EXTENDED- < 0
8604 make an error
8605 #endif
8606   ;
8607   return 0;
8608 }
8609 _ACEOF
8610 rm -f conftest.$ac_objext
8611 if { (eval echo "$as_me:8611: \"$ac_compile\"") >&5
8612   (eval $ac_compile) 2>&5
8613   ac_status=$?
8614   echo "$as_me:8614: \$? = $ac_status" >&5
8615   (exit $ac_status); } &&
8616          { ac_try='test -s conftest.$ac_objext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622   cf_result=yes
8623 else
8624   echo "$as_me: failed program was:" >&5
8625 cat conftest.$ac_ext >&5
8626 cf_result=no
8627 fi
8628 rm -f conftest.$ac_objext conftest.$ac_ext
8629         echo "$as_me:8629: result: $cf_result" >&5
8630 echo "${ECHO_T}$cf_result" >&6
8631         if test "$cf_result" = no ; then
8632                 # perhaps we can override it - try...
8633                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8634         fi
8635 fi
8636
8637 fi
8638
8639         # with_overwrite=no
8640         NCURSES_CH_T=cchar_t
8641
8642 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8643 do
8644 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8645 echo "$as_me:8645: checking for $ac_func" >&5
8646 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8647 if eval "test \"\${$as_ac_var+set}\" = set"; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650   cat >conftest.$ac_ext <<_ACEOF
8651 #line 8651 "configure"
8652 #include "confdefs.h"
8653 /* System header to define __stub macros and hopefully few prototypes,
8654     which can conflict with char $ac_func (); below.  */
8655 #include <assert.h>
8656 /* Override any gcc2 internal prototype to avoid an error.  */
8657 #ifdef __cplusplus
8658 extern "C"
8659 #endif
8660 /* We use char because int might match the return type of a gcc2
8661    builtin and then its argument prototype would still apply.  */
8662 char $ac_func ();
8663 char (*f) ();
8664
8665 int
8666 main ()
8667 {
8668 /* The GNU C library defines this for functions which it implements
8669     to always fail with ENOSYS.  Some functions are actually named
8670     something starting with __ and the normal name is an alias.  */
8671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8672 choke me
8673 #else
8674 f = $ac_func;
8675 #endif
8676
8677   ;
8678   return 0;
8679 }
8680 _ACEOF
8681 rm -f conftest.$ac_objext conftest$ac_exeext
8682 if { (eval echo "$as_me:8682: \"$ac_link\"") >&5
8683   (eval $ac_link) 2>&5
8684   ac_status=$?
8685   echo "$as_me:8685: \$? = $ac_status" >&5
8686   (exit $ac_status); } &&
8687          { ac_try='test -s conftest$ac_exeext'
8688   { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); }; }; then
8693   eval "$as_ac_var=yes"
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 eval "$as_ac_var=no"
8698 fi
8699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8700 fi
8701 echo "$as_me:8701: result: `eval echo '${'$as_ac_var'}'`" >&5
8702 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8703 if test `eval echo '${'$as_ac_var'}'` = yes; then
8704   cat >>confdefs.h <<EOF
8705 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8706 EOF
8707
8708 fi
8709 done
8710
8711         if test "$ac_cv_func_putwc" != yes ; then
8712
8713 echo "$as_me:8713: checking for multibyte character support" >&5
8714 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8715 if test "${cf_cv_utf8_lib+set}" = set; then
8716   echo $ECHO_N "(cached) $ECHO_C" >&6
8717 else
8718
8719         cf_save_LIBS="$LIBS"
8720         cat >conftest.$ac_ext <<_ACEOF
8721 #line 8721 "configure"
8722 #include "confdefs.h"
8723
8724 #include <stdlib.h>
8725 int
8726 main ()
8727 {
8728 putwc(0,0);
8729   ;
8730   return 0;
8731 }
8732 _ACEOF
8733 rm -f conftest.$ac_objext conftest$ac_exeext
8734 if { (eval echo "$as_me:8734: \"$ac_link\"") >&5
8735   (eval $ac_link) 2>&5
8736   ac_status=$?
8737   echo "$as_me:8737: \$? = $ac_status" >&5
8738   (exit $ac_status); } &&
8739          { ac_try='test -s conftest$ac_exeext'
8740   { (eval echo "$as_me:8740: \"$ac_try\"") >&5
8741   (eval $ac_try) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); }; }; then
8745   cf_cv_utf8_lib=yes
8746 else
8747   echo "$as_me: failed program was:" >&5
8748 cat conftest.$ac_ext >&5
8749
8750 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8751 # will be set on completion of the AC_TRY_LINK below.
8752 cf_cv_header_path_utf8=
8753 cf_cv_library_path_utf8=
8754
8755 echo "${as_me:-configure}:8755: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8756
8757 cf_save_LIBS="$LIBS"
8758
8759 cat >conftest.$ac_ext <<_ACEOF
8760 #line 8760 "configure"
8761 #include "confdefs.h"
8762
8763 #include <libutf8.h>
8764 int
8765 main ()
8766 {
8767 putwc(0,0);
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext conftest$ac_exeext
8773 if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
8774   (eval $ac_link) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -s conftest$ac_exeext'
8779   { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784
8785         cf_cv_find_linkage_utf8=yes
8786         cf_cv_header_path_utf8=/usr/include
8787         cf_cv_library_path_utf8=/usr/lib
8788
8789 else
8790   echo "$as_me: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8792
8793 LIBS="-lutf8  $cf_save_LIBS"
8794
8795 cat >conftest.$ac_ext <<_ACEOF
8796 #line 8796 "configure"
8797 #include "confdefs.h"
8798
8799 #include <libutf8.h>
8800 int
8801 main ()
8802 {
8803 putwc(0,0);
8804   ;
8805   return 0;
8806 }
8807 _ACEOF
8808 rm -f conftest.$ac_objext conftest$ac_exeext
8809 if { (eval echo "$as_me:8809: \"$ac_link\"") >&5
8810   (eval $ac_link) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); } &&
8814          { ac_try='test -s conftest$ac_exeext'
8815   { (eval echo "$as_me:8815: \"$ac_try\"") >&5
8816   (eval $ac_try) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); }; }; then
8820
8821         cf_cv_find_linkage_utf8=yes
8822         cf_cv_header_path_utf8=/usr/include
8823         cf_cv_library_path_utf8=/usr/lib
8824         cf_cv_library_file_utf8="-lutf8"
8825
8826 else
8827   echo "$as_me: failed program was:" >&5
8828 cat conftest.$ac_ext >&5
8829
8830         cf_cv_find_linkage_utf8=no
8831         LIBS="$cf_save_LIBS"
8832
8833     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8834
8835 echo "${as_me:-configure}:8835: testing find linkage for utf8 library ..." 1>&5
8836
8837 echo "${as_me:-configure}:8837: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8838
8839     cf_save_CPPFLAGS="$CPPFLAGS"
8840     cf_test_CPPFLAGS="$CPPFLAGS"
8841
8842 cf_search=
8843
8844 # collect the current set of include-directories from compiler flags
8845 cf_header_path_list=""
8846 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8847         for cf_header_path in $CPPFLAGS $CFLAGS
8848         do
8849                 case $cf_header_path in #(vi
8850                 -I*)
8851                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8852
8853 test "$cf_header_path" != "NONE" && \
8854 test -d "$cf_header_path" && \
8855  {
8856         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8857         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8858         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8859         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8860         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8861         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8862 }
8863
8864                         cf_header_path_list="$cf_header_path_list $cf_search"
8865                         ;;
8866                 esac
8867         done
8868 fi
8869
8870 # add the variations for the package we are looking for
8871
8872 cf_search=
8873
8874 test "/usr" != "$prefix" && \
8875 test -d "/usr" && \
8876 (test $prefix = NONE || test "/usr" != "$prefix") && {
8877         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8878         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8879         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8880         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8881         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8882         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8883 }
8884
8885 test "$prefix" != "NONE" && \
8886 test -d "$prefix" && \
8887  {
8888         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8889         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8890         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8891         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8892         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8893         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8894 }
8895
8896 test "/usr/local" != "$prefix" && \
8897 test -d "/usr/local" && \
8898 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8899         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8900         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8901         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8902         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8903         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8904         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8905 }
8906
8907 test "/opt" != "$prefix" && \
8908 test -d "/opt" && \
8909 (test $prefix = NONE || test "/opt" != "$prefix") && {
8910         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8911         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8912         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8913         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8914         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8915         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8916 }
8917
8918 test "$HOME" != "$prefix" && \
8919 test -d "$HOME" && \
8920 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8921         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8922         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8923         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8924         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8925         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8926         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8927 }
8928
8929 test "$includedir" != NONE && \
8930 test "$includedir" != "/usr/include" && \
8931 test -d "$includedir" && {
8932         test -d $includedir &&    cf_search="$cf_search $includedir"
8933         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8934 }
8935
8936 test "$oldincludedir" != NONE && \
8937 test "$oldincludedir" != "/usr/include" && \
8938 test -d "$oldincludedir" && {
8939         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8940         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8941 }
8942
8943 cf_search="$cf_search $cf_header_path_list"
8944
8945     for cf_cv_header_path_utf8 in $cf_search
8946     do
8947       if test -d $cf_cv_header_path_utf8 ; then
8948         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8949
8950 echo "${as_me:-configure}:8950: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8951
8952         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8953         cat >conftest.$ac_ext <<_ACEOF
8954 #line 8954 "configure"
8955 #include "confdefs.h"
8956
8957 #include <libutf8.h>
8958 int
8959 main ()
8960 {
8961 putwc(0,0);
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest.$ac_objext'
8973   { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978
8979             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8980
8981 echo "${as_me:-configure}:8981: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8982
8983             cf_cv_find_linkage_utf8=maybe
8984             cf_test_CPPFLAGS="$CPPFLAGS"
8985             break
8986 else
8987   echo "$as_me: failed program was:" >&5
8988 cat conftest.$ac_ext >&5
8989
8990             CPPFLAGS="$cf_save_CPPFLAGS"
8991
8992 fi
8993 rm -f conftest.$ac_objext conftest.$ac_ext
8994       fi
8995     done
8996
8997     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8998
8999 echo "${as_me:-configure}:8999: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9000
9001       cf_save_LIBS="$LIBS"
9002       cf_save_LDFLAGS="$LDFLAGS"
9003
9004       if test "$cf_cv_find_linkage_utf8" != yes ; then
9005
9006 cf_search=
9007 cf_library_path_list=""
9008 if test -n "${LDFLAGS}${LIBS}" ; then
9009         for cf_library_path in $LDFLAGS $LIBS
9010         do
9011                 case $cf_library_path in #(vi
9012                 -L*)
9013                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9014
9015 test "$cf_library_path" != "NONE" && \
9016 test -d "$cf_library_path" && \
9017  {
9018         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9019         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9020         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9021         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9022         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9023         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9024 }
9025
9026                         cf_library_path_list="$cf_library_path_list $cf_search"
9027                         ;;
9028                 esac
9029         done
9030 fi
9031
9032 cf_search=
9033
9034 test "/usr" != "$prefix" && \
9035 test -d "/usr" && \
9036 (test $prefix = NONE || test "/usr" != "$prefix") && {
9037         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9038         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9039         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9040         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9041         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9042         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9043 }
9044
9045 test "$prefix" != "NONE" && \
9046 test -d "$prefix" && \
9047  {
9048         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9049         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9050         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9051         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9052         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9053         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9054 }
9055
9056 test "/usr/local" != "$prefix" && \
9057 test -d "/usr/local" && \
9058 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9059         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9060         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9061         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9062         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9063         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9064         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9065 }
9066
9067 test "/opt" != "$prefix" && \
9068 test -d "/opt" && \
9069 (test $prefix = NONE || test "/opt" != "$prefix") && {
9070         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9071         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9072         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9073         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9074         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9075         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9076 }
9077
9078 test "$HOME" != "$prefix" && \
9079 test -d "$HOME" && \
9080 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9081         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9082         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9083         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9084         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9085         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9086         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9087 }
9088
9089 cf_search="$cf_library_path_list $cf_search"
9090
9091         for cf_cv_library_path_utf8 in $cf_search
9092         do
9093           if test -d $cf_cv_library_path_utf8 ; then
9094             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9095
9096 echo "${as_me:-configure}:9096: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9097
9098             CPPFLAGS="$cf_test_CPPFLAGS"
9099             LIBS="-lutf8  $cf_save_LIBS"
9100             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9101             cat >conftest.$ac_ext <<_ACEOF
9102 #line 9102 "configure"
9103 #include "confdefs.h"
9104
9105 #include <libutf8.h>
9106 int
9107 main ()
9108 {
9109 putwc(0,0);
9110   ;
9111   return 0;
9112 }
9113 _ACEOF
9114 rm -f conftest.$ac_objext conftest$ac_exeext
9115 if { (eval echo "$as_me:9115: \"$ac_link\"") >&5
9116   (eval $ac_link) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); } &&
9120          { ac_try='test -s conftest$ac_exeext'
9121   { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9122   (eval $ac_try) 2>&5
9123   ac_status=$?
9124   echo "$as_me:9124: \$? = $ac_status" >&5
9125   (exit $ac_status); }; }; then
9126
9127                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9128
9129 echo "${as_me:-configure}:9129: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9130
9131                 cf_cv_find_linkage_utf8=yes
9132                 cf_cv_library_file_utf8="-lutf8"
9133                 break
9134 else
9135   echo "$as_me: failed program was:" >&5
9136 cat conftest.$ac_ext >&5
9137
9138                 CPPFLAGS="$cf_save_CPPFLAGS"
9139                 LIBS="$cf_save_LIBS"
9140                 LDFLAGS="$cf_save_LDFLAGS"
9141
9142 fi
9143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9144           fi
9145         done
9146         CPPFLAGS="$cf_save_CPPFLAGS"
9147         LDFLAGS="$cf_save_LDFLAGS"
9148       fi
9149
9150     else
9151       cf_cv_find_linkage_utf8=no
9152     fi
9153
9154 fi
9155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9156
9157 fi
9158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9159
9160 LIBS="$cf_save_LIBS"
9161
9162 if test "$cf_cv_find_linkage_utf8" = yes ; then
9163 cf_cv_utf8_lib=add-on
9164 else
9165 cf_cv_utf8_lib=no
9166 fi
9167
9168 fi
9169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9170 fi
9171 echo "$as_me:9171: result: $cf_cv_utf8_lib" >&5
9172 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9173
9174 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9175 # ncurses/ncursesw:
9176 if test "$cf_cv_utf8_lib" = "add-on" ; then
9177         cat >>confdefs.h <<\EOF
9178 #define HAVE_LIBUTF8_H 1
9179 EOF
9180
9181 if test -n "$cf_cv_header_path_utf8" ; then
9182   for cf_add_incdir in $cf_cv_header_path_utf8
9183   do
9184         while test $cf_add_incdir != /usr/include
9185         do
9186           if test -d $cf_add_incdir
9187           then
9188                 cf_have_incdir=no
9189                 if test -n "$CFLAGS$CPPFLAGS" ; then
9190                   # a loop is needed to ensure we can add subdirs of existing dirs
9191                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9192                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9193                           cf_have_incdir=yes; break
9194                         fi
9195                   done
9196                 fi
9197
9198                 if test "$cf_have_incdir" = no ; then
9199                   if test "$cf_add_incdir" = /usr/local/include ; then
9200                         if test "$GCC" = yes
9201                         then
9202                           cf_save_CPPFLAGS=$CPPFLAGS
9203                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9204                           cat >conftest.$ac_ext <<_ACEOF
9205 #line 9205 "configure"
9206 #include "confdefs.h"
9207 #include <stdio.h>
9208 int
9209 main ()
9210 {
9211 printf("Hello")
9212   ;
9213   return 0;
9214 }
9215 _ACEOF
9216 rm -f conftest.$ac_objext
9217 if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218   (eval $ac_compile) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit $ac_status); } &&
9222          { ac_try='test -s conftest.$ac_objext'
9223   { (eval echo "$as_me:9223: \"$ac_try\"") >&5
9224   (eval $ac_try) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); }; }; then
9228   :
9229 else
9230   echo "$as_me: failed program was:" >&5
9231 cat conftest.$ac_ext >&5
9232 cf_have_incdir=yes
9233 fi
9234 rm -f conftest.$ac_objext conftest.$ac_ext
9235                           CPPFLAGS=$cf_save_CPPFLAGS
9236                         fi
9237                   fi
9238                 fi
9239
9240                 if test "$cf_have_incdir" = no ; then
9241                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9242
9243 echo "${as_me:-configure}:9243: testing adding $cf_add_incdir to include-path ..." 1>&5
9244
9245                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9246
9247                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9248                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9249                   cf_add_incdir="$cf_top_incdir"
9250                 else
9251                   break
9252                 fi
9253           fi
9254         done
9255   done
9256 fi
9257
9258 if test -n "$cf_cv_library_path_utf8" ; then
9259   for cf_add_libdir in $cf_cv_library_path_utf8
9260   do
9261     if test $cf_add_libdir = /usr/lib ; then
9262       :
9263     elif test -d $cf_add_libdir
9264     then
9265       cf_have_libdir=no
9266       if test -n "$LDFLAGS$LIBS" ; then
9267         # a loop is needed to ensure we can add subdirs of existing dirs
9268         for cf_test_libdir in $LDFLAGS $LIBS ; do
9269           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9270             cf_have_libdir=yes; break
9271           fi
9272         done
9273       fi
9274       if test "$cf_have_libdir" = no ; then
9275         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9276
9277 echo "${as_me:-configure}:9277: testing adding $cf_add_libdir to library-path ..." 1>&5
9278
9279         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9280       fi
9281     fi
9282   done
9283 fi
9284
9285         LIBS="$cf_cv_library_file_utf8 $LIBS"
9286 fi
9287
9288                 if test "$cf_cv_utf8_lib" != no ; then
9289                         NCURSES_LIBUTF8=1
9290                 fi
9291         fi
9292
9293 # This is needed on Tru64 5.0 to declare mbstate_t
9294 echo "$as_me:9294: checking if we must include wchar.h to declare mbstate_t" >&5
9295 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9296 if test "${cf_cv_mbstate_t+set}" = set; then
9297   echo $ECHO_N "(cached) $ECHO_C" >&6
9298 else
9299
9300 cat >conftest.$ac_ext <<_ACEOF
9301 #line 9301 "configure"
9302 #include "confdefs.h"
9303
9304 #include <stdlib.h>
9305 #include <stdarg.h>
9306 #include <stdio.h>
9307 #ifdef HAVE_LIBUTF8_H
9308 #include <libutf8.h>
9309 #endif
9310 int
9311 main ()
9312 {
9313 mbstate_t state
9314   ;
9315   return 0;
9316 }
9317 _ACEOF
9318 rm -f conftest.$ac_objext
9319 if { (eval echo "$as_me:9319: \"$ac_compile\"") >&5
9320   (eval $ac_compile) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); } &&
9324          { ac_try='test -s conftest.$ac_objext'
9325   { (eval echo "$as_me:9325: \"$ac_try\"") >&5
9326   (eval $ac_try) 2>&5
9327   ac_status=$?
9328   echo "$as_me:9328: \$? = $ac_status" >&5
9329   (exit $ac_status); }; }; then
9330   cf_cv_mbstate_t=no
9331 else
9332   echo "$as_me: failed program was:" >&5
9333 cat conftest.$ac_ext >&5
9334 cat >conftest.$ac_ext <<_ACEOF
9335 #line 9335 "configure"
9336 #include "confdefs.h"
9337
9338 #include <stdlib.h>
9339 #include <stdarg.h>
9340 #include <stdio.h>
9341 #include <wchar.h>
9342 #ifdef HAVE_LIBUTF8_H
9343 #include <libutf8.h>
9344 #endif
9345 int
9346 main ()
9347 {
9348 mbstate_t value
9349   ;
9350   return 0;
9351 }
9352 _ACEOF
9353 rm -f conftest.$ac_objext
9354 if { (eval echo "$as_me:9354: \"$ac_compile\"") >&5
9355   (eval $ac_compile) 2>&5
9356   ac_status=$?
9357   echo "$as_me:9357: \$? = $ac_status" >&5
9358   (exit $ac_status); } &&
9359          { ac_try='test -s conftest.$ac_objext'
9360   { (eval echo "$as_me:9360: \"$ac_try\"") >&5
9361   (eval $ac_try) 2>&5
9362   ac_status=$?
9363   echo "$as_me:9363: \$? = $ac_status" >&5
9364   (exit $ac_status); }; }; then
9365   cf_cv_mbstate_t=yes
9366 else
9367   echo "$as_me: failed program was:" >&5
9368 cat conftest.$ac_ext >&5
9369 cf_cv_mbstate_t=unknown
9370 fi
9371 rm -f conftest.$ac_objext conftest.$ac_ext
9372 fi
9373 rm -f conftest.$ac_objext conftest.$ac_ext
9374 fi
9375 echo "$as_me:9375: result: $cf_cv_mbstate_t" >&5
9376 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9377
9378 if test "$cf_cv_mbstate_t" = yes ; then
9379         cat >>confdefs.h <<\EOF
9380 #define NEED_WCHAR_H 1
9381 EOF
9382
9383         NEED_WCHAR_H=1
9384 fi
9385
9386 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9387 if test "$cf_cv_mbstate_t" = unknown ; then
9388         NCURSES_MBSTATE_T=1
9389 fi
9390
9391 # This is needed on Tru64 5.0 to declare wchar_t
9392 echo "$as_me:9392: checking if we must include wchar.h to declare wchar_t" >&5
9393 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9394 if test "${cf_cv_wchar_t+set}" = set; then
9395   echo $ECHO_N "(cached) $ECHO_C" >&6
9396 else
9397
9398 cat >conftest.$ac_ext <<_ACEOF
9399 #line 9399 "configure"
9400 #include "confdefs.h"
9401
9402 #include <stdlib.h>
9403 #include <stdarg.h>
9404 #include <stdio.h>
9405 #ifdef HAVE_LIBUTF8_H
9406 #include <libutf8.h>
9407 #endif
9408 int
9409 main ()
9410 {
9411 wchar_t state
9412   ;
9413   return 0;
9414 }
9415 _ACEOF
9416 rm -f conftest.$ac_objext
9417 if { (eval echo "$as_me:9417: \"$ac_compile\"") >&5
9418   (eval $ac_compile) 2>&5
9419   ac_status=$?
9420   echo "$as_me:9420: \$? = $ac_status" >&5
9421   (exit $ac_status); } &&
9422          { ac_try='test -s conftest.$ac_objext'
9423   { (eval echo "$as_me:9423: \"$ac_try\"") >&5
9424   (eval $ac_try) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); }; }; then
9428   cf_cv_wchar_t=no
9429 else
9430   echo "$as_me: failed program was:" >&5
9431 cat conftest.$ac_ext >&5
9432 cat >conftest.$ac_ext <<_ACEOF
9433 #line 9433 "configure"
9434 #include "confdefs.h"
9435
9436 #include <stdlib.h>
9437 #include <stdarg.h>
9438 #include <stdio.h>
9439 #include <wchar.h>
9440 #ifdef HAVE_LIBUTF8_H
9441 #include <libutf8.h>
9442 #endif
9443 int
9444 main ()
9445 {
9446 wchar_t value
9447   ;
9448   return 0;
9449 }
9450 _ACEOF
9451 rm -f conftest.$ac_objext
9452 if { (eval echo "$as_me:9452: \"$ac_compile\"") >&5
9453   (eval $ac_compile) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); } &&
9457          { ac_try='test -s conftest.$ac_objext'
9458   { (eval echo "$as_me:9458: \"$ac_try\"") >&5
9459   (eval $ac_try) 2>&5
9460   ac_status=$?
9461   echo "$as_me:9461: \$? = $ac_status" >&5
9462   (exit $ac_status); }; }; then
9463   cf_cv_wchar_t=yes
9464 else
9465   echo "$as_me: failed program was:" >&5
9466 cat conftest.$ac_ext >&5
9467 cf_cv_wchar_t=unknown
9468 fi
9469 rm -f conftest.$ac_objext conftest.$ac_ext
9470 fi
9471 rm -f conftest.$ac_objext conftest.$ac_ext
9472 fi
9473 echo "$as_me:9473: result: $cf_cv_wchar_t" >&5
9474 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9475
9476 if test "$cf_cv_wchar_t" = yes ; then
9477         cat >>confdefs.h <<\EOF
9478 #define NEED_WCHAR_H 1
9479 EOF
9480
9481         NEED_WCHAR_H=1
9482 fi
9483
9484 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9485 if test "$cf_cv_wchar_t" = unknown ; then
9486         NCURSES_WCHAR_T=1
9487 fi
9488
9489 # if we find wchar_t in either place, use substitution to provide a fallback.
9490 if test "$cf_cv_wchar_t" != unknown ; then
9491         NCURSES_OK_WCHAR_T=1
9492 fi
9493
9494 # This is needed on Tru64 5.0 to declare wint_t
9495 echo "$as_me:9495: checking if we must include wchar.h to declare wint_t" >&5
9496 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9497 if test "${cf_cv_wint_t+set}" = set; then
9498   echo $ECHO_N "(cached) $ECHO_C" >&6
9499 else
9500
9501 cat >conftest.$ac_ext <<_ACEOF
9502 #line 9502 "configure"
9503 #include "confdefs.h"
9504
9505 #include <stdlib.h>
9506 #include <stdarg.h>
9507 #include <stdio.h>
9508 #ifdef HAVE_LIBUTF8_H
9509 #include <libutf8.h>
9510 #endif
9511 int
9512 main ()
9513 {
9514 wint_t state
9515   ;
9516   return 0;
9517 }
9518 _ACEOF
9519 rm -f conftest.$ac_objext
9520 if { (eval echo "$as_me:9520: \"$ac_compile\"") >&5
9521   (eval $ac_compile) 2>&5
9522   ac_status=$?
9523   echo "$as_me:9523: \$? = $ac_status" >&5
9524   (exit $ac_status); } &&
9525          { ac_try='test -s conftest.$ac_objext'
9526   { (eval echo "$as_me:9526: \"$ac_try\"") >&5
9527   (eval $ac_try) 2>&5
9528   ac_status=$?
9529   echo "$as_me:9529: \$? = $ac_status" >&5
9530   (exit $ac_status); }; }; then
9531   cf_cv_wint_t=no
9532 else
9533   echo "$as_me: failed program was:" >&5
9534 cat conftest.$ac_ext >&5
9535 cat >conftest.$ac_ext <<_ACEOF
9536 #line 9536 "configure"
9537 #include "confdefs.h"
9538
9539 #include <stdlib.h>
9540 #include <stdarg.h>
9541 #include <stdio.h>
9542 #include <wchar.h>
9543 #ifdef HAVE_LIBUTF8_H
9544 #include <libutf8.h>
9545 #endif
9546 int
9547 main ()
9548 {
9549 wint_t value
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 rm -f conftest.$ac_objext
9555 if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5
9556   (eval $ac_compile) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); } &&
9560          { ac_try='test -s conftest.$ac_objext'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit $ac_status); }; }; then
9566   cf_cv_wint_t=yes
9567 else
9568   echo "$as_me: failed program was:" >&5
9569 cat conftest.$ac_ext >&5
9570 cf_cv_wint_t=unknown
9571 fi
9572 rm -f conftest.$ac_objext conftest.$ac_ext
9573 fi
9574 rm -f conftest.$ac_objext conftest.$ac_ext
9575 fi
9576 echo "$as_me:9576: result: $cf_cv_wint_t" >&5
9577 echo "${ECHO_T}$cf_cv_wint_t" >&6
9578
9579 if test "$cf_cv_wint_t" = yes ; then
9580         cat >>confdefs.h <<\EOF
9581 #define NEED_WCHAR_H 1
9582 EOF
9583
9584         NEED_WCHAR_H=1
9585 fi
9586
9587 # if we do not find wint_t in either place, use substitution to provide a fallback.
9588 if test "$cf_cv_wint_t" = unknown ; then
9589         NCURSES_WINT_T=1
9590 fi
9591
9592 # if we find wint_t in either place, use substitution to provide a fallback.
9593 if test "$cf_cv_wint_t" != unknown ; then
9594         NCURSES_OK_WINT_T=1
9595 fi
9596
9597         if test "$NCURSES_MBSTATE_T" != 0; then
9598                 cat >>confdefs.h <<\EOF
9599 #define NEED_MBSTATE_T_DEF 1
9600 EOF
9601
9602         fi
9603 fi
9604
9605 ###   use option --disable-lp64 to allow long chtype
9606 case $cf_cv_abi_version in
9607 [345]*)
9608         default_with_lp64=no
9609         ;;
9610 *)
9611         default_with_lp64=yes
9612         ;;
9613 esac
9614
9615 echo "$as_me:9615: checking whether to enable _LP64 definition in curses.h" >&5
9616 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9617
9618 # Check whether --enable-lp64 or --disable-lp64 was given.
9619 if test "${enable_lp64+set}" = set; then
9620   enableval="$enable_lp64"
9621   with_lp64=$enableval
9622 else
9623   with_lp64=$default_with_lp64
9624 fi;
9625 echo "$as_me:9625: result: $with_lp64" >&5
9626 echo "${ECHO_T}$with_lp64" >&6
9627
9628 if test "$with_lp64" = yes ; then
9629         cf_cv_enable_lp64=1
9630 else
9631         cf_cv_enable_lp64=0
9632 fi
9633
9634 # Check whether --enable-largefile or --disable-largefile was given.
9635 if test "${enable_largefile+set}" = set; then
9636   enableval="$enable_largefile"
9637
9638 fi;
9639 if test "$enable_largefile" != no; then
9640
9641   echo "$as_me:9641: checking for special C compiler options needed for large files" >&5
9642 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9643 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9644   echo $ECHO_N "(cached) $ECHO_C" >&6
9645 else
9646   ac_cv_sys_largefile_CC=no
9647      if test "$GCC" != yes; then
9648        ac_save_CC=$CC
9649        while :; do
9650          # IRIX 6.2 and later do not support large files by default,
9651          # so use the C compiler's -n32 option if that helps.
9652          cat >conftest.$ac_ext <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9655 #include <sys/types.h>
9656  /* Check that off_t can represent 2**63 - 1 correctly.
9657     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9658     since some C++ compilers masquerading as C compilers
9659     incorrectly reject 9223372036854775807.  */
9660 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9661   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9662                        && LARGE_OFF_T % 2147483647 == 1)
9663                       ? 1 : -1];
9664 int
9665 main ()
9666 {
9667
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672          rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:9673: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   break
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 fi
9689 rm -f conftest.$ac_objext
9690          CC="$CC -n32"
9691          rm -f conftest.$ac_objext
9692 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693   (eval $ac_compile) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest.$ac_objext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   ac_cv_sys_largefile_CC=' -n32'; break
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 fi
9708 rm -f conftest.$ac_objext
9709          break
9710        done
9711        CC=$ac_save_CC
9712        rm -f conftest.$ac_ext
9713     fi
9714 fi
9715 echo "$as_me:9715: result: $ac_cv_sys_largefile_CC" >&5
9716 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9717   if test "$ac_cv_sys_largefile_CC" != no; then
9718     CC=$CC$ac_cv_sys_largefile_CC
9719   fi
9720
9721   echo "$as_me:9721: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9722 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9723 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9724   echo $ECHO_N "(cached) $ECHO_C" >&6
9725 else
9726   while :; do
9727   ac_cv_sys_file_offset_bits=no
9728   cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731 #include <sys/types.h>
9732  /* Check that off_t can represent 2**63 - 1 correctly.
9733     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9734     since some C++ compilers masquerading as C compilers
9735     incorrectly reject 9223372036854775807.  */
9736 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9737   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9738                        && LARGE_OFF_T % 2147483647 == 1)
9739                       ? 1 : -1];
9740 int
9741 main ()
9742 {
9743
9744   ;
9745   return 0;
9746 }
9747 _ACEOF
9748 rm -f conftest.$ac_objext
9749 if { (eval echo "$as_me:9749: \"$ac_compile\"") >&5
9750   (eval $ac_compile) 2>&5
9751   ac_status=$?
9752   echo "$as_me:9752: \$? = $ac_status" >&5
9753   (exit $ac_status); } &&
9754          { ac_try='test -s conftest.$ac_objext'
9755   { (eval echo "$as_me:9755: \"$ac_try\"") >&5
9756   (eval $ac_try) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); }; }; then
9760   break
9761 else
9762   echo "$as_me: failed program was:" >&5
9763 cat conftest.$ac_ext >&5
9764 fi
9765 rm -f conftest.$ac_objext conftest.$ac_ext
9766   cat >conftest.$ac_ext <<_ACEOF
9767 #line 9767 "configure"
9768 #include "confdefs.h"
9769 #define _FILE_OFFSET_BITS 64
9770 #include <sys/types.h>
9771  /* Check that off_t can represent 2**63 - 1 correctly.
9772     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9773     since some C++ compilers masquerading as C compilers
9774     incorrectly reject 9223372036854775807.  */
9775 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9776   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9777                        && LARGE_OFF_T % 2147483647 == 1)
9778                       ? 1 : -1];
9779 int
9780 main ()
9781 {
9782
9783   ;
9784   return 0;
9785 }
9786 _ACEOF
9787 rm -f conftest.$ac_objext
9788 if { (eval echo "$as_me:9788: \"$ac_compile\"") >&5
9789   (eval $ac_compile) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); } &&
9793          { ac_try='test -s conftest.$ac_objext'
9794   { (eval echo "$as_me:9794: \"$ac_try\"") >&5
9795   (eval $ac_try) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); }; }; then
9799   ac_cv_sys_file_offset_bits=64; break
9800 else
9801   echo "$as_me: failed program was:" >&5
9802 cat conftest.$ac_ext >&5
9803 fi
9804 rm -f conftest.$ac_objext conftest.$ac_ext
9805   break
9806 done
9807 fi
9808 echo "$as_me:9808: result: $ac_cv_sys_file_offset_bits" >&5
9809 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9810 if test "$ac_cv_sys_file_offset_bits" != no; then
9811
9812 cat >>confdefs.h <<EOF
9813 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9814 EOF
9815
9816 fi
9817 rm -rf conftest*
9818   echo "$as_me:9818: checking for _LARGE_FILES value needed for large files" >&5
9819 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9820 if test "${ac_cv_sys_large_files+set}" = set; then
9821   echo $ECHO_N "(cached) $ECHO_C" >&6
9822 else
9823   while :; do
9824   ac_cv_sys_large_files=no
9825   cat >conftest.$ac_ext <<_ACEOF
9826 #line 9826 "configure"
9827 #include "confdefs.h"
9828 #include <sys/types.h>
9829  /* Check that off_t can represent 2**63 - 1 correctly.
9830     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9831     since some C++ compilers masquerading as C compilers
9832     incorrectly reject 9223372036854775807.  */
9833 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9834   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9835                        && LARGE_OFF_T % 2147483647 == 1)
9836                       ? 1 : -1];
9837 int
9838 main ()
9839 {
9840
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 rm -f conftest.$ac_objext
9846 if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
9847   (eval $ac_compile) 2>&5
9848   ac_status=$?
9849   echo "$as_me:9849: \$? = $ac_status" >&5
9850   (exit $ac_status); } &&
9851          { ac_try='test -s conftest.$ac_objext'
9852   { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9853   (eval $ac_try) 2>&5
9854   ac_status=$?
9855   echo "$as_me:9855: \$? = $ac_status" >&5
9856   (exit $ac_status); }; }; then
9857   break
9858 else
9859   echo "$as_me: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9861 fi
9862 rm -f conftest.$ac_objext conftest.$ac_ext
9863   cat >conftest.$ac_ext <<_ACEOF
9864 #line 9864 "configure"
9865 #include "confdefs.h"
9866 #define _LARGE_FILES 1
9867 #include <sys/types.h>
9868  /* Check that off_t can represent 2**63 - 1 correctly.
9869     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9870     since some C++ compilers masquerading as C compilers
9871     incorrectly reject 9223372036854775807.  */
9872 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9873   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9874                        && LARGE_OFF_T % 2147483647 == 1)
9875                       ? 1 : -1];
9876 int
9877 main ()
9878 {
9879
9880   ;
9881   return 0;
9882 }
9883 _ACEOF
9884 rm -f conftest.$ac_objext
9885 if { (eval echo "$as_me:9885: \"$ac_compile\"") >&5
9886   (eval $ac_compile) 2>&5
9887   ac_status=$?
9888   echo "$as_me:9888: \$? = $ac_status" >&5
9889   (exit $ac_status); } &&
9890          { ac_try='test -s conftest.$ac_objext'
9891   { (eval echo "$as_me:9891: \"$ac_try\"") >&5
9892   (eval $ac_try) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); }; }; then
9896   ac_cv_sys_large_files=1; break
9897 else
9898   echo "$as_me: failed program was:" >&5
9899 cat conftest.$ac_ext >&5
9900 fi
9901 rm -f conftest.$ac_objext conftest.$ac_ext
9902   break
9903 done
9904 fi
9905 echo "$as_me:9905: result: $ac_cv_sys_large_files" >&5
9906 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9907 if test "$ac_cv_sys_large_files" != no; then
9908
9909 cat >>confdefs.h <<EOF
9910 #define _LARGE_FILES $ac_cv_sys_large_files
9911 EOF
9912
9913 fi
9914 rm -rf conftest*
9915 fi
9916
9917     if test "$enable_largefile" != no ; then
9918         echo "$as_me:9918: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9919 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9920 if test "${ac_cv_sys_largefile_source+set}" = set; then
9921   echo $ECHO_N "(cached) $ECHO_C" >&6
9922 else
9923   while :; do
9924   ac_cv_sys_largefile_source=no
9925   cat >conftest.$ac_ext <<_ACEOF
9926 #line 9926 "configure"
9927 #include "confdefs.h"
9928 #include <stdio.h>
9929 int
9930 main ()
9931 {
9932 return !fseeko;
9933   ;
9934   return 0;
9935 }
9936 _ACEOF
9937 rm -f conftest.$ac_objext
9938 if { (eval echo "$as_me:9938: \"$ac_compile\"") >&5
9939   (eval $ac_compile) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit $ac_status); } &&
9943          { ac_try='test -s conftest.$ac_objext'
9944   { (eval echo "$as_me:9944: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:9947: \$? = $ac_status" >&5
9948   (exit $ac_status); }; }; then
9949   break
9950 else
9951   echo "$as_me: failed program was:" >&5
9952 cat conftest.$ac_ext >&5
9953 fi
9954 rm -f conftest.$ac_objext conftest.$ac_ext
9955   cat >conftest.$ac_ext <<_ACEOF
9956 #line 9956 "configure"
9957 #include "confdefs.h"
9958 #define _LARGEFILE_SOURCE 1
9959 #include <stdio.h>
9960 int
9961 main ()
9962 {
9963 return !fseeko;
9964   ;
9965   return 0;
9966 }
9967 _ACEOF
9968 rm -f conftest.$ac_objext
9969 if { (eval echo "$as_me:9969: \"$ac_compile\"") >&5
9970   (eval $ac_compile) 2>&5
9971   ac_status=$?
9972   echo "$as_me:9972: \$? = $ac_status" >&5
9973   (exit $ac_status); } &&
9974          { ac_try='test -s conftest.$ac_objext'
9975   { (eval echo "$as_me:9975: \"$ac_try\"") >&5
9976   (eval $ac_try) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit $ac_status); }; }; then
9980   ac_cv_sys_largefile_source=1; break
9981 else
9982   echo "$as_me: failed program was:" >&5
9983 cat conftest.$ac_ext >&5
9984 fi
9985 rm -f conftest.$ac_objext conftest.$ac_ext
9986   break
9987 done
9988 fi
9989 echo "$as_me:9989: result: $ac_cv_sys_largefile_source" >&5
9990 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9991 if test "$ac_cv_sys_largefile_source" != no; then
9992
9993 cat >>confdefs.h <<EOF
9994 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9995 EOF
9996
9997 fi
9998 rm -rf conftest*
9999
10000 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10001 # in glibc 2.1.3, but that breaks too many other things.
10002 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10003 echo "$as_me:10003: checking for fseeko" >&5
10004 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10005 if test "${ac_cv_func_fseeko+set}" = set; then
10006   echo $ECHO_N "(cached) $ECHO_C" >&6
10007 else
10008   cat >conftest.$ac_ext <<_ACEOF
10009 #line 10009 "configure"
10010 #include "confdefs.h"
10011 #include <stdio.h>
10012 int
10013 main ()
10014 {
10015 return fseeko && fseeko (stdin, 0, 0);
10016   ;
10017   return 0;
10018 }
10019 _ACEOF
10020 rm -f conftest.$ac_objext conftest$ac_exeext
10021 if { (eval echo "$as_me:10021: \"$ac_link\"") >&5
10022   (eval $ac_link) 2>&5
10023   ac_status=$?
10024   echo "$as_me:10024: \$? = $ac_status" >&5
10025   (exit $ac_status); } &&
10026          { ac_try='test -s conftest$ac_exeext'
10027   { (eval echo "$as_me:10027: \"$ac_try\"") >&5
10028   (eval $ac_try) 2>&5
10029   ac_status=$?
10030   echo "$as_me:10030: \$? = $ac_status" >&5
10031   (exit $ac_status); }; }; then
10032   ac_cv_func_fseeko=yes
10033 else
10034   echo "$as_me: failed program was:" >&5
10035 cat conftest.$ac_ext >&5
10036 ac_cv_func_fseeko=no
10037 fi
10038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10039 fi
10040 echo "$as_me:10040: result: $ac_cv_func_fseeko" >&5
10041 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10042 if test $ac_cv_func_fseeko = yes; then
10043
10044 cat >>confdefs.h <<\EOF
10045 #define HAVE_FSEEKO 1
10046 EOF
10047
10048 fi
10049
10050         # Normally we would collect these definitions in the config.h,
10051         # but (like _XOPEN_SOURCE), some environments rely on having these
10052         # defined before any of the system headers are included.  Another
10053         # case comes up with C++, e.g., on AIX the compiler compiles the
10054         # header files by themselves before looking at the body files it is
10055         # told to compile.  For ncurses, those header files do not include
10056         # the config.h
10057         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10058         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10059         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10060
10061         echo "$as_me:10061: checking whether to use struct dirent64" >&5
10062 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10063 if test "${cf_cv_struct_dirent64+set}" = set; then
10064   echo $ECHO_N "(cached) $ECHO_C" >&6
10065 else
10066
10067                 cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070
10071 #include <sys/types.h>
10072 #include <dirent.h>
10073
10074 int
10075 main ()
10076 {
10077
10078                 /* if transitional largefile support is setup, this is true */
10079                 extern struct dirent64 * readdir(DIR *);
10080                 struct dirent64 *x = readdir((DIR *)0);
10081                 struct dirent *y = readdir((DIR *)0);
10082                 int z = x - y;
10083
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 rm -f conftest.$ac_objext
10089 if { (eval echo "$as_me:10089: \"$ac_compile\"") >&5
10090   (eval $ac_compile) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); } &&
10094          { ac_try='test -s conftest.$ac_objext'
10095   { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100   cf_cv_struct_dirent64=yes
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 cat conftest.$ac_ext >&5
10104 cf_cv_struct_dirent64=no
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107
10108 fi
10109 echo "$as_me:10109: result: $cf_cv_struct_dirent64" >&5
10110 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10111         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10112 #define HAVE_STRUCT_DIRENT64 1
10113 EOF
10114
10115     fi
10116
10117 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10118 echo "$as_me:10118: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10119 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10120
10121 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10122 if test "${enable_tparm_varargs+set}" = set; then
10123   enableval="$enable_tparm_varargs"
10124   with_tparm_varargs=$enableval
10125 else
10126   with_tparm_varargs=yes
10127 fi;
10128 echo "$as_me:10128: result: $with_tparm_varargs" >&5
10129 echo "${ECHO_T}$with_tparm_varargs" >&6
10130 NCURSES_TPARM_VARARGS=0
10131 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10132
10133 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10134 if test "$with_ticlib" != no ; then
10135 echo "$as_me:10135: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10136 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10137
10138 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10139 if test "${enable_tic_depends+set}" = set; then
10140   enableval="$enable_tic_depends"
10141   with_tic_depends=$enableval
10142 else
10143   with_tic_depends=yes
10144 fi;
10145 echo "$as_me:10145: result: $with_tic_depends" >&5
10146 echo "${ECHO_T}$with_tic_depends" >&6
10147 else
10148         with_tic_depends=no
10149 fi
10150
10151 ###   use option --with-bool to override bool's type
10152 echo "$as_me:10152: checking for type of bool" >&5
10153 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10154
10155 # Check whether --with-bool or --without-bool was given.
10156 if test "${with_bool+set}" = set; then
10157   withval="$with_bool"
10158   NCURSES_BOOL="$withval"
10159 else
10160   NCURSES_BOOL=auto
10161 fi;
10162 echo "$as_me:10162: result: $NCURSES_BOOL" >&5
10163 echo "${ECHO_T}$NCURSES_BOOL" >&6
10164
10165 echo "$as_me:10165: checking for alternate terminal capabilities file" >&5
10166 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10167
10168 # Check whether --with-caps or --without-caps was given.
10169 if test "${with_caps+set}" = set; then
10170   withval="$with_caps"
10171   TERMINFO_CAPS=Caps.$withval
10172 else
10173   TERMINFO_CAPS=Caps
10174 fi;
10175 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10176 echo "$as_me:10176: result: $TERMINFO_CAPS" >&5
10177 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10178
10179 ###   use option --with-chtype to override chtype's type
10180 echo "$as_me:10180: checking for type of chtype" >&5
10181 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10182
10183 # Check whether --with-chtype or --without-chtype was given.
10184 if test "${with_chtype+set}" = set; then
10185   withval="$with_chtype"
10186   NCURSES_CHTYPE="$withval"
10187 else
10188   NCURSES_CHTYPE=auto
10189 fi;
10190 echo "$as_me:10190: result: $NCURSES_CHTYPE" >&5
10191 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10192
10193 ###   use option --with-ospeed to override ospeed's type
10194 echo "$as_me:10194: checking for type of ospeed" >&5
10195 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10196
10197 # Check whether --with-ospeed or --without-ospeed was given.
10198 if test "${with_ospeed+set}" = set; then
10199   withval="$with_ospeed"
10200   NCURSES_OSPEED="$withval"
10201 else
10202   NCURSES_OSPEED=short
10203 fi;
10204 echo "$as_me:10204: result: $NCURSES_OSPEED" >&5
10205 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10206
10207 ###   use option --with-mmask-t to override mmask_t's type
10208 echo "$as_me:10208: checking for type of mmask_t" >&5
10209 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10210
10211 # Check whether --with-mmask-t or --without-mmask-t was given.
10212 if test "${with_mmask_t+set}" = set; then
10213   withval="$with_mmask_t"
10214   NCURSES_MMASK_T="$withval"
10215 else
10216   NCURSES_MMASK_T=auto
10217 fi;
10218 echo "$as_me:10218: result: $NCURSES_MMASK_T" >&5
10219 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10220
10221 ###   use option --with-ccharw-max to override CCHARW_MAX size
10222 echo "$as_me:10222: checking for size CCHARW_MAX" >&5
10223 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10224
10225 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10226 if test "${with_ccharw_max+set}" = set; then
10227   withval="$with_ccharw_max"
10228   NCURSES_CCHARW_MAX="$withval"
10229 else
10230   NCURSES_CCHARW_MAX=5
10231 fi;
10232 echo "$as_me:10232: result: $NCURSES_CCHARW_MAX" >&5
10233 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10234
10235 ### Enable compiling-in rcs id's
10236 echo "$as_me:10236: checking if RCS identifiers should be compiled-in" >&5
10237 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10238
10239 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10240 if test "${with_rcs_ids+set}" = set; then
10241   withval="$with_rcs_ids"
10242   with_rcs_ids=$withval
10243 else
10244   with_rcs_ids=no
10245 fi;
10246 echo "$as_me:10246: result: $with_rcs_ids" >&5
10247 echo "${ECHO_T}$with_rcs_ids" >&6
10248 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10249 #define USE_RCS_IDS 1
10250 EOF
10251
10252 ###############################################################################
10253
10254 echo "$as_me:10254: checking format of man-pages" >&5
10255 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10256
10257 # Check whether --with-manpage-format or --without-manpage-format was given.
10258 if test "${with_manpage_format+set}" = set; then
10259   withval="$with_manpage_format"
10260   MANPAGE_FORMAT=$withval
10261 else
10262   MANPAGE_FORMAT=unknown
10263 fi;
10264
10265 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10266 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10267
10268 cf_unknown=
10269
10270 case $MANPAGE_FORMAT in
10271 unknown)
10272   if test -z "$MANPATH" ; then
10273     MANPATH="/usr/man:/usr/share/man"
10274   fi
10275
10276   # look for the 'date' man-page (it's most likely to be installed!)
10277   MANPAGE_FORMAT=
10278   cf_preform=no
10279   cf_catonly=yes
10280   cf_example=date
10281
10282   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10283   for cf_dir in $MANPATH; do
10284     test -z "$cf_dir" && cf_dir=/usr/man
10285     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
10286     do
10287       cf_test=`echo $cf_name | sed -e 's/*//'`
10288       if test "x$cf_test" = "x$cf_name" ; then
10289
10290         case "$cf_name" in
10291         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10292         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10293         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10294         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10295         esac
10296
10297         case "$cf_name" in
10298         $cf_dir/man*)
10299           cf_catonly=no
10300           ;;
10301         $cf_dir/cat*)
10302           cf_preform=yes
10303           ;;
10304         esac
10305         break
10306       fi
10307
10308       # if we found a match in either man* or cat*, stop looking
10309       if test -n "$MANPAGE_FORMAT" ; then
10310         cf_found=no
10311         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10312         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10313         case "$cf_name" in
10314         $cf_dir/cat*)
10315           cf_found=yes
10316           ;;
10317         esac
10318         test $cf_found=yes && break
10319       fi
10320     done
10321     # only check the first directory in $MANPATH where we find manpages
10322     if test -n "$MANPAGE_FORMAT" ; then
10323        break
10324     fi
10325   done
10326   # if we did not find the example, just assume it is normal
10327   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10328   IFS="$ac_save_ifs"
10329   ;;
10330 *)
10331   for cf_option in $MANPAGE_FORMAT; do
10332      case $cf_option in #(vi
10333      gzip|compress|BSDI|normal|formatted|catonly)
10334        ;;
10335      *)
10336        cf_unknown="$cf_unknown $cf_option"
10337        ;;
10338      esac
10339   done
10340   ;;
10341 esac
10342
10343 echo "$as_me:10343: result: $MANPAGE_FORMAT" >&5
10344 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10345 if test -n "$cf_unknown" ; then
10346   { echo "$as_me:10346: WARNING: Unexpected manpage-format $cf_unknown" >&5
10347 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10348 fi
10349
10350 echo "$as_me:10350: checking for manpage renaming" >&5
10351 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10352
10353 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10354 if test "${with_manpage_renames+set}" = set; then
10355   withval="$with_manpage_renames"
10356   MANPAGE_RENAMES=$withval
10357 else
10358   MANPAGE_RENAMES=yes
10359 fi;
10360
10361 case ".$MANPAGE_RENAMES" in #(vi
10362 .no) #(vi
10363   ;;
10364 .|.yes)
10365   # Debian 'man' program?
10366   if test -f /etc/debian_version ; then
10367     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10368   else
10369     MANPAGE_RENAMES=no
10370   fi
10371   ;;
10372 esac
10373
10374 if test "$MANPAGE_RENAMES" != no ; then
10375   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10376     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10377   elif test ! -f $MANPAGE_RENAMES ; then
10378     { { echo "$as_me:10378: error: not a filename: $MANPAGE_RENAMES" >&5
10379 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10380    { (exit 1); exit 1; }; }
10381   fi
10382
10383   test ! -d man && mkdir man
10384
10385   # Construct a sed-script to perform renaming within man-pages
10386   if test -n "$MANPAGE_RENAMES" ; then
10387     test ! -d man && mkdir man
10388     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10389   fi
10390 fi
10391
10392 echo "$as_me:10392: result: $MANPAGE_RENAMES" >&5
10393 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10394
10395 echo "$as_me:10395: checking if manpage aliases will be installed" >&5
10396 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10397
10398 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10399 if test "${with_manpage_aliases+set}" = set; then
10400   withval="$with_manpage_aliases"
10401   MANPAGE_ALIASES=$withval
10402 else
10403   MANPAGE_ALIASES=yes
10404 fi;
10405
10406 echo "$as_me:10406: result: $MANPAGE_ALIASES" >&5
10407 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10408
10409 case "x$LN_S" in #(vi
10410 xln*) #(vi
10411         cf_use_symlinks=yes
10412         ;;
10413 *)
10414         cf_use_symlinks=no
10415         ;;
10416 esac
10417
10418 MANPAGE_SYMLINKS=no
10419 if test "$MANPAGE_ALIASES" = yes ; then
10420 echo "$as_me:10420: checking if manpage symlinks should be used" >&5
10421 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10422
10423 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10424 if test "${with_manpage_symlinks+set}" = set; then
10425   withval="$with_manpage_symlinks"
10426   MANPAGE_SYMLINKS=$withval
10427 else
10428   MANPAGE_SYMLINKS=$cf_use_symlinks
10429 fi;
10430
10431 if test "$$cf_use_symlinks" = no; then
10432 if test "$MANPAGE_SYMLINKS" = yes ; then
10433         { echo "$as_me:10433: WARNING: cannot make symlinks" >&5
10434 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10435         MANPAGE_SYMLINKS=no
10436 fi
10437 fi
10438
10439 echo "$as_me:10439: result: $MANPAGE_SYMLINKS" >&5
10440 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10441 fi
10442
10443 echo "$as_me:10443: checking for manpage tbl" >&5
10444 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10445
10446 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10447 if test "${with_manpage_tbl+set}" = set; then
10448   withval="$with_manpage_tbl"
10449   MANPAGE_TBL=$withval
10450 else
10451   MANPAGE_TBL=no
10452 fi;
10453
10454 echo "$as_me:10454: result: $MANPAGE_TBL" >&5
10455 echo "${ECHO_T}$MANPAGE_TBL" >&6
10456
10457   if test "$prefix" = "NONE" ; then
10458      cf_prefix="$ac_default_prefix"
10459   else
10460      cf_prefix="$prefix"
10461   fi
10462
10463   case "$MANPAGE_FORMAT" in # (vi
10464   *catonly*) # (vi
10465     cf_format=yes
10466     cf_inboth=no
10467     ;;
10468   *formatted*) # (vi
10469     cf_format=yes
10470     cf_inboth=yes
10471     ;;
10472   *)
10473     cf_format=no
10474     cf_inboth=no
10475     ;;
10476   esac
10477
10478 test ! -d man && mkdir man
10479
10480 cf_so_strip=
10481 cf_compress=
10482 case "$MANPAGE_FORMAT" in #(vi
10483 *compress*) #(vi
10484         cf_so_strip="Z"
10485         cf_compress=compress
10486   ;;
10487 *gzip*)
10488         cf_so_strip="gz"
10489         cf_compress=gzip
10490   ;;
10491 esac
10492
10493 cf_edit_man=./edit_man.sh
10494 cf_man_alias=`pwd`/man_alias.sed
10495
10496 cat >$cf_edit_man <<CF_EOF
10497 #! /bin/sh
10498 # this script is generated by the configure-script CF_MAN_PAGES macro.
10499
10500 prefix="$cf_prefix"
10501 datadir="$datadir"
10502
10503 NCURSES_MAJOR="$NCURSES_MAJOR"
10504 NCURSES_MINOR="$NCURSES_MINOR"
10505 NCURSES_PATCH="$NCURSES_PATCH"
10506
10507 NCURSES_OSPEED="$NCURSES_OSPEED"
10508 TERMINFO="$TERMINFO"
10509
10510 INSTALL="$INSTALL"
10511 INSTALL_DATA="$INSTALL_DATA"
10512
10513 transform="$program_transform_name"
10514
10515 TMP=\${TMPDIR:=/tmp}/man\$\$
10516 trap "rm -f \$TMP" 0 1 2 5 15
10517
10518 form=\$1
10519 shift || exit 1
10520
10521 verb=\$1
10522 shift || exit 1
10523
10524 mandir=\$1
10525 shift || exit 1
10526
10527 srcdir=\$1
10528 top_srcdir=\$srcdir/..
10529 shift || exit 1
10530
10531 if test "\$form" = normal ; then
10532         if test "$cf_format" = yes ; then
10533         if test "$cf_inboth" = no ; then
10534                 sh \$0 format \$verb \$mandir \$srcdir \$*
10535                 exit $?
10536         fi
10537         fi
10538         cf_subdir=\$mandir/man
10539         cf_tables=$MANPAGE_TBL
10540 else
10541         cf_subdir=\$mandir/cat
10542         cf_tables=yes
10543 fi
10544
10545 # process the list of source-files
10546 for i in \$* ; do
10547 case \$i in #(vi
10548 *.orig|*.rej) ;; #(vi
10549 *.[0-9]*)
10550         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10551         if test \$verb = installing ; then
10552         if test ! -d \$cf_subdir\${section} ; then
10553                 mkdir -p \$cf_subdir\$section
10554         fi
10555         fi
10556
10557         # replace variables in man page
10558         if test ! -f $cf_man_alias ; then
10559 cat >>$cf_man_alias <<-CF_EOF2
10560                 s,@DATADIR@,\$datadir,g
10561                 s,@TERMINFO@,\$TERMINFO,g
10562                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10563                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10564                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10565                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10566 CF_EOF
10567
10568         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10569         do
10570                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10571                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10572 cat >>$cf_edit_man <<-CF_EOF
10573                 s,@$cf_NAME@,$cf_name,g
10574 CF_EOF
10575         done
10576
10577 cat >>$cf_edit_man <<CF_EOF
10578 CF_EOF2
10579                 echo "...made $cf_man_alias"
10580         fi
10581
10582         aliases=
10583         cf_source=\`basename \$i\`
10584         inalias=\$cf_source
10585         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10586         if test ! -f \$inalias ; then
10587                 echo .. skipped \$cf_source
10588                 continue
10589         fi
10590 CF_EOF
10591
10592 if test "$MANPAGE_ALIASES" != no ; then
10593 cat >>$cf_edit_man <<CF_EOF
10594         nCurses=ignore.3x
10595         test $with_curses_h = yes && nCurses=ncurses.3x
10596         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10597 CF_EOF
10598 fi
10599
10600 if test "$MANPAGE_RENAMES" = no ; then
10601 cat >>$cf_edit_man <<CF_EOF
10602         # perform program transformations for section 1 man pages
10603         if test \$section = 1 ; then
10604                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10605         else
10606                 cf_target=\$cf_subdir\${section}/\$cf_source
10607         fi
10608 CF_EOF
10609 else
10610 cat >>$cf_edit_man <<CF_EOF
10611         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10612         if test -z "\$cf_target" ; then
10613                 echo '? missing rename for '\$cf_source
10614                 cf_target="\$cf_source"
10615         fi
10616         cf_target="\$cf_subdir\${section}/\${cf_target}"
10617
10618 CF_EOF
10619 fi
10620
10621 cat >>$cf_edit_man <<CF_EOF
10622         sed     -f $cf_man_alias \\
10623 CF_EOF
10624
10625 if test -f $MANPAGE_RENAMES ; then
10626 cat >>$cf_edit_man <<CF_EOF
10627                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10628 CF_EOF
10629 else
10630 cat >>$cf_edit_man <<CF_EOF
10631                 < \$i >\$TMP
10632 CF_EOF
10633 fi
10634
10635 cat >>$cf_edit_man <<CF_EOF
10636 if test \$cf_tables = yes ; then
10637         tbl \$TMP >\$TMP.out
10638         mv \$TMP.out \$TMP
10639 fi
10640 CF_EOF
10641
10642 if test $with_overwrite != yes ; then
10643 cat >>$cf_edit_man <<CF_EOF
10644         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10645         mv \$TMP.out \$TMP
10646 CF_EOF
10647 fi
10648
10649 if test $with_curses_h != yes ; then
10650 cat >>$cf_edit_man <<CF_EOF
10651         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10652         mv \$TMP.out \$TMP
10653 CF_EOF
10654 fi
10655
10656 cat >>$cf_edit_man <<CF_EOF
10657         if test \$form = format ; then
10658                 nroff -man \$TMP >\$TMP.out
10659                 mv \$TMP.out \$TMP
10660         fi
10661 CF_EOF
10662
10663 if test -n "$cf_compress" ; then
10664 cat >>$cf_edit_man <<CF_EOF
10665         if test \$verb = installing ; then
10666         if ( $cf_compress -f \$TMP )
10667         then
10668                 mv \$TMP.$cf_so_strip \$TMP
10669         fi
10670         fi
10671         cf_target="\$cf_target.$cf_so_strip"
10672 CF_EOF
10673 fi
10674
10675 case "$MANPAGE_FORMAT" in #(vi
10676 *BSDI*)
10677 cat >>$cf_edit_man <<CF_EOF
10678         if test \$form = format ; then
10679                 # BSDI installs only .0 suffixes in the cat directories
10680                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10681         fi
10682 CF_EOF
10683   ;;
10684 esac
10685
10686 cat >>$cf_edit_man <<CF_EOF
10687         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10688         if test \$verb = installing ; then
10689                 echo \$verb \$cf_target
10690                 \$INSTALL_DATA \$TMP \$cf_target
10691                 test -d \$cf_subdir\${section} &&
10692                 test -n "\$aliases" && (
10693                         cd \$cf_subdir\${section} && (
10694                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10695                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10696                                 cf_target=\`basename \$cf_target\`
10697                                 for cf_alias in \$aliases
10698                                 do
10699                                         if test \$section = 1 ; then
10700                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10701                                         fi
10702
10703                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10704                                                 if test -f \$cf_alias\${suffix} ; then
10705                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10706                                                         then
10707                                                                 continue
10708                                                         fi
10709                                                 fi
10710                                                 echo .. \$verb alias \$cf_alias\${suffix}
10711 CF_EOF
10712 case "x$LN_S" in #(vi
10713 *-f) #(vi
10714 cat >>$cf_edit_man <<CF_EOF
10715                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10716 CF_EOF
10717         ;;
10718 *)
10719 cat >>$cf_edit_man <<CF_EOF
10720                                                 rm -f \$cf_alias\${suffix}
10721                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10722 CF_EOF
10723         ;;
10724 esac
10725 cat >>$cf_edit_man <<CF_EOF
10726                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10727                                                 echo ".so \$cf_source" >\$TMP
10728 CF_EOF
10729 if test -n "$cf_compress" ; then
10730 cat >>$cf_edit_man <<CF_EOF
10731                                                 if test -n "$cf_so_strip" ; then
10732                                                         $cf_compress -f \$TMP
10733                                                         mv \$TMP.$cf_so_strip \$TMP
10734                                                 fi
10735 CF_EOF
10736 fi
10737 cat >>$cf_edit_man <<CF_EOF
10738                                                 echo .. \$verb alias \$cf_alias\${suffix}
10739                                                 rm -f \$cf_alias\${suffix}
10740                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10741                                         fi
10742                                 done
10743                         )
10744                 )
10745         elif test \$verb = removing ; then
10746                 test -f \$cf_target && (
10747                         echo \$verb \$cf_target
10748                         rm -f \$cf_target
10749                 )
10750                 test -d \$cf_subdir\${section} &&
10751                 test -n "\$aliases" && (
10752                         cd \$cf_subdir\${section} && (
10753                                 for cf_alias in \$aliases
10754                                 do
10755                                         if test \$section = 1 ; then
10756                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10757                                         fi
10758
10759                                         echo .. \$verb alias \$cf_alias\${suffix}
10760                                         rm -f \$cf_alias\${suffix}
10761                                 done
10762                         )
10763                 )
10764         else
10765 #               echo ".hy 0"
10766                 cat \$TMP
10767         fi
10768         ;;
10769 esac
10770 done
10771
10772 if test $cf_inboth = yes ; then
10773 if test \$form != format ; then
10774         sh \$0 format \$verb \$mandir \$srcdir \$*
10775 fi
10776 fi
10777
10778 exit 0
10779 CF_EOF
10780 chmod 755 $cf_edit_man
10781
10782 ###############################################################################
10783
10784 ### Note that some functions (such as const) are normally disabled anyway.
10785 echo "$as_me:10785: checking if you want to build with function extensions" >&5
10786 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10787
10788 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10789 if test "${enable_ext_funcs+set}" = set; then
10790   enableval="$enable_ext_funcs"
10791   with_ext_funcs=$enableval
10792 else
10793   with_ext_funcs=yes
10794 fi;
10795 echo "$as_me:10795: result: $with_ext_funcs" >&5
10796 echo "${ECHO_T}$with_ext_funcs" >&6
10797 if test "$with_ext_funcs" = yes ; then
10798         NCURSES_EXT_FUNCS=1
10799         cat >>confdefs.h <<\EOF
10800 #define HAVE_ASSUME_DEFAULT_COLORS 1
10801 EOF
10802
10803         cat >>confdefs.h <<\EOF
10804 #define HAVE_CURSES_VERSION 1
10805 EOF
10806
10807         cat >>confdefs.h <<\EOF
10808 #define HAVE_HAS_KEY 1
10809 EOF
10810
10811         cat >>confdefs.h <<\EOF
10812 #define HAVE_RESIZETERM 1
10813 EOF
10814
10815         cat >>confdefs.h <<\EOF
10816 #define HAVE_RESIZE_TERM 1
10817 EOF
10818
10819         cat >>confdefs.h <<\EOF
10820 #define HAVE_TERM_ENTRY_H 1
10821 EOF
10822
10823         cat >>confdefs.h <<\EOF
10824 #define HAVE_USE_DEFAULT_COLORS 1
10825 EOF
10826
10827         cat >>confdefs.h <<\EOF
10828 #define HAVE_USE_SCREEN 1
10829 EOF
10830
10831         cat >>confdefs.h <<\EOF
10832 #define HAVE_USE_WINDOW 1
10833 EOF
10834
10835         cat >>confdefs.h <<\EOF
10836 #define HAVE_WRESIZE 1
10837 EOF
10838
10839         cat >>confdefs.h <<\EOF
10840 #define NCURSES_EXT_FUNCS 1
10841 EOF
10842
10843         GENERATED_EXT_FUNCS=generated
10844 else
10845         NCURSES_EXT_FUNCS=0
10846         GENERATED_EXT_FUNCS=
10847 fi
10848
10849 echo "$as_me:10849: checking if you want to build with experimental SCREEN extensions" >&5
10850 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10851
10852 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10853 if test "${enable_sp_funcs+set}" = set; then
10854   enableval="$enable_sp_funcs"
10855   with_sp_funcs=$enableval
10856 else
10857   with_sp_funcs=no
10858 fi;
10859 echo "$as_me:10859: result: $with_sp_funcs" >&5
10860 echo "${ECHO_T}$with_sp_funcs" >&6
10861 if test "$with_sp_funcs" = yes ; then
10862         NCURSES_SP_FUNCS=1
10863         cat >>confdefs.h <<\EOF
10864 #define NCURSES_SP_FUNCS 1
10865 EOF
10866
10867         GENERATED_SP_FUNCS=generated
10868 else
10869         NCURSES_SP_FUNCS=0
10870         GENERATED_SP_FUNCS=
10871 fi
10872
10873 echo "$as_me:10873: checking if you want to build with experimental terminal-driver" >&5
10874 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10875
10876 # Check whether --enable-term-driver or --disable-term-driver was given.
10877 if test "${enable_term_driver+set}" = set; then
10878   enableval="$enable_term_driver"
10879   with_term_driver=$enableval
10880 else
10881   with_term_driver=no
10882 fi;
10883 echo "$as_me:10883: result: $with_term_driver" >&5
10884 echo "${ECHO_T}$with_term_driver" >&6
10885 if test "$with_term_driver" = yes ; then
10886         cat >>confdefs.h <<\EOF
10887 #define USE_TERM_DRIVER 1
10888 EOF
10889
10890         if test "$with_sp_funcs" != yes ; then
10891                 { { echo "$as_me:10891: error: The term-driver option relies upon sp-funcs" >&5
10892 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10893    { (exit 1); exit 1; }; }
10894         fi
10895 fi
10896
10897 ###   use option --enable-const to turn on use of const beyond that in XSI.
10898 echo "$as_me:10898: checking for extended use of const keyword" >&5
10899 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10900
10901 # Check whether --enable-const or --disable-const was given.
10902 if test "${enable_const+set}" = set; then
10903   enableval="$enable_const"
10904   with_ext_const=$enableval
10905 else
10906   with_ext_const=no
10907 fi;
10908 echo "$as_me:10908: result: $with_ext_const" >&5
10909 echo "${ECHO_T}$with_ext_const" >&6
10910 NCURSES_CONST='/*nothing*/'
10911 if test "$with_ext_const" = yes ; then
10912         NCURSES_CONST=const
10913 fi
10914
10915 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10916 echo "$as_me:10916: checking if you want to use extended colors" >&5
10917 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10918
10919 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10920 if test "${enable_ext_colors+set}" = set; then
10921   enableval="$enable_ext_colors"
10922   with_ext_colors=$enableval
10923 else
10924   with_ext_colors=no
10925 fi;
10926 echo "$as_me:10926: result: $with_ext_colors" >&5
10927 echo "${ECHO_T}$with_ext_colors" >&6
10928 NCURSES_EXT_COLORS=0
10929 if test "$with_ext_colors" = yes ; then
10930         if test "$with_widec" != yes ; then
10931                 { { echo "$as_me:10931: error: This option applies only to wide-character library" >&5
10932 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10933    { (exit 1); exit 1; }; }
10934         else
10935                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10936
10937 if test "${with_abi_version+set}" != set; then
10938         case $cf_cv_rel_version in
10939         5.*)
10940                 cf_cv_rel_version=6.0
10941                 cf_cv_abi_version=6
10942                 { echo "$as_me:10942: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10943 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10944                 ;;
10945         esac
10946 fi
10947
10948         fi
10949         NCURSES_EXT_COLORS=1
10950         cat >>confdefs.h <<\EOF
10951 #define NCURSES_EXT_COLORS 1
10952 EOF
10953
10954 fi
10955
10956 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10957 echo "$as_me:10957: checking if you want to use extended mouse encoding" >&5
10958 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10959
10960 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10961 if test "${enable_ext_mouse+set}" = set; then
10962   enableval="$enable_ext_mouse"
10963   with_ext_mouse=$enableval
10964 else
10965   with_ext_mouse=no
10966 fi;
10967 echo "$as_me:10967: result: $with_ext_mouse" >&5
10968 echo "${ECHO_T}$with_ext_mouse" >&6
10969 NCURSES_MOUSE_VERSION=1
10970 if test "$with_ext_mouse" = yes ; then
10971         NCURSES_MOUSE_VERSION=2
10972
10973 if test "${with_abi_version+set}" != set; then
10974         case $cf_cv_rel_version in
10975         5.*)
10976                 cf_cv_rel_version=6.0
10977                 cf_cv_abi_version=6
10978                 { echo "$as_me:10978: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10979 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10980                 ;;
10981         esac
10982 fi
10983
10984 fi
10985
10986 echo "$as_me:10986: checking if you want \$NCURSES_NO_PADDING code" >&5
10987 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10988
10989 # Check whether --enable-no-padding or --disable-no-padding was given.
10990 if test "${enable_no_padding+set}" = set; then
10991   enableval="$enable_no_padding"
10992   with_no_padding=$enableval
10993 else
10994   with_no_padding=$with_ext_funcs
10995 fi;
10996 echo "$as_me:10996: result: $with_no_padding" >&5
10997 echo "${ECHO_T}$with_no_padding" >&6
10998 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10999 #define NCURSES_NO_PADDING 1
11000 EOF
11001
11002 echo "$as_me:11002: checking for ANSI C header files" >&5
11003 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11004 if test "${ac_cv_header_stdc+set}" = set; then
11005   echo $ECHO_N "(cached) $ECHO_C" >&6
11006 else
11007   cat >conftest.$ac_ext <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010 #include <stdlib.h>
11011 #include <stdarg.h>
11012 #include <string.h>
11013 #include <float.h>
11014
11015 _ACEOF
11016 if { (eval echo "$as_me:11016: \"$ac_cpp conftest.$ac_ext\"") >&5
11017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11018   ac_status=$?
11019   egrep -v '^ *\+' conftest.er1 >conftest.err
11020   rm -f conftest.er1
11021   cat conftest.err >&5
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit $ac_status); } >/dev/null; then
11024   if test -s conftest.err; then
11025     ac_cpp_err=$ac_c_preproc_warn_flag
11026   else
11027     ac_cpp_err=
11028   fi
11029 else
11030   ac_cpp_err=yes
11031 fi
11032 if test -z "$ac_cpp_err"; then
11033   ac_cv_header_stdc=yes
11034 else
11035   echo "$as_me: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   ac_cv_header_stdc=no
11038 fi
11039 rm -f conftest.err conftest.$ac_ext
11040
11041 if test $ac_cv_header_stdc = yes; then
11042   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11043   cat >conftest.$ac_ext <<_ACEOF
11044 #line 11044 "configure"
11045 #include "confdefs.h"
11046 #include <string.h>
11047
11048 _ACEOF
11049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11050   egrep "memchr" >/dev/null 2>&1; then
11051   :
11052 else
11053   ac_cv_header_stdc=no
11054 fi
11055 rm -rf conftest*
11056
11057 fi
11058
11059 if test $ac_cv_header_stdc = yes; then
11060   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11061   cat >conftest.$ac_ext <<_ACEOF
11062 #line 11062 "configure"
11063 #include "confdefs.h"
11064 #include <stdlib.h>
11065
11066 _ACEOF
11067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11068   egrep "free" >/dev/null 2>&1; then
11069   :
11070 else
11071   ac_cv_header_stdc=no
11072 fi
11073 rm -rf conftest*
11074
11075 fi
11076
11077 if test $ac_cv_header_stdc = yes; then
11078   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11079   if test "$cross_compiling" = yes; then
11080   :
11081 else
11082   cat >conftest.$ac_ext <<_ACEOF
11083 #line 11083 "configure"
11084 #include "confdefs.h"
11085 #include <ctype.h>
11086 #if ((' ' & 0x0FF) == 0x020)
11087 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11088 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11089 #else
11090 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11091                      || ('j' <= (c) && (c) <= 'r') \
11092                      || ('s' <= (c) && (c) <= 'z'))
11093 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11094 #endif
11095
11096 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11097 int
11098 main ()
11099 {
11100   int i;
11101   for (i = 0; i < 256; i++)
11102     if (XOR (islower (i), ISLOWER (i))
11103         || toupper (i) != TOUPPER (i))
11104       $ac_main_return(2);
11105   $ac_main_return (0);
11106 }
11107 _ACEOF
11108 rm -f conftest$ac_exeext
11109 if { (eval echo "$as_me:11109: \"$ac_link\"") >&5
11110   (eval $ac_link) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11114   { (eval echo "$as_me:11114: \"$ac_try\"") >&5
11115   (eval $ac_try) 2>&5
11116   ac_status=$?
11117   echo "$as_me:11117: \$? = $ac_status" >&5
11118   (exit $ac_status); }; }; then
11119   :
11120 else
11121   echo "$as_me: program exited with status $ac_status" >&5
11122 echo "$as_me: failed program was:" >&5
11123 cat conftest.$ac_ext >&5
11124 ac_cv_header_stdc=no
11125 fi
11126 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11127 fi
11128 fi
11129 fi
11130 echo "$as_me:11130: result: $ac_cv_header_stdc" >&5
11131 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11132 if test $ac_cv_header_stdc = yes; then
11133
11134 cat >>confdefs.h <<\EOF
11135 #define STDC_HEADERS 1
11136 EOF
11137
11138 fi
11139
11140 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11141
11142 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11143                   inttypes.h stdint.h unistd.h
11144 do
11145 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11146 echo "$as_me:11146: checking for $ac_header" >&5
11147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11149   echo $ECHO_N "(cached) $ECHO_C" >&6
11150 else
11151   cat >conftest.$ac_ext <<_ACEOF
11152 #line 11152 "configure"
11153 #include "confdefs.h"
11154 $ac_includes_default
11155 #include <$ac_header>
11156 _ACEOF
11157 rm -f conftest.$ac_objext
11158 if { (eval echo "$as_me:11158: \"$ac_compile\"") >&5
11159   (eval $ac_compile) 2>&5
11160   ac_status=$?
11161   echo "$as_me:11161: \$? = $ac_status" >&5
11162   (exit $ac_status); } &&
11163          { ac_try='test -s conftest.$ac_objext'
11164   { (eval echo "$as_me:11164: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   eval "$as_ac_Header=yes"
11170 else
11171   echo "$as_me: failed program was:" >&5
11172 cat conftest.$ac_ext >&5
11173 eval "$as_ac_Header=no"
11174 fi
11175 rm -f conftest.$ac_objext conftest.$ac_ext
11176 fi
11177 echo "$as_me:11177: result: `eval echo '${'$as_ac_Header'}'`" >&5
11178 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11180   cat >>confdefs.h <<EOF
11181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11182 EOF
11183
11184 fi
11185 done
11186
11187 echo "$as_me:11187: checking for signed char" >&5
11188 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11189 if test "${ac_cv_type_signed_char+set}" = set; then
11190   echo $ECHO_N "(cached) $ECHO_C" >&6
11191 else
11192   cat >conftest.$ac_ext <<_ACEOF
11193 #line 11193 "configure"
11194 #include "confdefs.h"
11195 $ac_includes_default
11196 int
11197 main ()
11198 {
11199 if ((signed char *) 0)
11200   return 0;
11201 if (sizeof (signed char))
11202   return 0;
11203   ;
11204   return 0;
11205 }
11206 _ACEOF
11207 rm -f conftest.$ac_objext
11208 if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
11209   (eval $ac_compile) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); } &&
11213          { ac_try='test -s conftest.$ac_objext'
11214   { (eval echo "$as_me:11214: \"$ac_try\"") >&5
11215   (eval $ac_try) 2>&5
11216   ac_status=$?
11217   echo "$as_me:11217: \$? = $ac_status" >&5
11218   (exit $ac_status); }; }; then
11219   ac_cv_type_signed_char=yes
11220 else
11221   echo "$as_me: failed program was:" >&5
11222 cat conftest.$ac_ext >&5
11223 ac_cv_type_signed_char=no
11224 fi
11225 rm -f conftest.$ac_objext conftest.$ac_ext
11226 fi
11227 echo "$as_me:11227: result: $ac_cv_type_signed_char" >&5
11228 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11229
11230 echo "$as_me:11230: checking size of signed char" >&5
11231 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11232 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11233   echo $ECHO_N "(cached) $ECHO_C" >&6
11234 else
11235   if test "$ac_cv_type_signed_char" = yes; then
11236   if test "$cross_compiling" = yes; then
11237   # Depending upon the size, compute the lo and hi bounds.
11238 cat >conftest.$ac_ext <<_ACEOF
11239 #line 11239 "configure"
11240 #include "confdefs.h"
11241 $ac_includes_default
11242 int
11243 main ()
11244 {
11245 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11246   ;
11247   return 0;
11248 }
11249 _ACEOF
11250 rm -f conftest.$ac_objext
11251 if { (eval echo "$as_me:11251: \"$ac_compile\"") >&5
11252   (eval $ac_compile) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); } &&
11256          { ac_try='test -s conftest.$ac_objext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   ac_lo=0 ac_mid=0
11263   while :; do
11264     cat >conftest.$ac_ext <<_ACEOF
11265 #line 11265 "configure"
11266 #include "confdefs.h"
11267 $ac_includes_default
11268 int
11269 main ()
11270 {
11271 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11272   ;
11273   return 0;
11274 }
11275 _ACEOF
11276 rm -f conftest.$ac_objext
11277 if { (eval echo "$as_me:11277: \"$ac_compile\"") >&5
11278   (eval $ac_compile) 2>&5
11279   ac_status=$?
11280   echo "$as_me:11280: \$? = $ac_status" >&5
11281   (exit $ac_status); } &&
11282          { ac_try='test -s conftest.$ac_objext'
11283   { (eval echo "$as_me:11283: \"$ac_try\"") >&5
11284   (eval $ac_try) 2>&5
11285   ac_status=$?
11286   echo "$as_me:11286: \$? = $ac_status" >&5
11287   (exit $ac_status); }; }; then
11288   ac_hi=$ac_mid; break
11289 else
11290   echo "$as_me: failed program was:" >&5
11291 cat conftest.$ac_ext >&5
11292 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11293 fi
11294 rm -f conftest.$ac_objext conftest.$ac_ext
11295   done
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 cat conftest.$ac_ext >&5
11299 ac_hi=-1 ac_mid=-1
11300   while :; do
11301     cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304 $ac_includes_default
11305 int
11306 main ()
11307 {
11308 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11309   ;
11310   return 0;
11311 }
11312 _ACEOF
11313 rm -f conftest.$ac_objext
11314 if { (eval echo "$as_me:11314: \"$ac_compile\"") >&5
11315   (eval $ac_compile) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); } &&
11319          { ac_try='test -s conftest.$ac_objext'
11320   { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit $ac_status); }; }; then
11325   ac_lo=$ac_mid; break
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 cat conftest.$ac_ext >&5
11329 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11330 fi
11331 rm -f conftest.$ac_objext conftest.$ac_ext
11332   done
11333 fi
11334 rm -f conftest.$ac_objext conftest.$ac_ext
11335 # Binary search between lo and hi bounds.
11336 while test "x$ac_lo" != "x$ac_hi"; do
11337   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11338   cat >conftest.$ac_ext <<_ACEOF
11339 #line 11339 "configure"
11340 #include "confdefs.h"
11341 $ac_includes_default
11342 int
11343 main ()
11344 {
11345 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 rm -f conftest.$ac_objext
11351 if { (eval echo "$as_me:11351: \"$ac_compile\"") >&5
11352   (eval $ac_compile) 2>&5
11353   ac_status=$?
11354   echo "$as_me:11354: \$? = $ac_status" >&5
11355   (exit $ac_status); } &&
11356          { ac_try='test -s conftest.$ac_objext'
11357   { (eval echo "$as_me:11357: \"$ac_try\"") >&5
11358   (eval $ac_try) 2>&5
11359   ac_status=$?
11360   echo "$as_me:11360: \$? = $ac_status" >&5
11361   (exit $ac_status); }; }; then
11362   ac_hi=$ac_mid
11363 else
11364   echo "$as_me: failed program was:" >&5
11365 cat conftest.$ac_ext >&5
11366 ac_lo=`expr $ac_mid + 1`
11367 fi
11368 rm -f conftest.$ac_objext conftest.$ac_ext
11369 done
11370 ac_cv_sizeof_signed_char=$ac_lo
11371 else
11372   if test "$cross_compiling" = yes; then
11373   { { echo "$as_me:11373: error: cannot run test program while cross compiling" >&5
11374 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11375    { (exit 1); exit 1; }; }
11376 else
11377   cat >conftest.$ac_ext <<_ACEOF
11378 #line 11378 "configure"
11379 #include "confdefs.h"
11380 $ac_includes_default
11381 int
11382 main ()
11383 {
11384 FILE *f = fopen ("conftest.val", "w");
11385 if (!f)
11386   $ac_main_return (1);
11387 fprintf (f, "%d", (sizeof (signed char)));
11388 fclose (f);
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 rm -f conftest$ac_exeext
11394 if { (eval echo "$as_me:11394: \"$ac_link\"") >&5
11395   (eval $ac_link) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11399   { (eval echo "$as_me:11399: \"$ac_try\"") >&5
11400   (eval $ac_try) 2>&5
11401   ac_status=$?
11402   echo "$as_me:11402: \$? = $ac_status" >&5
11403   (exit $ac_status); }; }; then
11404   ac_cv_sizeof_signed_char=`cat conftest.val`
11405 else
11406   echo "$as_me: program exited with status $ac_status" >&5
11407 echo "$as_me: failed program was:" >&5
11408 cat conftest.$ac_ext >&5
11409 fi
11410 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11411 fi
11412 fi
11413 rm -f conftest.val
11414 else
11415   ac_cv_sizeof_signed_char=0
11416 fi
11417 fi
11418 echo "$as_me:11418: result: $ac_cv_sizeof_signed_char" >&5
11419 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11420 cat >>confdefs.h <<EOF
11421 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11422 EOF
11423
11424 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11425         NCURSES_SBOOL="signed char"
11426 else
11427         NCURSES_SBOOL="char"
11428 fi
11429 echo "$as_me:11429: checking if you want to use signed Boolean array in term.h" >&5
11430 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11431
11432 # Check whether --enable-signed-char or --disable-signed-char was given.
11433 if test "${enable_signed_char+set}" = set; then
11434   enableval="$enable_signed_char"
11435   with_signed_char=$enableval
11436 else
11437   with_signed_char=no
11438 fi;
11439 echo "$as_me:11439: result: $with_signed_char" >&5
11440 echo "${ECHO_T}$with_signed_char" >&6
11441 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11442
11443 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11444 echo "$as_me:11444: checking if you want SIGWINCH handler" >&5
11445 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11446
11447 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11448 if test "${enable_sigwinch+set}" = set; then
11449   enableval="$enable_sigwinch"
11450   with_sigwinch=$enableval
11451 else
11452   with_sigwinch=$with_ext_funcs
11453 fi;
11454 echo "$as_me:11454: result: $with_sigwinch" >&5
11455 echo "${ECHO_T}$with_sigwinch" >&6
11456 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11457 #define USE_SIGWINCH 1
11458 EOF
11459
11460 ###   use option --enable-tcap-names to allow user to define new capabilities
11461 echo "$as_me:11461: checking if you want user-definable terminal capabilities like termcap" >&5
11462 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11463
11464 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11465 if test "${enable_tcap_names+set}" = set; then
11466   enableval="$enable_tcap_names"
11467   with_tcap_names=$enableval
11468 else
11469   with_tcap_names=$with_ext_funcs
11470 fi;
11471 echo "$as_me:11471: result: $with_tcap_names" >&5
11472 echo "${ECHO_T}$with_tcap_names" >&6
11473 NCURSES_XNAMES=0
11474 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11475
11476 ###############################################################################
11477 # These options are relatively safe to experiment with.
11478
11479 echo "$as_me:11479: checking if you want all development code" >&5
11480 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11481
11482 # Check whether --with-develop or --without-develop was given.
11483 if test "${with_develop+set}" = set; then
11484   withval="$with_develop"
11485   with_develop=$withval
11486 else
11487   with_develop=no
11488 fi;
11489 echo "$as_me:11489: result: $with_develop" >&5
11490 echo "${ECHO_T}$with_develop" >&6
11491
11492 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11493 echo "$as_me:11493: checking if you want hard-tabs code" >&5
11494 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11495
11496 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11497 if test "${enable_hard_tabs+set}" = set; then
11498   enableval="$enable_hard_tabs"
11499
11500 else
11501   enable_hard_tabs=$with_develop
11502 fi;
11503 echo "$as_me:11503: result: $enable_hard_tabs" >&5
11504 echo "${ECHO_T}$enable_hard_tabs" >&6
11505 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11506 #define USE_HARD_TABS 1
11507 EOF
11508
11509 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11510 echo "$as_me:11510: checking if you want limited support for xmc" >&5
11511 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11512
11513 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11514 if test "${enable_xmc_glitch+set}" = set; then
11515   enableval="$enable_xmc_glitch"
11516
11517 else
11518   enable_xmc_glitch=$with_develop
11519 fi;
11520 echo "$as_me:11520: result: $enable_xmc_glitch" >&5
11521 echo "${ECHO_T}$enable_xmc_glitch" >&6
11522 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11523 #define USE_XMC_SUPPORT 1
11524 EOF
11525
11526 ###############################################################################
11527 # These are just experimental, probably should not be in a package:
11528
11529 echo "$as_me:11529: checking if you do not want to assume colors are white-on-black" >&5
11530 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11531
11532 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11533 if test "${enable_assumed_color+set}" = set; then
11534   enableval="$enable_assumed_color"
11535   with_assumed_color=$enableval
11536 else
11537   with_assumed_color=yes
11538 fi;
11539 echo "$as_me:11539: result: $with_assumed_color" >&5
11540 echo "${ECHO_T}$with_assumed_color" >&6
11541 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11542 #define USE_ASSUMED_COLOR 1
11543 EOF
11544
11545 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11546 echo "$as_me:11546: checking if you want hashmap scrolling-optimization code" >&5
11547 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11548
11549 # Check whether --enable-hashmap or --disable-hashmap was given.
11550 if test "${enable_hashmap+set}" = set; then
11551   enableval="$enable_hashmap"
11552   with_hashmap=$enableval
11553 else
11554   with_hashmap=yes
11555 fi;
11556 echo "$as_me:11556: result: $with_hashmap" >&5
11557 echo "${ECHO_T}$with_hashmap" >&6
11558 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11559 #define USE_HASHMAP 1
11560 EOF
11561
11562 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11563 echo "$as_me:11563: checking if you want colorfgbg code" >&5
11564 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11565
11566 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11567 if test "${enable_colorfgbg+set}" = set; then
11568   enableval="$enable_colorfgbg"
11569   with_colorfgbg=$enableval
11570 else
11571   with_colorfgbg=no
11572 fi;
11573 echo "$as_me:11573: result: $with_colorfgbg" >&5
11574 echo "${ECHO_T}$with_colorfgbg" >&6
11575 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11576 #define USE_COLORFGBG 1
11577 EOF
11578
11579 ###   use option --enable-interop to turn on use of bindings used for interop
11580 echo "$as_me:11580: checking if you want interop bindings" >&5
11581 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11582
11583 # Check whether --enable-interop or --disable-interop was given.
11584 if test "${enable_interop+set}" = set; then
11585   enableval="$enable_interop"
11586   with_exp_interop=$enableval
11587 else
11588   with_exp_interop=no
11589 fi;
11590 echo "$as_me:11590: result: $with_exp_interop" >&5
11591 echo "${ECHO_T}$with_exp_interop" >&6
11592
11593 NCURSES_INTEROP_FUNCS=0
11594 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11595
11596 # This is still experimental (20080329), but should ultimately be moved to
11597 # the script-block --with-normal, etc.
11598
11599 echo "$as_me:11599: checking if you want to link with the pthread library" >&5
11600 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11601
11602 # Check whether --with-pthread or --without-pthread was given.
11603 if test "${with_pthread+set}" = set; then
11604   withval="$with_pthread"
11605   with_pthread=$withval
11606 else
11607   with_pthread=no
11608 fi;
11609 echo "$as_me:11609: result: $with_pthread" >&5
11610 echo "${ECHO_T}$with_pthread" >&6
11611
11612 if test "$with_pthread" != no ; then
11613     echo "$as_me:11613: checking for pthread.h" >&5
11614 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11615 if test "${ac_cv_header_pthread_h+set}" = set; then
11616   echo $ECHO_N "(cached) $ECHO_C" >&6
11617 else
11618   cat >conftest.$ac_ext <<_ACEOF
11619 #line 11619 "configure"
11620 #include "confdefs.h"
11621 #include <pthread.h>
11622 _ACEOF
11623 if { (eval echo "$as_me:11623: \"$ac_cpp conftest.$ac_ext\"") >&5
11624   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11625   ac_status=$?
11626   egrep -v '^ *\+' conftest.er1 >conftest.err
11627   rm -f conftest.er1
11628   cat conftest.err >&5
11629   echo "$as_me:11629: \$? = $ac_status" >&5
11630   (exit $ac_status); } >/dev/null; then
11631   if test -s conftest.err; then
11632     ac_cpp_err=$ac_c_preproc_warn_flag
11633   else
11634     ac_cpp_err=
11635   fi
11636 else
11637   ac_cpp_err=yes
11638 fi
11639 if test -z "$ac_cpp_err"; then
11640   ac_cv_header_pthread_h=yes
11641 else
11642   echo "$as_me: failed program was:" >&5
11643   cat conftest.$ac_ext >&5
11644   ac_cv_header_pthread_h=no
11645 fi
11646 rm -f conftest.err conftest.$ac_ext
11647 fi
11648 echo "$as_me:11648: result: $ac_cv_header_pthread_h" >&5
11649 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11650 if test $ac_cv_header_pthread_h = yes; then
11651
11652         cat >>confdefs.h <<\EOF
11653 #define HAVE_PTHREADS_H 1
11654 EOF
11655
11656         for cf_lib_pthread in pthread c_r
11657         do
11658             echo "$as_me:11658: checking if we can link with the $cf_lib_pthread library" >&5
11659 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11660             cf_save_LIBS="$LIBS"
11661             LIBS="-l$cf_lib_pthread $LIBS"
11662             cat >conftest.$ac_ext <<_ACEOF
11663 #line 11663 "configure"
11664 #include "confdefs.h"
11665
11666 #include <pthread.h>
11667
11668 int
11669 main ()
11670 {
11671
11672                 int rc = pthread_create(0,0,0,0);
11673                 int r2 = pthread_mutexattr_settype(0, 0);
11674
11675   ;
11676   return 0;
11677 }
11678 _ACEOF
11679 rm -f conftest.$ac_objext conftest$ac_exeext
11680 if { (eval echo "$as_me:11680: \"$ac_link\"") >&5
11681   (eval $ac_link) 2>&5
11682   ac_status=$?
11683   echo "$as_me:11683: \$? = $ac_status" >&5
11684   (exit $ac_status); } &&
11685          { ac_try='test -s conftest$ac_exeext'
11686   { (eval echo "$as_me:11686: \"$ac_try\"") >&5
11687   (eval $ac_try) 2>&5
11688   ac_status=$?
11689   echo "$as_me:11689: \$? = $ac_status" >&5
11690   (exit $ac_status); }; }; then
11691   with_pthread=yes
11692 else
11693   echo "$as_me: failed program was:" >&5
11694 cat conftest.$ac_ext >&5
11695 with_pthread=no
11696 fi
11697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11698             LIBS="$cf_save_LIBS"
11699             echo "$as_me:11699: result: $with_pthread" >&5
11700 echo "${ECHO_T}$with_pthread" >&6
11701             test "$with_pthread" = yes && break
11702         done
11703
11704         if test "$with_pthread" = yes ; then
11705             LIBS="-l$cf_lib_pthread $LIBS"
11706             cat >>confdefs.h <<\EOF
11707 #define HAVE_LIBPTHREADS 1
11708 EOF
11709
11710         else
11711             { { echo "$as_me:11711: error: Cannot link with pthread library" >&5
11712 echo "$as_me: error: Cannot link with pthread library" >&2;}
11713    { (exit 1); exit 1; }; }
11714         fi
11715
11716 fi
11717
11718 fi
11719
11720 if test "x$with_pthread" != xno; then
11721         echo "$as_me:11721: checking for pthread_kill" >&5
11722 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11723 if test "${ac_cv_func_pthread_kill+set}" = set; then
11724   echo $ECHO_N "(cached) $ECHO_C" >&6
11725 else
11726   cat >conftest.$ac_ext <<_ACEOF
11727 #line 11727 "configure"
11728 #include "confdefs.h"
11729 /* System header to define __stub macros and hopefully few prototypes,
11730     which can conflict with char pthread_kill (); below.  */
11731 #include <assert.h>
11732 /* Override any gcc2 internal prototype to avoid an error.  */
11733 #ifdef __cplusplus
11734 extern "C"
11735 #endif
11736 /* We use char because int might match the return type of a gcc2
11737    builtin and then its argument prototype would still apply.  */
11738 char pthread_kill ();
11739 char (*f) ();
11740
11741 int
11742 main ()
11743 {
11744 /* The GNU C library defines this for functions which it implements
11745     to always fail with ENOSYS.  Some functions are actually named
11746     something starting with __ and the normal name is an alias.  */
11747 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11748 choke me
11749 #else
11750 f = pthread_kill;
11751 #endif
11752
11753   ;
11754   return 0;
11755 }
11756 _ACEOF
11757 rm -f conftest.$ac_objext conftest$ac_exeext
11758 if { (eval echo "$as_me:11758: \"$ac_link\"") >&5
11759   (eval $ac_link) 2>&5
11760   ac_status=$?
11761   echo "$as_me:11761: \$? = $ac_status" >&5
11762   (exit $ac_status); } &&
11763          { ac_try='test -s conftest$ac_exeext'
11764   { (eval echo "$as_me:11764: \"$ac_try\"") >&5
11765   (eval $ac_try) 2>&5
11766   ac_status=$?
11767   echo "$as_me:11767: \$? = $ac_status" >&5
11768   (exit $ac_status); }; }; then
11769   ac_cv_func_pthread_kill=yes
11770 else
11771   echo "$as_me: failed program was:" >&5
11772 cat conftest.$ac_ext >&5
11773 ac_cv_func_pthread_kill=no
11774 fi
11775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11776 fi
11777 echo "$as_me:11777: result: $ac_cv_func_pthread_kill" >&5
11778 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11779 if test $ac_cv_func_pthread_kill = yes; then
11780
11781                 echo "$as_me:11781: checking if you want to allow EINTR in wgetch with pthreads" >&5
11782 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11783
11784 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11785 if test "${enable_pthreads_eintr+set}" = set; then
11786   enableval="$enable_pthreads_eintr"
11787   use_pthreads_eintr=$enableval
11788 else
11789   use_pthreads_eintr=no
11790 fi;
11791                 echo "$as_me:11791: result: $use_pthreads_eintr" >&5
11792 echo "${ECHO_T}$use_pthreads_eintr" >&6
11793                 if test $use_pthreads_eintr = yes ; then
11794                         cat >>confdefs.h <<\EOF
11795 #define USE_PTHREADS_EINTR 1
11796 EOF
11797
11798                 fi
11799 fi
11800
11801         echo "$as_me:11801: checking if you want to use weak-symbols for pthreads" >&5
11802 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11803
11804 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11805 if test "${enable_weak_symbols+set}" = set; then
11806   enableval="$enable_weak_symbols"
11807   use_weak_symbols=$enableval
11808 else
11809   use_weak_symbols=no
11810 fi;
11811         echo "$as_me:11811: result: $use_weak_symbols" >&5
11812 echo "${ECHO_T}$use_weak_symbols" >&6
11813         if test "$use_weak_symbols" = yes ; then
11814
11815 echo "$as_me:11815: checking if $CC supports weak symbols" >&5
11816 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11817 if test "${cf_cv_weak_symbols+set}" = set; then
11818   echo $ECHO_N "(cached) $ECHO_C" >&6
11819 else
11820
11821 cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824
11825 #include <stdio.h>
11826 int
11827 main ()
11828 {
11829
11830 #if defined(__GNUC__)
11831 #  if defined __USE_ISOC99
11832 #    define _cat_pragma(exp)    _Pragma(#exp)
11833 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11834 #  else
11835 #    define _weak_pragma(exp)
11836 #  endif
11837 #  define _declare(name)        __extension__ extern __typeof__(name) name
11838 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11839 #endif
11840
11841 weak_symbol(fopen);
11842
11843   ;
11844   return 0;
11845 }
11846 _ACEOF
11847 rm -f conftest.$ac_objext
11848 if { (eval echo "$as_me:11848: \"$ac_compile\"") >&5
11849   (eval $ac_compile) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit $ac_status); } &&
11853          { ac_try='test -s conftest.$ac_objext'
11854   { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:11857: \$? = $ac_status" >&5
11858   (exit $ac_status); }; }; then
11859   cf_cv_weak_symbols=yes
11860 else
11861   echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 cf_cv_weak_symbols=no
11864 fi
11865 rm -f conftest.$ac_objext conftest.$ac_ext
11866
11867 fi
11868 echo "$as_me:11868: result: $cf_cv_weak_symbols" >&5
11869 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11870
11871         else
11872                 cf_cv_weak_symbols=no
11873         fi
11874
11875         if test $cf_cv_weak_symbols = yes ; then
11876                 cat >>confdefs.h <<\EOF
11877 #define USE_WEAK_SYMBOLS 1
11878 EOF
11879
11880         fi
11881 fi
11882
11883 PTHREAD=
11884 if test "$with_pthread" = "yes" ; then
11885     cat >>confdefs.h <<\EOF
11886 #define USE_PTHREADS 1
11887 EOF
11888
11889     enable_reentrant=yes
11890     if test $cf_cv_weak_symbols = yes ; then
11891         PTHREAD=-lpthread
11892     fi
11893 fi
11894
11895 # Reentrant code has to be opaque; there's little advantage to making ncurses
11896 # opaque outside of that, so there is no --enable-opaque option.  We can use
11897 # this option without --with-pthreads, but this will be always set for
11898 # pthreads.
11899 echo "$as_me:11899: checking if you want experimental reentrant code" >&5
11900 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11901
11902 # Check whether --enable-reentrant or --disable-reentrant was given.
11903 if test "${enable_reentrant+set}" = set; then
11904   enableval="$enable_reentrant"
11905   with_reentrant=$enableval
11906 else
11907   with_reentrant=no
11908 fi;
11909 echo "$as_me:11909: result: $with_reentrant" >&5
11910 echo "${ECHO_T}$with_reentrant" >&6
11911 if test "$with_reentrant" = yes ; then
11912         cf_cv_enable_reentrant=1
11913         cf_cv_enable_opaque="NCURSES_INTERNALS"
11914         NCURSES_OPAQUE=1
11915         NCURSES_SIZE_T=int
11916         if test $cf_cv_weak_symbols = yes ; then
11917
11918 # remove pthread library from $LIBS
11919 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11920
11921                 TEST_LIBS="-lpthread $TEST_LIBS"
11922                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11923         else
11924                 LIB_SUFFIX="t${LIB_SUFFIX}"
11925         fi
11926         cat >>confdefs.h <<\EOF
11927 #define USE_REENTRANT 1
11928 EOF
11929
11930 if test "${with_abi_version+set}" != set; then
11931         case $cf_cv_rel_version in
11932         5.*)
11933                 cf_cv_rel_version=6.0
11934                 cf_cv_abi_version=6
11935                 { echo "$as_me:11935: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11936 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11937                 ;;
11938         esac
11939 fi
11940
11941 else
11942         cf_cv_enable_reentrant=0
11943         cf_cv_enable_opaque="NCURSES_OPAQUE"
11944         NCURSES_OPAQUE=0
11945         NCURSES_SIZE_T=short
11946 fi
11947
11948 ### Allow using a different wrap-prefix
11949 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11950         echo "$as_me:11950: checking for prefix used to wrap public variables" >&5
11951 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11952
11953 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11954 if test "${with_wrap_prefix+set}" = set; then
11955   withval="$with_wrap_prefix"
11956   NCURSES_WRAP_PREFIX=$withval
11957 else
11958   NCURSES_WRAP_PREFIX=_nc_
11959 fi;
11960         echo "$as_me:11960: result: $NCURSES_WRAP_PREFIX" >&5
11961 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11962 else
11963         NCURSES_WRAP_PREFIX=_nc_
11964 fi
11965
11966 cat >>confdefs.h <<EOF
11967 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11968 EOF
11969
11970 echo "$as_me:11970: checking if you want experimental safe-sprintf code" >&5
11971 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11972
11973 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11974 if test "${enable_safe_sprintf+set}" = set; then
11975   enableval="$enable_safe_sprintf"
11976   with_safe_sprintf=$enableval
11977 else
11978   with_safe_sprintf=no
11979 fi;
11980 echo "$as_me:11980: result: $with_safe_sprintf" >&5
11981 echo "${ECHO_T}$with_safe_sprintf" >&6
11982 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11983 #define USE_SAFE_SPRINTF 1
11984 EOF
11985
11986 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11987 # when hashmap is used scroll hints are useless
11988 if test "$with_hashmap" = no ; then
11989 echo "$as_me:11989: checking if you want to experiment without scrolling-hints code" >&5
11990 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11991
11992 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11993 if test "${enable_scroll_hints+set}" = set; then
11994   enableval="$enable_scroll_hints"
11995   with_scroll_hints=$enableval
11996 else
11997   with_scroll_hints=yes
11998 fi;
11999 echo "$as_me:11999: result: $with_scroll_hints" >&5
12000 echo "${ECHO_T}$with_scroll_hints" >&6
12001 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12002 #define USE_SCROLL_HINTS 1
12003 EOF
12004
12005 fi
12006
12007 echo "$as_me:12007: checking if you want experimental wgetch-events code" >&5
12008 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12009
12010 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12011 if test "${enable_wgetch_events+set}" = set; then
12012   enableval="$enable_wgetch_events"
12013   with_wgetch_events=$enableval
12014 else
12015   with_wgetch_events=no
12016 fi;
12017 echo "$as_me:12017: result: $with_wgetch_events" >&5
12018 echo "${ECHO_T}$with_wgetch_events" >&6
12019 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12020 #define NCURSES_WGETCH_EVENTS 1
12021 EOF
12022
12023 ###############################################################################
12024
12025 ###     use option --disable-echo to suppress full display compiling commands
12026 echo "$as_me:12026: checking if you want to display full commands during build" >&5
12027 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12028
12029 # Check whether --enable-echo or --disable-echo was given.
12030 if test "${enable_echo+set}" = set; then
12031   enableval="$enable_echo"
12032   with_echo=$enableval
12033 else
12034   with_echo=yes
12035 fi;
12036 if test "$with_echo" = yes; then
12037         ECHO_LINK=
12038 else
12039         ECHO_LINK='@ echo linking $@ ... ;'
12040         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12041         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12042 fi
12043 echo "$as_me:12043: result: $with_echo" >&5
12044 echo "${ECHO_T}$with_echo" >&6
12045
12046 ###     use option --enable-warnings to turn on all gcc warnings
12047 echo "$as_me:12047: checking if you want to see compiler warnings" >&5
12048 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12049
12050 # Check whether --enable-warnings or --disable-warnings was given.
12051 if test "${enable_warnings+set}" = set; then
12052   enableval="$enable_warnings"
12053   with_warnings=$enableval
12054 fi;
12055 echo "$as_me:12055: result: $with_warnings" >&5
12056 echo "${ECHO_T}$with_warnings" >&6
12057
12058 if test "x$with_warnings" = "xyes"; then
12059
12060         ADAFLAGS="$ADAFLAGS -gnatg"
12061
12062 INTEL_COMPILER=no
12063
12064 if test "$GCC" = yes ; then
12065         case $host_os in
12066         linux*|gnu*)
12067                 echo "$as_me:12067: checking if this is really Intel C compiler" >&5
12068 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12069                 cf_save_CFLAGS="$CFLAGS"
12070                 CFLAGS="$CFLAGS -no-gcc"
12071                 cat >conftest.$ac_ext <<_ACEOF
12072 #line 12072 "configure"
12073 #include "confdefs.h"
12074
12075 int
12076 main ()
12077 {
12078
12079 #ifdef __INTEL_COMPILER
12080 #else
12081 make an error
12082 #endif
12083
12084   ;
12085   return 0;
12086 }
12087 _ACEOF
12088 rm -f conftest.$ac_objext
12089 if { (eval echo "$as_me:12089: \"$ac_compile\"") >&5
12090   (eval $ac_compile) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); } &&
12094          { ac_try='test -s conftest.$ac_objext'
12095   { (eval echo "$as_me:12095: \"$ac_try\"") >&5
12096   (eval $ac_try) 2>&5
12097   ac_status=$?
12098   echo "$as_me:12098: \$? = $ac_status" >&5
12099   (exit $ac_status); }; }; then
12100   INTEL_COMPILER=yes
12101 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12102
12103 else
12104   echo "$as_me: failed program was:" >&5
12105 cat conftest.$ac_ext >&5
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108                 CFLAGS="$cf_save_CFLAGS"
12109                 echo "$as_me:12109: result: $INTEL_COMPILER" >&5
12110 echo "${ECHO_T}$INTEL_COMPILER" >&6
12111                 ;;
12112         esac
12113 fi
12114
12115 cat > conftest.$ac_ext <<EOF
12116 #line 12116 "${as_me:-configure}"
12117 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12118 EOF
12119
12120 if test "$INTEL_COMPILER" = yes
12121 then
12122 # The "-wdXXX" options suppress warnings:
12123 # remark #1419: external declaration in primary source file
12124 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12125 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12126 # remark #193: zero used for undefined preprocessing identifier
12127 # remark #593: variable "curs_sb_left_arrow" was set but never used
12128 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12129 # remark #869: parameter "tw" was never referenced
12130 # remark #981: operands are evaluated in unspecified order
12131 # warning #279: controlling expression is constant
12132
12133         { echo "$as_me:12133: checking for $CC warning options..." >&5
12134 echo "$as_me: checking for $CC warning options..." >&6;}
12135         cf_save_CFLAGS="$CFLAGS"
12136         EXTRA_CFLAGS="-Wall"
12137         for cf_opt in \
12138                 wd1419 \
12139                 wd1683 \
12140                 wd1684 \
12141                 wd193 \
12142                 wd593 \
12143                 wd279 \
12144                 wd810 \
12145                 wd869 \
12146                 wd981
12147         do
12148                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12149                 if { (eval echo "$as_me:12149: \"$ac_compile\"") >&5
12150   (eval $ac_compile) 2>&5
12151   ac_status=$?
12152   echo "$as_me:12152: \$? = $ac_status" >&5
12153   (exit $ac_status); }; then
12154                         test -n "$verbose" && echo "$as_me:12154: result: ... -$cf_opt" >&5
12155 echo "${ECHO_T}... -$cf_opt" >&6
12156                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12157                 fi
12158         done
12159         CFLAGS="$cf_save_CFLAGS"
12160
12161 elif test "$GCC" = yes
12162 then
12163         { echo "$as_me:12163: checking for $CC warning options..." >&5
12164 echo "$as_me: checking for $CC warning options..." >&6;}
12165         cf_save_CFLAGS="$CFLAGS"
12166         EXTRA_CFLAGS=
12167         cf_warn_CONST=""
12168         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12169         for cf_opt in W Wall \
12170                 Wbad-function-cast \
12171                 Wcast-align \
12172                 Wcast-qual \
12173                 Winline \
12174                 Wmissing-declarations \
12175                 Wmissing-prototypes \
12176                 Wnested-externs \
12177                 Wpointer-arith \
12178                 Wshadow \
12179                 Wstrict-prototypes \
12180                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12181         do
12182                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12183                 if { (eval echo "$as_me:12183: \"$ac_compile\"") >&5
12184   (eval $ac_compile) 2>&5
12185   ac_status=$?
12186   echo "$as_me:12186: \$? = $ac_status" >&5
12187   (exit $ac_status); }; then
12188                         test -n "$verbose" && echo "$as_me:12188: result: ... -$cf_opt" >&5
12189 echo "${ECHO_T}... -$cf_opt" >&6
12190                         case $cf_opt in #(vi
12191                         Wcast-qual) #(vi
12192                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12193                                 ;;
12194                         Winline) #(vi
12195                                 case $GCC_VERSION in
12196                                 [34].*)
12197                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12198
12199 echo "${as_me:-configure}:12199: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12200
12201                                         continue;;
12202                                 esac
12203                                 ;;
12204                         esac
12205                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12206                 fi
12207         done
12208         CFLAGS="$cf_save_CFLAGS"
12209 fi
12210 rm -rf conftest*
12211
12212         if test "$cf_with_cxx" = yes ; then
12213
12214 INTEL_CPLUSPLUS=no
12215
12216 if test "$GCC" = yes ; then
12217         case $host_os in
12218         linux*|gnu*)
12219                 echo "$as_me:12219: checking if this is really Intel C++ compiler" >&5
12220 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12221                 cf_save_CFLAGS="$CXXFLAGS"
12222                 CXXFLAGS="$CXXFLAGS -no-gcc"
12223                 cat >conftest.$ac_ext <<_ACEOF
12224 #line 12224 "configure"
12225 #include "confdefs.h"
12226
12227 int
12228 main ()
12229 {
12230
12231 #ifdef __INTEL_COMPILER
12232 #else
12233 make an error
12234 #endif
12235
12236   ;
12237   return 0;
12238 }
12239 _ACEOF
12240 rm -f conftest.$ac_objext
12241 if { (eval echo "$as_me:12241: \"$ac_compile\"") >&5
12242   (eval $ac_compile) 2>&5
12243   ac_status=$?
12244   echo "$as_me:12244: \$? = $ac_status" >&5
12245   (exit $ac_status); } &&
12246          { ac_try='test -s conftest.$ac_objext'
12247   { (eval echo "$as_me:12247: \"$ac_try\"") >&5
12248   (eval $ac_try) 2>&5
12249   ac_status=$?
12250   echo "$as_me:12250: \$? = $ac_status" >&5
12251   (exit $ac_status); }; }; then
12252   INTEL_CPLUSPLUS=yes
12253 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12254
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 cat conftest.$ac_ext >&5
12258 fi
12259 rm -f conftest.$ac_objext conftest.$ac_ext
12260                 CXXFLAGS="$cf_save_CFLAGS"
12261                 echo "$as_me:12261: result: $INTEL_CPLUSPLUS" >&5
12262 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12263                 ;;
12264         esac
12265 fi
12266
12267 ac_ext=cc
12268 ac_cpp='$CXXCPP $CPPFLAGS'
12269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12272 ac_main_return=return
12273
12274 cat > conftest.$ac_ext <<EOF
12275 #line 12275 "configure"
12276 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12277 EOF
12278
12279 if test "$INTEL_CPLUSPLUS" = yes
12280 then
12281 # The "-wdXXX" options suppress warnings:
12282 # remark #1419: external declaration in primary source file
12283 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12284 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12285 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12286 # remark #193: zero used for undefined preprocessing identifier
12287 # remark #593: variable "curs_sb_left_arrow" was set but never used
12288 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12289 # remark #869: parameter "tw" was never referenced
12290 # remark #981: operands are evaluated in unspecified order
12291 # warning #269: invalid format string conversion
12292
12293         { echo "$as_me:12293: checking for $CC warning options..." >&5
12294 echo "$as_me: checking for $CC warning options..." >&6;}
12295         cf_save_CXXFLAGS="$CXXFLAGS"
12296         EXTRA_CXXFLAGS="-Wall"
12297         for cf_opt in \
12298                 wd1419 \
12299                 wd1682 \
12300                 wd1683 \
12301                 wd1684 \
12302                 wd193 \
12303                 wd279 \
12304                 wd593 \
12305                 wd810 \
12306                 wd869 \
12307                 wd981
12308         do
12309                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12310                 if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
12311   (eval $ac_compile) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; then
12315                         test -n "$verbose" && echo "$as_me:12315: result: ... -$cf_opt" >&5
12316 echo "${ECHO_T}... -$cf_opt" >&6
12317                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12318                 fi
12319         done
12320         CXXFLAGS="$cf_save_CXXFLAGS"
12321
12322 elif test "$GXX" = yes
12323 then
12324         { echo "$as_me:12324: checking for $CXX warning options..." >&5
12325 echo "$as_me: checking for $CXX warning options..." >&6;}
12326         cf_save_CXXFLAGS="$CXXFLAGS"
12327         EXTRA_CXXFLAGS="-W -Wall"
12328         cf_gxx_extra_warnings=""
12329         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12330         case "$GCC_VERSION" in
12331         [1-2].*)
12332                 ;;
12333         *)
12334                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12335                 ;;
12336         esac
12337         for cf_opt in \
12338                 Wabi \
12339                 fabi-version=0 \
12340                 Woverloaded-virtual \
12341                 Wsign-promo \
12342                 Wsynth \
12343                 Wold-style-cast \
12344                 Wcast-align \
12345                 Wcast-qual \
12346                 Wmissing-prototypes \
12347                 Wpointer-arith \
12348                 Wshadow \
12349                 Wstrict-prototypes \
12350                 Wundef $cf_gxx_extra_warnings Wno-unused
12351         do
12352                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12353                 if { (eval echo "$as_me:12353: \"$ac_compile\"") >&5
12354   (eval $ac_compile) 2>&5
12355   ac_status=$?
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit $ac_status); }; then
12358                         test -n "$verbose" && echo "$as_me:12358: result: ... -$cf_opt" >&5
12359 echo "${ECHO_T}... -$cf_opt" >&6
12360                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12361                 else
12362                         test -n "$verbose" && echo "$as_me:12362: result: ... no -$cf_opt" >&5
12363 echo "${ECHO_T}... no -$cf_opt" >&6
12364                 fi
12365         done
12366         CXXFLAGS="$cf_save_CXXFLAGS"
12367 fi
12368
12369 rm -rf conftest*
12370 ac_ext=c
12371 ac_cpp='$CPP $CPPFLAGS'
12372 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12373 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12374 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12375 ac_main_return=return
12376
12377         fi
12378 fi
12379
12380 if test "$GCC" = yes
12381 then
12382 cat > conftest.i <<EOF
12383 #ifndef GCC_PRINTF
12384 #define GCC_PRINTF 0
12385 #endif
12386 #ifndef GCC_SCANF
12387 #define GCC_SCANF 0
12388 #endif
12389 #ifndef GCC_NORETURN
12390 #define GCC_NORETURN /* nothing */
12391 #endif
12392 #ifndef GCC_UNUSED
12393 #define GCC_UNUSED /* nothing */
12394 #endif
12395 EOF
12396 if test "$GCC" = yes
12397 then
12398         { echo "$as_me:12398: checking for $CC __attribute__ directives..." >&5
12399 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12400 cat > conftest.$ac_ext <<EOF
12401 #line 12401 "${as_me:-configure}"
12402 #include "confdefs.h"
12403 #include "conftest.h"
12404 #include "conftest.i"
12405 #if     GCC_PRINTF
12406 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12407 #else
12408 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12409 #endif
12410 #if     GCC_SCANF
12411 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12412 #else
12413 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12414 #endif
12415 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12416 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12417 extern void foo(void) GCC_NORETURN;
12418 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12419 EOF
12420         cf_printf_attribute=no
12421         cf_scanf_attribute=no
12422         for cf_attribute in scanf printf unused noreturn
12423         do
12424
12425 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12426
12427                 cf_directive="__attribute__(($cf_attribute))"
12428                 echo "checking for $CC $cf_directive" 1>&5
12429
12430                 case $cf_attribute in #(vi
12431                 printf) #(vi
12432                         cf_printf_attribute=yes
12433                         cat >conftest.h <<EOF
12434 #define GCC_$cf_ATTRIBUTE 1
12435 EOF
12436                         ;;
12437                 scanf) #(vi
12438                         cf_scanf_attribute=yes
12439                         cat >conftest.h <<EOF
12440 #define GCC_$cf_ATTRIBUTE 1
12441 EOF
12442                         ;;
12443                 *) #(vi
12444                         cat >conftest.h <<EOF
12445 #define GCC_$cf_ATTRIBUTE $cf_directive
12446 EOF
12447                         ;;
12448                 esac
12449
12450                 if { (eval echo "$as_me:12450: \"$ac_compile\"") >&5
12451   (eval $ac_compile) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit $ac_status); }; then
12455                         test -n "$verbose" && echo "$as_me:12455: result: ... $cf_attribute" >&5
12456 echo "${ECHO_T}... $cf_attribute" >&6
12457                         cat conftest.h >>confdefs.h
12458                         case $cf_attribute in #(vi
12459                         printf) #(vi
12460                                 if test "$cf_printf_attribute" = no ; then
12461                                         cat >>confdefs.h <<EOF
12462 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12463 EOF
12464                                 else
12465                                         cat >>confdefs.h <<EOF
12466 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12467 EOF
12468                                 fi
12469                                 ;;
12470                         scanf) #(vi
12471                                 if test "$cf_scanf_attribute" = no ; then
12472                                         cat >>confdefs.h <<EOF
12473 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12474 EOF
12475                                 else
12476                                         cat >>confdefs.h <<EOF
12477 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12478 EOF
12479                                 fi
12480                                 ;;
12481                         esac
12482                 fi
12483         done
12484 else
12485         fgrep define conftest.i >>confdefs.h
12486 fi
12487 rm -rf conftest*
12488 fi
12489
12490 ###     use option --enable-assertions to turn on generation of assertion code
12491 echo "$as_me:12491: checking if you want to enable runtime assertions" >&5
12492 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12493
12494 # Check whether --enable-assertions or --disable-assertions was given.
12495 if test "${enable_assertions+set}" = set; then
12496   enableval="$enable_assertions"
12497   with_assertions=$enableval
12498 else
12499   with_assertions=no
12500 fi;
12501 echo "$as_me:12501: result: $with_assertions" >&5
12502 echo "${ECHO_T}$with_assertions" >&6
12503 if test -n "$GCC"
12504 then
12505         if test "$with_assertions" = no
12506         then
12507                 cat >>confdefs.h <<\EOF
12508 #define NDEBUG 1
12509 EOF
12510
12511                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12512         else
12513
12514         ADAFLAGS="$ADAFLAGS -gnata"
12515
12516         fi
12517 fi
12518
12519 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12520
12521 echo "$as_me:12521: checking if you want to use dmalloc for testing" >&5
12522 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12523
12524 # Check whether --with-dmalloc or --without-dmalloc was given.
12525 if test "${with_dmalloc+set}" = set; then
12526   withval="$with_dmalloc"
12527   cat >>confdefs.h <<\EOF
12528 #define USE_DMALLOC 1
12529 EOF
12530
12531         : ${with_cflags:=-g}
12532         : ${with_no_leaks:=yes}
12533          with_dmalloc=yes
12534 else
12535   with_dmalloc=
12536 fi;
12537 echo "$as_me:12537: result: ${with_dmalloc:-no}" >&5
12538 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12539
12540 case .$with_cflags in #(vi
12541 .*-g*)
12542         case .$CFLAGS in #(vi
12543         .*-g*) #(vi
12544                 ;;
12545         *)
12546
12547 cf_fix_cppflags=no
12548 cf_new_cflags=
12549 cf_new_cppflags=
12550 cf_new_extra_cppflags=
12551
12552 for cf_add_cflags in -g
12553 do
12554 case $cf_fix_cppflags in
12555 no)
12556         case $cf_add_cflags in #(vi
12557         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12558                 case $cf_add_cflags in
12559                 -D*)
12560                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12561
12562                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12563                                 && test -z "${cf_tst_cflags}" \
12564                                 && cf_fix_cppflags=yes
12565
12566                         if test $cf_fix_cppflags = yes ; then
12567                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12568                                 continue
12569                         elif test "${cf_tst_cflags}" = "\"'" ; then
12570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12571                                 continue
12572                         fi
12573                         ;;
12574                 esac
12575                 case "$CPPFLAGS" in
12576                 *$cf_add_cflags) #(vi
12577                         ;;
12578                 *) #(vi
12579                         case $cf_add_cflags in #(vi
12580                         -D*)
12581                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12582
12583 CPPFLAGS=`echo "$CPPFLAGS" | \
12584         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12585                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12586
12587                                 ;;
12588                         esac
12589                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12590                         ;;
12591                 esac
12592                 ;;
12593         *)
12594                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12595                 ;;
12596         esac
12597         ;;
12598 yes)
12599         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12600
12601         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12602
12603         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12604                 && test -z "${cf_tst_cflags}" \
12605                 && cf_fix_cppflags=no
12606         ;;
12607 esac
12608 done
12609
12610 if test -n "$cf_new_cflags" ; then
12611
12612         CFLAGS="$CFLAGS $cf_new_cflags"
12613 fi
12614
12615 if test -n "$cf_new_cppflags" ; then
12616
12617         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12618 fi
12619
12620 if test -n "$cf_new_extra_cppflags" ; then
12621
12622         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12623 fi
12624
12625                 ;;
12626         esac
12627         ;;
12628 esac
12629
12630 if test "$with_dmalloc" = yes ; then
12631         echo "$as_me:12631: checking for dmalloc.h" >&5
12632 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12633 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12634   echo $ECHO_N "(cached) $ECHO_C" >&6
12635 else
12636   cat >conftest.$ac_ext <<_ACEOF
12637 #line 12637 "configure"
12638 #include "confdefs.h"
12639 #include <dmalloc.h>
12640 _ACEOF
12641 if { (eval echo "$as_me:12641: \"$ac_cpp conftest.$ac_ext\"") >&5
12642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12643   ac_status=$?
12644   egrep -v '^ *\+' conftest.er1 >conftest.err
12645   rm -f conftest.er1
12646   cat conftest.err >&5
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); } >/dev/null; then
12649   if test -s conftest.err; then
12650     ac_cpp_err=$ac_c_preproc_warn_flag
12651   else
12652     ac_cpp_err=
12653   fi
12654 else
12655   ac_cpp_err=yes
12656 fi
12657 if test -z "$ac_cpp_err"; then
12658   ac_cv_header_dmalloc_h=yes
12659 else
12660   echo "$as_me: failed program was:" >&5
12661   cat conftest.$ac_ext >&5
12662   ac_cv_header_dmalloc_h=no
12663 fi
12664 rm -f conftest.err conftest.$ac_ext
12665 fi
12666 echo "$as_me:12666: result: $ac_cv_header_dmalloc_h" >&5
12667 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12668 if test $ac_cv_header_dmalloc_h = yes; then
12669
12670 echo "$as_me:12670: checking for dmalloc_debug in -ldmalloc" >&5
12671 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12672 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12673   echo $ECHO_N "(cached) $ECHO_C" >&6
12674 else
12675   ac_check_lib_save_LIBS=$LIBS
12676 LIBS="-ldmalloc  $LIBS"
12677 cat >conftest.$ac_ext <<_ACEOF
12678 #line 12678 "configure"
12679 #include "confdefs.h"
12680
12681 /* Override any gcc2 internal prototype to avoid an error.  */
12682 #ifdef __cplusplus
12683 extern "C"
12684 #endif
12685 /* We use char because int might match the return type of a gcc2
12686    builtin and then its argument prototype would still apply.  */
12687 char dmalloc_debug ();
12688 int
12689 main ()
12690 {
12691 dmalloc_debug ();
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 rm -f conftest.$ac_objext conftest$ac_exeext
12697 if { (eval echo "$as_me:12697: \"$ac_link\"") >&5
12698   (eval $ac_link) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit $ac_status); } &&
12702          { ac_try='test -s conftest$ac_exeext'
12703   { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704   (eval $ac_try) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit $ac_status); }; }; then
12708   ac_cv_lib_dmalloc_dmalloc_debug=yes
12709 else
12710   echo "$as_me: failed program was:" >&5
12711 cat conftest.$ac_ext >&5
12712 ac_cv_lib_dmalloc_dmalloc_debug=no
12713 fi
12714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12715 LIBS=$ac_check_lib_save_LIBS
12716 fi
12717 echo "$as_me:12717: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12718 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12719 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12720   cat >>confdefs.h <<EOF
12721 #define HAVE_LIBDMALLOC 1
12722 EOF
12723
12724   LIBS="-ldmalloc $LIBS"
12725
12726 fi
12727
12728 fi
12729
12730 fi
12731
12732 echo "$as_me:12732: checking if you want to use dbmalloc for testing" >&5
12733 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12734
12735 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12736 if test "${with_dbmalloc+set}" = set; then
12737   withval="$with_dbmalloc"
12738   cat >>confdefs.h <<\EOF
12739 #define USE_DBMALLOC 1
12740 EOF
12741
12742         : ${with_cflags:=-g}
12743         : ${with_no_leaks:=yes}
12744          with_dbmalloc=yes
12745 else
12746   with_dbmalloc=
12747 fi;
12748 echo "$as_me:12748: result: ${with_dbmalloc:-no}" >&5
12749 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12750
12751 case .$with_cflags in #(vi
12752 .*-g*)
12753         case .$CFLAGS in #(vi
12754         .*-g*) #(vi
12755                 ;;
12756         *)
12757
12758 cf_fix_cppflags=no
12759 cf_new_cflags=
12760 cf_new_cppflags=
12761 cf_new_extra_cppflags=
12762
12763 for cf_add_cflags in -g
12764 do
12765 case $cf_fix_cppflags in
12766 no)
12767         case $cf_add_cflags in #(vi
12768         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12769                 case $cf_add_cflags in
12770                 -D*)
12771                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12772
12773                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12774                                 && test -z "${cf_tst_cflags}" \
12775                                 && cf_fix_cppflags=yes
12776
12777                         if test $cf_fix_cppflags = yes ; then
12778                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12779                                 continue
12780                         elif test "${cf_tst_cflags}" = "\"'" ; then
12781                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12782                                 continue
12783                         fi
12784                         ;;
12785                 esac
12786                 case "$CPPFLAGS" in
12787                 *$cf_add_cflags) #(vi
12788                         ;;
12789                 *) #(vi
12790                         case $cf_add_cflags in #(vi
12791                         -D*)
12792                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12793
12794 CPPFLAGS=`echo "$CPPFLAGS" | \
12795         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12796                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12797
12798                                 ;;
12799                         esac
12800                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12801                         ;;
12802                 esac
12803                 ;;
12804         *)
12805                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12806                 ;;
12807         esac
12808         ;;
12809 yes)
12810         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12811
12812         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12813
12814         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12815                 && test -z "${cf_tst_cflags}" \
12816                 && cf_fix_cppflags=no
12817         ;;
12818 esac
12819 done
12820
12821 if test -n "$cf_new_cflags" ; then
12822
12823         CFLAGS="$CFLAGS $cf_new_cflags"
12824 fi
12825
12826 if test -n "$cf_new_cppflags" ; then
12827
12828         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12829 fi
12830
12831 if test -n "$cf_new_extra_cppflags" ; then
12832
12833         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12834 fi
12835
12836                 ;;
12837         esac
12838         ;;
12839 esac
12840
12841 if test "$with_dbmalloc" = yes ; then
12842         echo "$as_me:12842: checking for dbmalloc.h" >&5
12843 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12844 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12845   echo $ECHO_N "(cached) $ECHO_C" >&6
12846 else
12847   cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850 #include <dbmalloc.h>
12851 _ACEOF
12852 if { (eval echo "$as_me:12852: \"$ac_cpp conftest.$ac_ext\"") >&5
12853   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12854   ac_status=$?
12855   egrep -v '^ *\+' conftest.er1 >conftest.err
12856   rm -f conftest.er1
12857   cat conftest.err >&5
12858   echo "$as_me:12858: \$? = $ac_status" >&5
12859   (exit $ac_status); } >/dev/null; then
12860   if test -s conftest.err; then
12861     ac_cpp_err=$ac_c_preproc_warn_flag
12862   else
12863     ac_cpp_err=
12864   fi
12865 else
12866   ac_cpp_err=yes
12867 fi
12868 if test -z "$ac_cpp_err"; then
12869   ac_cv_header_dbmalloc_h=yes
12870 else
12871   echo "$as_me: failed program was:" >&5
12872   cat conftest.$ac_ext >&5
12873   ac_cv_header_dbmalloc_h=no
12874 fi
12875 rm -f conftest.err conftest.$ac_ext
12876 fi
12877 echo "$as_me:12877: result: $ac_cv_header_dbmalloc_h" >&5
12878 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12879 if test $ac_cv_header_dbmalloc_h = yes; then
12880
12881 echo "$as_me:12881: checking for debug_malloc in -ldbmalloc" >&5
12882 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12883 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12884   echo $ECHO_N "(cached) $ECHO_C" >&6
12885 else
12886   ac_check_lib_save_LIBS=$LIBS
12887 LIBS="-ldbmalloc  $LIBS"
12888 cat >conftest.$ac_ext <<_ACEOF
12889 #line 12889 "configure"
12890 #include "confdefs.h"
12891
12892 /* Override any gcc2 internal prototype to avoid an error.  */
12893 #ifdef __cplusplus
12894 extern "C"
12895 #endif
12896 /* We use char because int might match the return type of a gcc2
12897    builtin and then its argument prototype would still apply.  */
12898 char debug_malloc ();
12899 int
12900 main ()
12901 {
12902 debug_malloc ();
12903   ;
12904   return 0;
12905 }
12906 _ACEOF
12907 rm -f conftest.$ac_objext conftest$ac_exeext
12908 if { (eval echo "$as_me:12908: \"$ac_link\"") >&5
12909   (eval $ac_link) 2>&5
12910   ac_status=$?
12911   echo "$as_me:12911: \$? = $ac_status" >&5
12912   (exit $ac_status); } &&
12913          { ac_try='test -s conftest$ac_exeext'
12914   { (eval echo "$as_me:12914: \"$ac_try\"") >&5
12915   (eval $ac_try) 2>&5
12916   ac_status=$?
12917   echo "$as_me:12917: \$? = $ac_status" >&5
12918   (exit $ac_status); }; }; then
12919   ac_cv_lib_dbmalloc_debug_malloc=yes
12920 else
12921   echo "$as_me: failed program was:" >&5
12922 cat conftest.$ac_ext >&5
12923 ac_cv_lib_dbmalloc_debug_malloc=no
12924 fi
12925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12926 LIBS=$ac_check_lib_save_LIBS
12927 fi
12928 echo "$as_me:12928: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12929 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12930 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12931   cat >>confdefs.h <<EOF
12932 #define HAVE_LIBDBMALLOC 1
12933 EOF
12934
12935   LIBS="-ldbmalloc $LIBS"
12936
12937 fi
12938
12939 fi
12940
12941 fi
12942
12943 echo "$as_me:12943: checking if you want to use valgrind for testing" >&5
12944 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12945
12946 # Check whether --with-valgrind or --without-valgrind was given.
12947 if test "${with_valgrind+set}" = set; then
12948   withval="$with_valgrind"
12949   cat >>confdefs.h <<\EOF
12950 #define USE_VALGRIND 1
12951 EOF
12952
12953         : ${with_cflags:=-g}
12954         : ${with_no_leaks:=yes}
12955          with_valgrind=yes
12956 else
12957   with_valgrind=
12958 fi;
12959 echo "$as_me:12959: result: ${with_valgrind:-no}" >&5
12960 echo "${ECHO_T}${with_valgrind:-no}" >&6
12961
12962 case .$with_cflags in #(vi
12963 .*-g*)
12964         case .$CFLAGS in #(vi
12965         .*-g*) #(vi
12966                 ;;
12967         *)
12968
12969 cf_fix_cppflags=no
12970 cf_new_cflags=
12971 cf_new_cppflags=
12972 cf_new_extra_cppflags=
12973
12974 for cf_add_cflags in -g
12975 do
12976 case $cf_fix_cppflags in
12977 no)
12978         case $cf_add_cflags in #(vi
12979         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12980                 case $cf_add_cflags in
12981                 -D*)
12982                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12983
12984                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12985                                 && test -z "${cf_tst_cflags}" \
12986                                 && cf_fix_cppflags=yes
12987
12988                         if test $cf_fix_cppflags = yes ; then
12989                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12990                                 continue
12991                         elif test "${cf_tst_cflags}" = "\"'" ; then
12992                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12993                                 continue
12994                         fi
12995                         ;;
12996                 esac
12997                 case "$CPPFLAGS" in
12998                 *$cf_add_cflags) #(vi
12999                         ;;
13000                 *) #(vi
13001                         case $cf_add_cflags in #(vi
13002                         -D*)
13003                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13004
13005 CPPFLAGS=`echo "$CPPFLAGS" | \
13006         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13007                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13008
13009                                 ;;
13010                         esac
13011                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13012                         ;;
13013                 esac
13014                 ;;
13015         *)
13016                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13017                 ;;
13018         esac
13019         ;;
13020 yes)
13021         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13022
13023         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13024
13025         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13026                 && test -z "${cf_tst_cflags}" \
13027                 && cf_fix_cppflags=no
13028         ;;
13029 esac
13030 done
13031
13032 if test -n "$cf_new_cflags" ; then
13033
13034         CFLAGS="$CFLAGS $cf_new_cflags"
13035 fi
13036
13037 if test -n "$cf_new_cppflags" ; then
13038
13039         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13040 fi
13041
13042 if test -n "$cf_new_extra_cppflags" ; then
13043
13044         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13045 fi
13046
13047                 ;;
13048         esac
13049         ;;
13050 esac
13051
13052 echo "$as_me:13052: checking if you want to perform memory-leak testing" >&5
13053 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13054
13055 # Check whether --enable-leaks or --disable-leaks was given.
13056 if test "${enable_leaks+set}" = set; then
13057   enableval="$enable_leaks"
13058   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13059 else
13060   : ${with_no_leaks:=no}
13061 fi;
13062 echo "$as_me:13062: result: $with_no_leaks" >&5
13063 echo "${ECHO_T}$with_no_leaks" >&6
13064
13065 if test "$with_no_leaks" = yes ; then
13066         cat >>confdefs.h <<\EOF
13067 #define NO_LEAKS 1
13068 EOF
13069
13070         cat >>confdefs.h <<\EOF
13071 #define YY_NO_LEAKS 1
13072 EOF
13073
13074 fi
13075
13076 cat >>confdefs.h <<\EOF
13077 #define HAVE_NC_ALLOC_H 1
13078 EOF
13079
13080 ###     use option --enable-expanded to generate certain macros as functions
13081
13082 # Check whether --enable-expanded or --disable-expanded was given.
13083 if test "${enable_expanded+set}" = set; then
13084   enableval="$enable_expanded"
13085   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13086 #define NCURSES_EXPANDED 1
13087 EOF
13088
13089 fi;
13090
13091 ###     use option --disable-macros to suppress macros in favor of functions
13092
13093 # Check whether --enable-macros or --disable-macros was given.
13094 if test "${enable_macros+set}" = set; then
13095   enableval="$enable_macros"
13096   test "$enableval" = no && cat >>confdefs.h <<\EOF
13097 #define NCURSES_NOMACROS 1
13098 EOF
13099
13100 fi;
13101
13102 # Normally we only add trace() to the debug-library.  Allow this to be
13103 # extended to all models of the ncurses library:
13104 cf_all_traces=no
13105 case "$CFLAGS $CPPFLAGS" in
13106 *-DTRACE*)
13107         cf_all_traces=yes
13108         ;;
13109 esac
13110
13111 echo "$as_me:13111: checking whether to add trace feature to all models" >&5
13112 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13113
13114 # Check whether --with-trace or --without-trace was given.
13115 if test "${with_trace+set}" = set; then
13116   withval="$with_trace"
13117   cf_with_trace=$withval
13118 else
13119   cf_with_trace=$cf_all_traces
13120 fi;
13121 echo "$as_me:13121: result: $cf_with_trace" >&5
13122 echo "${ECHO_T}$cf_with_trace" >&6
13123
13124 if test "$cf_with_trace" = yes ; then
13125         LIB_TRACING=all
13126         ADA_TRACE=TRUE
13127
13128 cf_fix_cppflags=no
13129 cf_new_cflags=
13130 cf_new_cppflags=
13131 cf_new_extra_cppflags=
13132
13133 for cf_add_cflags in -DTRACE
13134 do
13135 case $cf_fix_cppflags in
13136 no)
13137         case $cf_add_cflags in #(vi
13138         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13139                 case $cf_add_cflags in
13140                 -D*)
13141                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13142
13143                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13144                                 && test -z "${cf_tst_cflags}" \
13145                                 && cf_fix_cppflags=yes
13146
13147                         if test $cf_fix_cppflags = yes ; then
13148                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13149                                 continue
13150                         elif test "${cf_tst_cflags}" = "\"'" ; then
13151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13152                                 continue
13153                         fi
13154                         ;;
13155                 esac
13156                 case "$CPPFLAGS" in
13157                 *$cf_add_cflags) #(vi
13158                         ;;
13159                 *) #(vi
13160                         case $cf_add_cflags in #(vi
13161                         -D*)
13162                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13163
13164 CPPFLAGS=`echo "$CPPFLAGS" | \
13165         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13166                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13167
13168                                 ;;
13169                         esac
13170                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13171                         ;;
13172                 esac
13173                 ;;
13174         *)
13175                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13176                 ;;
13177         esac
13178         ;;
13179 yes)
13180         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13181
13182         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13183
13184         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13185                 && test -z "${cf_tst_cflags}" \
13186                 && cf_fix_cppflags=no
13187         ;;
13188 esac
13189 done
13190
13191 if test -n "$cf_new_cflags" ; then
13192
13193         CFLAGS="$CFLAGS $cf_new_cflags"
13194 fi
13195
13196 if test -n "$cf_new_cppflags" ; then
13197
13198         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13199 fi
13200
13201 if test -n "$cf_new_extra_cppflags" ; then
13202
13203         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13204 fi
13205
13206 else
13207         LIB_TRACING=DEBUG
13208         ADA_TRACE=FALSE
13209 fi
13210
13211 ###     Checks for libraries.
13212 case $cf_cv_system_name in #(vi
13213 *mingw32*) #(vi
13214         ;;
13215 *)
13216 echo "$as_me:13216: checking for gettimeofday" >&5
13217 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13218 if test "${ac_cv_func_gettimeofday+set}" = set; then
13219   echo $ECHO_N "(cached) $ECHO_C" >&6
13220 else
13221   cat >conftest.$ac_ext <<_ACEOF
13222 #line 13222 "configure"
13223 #include "confdefs.h"
13224 /* System header to define __stub macros and hopefully few prototypes,
13225     which can conflict with char gettimeofday (); below.  */
13226 #include <assert.h>
13227 /* Override any gcc2 internal prototype to avoid an error.  */
13228 #ifdef __cplusplus
13229 extern "C"
13230 #endif
13231 /* We use char because int might match the return type of a gcc2
13232    builtin and then its argument prototype would still apply.  */
13233 char gettimeofday ();
13234 char (*f) ();
13235
13236 int
13237 main ()
13238 {
13239 /* The GNU C library defines this for functions which it implements
13240     to always fail with ENOSYS.  Some functions are actually named
13241     something starting with __ and the normal name is an alias.  */
13242 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13243 choke me
13244 #else
13245 f = gettimeofday;
13246 #endif
13247
13248   ;
13249   return 0;
13250 }
13251 _ACEOF
13252 rm -f conftest.$ac_objext conftest$ac_exeext
13253 if { (eval echo "$as_me:13253: \"$ac_link\"") >&5
13254   (eval $ac_link) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); } &&
13258          { ac_try='test -s conftest$ac_exeext'
13259   { (eval echo "$as_me:13259: \"$ac_try\"") >&5
13260   (eval $ac_try) 2>&5
13261   ac_status=$?
13262   echo "$as_me:13262: \$? = $ac_status" >&5
13263   (exit $ac_status); }; }; then
13264   ac_cv_func_gettimeofday=yes
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 cat conftest.$ac_ext >&5
13268 ac_cv_func_gettimeofday=no
13269 fi
13270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13271 fi
13272 echo "$as_me:13272: result: $ac_cv_func_gettimeofday" >&5
13273 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13274 if test $ac_cv_func_gettimeofday = yes; then
13275   cat >>confdefs.h <<\EOF
13276 #define HAVE_GETTIMEOFDAY 1
13277 EOF
13278
13279 else
13280
13281 echo "$as_me:13281: checking for gettimeofday in -lbsd" >&5
13282 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13283 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13284   echo $ECHO_N "(cached) $ECHO_C" >&6
13285 else
13286   ac_check_lib_save_LIBS=$LIBS
13287 LIBS="-lbsd  $LIBS"
13288 cat >conftest.$ac_ext <<_ACEOF
13289 #line 13289 "configure"
13290 #include "confdefs.h"
13291
13292 /* Override any gcc2 internal prototype to avoid an error.  */
13293 #ifdef __cplusplus
13294 extern "C"
13295 #endif
13296 /* We use char because int might match the return type of a gcc2
13297    builtin and then its argument prototype would still apply.  */
13298 char gettimeofday ();
13299 int
13300 main ()
13301 {
13302 gettimeofday ();
13303   ;
13304   return 0;
13305 }
13306 _ACEOF
13307 rm -f conftest.$ac_objext conftest$ac_exeext
13308 if { (eval echo "$as_me:13308: \"$ac_link\"") >&5
13309   (eval $ac_link) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); } &&
13313          { ac_try='test -s conftest$ac_exeext'
13314   { (eval echo "$as_me:13314: \"$ac_try\"") >&5
13315   (eval $ac_try) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); }; }; then
13319   ac_cv_lib_bsd_gettimeofday=yes
13320 else
13321   echo "$as_me: failed program was:" >&5
13322 cat conftest.$ac_ext >&5
13323 ac_cv_lib_bsd_gettimeofday=no
13324 fi
13325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13326 LIBS=$ac_check_lib_save_LIBS
13327 fi
13328 echo "$as_me:13328: result: $ac_cv_lib_bsd_gettimeofday" >&5
13329 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13330 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13331   cat >>confdefs.h <<\EOF
13332 #define HAVE_GETTIMEOFDAY 1
13333 EOF
13334
13335         LIBS="-lbsd $LIBS"
13336 fi
13337
13338 fi
13339         ;;
13340 esac
13341
13342 echo "$as_me:13342: checking if -lm needed for math functions" >&5
13343 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13344 if test "${cf_cv_need_libm+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347
13348         cat >conftest.$ac_ext <<_ACEOF
13349 #line 13349 "configure"
13350 #include "confdefs.h"
13351
13352         #include <stdio.h>
13353         #include <math.h>
13354
13355 int
13356 main ()
13357 {
13358 double x = rand(); printf("result = %g\n", sin(x))
13359   ;
13360   return 0;
13361 }
13362 _ACEOF
13363 rm -f conftest.$ac_objext conftest$ac_exeext
13364 if { (eval echo "$as_me:13364: \"$ac_link\"") >&5
13365   (eval $ac_link) 2>&5
13366   ac_status=$?
13367   echo "$as_me:13367: \$? = $ac_status" >&5
13368   (exit $ac_status); } &&
13369          { ac_try='test -s conftest$ac_exeext'
13370   { (eval echo "$as_me:13370: \"$ac_try\"") >&5
13371   (eval $ac_try) 2>&5
13372   ac_status=$?
13373   echo "$as_me:13373: \$? = $ac_status" >&5
13374   (exit $ac_status); }; }; then
13375   cf_cv_need_libm=no
13376 else
13377   echo "$as_me: failed program was:" >&5
13378 cat conftest.$ac_ext >&5
13379 cf_cv_need_libm=yes
13380 fi
13381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13382 fi
13383 echo "$as_me:13383: result: $cf_cv_need_libm" >&5
13384 echo "${ECHO_T}$cf_cv_need_libm" >&6
13385 if test "$cf_cv_need_libm" = yes
13386 then
13387 MATH_LIB=-lm
13388 fi
13389
13390 ###     Checks for header files.
13391 echo "$as_me:13391: checking for ANSI C header files" >&5
13392 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13393 if test "${ac_cv_header_stdc+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396   cat >conftest.$ac_ext <<_ACEOF
13397 #line 13397 "configure"
13398 #include "confdefs.h"
13399 #include <stdlib.h>
13400 #include <stdarg.h>
13401 #include <string.h>
13402 #include <float.h>
13403
13404 _ACEOF
13405 if { (eval echo "$as_me:13405: \"$ac_cpp conftest.$ac_ext\"") >&5
13406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13407   ac_status=$?
13408   egrep -v '^ *\+' conftest.er1 >conftest.err
13409   rm -f conftest.er1
13410   cat conftest.err >&5
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); } >/dev/null; then
13413   if test -s conftest.err; then
13414     ac_cpp_err=$ac_c_preproc_warn_flag
13415   else
13416     ac_cpp_err=
13417   fi
13418 else
13419   ac_cpp_err=yes
13420 fi
13421 if test -z "$ac_cpp_err"; then
13422   ac_cv_header_stdc=yes
13423 else
13424   echo "$as_me: failed program was:" >&5
13425   cat conftest.$ac_ext >&5
13426   ac_cv_header_stdc=no
13427 fi
13428 rm -f conftest.err conftest.$ac_ext
13429
13430 if test $ac_cv_header_stdc = yes; then
13431   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13432   cat >conftest.$ac_ext <<_ACEOF
13433 #line 13433 "configure"
13434 #include "confdefs.h"
13435 #include <string.h>
13436
13437 _ACEOF
13438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13439   egrep "memchr" >/dev/null 2>&1; then
13440   :
13441 else
13442   ac_cv_header_stdc=no
13443 fi
13444 rm -rf conftest*
13445
13446 fi
13447
13448 if test $ac_cv_header_stdc = yes; then
13449   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13450   cat >conftest.$ac_ext <<_ACEOF
13451 #line 13451 "configure"
13452 #include "confdefs.h"
13453 #include <stdlib.h>
13454
13455 _ACEOF
13456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13457   egrep "free" >/dev/null 2>&1; then
13458   :
13459 else
13460   ac_cv_header_stdc=no
13461 fi
13462 rm -rf conftest*
13463
13464 fi
13465
13466 if test $ac_cv_header_stdc = yes; then
13467   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13468   if test "$cross_compiling" = yes; then
13469   :
13470 else
13471   cat >conftest.$ac_ext <<_ACEOF
13472 #line 13472 "configure"
13473 #include "confdefs.h"
13474 #include <ctype.h>
13475 #if ((' ' & 0x0FF) == 0x020)
13476 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13477 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13478 #else
13479 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13480                      || ('j' <= (c) && (c) <= 'r') \
13481                      || ('s' <= (c) && (c) <= 'z'))
13482 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13483 #endif
13484
13485 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13486 int
13487 main ()
13488 {
13489   int i;
13490   for (i = 0; i < 256; i++)
13491     if (XOR (islower (i), ISLOWER (i))
13492         || toupper (i) != TOUPPER (i))
13493       $ac_main_return(2);
13494   $ac_main_return (0);
13495 }
13496 _ACEOF
13497 rm -f conftest$ac_exeext
13498 if { (eval echo "$as_me:13498: \"$ac_link\"") >&5
13499   (eval $ac_link) 2>&5
13500   ac_status=$?
13501   echo "$as_me:13501: \$? = $ac_status" >&5
13502   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13503   { (eval echo "$as_me:13503: \"$ac_try\"") >&5
13504   (eval $ac_try) 2>&5
13505   ac_status=$?
13506   echo "$as_me:13506: \$? = $ac_status" >&5
13507   (exit $ac_status); }; }; then
13508   :
13509 else
13510   echo "$as_me: program exited with status $ac_status" >&5
13511 echo "$as_me: failed program was:" >&5
13512 cat conftest.$ac_ext >&5
13513 ac_cv_header_stdc=no
13514 fi
13515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13516 fi
13517 fi
13518 fi
13519 echo "$as_me:13519: result: $ac_cv_header_stdc" >&5
13520 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13521 if test $ac_cv_header_stdc = yes; then
13522
13523 cat >>confdefs.h <<\EOF
13524 #define STDC_HEADERS 1
13525 EOF
13526
13527 fi
13528
13529 ac_header_dirent=no
13530 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13531   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13532 echo "$as_me:13532: checking for $ac_hdr that defines DIR" >&5
13533 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 #include <sys/types.h>
13541 #include <$ac_hdr>
13542
13543 int
13544 main ()
13545 {
13546 if ((DIR *) 0)
13547 return 0;
13548   ;
13549   return 0;
13550 }
13551 _ACEOF
13552 rm -f conftest.$ac_objext
13553 if { (eval echo "$as_me:13553: \"$ac_compile\"") >&5
13554   (eval $ac_compile) 2>&5
13555   ac_status=$?
13556   echo "$as_me:13556: \$? = $ac_status" >&5
13557   (exit $ac_status); } &&
13558          { ac_try='test -s conftest.$ac_objext'
13559   { (eval echo "$as_me:13559: \"$ac_try\"") >&5
13560   (eval $ac_try) 2>&5
13561   ac_status=$?
13562   echo "$as_me:13562: \$? = $ac_status" >&5
13563   (exit $ac_status); }; }; then
13564   eval "$as_ac_Header=yes"
13565 else
13566   echo "$as_me: failed program was:" >&5
13567 cat conftest.$ac_ext >&5
13568 eval "$as_ac_Header=no"
13569 fi
13570 rm -f conftest.$ac_objext conftest.$ac_ext
13571 fi
13572 echo "$as_me:13572: result: `eval echo '${'$as_ac_Header'}'`" >&5
13573 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13574 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13575   cat >>confdefs.h <<EOF
13576 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13577 EOF
13578
13579 ac_header_dirent=$ac_hdr; break
13580 fi
13581
13582 done
13583 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13584 if test $ac_header_dirent = dirent.h; then
13585   echo "$as_me:13585: checking for opendir in -ldir" >&5
13586 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13587 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13588   echo $ECHO_N "(cached) $ECHO_C" >&6
13589 else
13590   ac_check_lib_save_LIBS=$LIBS
13591 LIBS="-ldir  $LIBS"
13592 cat >conftest.$ac_ext <<_ACEOF
13593 #line 13593 "configure"
13594 #include "confdefs.h"
13595
13596 /* Override any gcc2 internal prototype to avoid an error.  */
13597 #ifdef __cplusplus
13598 extern "C"
13599 #endif
13600 /* We use char because int might match the return type of a gcc2
13601    builtin and then its argument prototype would still apply.  */
13602 char opendir ();
13603 int
13604 main ()
13605 {
13606 opendir ();
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 rm -f conftest.$ac_objext conftest$ac_exeext
13612 if { (eval echo "$as_me:13612: \"$ac_link\"") >&5
13613   (eval $ac_link) 2>&5
13614   ac_status=$?
13615   echo "$as_me:13615: \$? = $ac_status" >&5
13616   (exit $ac_status); } &&
13617          { ac_try='test -s conftest$ac_exeext'
13618   { (eval echo "$as_me:13618: \"$ac_try\"") >&5
13619   (eval $ac_try) 2>&5
13620   ac_status=$?
13621   echo "$as_me:13621: \$? = $ac_status" >&5
13622   (exit $ac_status); }; }; then
13623   ac_cv_lib_dir_opendir=yes
13624 else
13625   echo "$as_me: failed program was:" >&5
13626 cat conftest.$ac_ext >&5
13627 ac_cv_lib_dir_opendir=no
13628 fi
13629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13630 LIBS=$ac_check_lib_save_LIBS
13631 fi
13632 echo "$as_me:13632: result: $ac_cv_lib_dir_opendir" >&5
13633 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13634 if test $ac_cv_lib_dir_opendir = yes; then
13635   LIBS="$LIBS -ldir"
13636 fi
13637
13638 else
13639   echo "$as_me:13639: checking for opendir in -lx" >&5
13640 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13641 if test "${ac_cv_lib_x_opendir+set}" = set; then
13642   echo $ECHO_N "(cached) $ECHO_C" >&6
13643 else
13644   ac_check_lib_save_LIBS=$LIBS
13645 LIBS="-lx  $LIBS"
13646 cat >conftest.$ac_ext <<_ACEOF
13647 #line 13647 "configure"
13648 #include "confdefs.h"
13649
13650 /* Override any gcc2 internal prototype to avoid an error.  */
13651 #ifdef __cplusplus
13652 extern "C"
13653 #endif
13654 /* We use char because int might match the return type of a gcc2
13655    builtin and then its argument prototype would still apply.  */
13656 char opendir ();
13657 int
13658 main ()
13659 {
13660 opendir ();
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 rm -f conftest.$ac_objext conftest$ac_exeext
13666 if { (eval echo "$as_me:13666: \"$ac_link\"") >&5
13667   (eval $ac_link) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); } &&
13671          { ac_try='test -s conftest$ac_exeext'
13672   { (eval echo "$as_me:13672: \"$ac_try\"") >&5
13673   (eval $ac_try) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); }; }; then
13677   ac_cv_lib_x_opendir=yes
13678 else
13679   echo "$as_me: failed program was:" >&5
13680 cat conftest.$ac_ext >&5
13681 ac_cv_lib_x_opendir=no
13682 fi
13683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13684 LIBS=$ac_check_lib_save_LIBS
13685 fi
13686 echo "$as_me:13686: result: $ac_cv_lib_x_opendir" >&5
13687 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13688 if test $ac_cv_lib_x_opendir = yes; then
13689   LIBS="$LIBS -lx"
13690 fi
13691
13692 fi
13693
13694 echo "$as_me:13694: checking whether time.h and sys/time.h may both be included" >&5
13695 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13696 if test "${ac_cv_header_time+set}" = set; then
13697   echo $ECHO_N "(cached) $ECHO_C" >&6
13698 else
13699   cat >conftest.$ac_ext <<_ACEOF
13700 #line 13700 "configure"
13701 #include "confdefs.h"
13702 #include <sys/types.h>
13703 #include <sys/time.h>
13704 #include <time.h>
13705
13706 int
13707 main ()
13708 {
13709 if ((struct tm *) 0)
13710 return 0;
13711   ;
13712   return 0;
13713 }
13714 _ACEOF
13715 rm -f conftest.$ac_objext
13716 if { (eval echo "$as_me:13716: \"$ac_compile\"") >&5
13717   (eval $ac_compile) 2>&5
13718   ac_status=$?
13719   echo "$as_me:13719: \$? = $ac_status" >&5
13720   (exit $ac_status); } &&
13721          { ac_try='test -s conftest.$ac_objext'
13722   { (eval echo "$as_me:13722: \"$ac_try\"") >&5
13723   (eval $ac_try) 2>&5
13724   ac_status=$?
13725   echo "$as_me:13725: \$? = $ac_status" >&5
13726   (exit $ac_status); }; }; then
13727   ac_cv_header_time=yes
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 cat conftest.$ac_ext >&5
13731 ac_cv_header_time=no
13732 fi
13733 rm -f conftest.$ac_objext conftest.$ac_ext
13734 fi
13735 echo "$as_me:13735: result: $ac_cv_header_time" >&5
13736 echo "${ECHO_T}$ac_cv_header_time" >&6
13737 if test $ac_cv_header_time = yes; then
13738
13739 cat >>confdefs.h <<\EOF
13740 #define TIME_WITH_SYS_TIME 1
13741 EOF
13742
13743 fi
13744
13745 cf_regex_func=no
13746
13747 cf_regex_libs="regex re"
13748 case $host_os in #(vi
13749 mingw*)
13750         cf_regex_libs="gnurx $cf_regex_libs"
13751         ;;
13752 esac
13753
13754 echo "$as_me:13754: checking for regcomp" >&5
13755 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13756 if test "${ac_cv_func_regcomp+set}" = set; then
13757   echo $ECHO_N "(cached) $ECHO_C" >&6
13758 else
13759   cat >conftest.$ac_ext <<_ACEOF
13760 #line 13760 "configure"
13761 #include "confdefs.h"
13762 /* System header to define __stub macros and hopefully few prototypes,
13763     which can conflict with char regcomp (); below.  */
13764 #include <assert.h>
13765 /* Override any gcc2 internal prototype to avoid an error.  */
13766 #ifdef __cplusplus
13767 extern "C"
13768 #endif
13769 /* We use char because int might match the return type of a gcc2
13770    builtin and then its argument prototype would still apply.  */
13771 char regcomp ();
13772 char (*f) ();
13773
13774 int
13775 main ()
13776 {
13777 /* The GNU C library defines this for functions which it implements
13778     to always fail with ENOSYS.  Some functions are actually named
13779     something starting with __ and the normal name is an alias.  */
13780 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13781 choke me
13782 #else
13783 f = regcomp;
13784 #endif
13785
13786   ;
13787   return 0;
13788 }
13789 _ACEOF
13790 rm -f conftest.$ac_objext conftest$ac_exeext
13791 if { (eval echo "$as_me:13791: \"$ac_link\"") >&5
13792   (eval $ac_link) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -s conftest$ac_exeext'
13797   { (eval echo "$as_me:13797: \"$ac_try\"") >&5
13798   (eval $ac_try) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); }; }; then
13802   ac_cv_func_regcomp=yes
13803 else
13804   echo "$as_me: failed program was:" >&5
13805 cat conftest.$ac_ext >&5
13806 ac_cv_func_regcomp=no
13807 fi
13808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13809 fi
13810 echo "$as_me:13810: result: $ac_cv_func_regcomp" >&5
13811 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13812 if test $ac_cv_func_regcomp = yes; then
13813   cf_regex_func=regcomp
13814 else
13815
13816         for cf_regex_lib in $cf_regex_libs
13817         do
13818                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13819 echo "$as_me:13819: checking for regcomp in -l$cf_regex_lib" >&5
13820 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13821 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13822   echo $ECHO_N "(cached) $ECHO_C" >&6
13823 else
13824   ac_check_lib_save_LIBS=$LIBS
13825 LIBS="-l$cf_regex_lib  $LIBS"
13826 cat >conftest.$ac_ext <<_ACEOF
13827 #line 13827 "configure"
13828 #include "confdefs.h"
13829
13830 /* Override any gcc2 internal prototype to avoid an error.  */
13831 #ifdef __cplusplus
13832 extern "C"
13833 #endif
13834 /* We use char because int might match the return type of a gcc2
13835    builtin and then its argument prototype would still apply.  */
13836 char regcomp ();
13837 int
13838 main ()
13839 {
13840 regcomp ();
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -f conftest.$ac_objext conftest$ac_exeext
13846 if { (eval echo "$as_me:13846: \"$ac_link\"") >&5
13847   (eval $ac_link) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); } &&
13851          { ac_try='test -s conftest$ac_exeext'
13852   { (eval echo "$as_me:13852: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); }; }; then
13857   eval "$as_ac_Lib=yes"
13858 else
13859   echo "$as_me: failed program was:" >&5
13860 cat conftest.$ac_ext >&5
13861 eval "$as_ac_Lib=no"
13862 fi
13863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13864 LIBS=$ac_check_lib_save_LIBS
13865 fi
13866 echo "$as_me:13866: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13867 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13868 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13869
13870                                 LIBS="-l$cf_regex_lib $LIBS"
13871                                 cf_regex_func=regcomp
13872                                 break
13873 fi
13874
13875         done
13876
13877 fi
13878
13879 if test "$cf_regex_func" = no ; then
13880         echo "$as_me:13880: checking for compile" >&5
13881 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13882 if test "${ac_cv_func_compile+set}" = set; then
13883   echo $ECHO_N "(cached) $ECHO_C" >&6
13884 else
13885   cat >conftest.$ac_ext <<_ACEOF
13886 #line 13886 "configure"
13887 #include "confdefs.h"
13888 /* System header to define __stub macros and hopefully few prototypes,
13889     which can conflict with char compile (); below.  */
13890 #include <assert.h>
13891 /* Override any gcc2 internal prototype to avoid an error.  */
13892 #ifdef __cplusplus
13893 extern "C"
13894 #endif
13895 /* We use char because int might match the return type of a gcc2
13896    builtin and then its argument prototype would still apply.  */
13897 char compile ();
13898 char (*f) ();
13899
13900 int
13901 main ()
13902 {
13903 /* The GNU C library defines this for functions which it implements
13904     to always fail with ENOSYS.  Some functions are actually named
13905     something starting with __ and the normal name is an alias.  */
13906 #if defined (__stub_compile) || defined (__stub___compile)
13907 choke me
13908 #else
13909 f = compile;
13910 #endif
13911
13912   ;
13913   return 0;
13914 }
13915 _ACEOF
13916 rm -f conftest.$ac_objext conftest$ac_exeext
13917 if { (eval echo "$as_me:13917: \"$ac_link\"") >&5
13918   (eval $ac_link) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit $ac_status); } &&
13922          { ac_try='test -s conftest$ac_exeext'
13923   { (eval echo "$as_me:13923: \"$ac_try\"") >&5
13924   (eval $ac_try) 2>&5
13925   ac_status=$?
13926   echo "$as_me:13926: \$? = $ac_status" >&5
13927   (exit $ac_status); }; }; then
13928   ac_cv_func_compile=yes
13929 else
13930   echo "$as_me: failed program was:" >&5
13931 cat conftest.$ac_ext >&5
13932 ac_cv_func_compile=no
13933 fi
13934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13935 fi
13936 echo "$as_me:13936: result: $ac_cv_func_compile" >&5
13937 echo "${ECHO_T}$ac_cv_func_compile" >&6
13938 if test $ac_cv_func_compile = yes; then
13939   cf_regex_func=compile
13940 else
13941
13942                 echo "$as_me:13942: checking for compile in -lgen" >&5
13943 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13944 if test "${ac_cv_lib_gen_compile+set}" = set; then
13945   echo $ECHO_N "(cached) $ECHO_C" >&6
13946 else
13947   ac_check_lib_save_LIBS=$LIBS
13948 LIBS="-lgen  $LIBS"
13949 cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952
13953 /* Override any gcc2 internal prototype to avoid an error.  */
13954 #ifdef __cplusplus
13955 extern "C"
13956 #endif
13957 /* We use char because int might match the return type of a gcc2
13958    builtin and then its argument prototype would still apply.  */
13959 char compile ();
13960 int
13961 main ()
13962 {
13963 compile ();
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 rm -f conftest.$ac_objext conftest$ac_exeext
13969 if { (eval echo "$as_me:13969: \"$ac_link\"") >&5
13970   (eval $ac_link) 2>&5
13971   ac_status=$?
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit $ac_status); } &&
13974          { ac_try='test -s conftest$ac_exeext'
13975   { (eval echo "$as_me:13975: \"$ac_try\"") >&5
13976   (eval $ac_try) 2>&5
13977   ac_status=$?
13978   echo "$as_me:13978: \$? = $ac_status" >&5
13979   (exit $ac_status); }; }; then
13980   ac_cv_lib_gen_compile=yes
13981 else
13982   echo "$as_me: failed program was:" >&5
13983 cat conftest.$ac_ext >&5
13984 ac_cv_lib_gen_compile=no
13985 fi
13986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13987 LIBS=$ac_check_lib_save_LIBS
13988 fi
13989 echo "$as_me:13989: result: $ac_cv_lib_gen_compile" >&5
13990 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13991 if test $ac_cv_lib_gen_compile = yes; then
13992
13993                                 LIBS="-lgen $LIBS"
13994                                 cf_regex_func=compile
13995 fi
13996
13997 fi
13998
13999 fi
14000
14001 if test "$cf_regex_func" = no ; then
14002         { echo "$as_me:14002: WARNING: cannot find regular expression library" >&5
14003 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14004 fi
14005
14006 echo "$as_me:14006: checking for regular-expression headers" >&5
14007 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14008 if test "${cf_cv_regex_hdrs+set}" = set; then
14009   echo $ECHO_N "(cached) $ECHO_C" >&6
14010 else
14011
14012 cf_cv_regex_hdrs=no
14013 case $cf_regex_func in #(vi
14014 compile) #(vi
14015         for cf_regex_hdr in regexp.h regexpr.h
14016         do
14017                 cat >conftest.$ac_ext <<_ACEOF
14018 #line 14018 "configure"
14019 #include "confdefs.h"
14020 #include <$cf_regex_hdr>
14021 int
14022 main ()
14023 {
14024
14025                         char *p = compile("", "", "", 0);
14026                         int x = step("", "");
14027
14028   ;
14029   return 0;
14030 }
14031 _ACEOF
14032 rm -f conftest.$ac_objext conftest$ac_exeext
14033 if { (eval echo "$as_me:14033: \"$ac_link\"") >&5
14034   (eval $ac_link) 2>&5
14035   ac_status=$?
14036   echo "$as_me:14036: \$? = $ac_status" >&5
14037   (exit $ac_status); } &&
14038          { ac_try='test -s conftest$ac_exeext'
14039   { (eval echo "$as_me:14039: \"$ac_try\"") >&5
14040   (eval $ac_try) 2>&5
14041   ac_status=$?
14042   echo "$as_me:14042: \$? = $ac_status" >&5
14043   (exit $ac_status); }; }; then
14044
14045                         cf_cv_regex_hdrs=$cf_regex_hdr
14046                         break
14047
14048 else
14049   echo "$as_me: failed program was:" >&5
14050 cat conftest.$ac_ext >&5
14051 fi
14052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14053         done
14054         ;;
14055 *)
14056         for cf_regex_hdr in regex.h
14057         do
14058                 cat >conftest.$ac_ext <<_ACEOF
14059 #line 14059 "configure"
14060 #include "confdefs.h"
14061 #include <sys/types.h>
14062 #include <$cf_regex_hdr>
14063 int
14064 main ()
14065 {
14066
14067                         regex_t *p;
14068                         int x = regcomp(p, "", 0);
14069                         int y = regexec(p, "", 0, 0, 0);
14070                         regfree(p);
14071
14072   ;
14073   return 0;
14074 }
14075 _ACEOF
14076 rm -f conftest.$ac_objext conftest$ac_exeext
14077 if { (eval echo "$as_me:14077: \"$ac_link\"") >&5
14078   (eval $ac_link) 2>&5
14079   ac_status=$?
14080   echo "$as_me:14080: \$? = $ac_status" >&5
14081   (exit $ac_status); } &&
14082          { ac_try='test -s conftest$ac_exeext'
14083   { (eval echo "$as_me:14083: \"$ac_try\"") >&5
14084   (eval $ac_try) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit $ac_status); }; }; then
14088
14089                         cf_cv_regex_hdrs=$cf_regex_hdr
14090                         break
14091
14092 else
14093   echo "$as_me: failed program was:" >&5
14094 cat conftest.$ac_ext >&5
14095 fi
14096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14097         done
14098         ;;
14099 esac
14100
14101 fi
14102 echo "$as_me:14102: result: $cf_cv_regex_hdrs" >&5
14103 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14104
14105 case $cf_cv_regex_hdrs in #(vi
14106     no)        { echo "$as_me:14106: WARNING: no regular expression header found" >&5
14107 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14108     regex.h)   cat >>confdefs.h <<\EOF
14109 #define HAVE_REGEX_H_FUNCS 1
14110 EOF
14111  ;; #(vi
14112     regexp.h)  cat >>confdefs.h <<\EOF
14113 #define HAVE_REGEXP_H_FUNCS 1
14114 EOF
14115  ;; #(vi
14116     regexpr.h) cat >>confdefs.h <<\EOF
14117 #define HAVE_REGEXPR_H_FUNCS 1
14118 EOF
14119  ;;
14120 esac
14121
14122 for ac_header in \
14123 fcntl.h \
14124 getopt.h \
14125 limits.h \
14126 locale.h \
14127 math.h \
14128 poll.h \
14129 sys/bsdtypes.h \
14130 sys/ioctl.h \
14131 sys/param.h \
14132 sys/poll.h \
14133 sys/select.h \
14134 sys/time.h \
14135 sys/times.h \
14136 ttyent.h \
14137 unistd.h \
14138 wctype.h \
14139
14140 do
14141 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14142 echo "$as_me:14142: checking for $ac_header" >&5
14143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   cat >conftest.$ac_ext <<_ACEOF
14148 #line 14148 "configure"
14149 #include "confdefs.h"
14150 #include <$ac_header>
14151 _ACEOF
14152 if { (eval echo "$as_me:14152: \"$ac_cpp conftest.$ac_ext\"") >&5
14153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14154   ac_status=$?
14155   egrep -v '^ *\+' conftest.er1 >conftest.err
14156   rm -f conftest.er1
14157   cat conftest.err >&5
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit $ac_status); } >/dev/null; then
14160   if test -s conftest.err; then
14161     ac_cpp_err=$ac_c_preproc_warn_flag
14162   else
14163     ac_cpp_err=
14164   fi
14165 else
14166   ac_cpp_err=yes
14167 fi
14168 if test -z "$ac_cpp_err"; then
14169   eval "$as_ac_Header=yes"
14170 else
14171   echo "$as_me: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   eval "$as_ac_Header=no"
14174 fi
14175 rm -f conftest.err conftest.$ac_ext
14176 fi
14177 echo "$as_me:14177: result: `eval echo '${'$as_ac_Header'}'`" >&5
14178 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14180   cat >>confdefs.h <<EOF
14181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14182 EOF
14183
14184 fi
14185 done
14186
14187 for ac_header in unistd.h getopt.h
14188 do
14189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14190 echo "$as_me:14190: checking for $ac_header" >&5
14191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14193   echo $ECHO_N "(cached) $ECHO_C" >&6
14194 else
14195   cat >conftest.$ac_ext <<_ACEOF
14196 #line 14196 "configure"
14197 #include "confdefs.h"
14198 #include <$ac_header>
14199 _ACEOF
14200 if { (eval echo "$as_me:14200: \"$ac_cpp conftest.$ac_ext\"") >&5
14201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14202   ac_status=$?
14203   egrep -v '^ *\+' conftest.er1 >conftest.err
14204   rm -f conftest.er1
14205   cat conftest.err >&5
14206   echo "$as_me:14206: \$? = $ac_status" >&5
14207   (exit $ac_status); } >/dev/null; then
14208   if test -s conftest.err; then
14209     ac_cpp_err=$ac_c_preproc_warn_flag
14210   else
14211     ac_cpp_err=
14212   fi
14213 else
14214   ac_cpp_err=yes
14215 fi
14216 if test -z "$ac_cpp_err"; then
14217   eval "$as_ac_Header=yes"
14218 else
14219   echo "$as_me: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   eval "$as_ac_Header=no"
14222 fi
14223 rm -f conftest.err conftest.$ac_ext
14224 fi
14225 echo "$as_me:14225: result: `eval echo '${'$as_ac_Header'}'`" >&5
14226 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14227 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14228   cat >>confdefs.h <<EOF
14229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14230 EOF
14231
14232 fi
14233 done
14234
14235 echo "$as_me:14235: checking for header declaring getopt variables" >&5
14236 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14237 if test "${cf_cv_getopt_header+set}" = set; then
14238   echo $ECHO_N "(cached) $ECHO_C" >&6
14239 else
14240
14241 cf_cv_getopt_header=none
14242 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14243 do
14244 cat >conftest.$ac_ext <<_ACEOF
14245 #line 14245 "configure"
14246 #include "confdefs.h"
14247
14248 #include <$cf_header>
14249 int
14250 main ()
14251 {
14252 int x = optind; char *y = optarg
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f conftest.$ac_objext
14258 if { (eval echo "$as_me:14258: \"$ac_compile\"") >&5
14259   (eval $ac_compile) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); } &&
14263          { ac_try='test -s conftest.$ac_objext'
14264   { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265   (eval $ac_try) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); }; }; then
14269   cf_cv_getopt_header=$cf_header
14270  break
14271 else
14272   echo "$as_me: failed program was:" >&5
14273 cat conftest.$ac_ext >&5
14274 fi
14275 rm -f conftest.$ac_objext conftest.$ac_ext
14276 done
14277
14278 fi
14279 echo "$as_me:14279: result: $cf_cv_getopt_header" >&5
14280 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14281 if test $cf_cv_getopt_header != none ; then
14282         cat >>confdefs.h <<\EOF
14283 #define HAVE_GETOPT_HEADER 1
14284 EOF
14285
14286 fi
14287
14288 # check for ISC (this may also define _POSIX_SOURCE)
14289 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14290 if test "$ISC" = yes ; then
14291
14292 echo "$as_me:14292: checking for main in -lcposix" >&5
14293 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14294 if test "${ac_cv_lib_cposix_main+set}" = set; then
14295   echo $ECHO_N "(cached) $ECHO_C" >&6
14296 else
14297   ac_check_lib_save_LIBS=$LIBS
14298 LIBS="-lcposix  $LIBS"
14299 cat >conftest.$ac_ext <<_ACEOF
14300 #line 14300 "configure"
14301 #include "confdefs.h"
14302
14303 int
14304 main ()
14305 {
14306 main ();
14307   ;
14308   return 0;
14309 }
14310 _ACEOF
14311 rm -f conftest.$ac_objext conftest$ac_exeext
14312 if { (eval echo "$as_me:14312: \"$ac_link\"") >&5
14313   (eval $ac_link) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); } &&
14317          { ac_try='test -s conftest$ac_exeext'
14318   { (eval echo "$as_me:14318: \"$ac_try\"") >&5
14319   (eval $ac_try) 2>&5
14320   ac_status=$?
14321   echo "$as_me:14321: \$? = $ac_status" >&5
14322   (exit $ac_status); }; }; then
14323   ac_cv_lib_cposix_main=yes
14324 else
14325   echo "$as_me: failed program was:" >&5
14326 cat conftest.$ac_ext >&5
14327 ac_cv_lib_cposix_main=no
14328 fi
14329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14330 LIBS=$ac_check_lib_save_LIBS
14331 fi
14332 echo "$as_me:14332: result: $ac_cv_lib_cposix_main" >&5
14333 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14334 if test $ac_cv_lib_cposix_main = yes; then
14335   cat >>confdefs.h <<EOF
14336 #define HAVE_LIBCPOSIX 1
14337 EOF
14338
14339   LIBS="-lcposix $LIBS"
14340
14341 fi
14342
14343         echo "$as_me:14343: checking for bzero in -linet" >&5
14344 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14345 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348   ac_check_lib_save_LIBS=$LIBS
14349 LIBS="-linet  $LIBS"
14350 cat >conftest.$ac_ext <<_ACEOF
14351 #line 14351 "configure"
14352 #include "confdefs.h"
14353
14354 /* Override any gcc2 internal prototype to avoid an error.  */
14355 #ifdef __cplusplus
14356 extern "C"
14357 #endif
14358 /* We use char because int might match the return type of a gcc2
14359    builtin and then its argument prototype would still apply.  */
14360 char bzero ();
14361 int
14362 main ()
14363 {
14364 bzero ();
14365   ;
14366   return 0;
14367 }
14368 _ACEOF
14369 rm -f conftest.$ac_objext 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); } &&
14375          { ac_try='test -s conftest$ac_exeext'
14376   { (eval echo "$as_me:14376: \"$ac_try\"") >&5
14377   (eval $ac_try) 2>&5
14378   ac_status=$?
14379   echo "$as_me:14379: \$? = $ac_status" >&5
14380   (exit $ac_status); }; }; then
14381   ac_cv_lib_inet_bzero=yes
14382 else
14383   echo "$as_me: failed program was:" >&5
14384 cat conftest.$ac_ext >&5
14385 ac_cv_lib_inet_bzero=no
14386 fi
14387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14388 LIBS=$ac_check_lib_save_LIBS
14389 fi
14390 echo "$as_me:14390: result: $ac_cv_lib_inet_bzero" >&5
14391 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14392 if test $ac_cv_lib_inet_bzero = yes; then
14393   LIBS="-linet $LIBS"
14394 fi
14395 fi
14396
14397 echo "$as_me:14397: checking if sys/time.h works with sys/select.h" >&5
14398 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14399 if test "${cf_cv_sys_time_select+set}" = set; then
14400   echo $ECHO_N "(cached) $ECHO_C" >&6
14401 else
14402
14403 cat >conftest.$ac_ext <<_ACEOF
14404 #line 14404 "configure"
14405 #include "confdefs.h"
14406
14407 #include <sys/types.h>
14408 #ifdef HAVE_SYS_TIME_H
14409 #include <sys/time.h>
14410 #endif
14411 #ifdef HAVE_SYS_SELECT_H
14412 #include <sys/select.h>
14413 #endif
14414
14415 int
14416 main ()
14417 {
14418
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_sys_time_select=yes
14436 else
14437   echo "$as_me: failed program was:" >&5
14438 cat conftest.$ac_ext >&5
14439 cf_cv_sys_time_select=no
14440 fi
14441 rm -f conftest.$ac_objext conftest.$ac_ext
14442
14443 fi
14444
14445 echo "$as_me:14445: result: $cf_cv_sys_time_select" >&5
14446 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14447 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14448 #define HAVE_SYS_TIME_SELECT 1
14449 EOF
14450
14451 ###     checks for compiler characteristics
14452 ac_ext=c
14453 ac_cpp='$CPP $CPPFLAGS'
14454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14457 ac_main_return=return
14458
14459 echo "$as_me:14459: checking for $CC option to accept ANSI C" >&5
14460 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14461 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14462   echo $ECHO_N "(cached) $ECHO_C" >&6
14463 else
14464   ac_cv_prog_cc_stdc=no
14465 ac_save_CC=$CC
14466 cat >conftest.$ac_ext <<_ACEOF
14467 #line 14467 "configure"
14468 #include "confdefs.h"
14469 #include <stdarg.h>
14470 #include <stdio.h>
14471 #include <sys/types.h>
14472 #include <sys/stat.h>
14473 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14474 struct buf { int x; };
14475 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14476 static char *e (p, i)
14477      char **p;
14478      int i;
14479 {
14480   return p[i];
14481 }
14482 static char *f (char * (*g) (char **, int), char **p, ...)
14483 {
14484   char *s;
14485   va_list v;
14486   va_start (v,p);
14487   s = g (p, va_arg (v,int));
14488   va_end (v);
14489   return s;
14490 }
14491 int test (int i, double x);
14492 struct s1 {int (*f) (int a);};
14493 struct s2 {int (*f) (double a);};
14494 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14495 int argc;
14496 char **argv;
14497 int
14498 main ()
14499 {
14500 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 # Don't try gcc -ansi; that turns off useful extensions and
14506 # breaks some systems' header files.
14507 # AIX                   -qlanglvl=ansi
14508 # Ultrix and OSF/1      -std1
14509 # HP-UX 10.20 and later -Ae
14510 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14511 # SVR4                  -Xc -D__EXTENSIONS__
14512 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14513 do
14514   CC="$ac_save_CC $ac_arg"
14515   rm -f conftest.$ac_objext
14516 if { (eval echo "$as_me:14516: \"$ac_compile\"") >&5
14517   (eval $ac_compile) 2>&5
14518   ac_status=$?
14519   echo "$as_me:14519: \$? = $ac_status" >&5
14520   (exit $ac_status); } &&
14521          { ac_try='test -s conftest.$ac_objext'
14522   { (eval echo "$as_me:14522: \"$ac_try\"") >&5
14523   (eval $ac_try) 2>&5
14524   ac_status=$?
14525   echo "$as_me:14525: \$? = $ac_status" >&5
14526   (exit $ac_status); }; }; then
14527   ac_cv_prog_cc_stdc=$ac_arg
14528 break
14529 else
14530   echo "$as_me: failed program was:" >&5
14531 cat conftest.$ac_ext >&5
14532 fi
14533 rm -f conftest.$ac_objext
14534 done
14535 rm -f conftest.$ac_ext conftest.$ac_objext
14536 CC=$ac_save_CC
14537
14538 fi
14539
14540 case "x$ac_cv_prog_cc_stdc" in
14541   x|xno)
14542     echo "$as_me:14542: result: none needed" >&5
14543 echo "${ECHO_T}none needed" >&6 ;;
14544   *)
14545     echo "$as_me:14545: result: $ac_cv_prog_cc_stdc" >&5
14546 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14547     CC="$CC $ac_cv_prog_cc_stdc" ;;
14548 esac
14549
14550 echo "$as_me:14550: checking for an ANSI C-conforming const" >&5
14551 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14552 if test "${ac_cv_c_const+set}" = set; then
14553   echo $ECHO_N "(cached) $ECHO_C" >&6
14554 else
14555   cat >conftest.$ac_ext <<_ACEOF
14556 #line 14556 "configure"
14557 #include "confdefs.h"
14558
14559 int
14560 main ()
14561 {
14562 /* FIXME: Include the comments suggested by Paul. */
14563 #ifndef __cplusplus
14564   /* Ultrix mips cc rejects this.  */
14565   typedef int charset[2];
14566   const charset x;
14567   /* SunOS 4.1.1 cc rejects this.  */
14568   char const *const *ccp;
14569   char **p;
14570   /* NEC SVR4.0.2 mips cc rejects this.  */
14571   struct point {int x, y;};
14572   static struct point const zero = {0,0};
14573   /* AIX XL C 1.02.0.0 rejects this.
14574      It does not let you subtract one const X* pointer from another in
14575      an arm of an if-expression whose if-part is not a constant
14576      expression */
14577   const char *g = "string";
14578   ccp = &g + (g ? g-g : 0);
14579   /* HPUX 7.0 cc rejects these. */
14580   ++ccp;
14581   p = (char**) ccp;
14582   ccp = (char const *const *) p;
14583   { /* SCO 3.2v4 cc rejects this.  */
14584     char *t;
14585     char const *s = 0 ? (char *) 0 : (char const *) 0;
14586
14587     *t++ = 0;
14588   }
14589   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14590     int x[] = {25, 17};
14591     const int *foo = &x[0];
14592     ++foo;
14593   }
14594   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14595     typedef const int *iptr;
14596     iptr p = 0;
14597     ++p;
14598   }
14599   { /* AIX XL C 1.02.0.0 rejects this saying
14600        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14601     struct s { int j; const int *ap[3]; };
14602     struct s *b; b->j = 5;
14603   }
14604   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14605     const int foo = 10;
14606   }
14607 #endif
14608
14609   ;
14610   return 0;
14611 }
14612 _ACEOF
14613 rm -f conftest.$ac_objext
14614 if { (eval echo "$as_me:14614: \"$ac_compile\"") >&5
14615   (eval $ac_compile) 2>&5
14616   ac_status=$?
14617   echo "$as_me:14617: \$? = $ac_status" >&5
14618   (exit $ac_status); } &&
14619          { ac_try='test -s conftest.$ac_objext'
14620   { (eval echo "$as_me:14620: \"$ac_try\"") >&5
14621   (eval $ac_try) 2>&5
14622   ac_status=$?
14623   echo "$as_me:14623: \$? = $ac_status" >&5
14624   (exit $ac_status); }; }; then
14625   ac_cv_c_const=yes
14626 else
14627   echo "$as_me: failed program was:" >&5
14628 cat conftest.$ac_ext >&5
14629 ac_cv_c_const=no
14630 fi
14631 rm -f conftest.$ac_objext conftest.$ac_ext
14632 fi
14633 echo "$as_me:14633: result: $ac_cv_c_const" >&5
14634 echo "${ECHO_T}$ac_cv_c_const" >&6
14635 if test $ac_cv_c_const = no; then
14636
14637 cat >>confdefs.h <<\EOF
14638 #define const
14639 EOF
14640
14641 fi
14642
14643 echo "$as_me:14643: checking for inline" >&5
14644 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14645 if test "${ac_cv_c_inline+set}" = set; then
14646   echo $ECHO_N "(cached) $ECHO_C" >&6
14647 else
14648   ac_cv_c_inline=no
14649 for ac_kw in inline __inline__ __inline; do
14650   cat >conftest.$ac_ext <<_ACEOF
14651 #line 14651 "configure"
14652 #include "confdefs.h"
14653 #ifndef __cplusplus
14654 static $ac_kw int static_foo () {return 0; }
14655 $ac_kw int foo () {return 0; }
14656 #endif
14657
14658 _ACEOF
14659 rm -f conftest.$ac_objext
14660 if { (eval echo "$as_me:14660: \"$ac_compile\"") >&5
14661   (eval $ac_compile) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); } &&
14665          { ac_try='test -s conftest.$ac_objext'
14666   { (eval echo "$as_me:14666: \"$ac_try\"") >&5
14667   (eval $ac_try) 2>&5
14668   ac_status=$?
14669   echo "$as_me:14669: \$? = $ac_status" >&5
14670   (exit $ac_status); }; }; then
14671   ac_cv_c_inline=$ac_kw; break
14672 else
14673   echo "$as_me: failed program was:" >&5
14674 cat conftest.$ac_ext >&5
14675 fi
14676 rm -f conftest.$ac_objext conftest.$ac_ext
14677 done
14678
14679 fi
14680 echo "$as_me:14680: result: $ac_cv_c_inline" >&5
14681 echo "${ECHO_T}$ac_cv_c_inline" >&6
14682 case $ac_cv_c_inline in
14683   inline | yes) ;;
14684   no)
14685 cat >>confdefs.h <<\EOF
14686 #define inline
14687 EOF
14688  ;;
14689   *)  cat >>confdefs.h <<EOF
14690 #define inline $ac_cv_c_inline
14691 EOF
14692  ;;
14693 esac
14694
14695 NCURSES_INLINE=
14696 if test "$ac_cv_c_inline" != no ; then
14697   NCURSES_INLINE=inline
14698   if test "$INTEL_COMPILER" = yes
14699   then
14700     :
14701   elif test "$GCC" = yes
14702   then
14703     echo "$as_me:14703: checking if $CC supports options to tune inlining" >&5
14704 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14705 if test "${cf_cv_gcc_inline+set}" = set; then
14706   echo $ECHO_N "(cached) $ECHO_C" >&6
14707 else
14708
14709       cf_save_CFLAGS=$CFLAGS
14710       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14711       cat >conftest.$ac_ext <<_ACEOF
14712 #line 14712 "configure"
14713 #include "confdefs.h"
14714 inline int foo(void) { return 1; }
14715 int
14716 main ()
14717 {
14718 ${cf_cv_main_return:-return} foo()
14719   ;
14720   return 0;
14721 }
14722 _ACEOF
14723 rm -f conftest.$ac_objext
14724 if { (eval echo "$as_me:14724: \"$ac_compile\"") >&5
14725   (eval $ac_compile) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit $ac_status); } &&
14729          { ac_try='test -s conftest.$ac_objext'
14730   { (eval echo "$as_me:14730: \"$ac_try\"") >&5
14731   (eval $ac_try) 2>&5
14732   ac_status=$?
14733   echo "$as_me:14733: \$? = $ac_status" >&5
14734   (exit $ac_status); }; }; then
14735   cf_cv_gcc_inline=yes
14736 else
14737   echo "$as_me: failed program was:" >&5
14738 cat conftest.$ac_ext >&5
14739 cf_cv_gcc_inline=no
14740 fi
14741 rm -f conftest.$ac_objext conftest.$ac_ext
14742       CFLAGS=$cf_save_CFLAGS
14743
14744 fi
14745 echo "$as_me:14745: result: $cf_cv_gcc_inline" >&5
14746 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14747     if test "$cf_cv_gcc_inline" = yes ; then
14748
14749 cf_fix_cppflags=no
14750 cf_new_cflags=
14751 cf_new_cppflags=
14752 cf_new_extra_cppflags=
14753
14754 for cf_add_cflags in --param max-inline-insns-single=1200
14755 do
14756 case $cf_fix_cppflags in
14757 no)
14758         case $cf_add_cflags in #(vi
14759         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14760                 case $cf_add_cflags in
14761                 -D*)
14762                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14763
14764                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14765                                 && test -z "${cf_tst_cflags}" \
14766                                 && cf_fix_cppflags=yes
14767
14768                         if test $cf_fix_cppflags = yes ; then
14769                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14770                                 continue
14771                         elif test "${cf_tst_cflags}" = "\"'" ; then
14772                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14773                                 continue
14774                         fi
14775                         ;;
14776                 esac
14777                 case "$CPPFLAGS" in
14778                 *$cf_add_cflags) #(vi
14779                         ;;
14780                 *) #(vi
14781                         case $cf_add_cflags in #(vi
14782                         -D*)
14783                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14784
14785 CPPFLAGS=`echo "$CPPFLAGS" | \
14786         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14787                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14788
14789                                 ;;
14790                         esac
14791                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14792                         ;;
14793                 esac
14794                 ;;
14795         *)
14796                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14797                 ;;
14798         esac
14799         ;;
14800 yes)
14801         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14802
14803         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14804
14805         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14806                 && test -z "${cf_tst_cflags}" \
14807                 && cf_fix_cppflags=no
14808         ;;
14809 esac
14810 done
14811
14812 if test -n "$cf_new_cflags" ; then
14813
14814         CFLAGS="$CFLAGS $cf_new_cflags"
14815 fi
14816
14817 if test -n "$cf_new_cppflags" ; then
14818
14819         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14820 fi
14821
14822 if test -n "$cf_new_extra_cppflags" ; then
14823
14824         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14825 fi
14826
14827     fi
14828   fi
14829 fi
14830
14831 echo "$as_me:14831: checking for signal global datatype" >&5
14832 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14833 if test "${cf_cv_sig_atomic_t+set}" = set; then
14834   echo $ECHO_N "(cached) $ECHO_C" >&6
14835 else
14836
14837         for cf_type in \
14838                 "volatile sig_atomic_t" \
14839                 "sig_atomic_t" \
14840                 "int"
14841         do
14842         cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845
14846 #include <sys/types.h>
14847 #include <signal.h>
14848 #include <stdio.h>
14849
14850 extern $cf_type x;
14851 $cf_type x;
14852 static void handler(int sig)
14853 {
14854         x = 5;
14855 }
14856 int
14857 main ()
14858 {
14859 signal(SIGINT, handler);
14860                  x = 1
14861   ;
14862   return 0;
14863 }
14864 _ACEOF
14865 rm -f conftest.$ac_objext
14866 if { (eval echo "$as_me:14866: \"$ac_compile\"") >&5
14867   (eval $ac_compile) 2>&5
14868   ac_status=$?
14869   echo "$as_me:14869: \$? = $ac_status" >&5
14870   (exit $ac_status); } &&
14871          { ac_try='test -s conftest.$ac_objext'
14872   { (eval echo "$as_me:14872: \"$ac_try\"") >&5
14873   (eval $ac_try) 2>&5
14874   ac_status=$?
14875   echo "$as_me:14875: \$? = $ac_status" >&5
14876   (exit $ac_status); }; }; then
14877   cf_cv_sig_atomic_t=$cf_type
14878 else
14879   echo "$as_me: failed program was:" >&5
14880 cat conftest.$ac_ext >&5
14881 cf_cv_sig_atomic_t=no
14882 fi
14883 rm -f conftest.$ac_objext conftest.$ac_ext
14884                 test "$cf_cv_sig_atomic_t" != no && break
14885         done
14886
14887 fi
14888
14889 echo "$as_me:14889: result: $cf_cv_sig_atomic_t" >&5
14890 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14891 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14892 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14893 EOF
14894
14895 if test $NCURSES_CHTYPE = auto ; then
14896
14897 echo "$as_me:14897: checking for type of chtype" >&5
14898 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14899 if test "${cf_cv_typeof_chtype+set}" = set; then
14900   echo $ECHO_N "(cached) $ECHO_C" >&6
14901 else
14902
14903                 if test "$cross_compiling" = yes; then
14904   cf_cv_typeof_chtype=long
14905 else
14906   cat >conftest.$ac_ext <<_ACEOF
14907 #line 14907 "configure"
14908 #include "confdefs.h"
14909
14910 #define WANT_BITS 31
14911 #include <stdio.h>
14912 int main()
14913 {
14914         FILE *fp = fopen("cf_test.out", "w");
14915         if (fp != 0) {
14916                 char *result = "long";
14917                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14918                         int n;
14919                         unsigned int x, y;
14920                         for (n = 0; n < WANT_BITS; n++) {
14921                                 x = (1 << n);
14922                                 y = (x >> n);
14923                                 if (y != 1 || x == 0) {
14924                                         x = 0;
14925                                         break;
14926                                 }
14927                         }
14928                         /*
14929                          * If x is nonzero, an int is big enough for the bits
14930                          * that we want.
14931                          */
14932                         result = (x != 0) ? "int" : "long";
14933                 }
14934                 fputs(result, fp);
14935                 fclose(fp);
14936         }
14937         ${cf_cv_main_return:-return}(0);
14938 }
14939
14940 _ACEOF
14941 rm -f conftest$ac_exeext
14942 if { (eval echo "$as_me:14942: \"$ac_link\"") >&5
14943   (eval $ac_link) 2>&5
14944   ac_status=$?
14945   echo "$as_me:14945: \$? = $ac_status" >&5
14946   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14947   { (eval echo "$as_me:14947: \"$ac_try\"") >&5
14948   (eval $ac_try) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); }; }; then
14952   cf_cv_typeof_chtype=`cat cf_test.out`
14953 else
14954   echo "$as_me: program exited with status $ac_status" >&5
14955 echo "$as_me: failed program was:" >&5
14956 cat conftest.$ac_ext >&5
14957 cf_cv_typeof_chtype=long
14958 fi
14959 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14960 fi
14961                 rm -f cf_test.out
14962
14963 fi
14964
14965 echo "$as_me:14965: result: $cf_cv_typeof_chtype" >&5
14966 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14967
14968 cat >>confdefs.h <<EOF
14969 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14970 EOF
14971
14972 else
14973         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14974 fi
14975 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14976
14977 echo "$as_me:14977: checking if unsigned literals are legal" >&5
14978 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14979 if test "${cf_cv_unsigned_literals+set}" = set; then
14980   echo $ECHO_N "(cached) $ECHO_C" >&6
14981 else
14982
14983         cat >conftest.$ac_ext <<_ACEOF
14984 #line 14984 "configure"
14985 #include "confdefs.h"
14986
14987 int
14988 main ()
14989 {
14990 long x = 1L + 1UL + 1U + 1
14991   ;
14992   return 0;
14993 }
14994 _ACEOF
14995 rm -f conftest.$ac_objext
14996 if { (eval echo "$as_me:14996: \"$ac_compile\"") >&5
14997   (eval $ac_compile) 2>&5
14998   ac_status=$?
14999   echo "$as_me:14999: \$? = $ac_status" >&5
15000   (exit $ac_status); } &&
15001          { ac_try='test -s conftest.$ac_objext'
15002   { (eval echo "$as_me:15002: \"$ac_try\"") >&5
15003   (eval $ac_try) 2>&5
15004   ac_status=$?
15005   echo "$as_me:15005: \$? = $ac_status" >&5
15006   (exit $ac_status); }; }; then
15007   cf_cv_unsigned_literals=yes
15008 else
15009   echo "$as_me: failed program was:" >&5
15010 cat conftest.$ac_ext >&5
15011 cf_cv_unsigned_literals=no
15012 fi
15013 rm -f conftest.$ac_objext conftest.$ac_ext
15014
15015 fi
15016
15017 echo "$as_me:15017: result: $cf_cv_unsigned_literals" >&5
15018 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15019
15020 cf_cv_1UL="1"
15021 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15022 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15023
15024 if test $NCURSES_MMASK_T = auto ; then
15025         cf_cv_typeof_mmask_t=long
15026 else
15027         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15028 fi
15029 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15030
15031 ###     Checks for external-data
15032
15033 echo "$as_me:15033: checking if external errno is declared" >&5
15034 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15035 if test "${cf_cv_dcl_errno+set}" = set; then
15036   echo $ECHO_N "(cached) $ECHO_C" >&6
15037 else
15038
15039     cat >conftest.$ac_ext <<_ACEOF
15040 #line 15040 "configure"
15041 #include "confdefs.h"
15042
15043 #ifdef HAVE_STDLIB_H
15044 #include <stdlib.h>
15045 #endif
15046 #include <stdio.h>
15047 #include <sys/types.h>
15048 #include <errno.h>
15049 int
15050 main ()
15051 {
15052 int x = (int) errno
15053   ;
15054   return 0;
15055 }
15056 _ACEOF
15057 rm -f conftest.$ac_objext
15058 if { (eval echo "$as_me:15058: \"$ac_compile\"") >&5
15059   (eval $ac_compile) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); } &&
15063          { ac_try='test -s conftest.$ac_objext'
15064   { (eval echo "$as_me:15064: \"$ac_try\"") >&5
15065   (eval $ac_try) 2>&5
15066   ac_status=$?
15067   echo "$as_me:15067: \$? = $ac_status" >&5
15068   (exit $ac_status); }; }; then
15069   cf_cv_dcl_errno=yes
15070 else
15071   echo "$as_me: failed program was:" >&5
15072 cat conftest.$ac_ext >&5
15073 cf_cv_dcl_errno=no
15074 fi
15075 rm -f conftest.$ac_objext conftest.$ac_ext
15076
15077 fi
15078 echo "$as_me:15078: result: $cf_cv_dcl_errno" >&5
15079 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15080
15081 if test "$cf_cv_dcl_errno" = no ; then
15082
15083 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15084
15085     cat >>confdefs.h <<EOF
15086 #define $cf_result 1
15087 EOF
15088
15089 fi
15090
15091 # It's possible (for near-UNIX clones) that the data doesn't exist
15092
15093 echo "$as_me:15093: checking if external errno exists" >&5
15094 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15095 if test "${cf_cv_have_errno+set}" = set; then
15096   echo $ECHO_N "(cached) $ECHO_C" >&6
15097 else
15098
15099     cat >conftest.$ac_ext <<_ACEOF
15100 #line 15100 "configure"
15101 #include "confdefs.h"
15102
15103 #undef errno
15104 extern int errno;
15105
15106 int
15107 main ()
15108 {
15109 errno = 2
15110   ;
15111   return 0;
15112 }
15113 _ACEOF
15114 rm -f conftest.$ac_objext conftest$ac_exeext
15115 if { (eval echo "$as_me:15115: \"$ac_link\"") >&5
15116   (eval $ac_link) 2>&5
15117   ac_status=$?
15118   echo "$as_me:15118: \$? = $ac_status" >&5
15119   (exit $ac_status); } &&
15120          { ac_try='test -s conftest$ac_exeext'
15121   { (eval echo "$as_me:15121: \"$ac_try\"") >&5
15122   (eval $ac_try) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); }; }; then
15126   cf_cv_have_errno=yes
15127 else
15128   echo "$as_me: failed program was:" >&5
15129 cat conftest.$ac_ext >&5
15130 cf_cv_have_errno=no
15131 fi
15132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15133
15134 fi
15135 echo "$as_me:15135: result: $cf_cv_have_errno" >&5
15136 echo "${ECHO_T}$cf_cv_have_errno" >&6
15137
15138 if test "$cf_cv_have_errno" = yes ; then
15139
15140 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15141
15142     cat >>confdefs.h <<EOF
15143 #define $cf_result 1
15144 EOF
15145
15146 fi
15147
15148 echo "$as_me:15148: checking if data-only library module links" >&5
15149 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15150 if test "${cf_cv_link_dataonly+set}" = set; then
15151   echo $ECHO_N "(cached) $ECHO_C" >&6
15152 else
15153
15154         rm -f conftest.a
15155         cat >conftest.$ac_ext <<EOF
15156 #line 15156 "configure"
15157 int     testdata[3] = { 123, 456, 789 };
15158 EOF
15159         if { (eval echo "$as_me:15159: \"$ac_compile\"") >&5
15160   (eval $ac_compile) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); } ; then
15164                 mv conftest.o data.o && \
15165                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15166         fi
15167         rm -f conftest.$ac_ext data.o
15168         cat >conftest.$ac_ext <<EOF
15169 #line 15169 "configure"
15170 int     testfunc()
15171 {
15172 #if defined(NeXT)
15173         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15174 #else
15175         extern int testdata[3];
15176         return testdata[0] == 123
15177            &&  testdata[1] == 456
15178            &&  testdata[2] == 789;
15179 #endif
15180 }
15181 EOF
15182         if { (eval echo "$as_me:15182: \"$ac_compile\"") >&5
15183   (eval $ac_compile) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit $ac_status); }; then
15187                 mv conftest.o func.o && \
15188                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15189         fi
15190         rm -f conftest.$ac_ext func.o
15191         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15192         cf_saveLIBS="$LIBS"
15193         LIBS="conftest.a $LIBS"
15194         if test "$cross_compiling" = yes; then
15195   cf_cv_link_dataonly=unknown
15196 else
15197   cat >conftest.$ac_ext <<_ACEOF
15198 #line 15198 "configure"
15199 #include "confdefs.h"
15200
15201         int main()
15202         {
15203                 extern int testfunc();
15204                 ${cf_cv_main_return:-return} (!testfunc());
15205         }
15206
15207 _ACEOF
15208 rm -f conftest$ac_exeext
15209 if { (eval echo "$as_me:15209: \"$ac_link\"") >&5
15210   (eval $ac_link) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15214   { (eval echo "$as_me:15214: \"$ac_try\"") >&5
15215   (eval $ac_try) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); }; }; then
15219   cf_cv_link_dataonly=yes
15220 else
15221   echo "$as_me: program exited with status $ac_status" >&5
15222 echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_cv_link_dataonly=no
15225 fi
15226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15227 fi
15228         LIBS="$cf_saveLIBS"
15229
15230 fi
15231
15232 echo "$as_me:15232: result: $cf_cv_link_dataonly" >&5
15233 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15234
15235 if test "$cf_cv_link_dataonly" = no ; then
15236         cat >>confdefs.h <<\EOF
15237 #define BROKEN_LINKER 1
15238 EOF
15239
15240         BROKEN_LINKER=1
15241 fi
15242
15243 ###     Checks for library functions.
15244
15245 for ac_func in \
15246 getcwd \
15247 getegid \
15248 geteuid \
15249 getttynam \
15250 issetugid \
15251 poll \
15252 remove \
15253 select \
15254 setbuf \
15255 setbuffer \
15256 setvbuf \
15257 sigaction \
15258 sigvec \
15259 strdup \
15260 strstr \
15261 tcgetpgrp \
15262 times \
15263 vsnprintf \
15264
15265 do
15266 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15267 echo "$as_me:15267: checking for $ac_func" >&5
15268 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15269 if eval "test \"\${$as_ac_var+set}\" = set"; then
15270   echo $ECHO_N "(cached) $ECHO_C" >&6
15271 else
15272   cat >conftest.$ac_ext <<_ACEOF
15273 #line 15273 "configure"
15274 #include "confdefs.h"
15275 /* System header to define __stub macros and hopefully few prototypes,
15276     which can conflict with char $ac_func (); below.  */
15277 #include <assert.h>
15278 /* Override any gcc2 internal prototype to avoid an error.  */
15279 #ifdef __cplusplus
15280 extern "C"
15281 #endif
15282 /* We use char because int might match the return type of a gcc2
15283    builtin and then its argument prototype would still apply.  */
15284 char $ac_func ();
15285 char (*f) ();
15286
15287 int
15288 main ()
15289 {
15290 /* The GNU C library defines this for functions which it implements
15291     to always fail with ENOSYS.  Some functions are actually named
15292     something starting with __ and the normal name is an alias.  */
15293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15294 choke me
15295 #else
15296 f = $ac_func;
15297 #endif
15298
15299   ;
15300   return 0;
15301 }
15302 _ACEOF
15303 rm -f conftest.$ac_objext conftest$ac_exeext
15304 if { (eval echo "$as_me:15304: \"$ac_link\"") >&5
15305   (eval $ac_link) 2>&5
15306   ac_status=$?
15307   echo "$as_me:15307: \$? = $ac_status" >&5
15308   (exit $ac_status); } &&
15309          { ac_try='test -s conftest$ac_exeext'
15310   { (eval echo "$as_me:15310: \"$ac_try\"") >&5
15311   (eval $ac_try) 2>&5
15312   ac_status=$?
15313   echo "$as_me:15313: \$? = $ac_status" >&5
15314   (exit $ac_status); }; }; then
15315   eval "$as_ac_var=yes"
15316 else
15317   echo "$as_me: failed program was:" >&5
15318 cat conftest.$ac_ext >&5
15319 eval "$as_ac_var=no"
15320 fi
15321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15322 fi
15323 echo "$as_me:15323: result: `eval echo '${'$as_ac_var'}'`" >&5
15324 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15325 if test `eval echo '${'$as_ac_var'}'` = yes; then
15326   cat >>confdefs.h <<EOF
15327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15328 EOF
15329
15330 fi
15331 done
15332
15333 if test "$with_getcap" = "yes" ; then
15334
15335 echo "$as_me:15335: checking for terminal-capability database functions" >&5
15336 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15337 if test "${cf_cv_cgetent+set}" = set; then
15338   echo $ECHO_N "(cached) $ECHO_C" >&6
15339 else
15340
15341 cat >conftest.$ac_ext <<_ACEOF
15342 #line 15342 "configure"
15343 #include "confdefs.h"
15344
15345 #include <stdlib.h>
15346 int
15347 main ()
15348 {
15349
15350         char temp[128];
15351         char *buf = temp;
15352         char *db_array = temp;
15353         cgetent(&buf, &db_array, "vt100");
15354         cgetcap(buf, "tc", '=');
15355         cgetmatch(buf, "tc");
15356
15357   ;
15358   return 0;
15359 }
15360 _ACEOF
15361 rm -f conftest.$ac_objext conftest$ac_exeext
15362 if { (eval echo "$as_me:15362: \"$ac_link\"") >&5
15363   (eval $ac_link) 2>&5
15364   ac_status=$?
15365   echo "$as_me:15365: \$? = $ac_status" >&5
15366   (exit $ac_status); } &&
15367          { ac_try='test -s conftest$ac_exeext'
15368   { (eval echo "$as_me:15368: \"$ac_try\"") >&5
15369   (eval $ac_try) 2>&5
15370   ac_status=$?
15371   echo "$as_me:15371: \$? = $ac_status" >&5
15372   (exit $ac_status); }; }; then
15373   cf_cv_cgetent=yes
15374 else
15375   echo "$as_me: failed program was:" >&5
15376 cat conftest.$ac_ext >&5
15377 cf_cv_cgetent=no
15378 fi
15379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15380
15381 fi
15382 echo "$as_me:15382: result: $cf_cv_cgetent" >&5
15383 echo "${ECHO_T}$cf_cv_cgetent" >&6
15384
15385 if test "$cf_cv_cgetent" = yes
15386 then
15387         cat >>confdefs.h <<\EOF
15388 #define HAVE_BSD_CGETENT 1
15389 EOF
15390
15391 echo "$as_me:15391: checking if cgetent uses const parameter" >&5
15392 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15393 if test "${cf_cv_cgetent_const+set}" = set; then
15394   echo $ECHO_N "(cached) $ECHO_C" >&6
15395 else
15396
15397 cat >conftest.$ac_ext <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400
15401 #include <stdlib.h>
15402 int
15403 main ()
15404 {
15405
15406         char temp[128];
15407         char *buf = temp;
15408 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15409         const char *db_array = temp;
15410         cgetent(&buf, &db_array, "vt100");
15411 #endif
15412         cgetcap(buf, "tc", '=');
15413         cgetmatch(buf, "tc");
15414
15415   ;
15416   return 0;
15417 }
15418 _ACEOF
15419 rm -f conftest.$ac_objext conftest$ac_exeext
15420 if { (eval echo "$as_me:15420: \"$ac_link\"") >&5
15421   (eval $ac_link) 2>&5
15422   ac_status=$?
15423   echo "$as_me:15423: \$? = $ac_status" >&5
15424   (exit $ac_status); } &&
15425          { ac_try='test -s conftest$ac_exeext'
15426   { (eval echo "$as_me:15426: \"$ac_try\"") >&5
15427   (eval $ac_try) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); }; }; then
15431   cf_cv_cgetent_const=yes
15432 else
15433   echo "$as_me: failed program was:" >&5
15434 cat conftest.$ac_ext >&5
15435 cf_cv_cgetent_const=no
15436 fi
15437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15438
15439 fi
15440 echo "$as_me:15440: result: $cf_cv_cgetent_const" >&5
15441 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15442         if test "$cf_cv_cgetent_const" = yes
15443         then
15444                 cat >>confdefs.h <<EOF
15445 #define CGETENT_CONST const
15446 EOF
15447
15448         fi
15449 fi
15450
15451 fi
15452
15453 echo "$as_me:15453: checking for isascii" >&5
15454 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15455 if test "${cf_cv_have_isascii+set}" = set; then
15456   echo $ECHO_N "(cached) $ECHO_C" >&6
15457 else
15458
15459         cat >conftest.$ac_ext <<_ACEOF
15460 #line 15460 "configure"
15461 #include "confdefs.h"
15462 #include <ctype.h>
15463 int
15464 main ()
15465 {
15466 int x = isascii(' ')
15467   ;
15468   return 0;
15469 }
15470 _ACEOF
15471 rm -f conftest.$ac_objext conftest$ac_exeext
15472 if { (eval echo "$as_me:15472: \"$ac_link\"") >&5
15473   (eval $ac_link) 2>&5
15474   ac_status=$?
15475   echo "$as_me:15475: \$? = $ac_status" >&5
15476   (exit $ac_status); } &&
15477          { ac_try='test -s conftest$ac_exeext'
15478   { (eval echo "$as_me:15478: \"$ac_try\"") >&5
15479   (eval $ac_try) 2>&5
15480   ac_status=$?
15481   echo "$as_me:15481: \$? = $ac_status" >&5
15482   (exit $ac_status); }; }; then
15483   cf_cv_have_isascii=yes
15484 else
15485   echo "$as_me: failed program was:" >&5
15486 cat conftest.$ac_ext >&5
15487 cf_cv_have_isascii=no
15488 fi
15489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15490
15491 fi
15492 echo "$as_me:15492: result: $cf_cv_have_isascii" >&5
15493 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15494 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15495 #define HAVE_ISASCII 1
15496 EOF
15497
15498 if test "$ac_cv_func_sigaction" = yes; then
15499 echo "$as_me:15499: checking whether sigaction needs _POSIX_SOURCE" >&5
15500 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15501 cat >conftest.$ac_ext <<_ACEOF
15502 #line 15502 "configure"
15503 #include "confdefs.h"
15504
15505 #include <sys/types.h>
15506 #include <signal.h>
15507 int
15508 main ()
15509 {
15510 struct sigaction act
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 rm -f conftest.$ac_objext
15516 if { (eval echo "$as_me:15516: \"$ac_compile\"") >&5
15517   (eval $ac_compile) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); } &&
15521          { ac_try='test -s conftest.$ac_objext'
15522   { (eval echo "$as_me:15522: \"$ac_try\"") >&5
15523   (eval $ac_try) 2>&5
15524   ac_status=$?
15525   echo "$as_me:15525: \$? = $ac_status" >&5
15526   (exit $ac_status); }; }; then
15527   sigact_bad=no
15528 else
15529   echo "$as_me: failed program was:" >&5
15530 cat conftest.$ac_ext >&5
15531
15532 cat >conftest.$ac_ext <<_ACEOF
15533 #line 15533 "configure"
15534 #include "confdefs.h"
15535
15536 #define _POSIX_SOURCE
15537 #include <sys/types.h>
15538 #include <signal.h>
15539 int
15540 main ()
15541 {
15542 struct sigaction act
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 rm -f conftest.$ac_objext
15548 if { (eval echo "$as_me:15548: \"$ac_compile\"") >&5
15549   (eval $ac_compile) 2>&5
15550   ac_status=$?
15551   echo "$as_me:15551: \$? = $ac_status" >&5
15552   (exit $ac_status); } &&
15553          { ac_try='test -s conftest.$ac_objext'
15554   { (eval echo "$as_me:15554: \"$ac_try\"") >&5
15555   (eval $ac_try) 2>&5
15556   ac_status=$?
15557   echo "$as_me:15557: \$? = $ac_status" >&5
15558   (exit $ac_status); }; }; then
15559   sigact_bad=yes
15560          cat >>confdefs.h <<\EOF
15561 #define _POSIX_SOURCE 1
15562 EOF
15563
15564 else
15565   echo "$as_me: failed program was:" >&5
15566 cat conftest.$ac_ext >&5
15567 sigact_bad=unknown
15568 fi
15569 rm -f conftest.$ac_objext conftest.$ac_ext
15570 fi
15571 rm -f conftest.$ac_objext conftest.$ac_ext
15572 echo "$as_me:15572: result: $sigact_bad" >&5
15573 echo "${ECHO_T}$sigact_bad" >&6
15574 fi
15575
15576 echo "$as_me:15576: checking if nanosleep really works" >&5
15577 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15578 if test "${cf_cv_func_nanosleep+set}" = set; then
15579   echo $ECHO_N "(cached) $ECHO_C" >&6
15580 else
15581
15582 if test "$cross_compiling" = yes; then
15583   cf_cv_func_nanosleep=unknown
15584 else
15585   cat >conftest.$ac_ext <<_ACEOF
15586 #line 15586 "configure"
15587 #include "confdefs.h"
15588
15589 #include <stdio.h>
15590 #include <errno.h>
15591 #include <time.h>
15592
15593 #ifdef HAVE_SYS_TIME_H
15594 #include <sys/time.h>
15595 #endif
15596
15597 int main() {
15598         struct timespec ts1, ts2;
15599         int code;
15600         ts1.tv_sec  = 0;
15601         ts1.tv_nsec = 750000000;
15602         ts2.tv_sec  = 0;
15603         ts2.tv_nsec = 0;
15604         errno = 0;
15605         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15606         ${cf_cv_main_return:-return}(code != 0);
15607 }
15608
15609 _ACEOF
15610 rm -f conftest$ac_exeext
15611 if { (eval echo "$as_me:15611: \"$ac_link\"") >&5
15612   (eval $ac_link) 2>&5
15613   ac_status=$?
15614   echo "$as_me:15614: \$? = $ac_status" >&5
15615   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15616   { (eval echo "$as_me:15616: \"$ac_try\"") >&5
15617   (eval $ac_try) 2>&5
15618   ac_status=$?
15619   echo "$as_me:15619: \$? = $ac_status" >&5
15620   (exit $ac_status); }; }; then
15621   cf_cv_func_nanosleep=yes
15622 else
15623   echo "$as_me: program exited with status $ac_status" >&5
15624 echo "$as_me: failed program was:" >&5
15625 cat conftest.$ac_ext >&5
15626 cf_cv_func_nanosleep=no
15627 fi
15628 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15629 fi
15630 fi
15631 echo "$as_me:15631: result: $cf_cv_func_nanosleep" >&5
15632 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15633
15634 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15635 #define HAVE_NANOSLEEP 1
15636 EOF
15637
15638 for ac_header in \
15639 termio.h \
15640 termios.h \
15641 unistd.h \
15642
15643 do
15644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15645 echo "$as_me:15645: checking for $ac_header" >&5
15646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15648   echo $ECHO_N "(cached) $ECHO_C" >&6
15649 else
15650   cat >conftest.$ac_ext <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653 #include <$ac_header>
15654 _ACEOF
15655 if { (eval echo "$as_me:15655: \"$ac_cpp conftest.$ac_ext\"") >&5
15656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15657   ac_status=$?
15658   egrep -v '^ *\+' conftest.er1 >conftest.err
15659   rm -f conftest.er1
15660   cat conftest.err >&5
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit $ac_status); } >/dev/null; then
15663   if test -s conftest.err; then
15664     ac_cpp_err=$ac_c_preproc_warn_flag
15665   else
15666     ac_cpp_err=
15667   fi
15668 else
15669   ac_cpp_err=yes
15670 fi
15671 if test -z "$ac_cpp_err"; then
15672   eval "$as_ac_Header=yes"
15673 else
15674   echo "$as_me: failed program was:" >&5
15675   cat conftest.$ac_ext >&5
15676   eval "$as_ac_Header=no"
15677 fi
15678 rm -f conftest.err conftest.$ac_ext
15679 fi
15680 echo "$as_me:15680: result: `eval echo '${'$as_ac_Header'}'`" >&5
15681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15682 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15683   cat >>confdefs.h <<EOF
15684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15685 EOF
15686
15687 fi
15688 done
15689
15690 if test "$ISC" = yes ; then
15691
15692 for ac_header in sys/termio.h
15693 do
15694 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15695 echo "$as_me:15695: checking for $ac_header" >&5
15696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700   cat >conftest.$ac_ext <<_ACEOF
15701 #line 15701 "configure"
15702 #include "confdefs.h"
15703 #include <$ac_header>
15704 _ACEOF
15705 if { (eval echo "$as_me:15705: \"$ac_cpp conftest.$ac_ext\"") >&5
15706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15707   ac_status=$?
15708   egrep -v '^ *\+' conftest.er1 >conftest.err
15709   rm -f conftest.er1
15710   cat conftest.err >&5
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); } >/dev/null; then
15713   if test -s conftest.err; then
15714     ac_cpp_err=$ac_c_preproc_warn_flag
15715   else
15716     ac_cpp_err=
15717   fi
15718 else
15719   ac_cpp_err=yes
15720 fi
15721 if test -z "$ac_cpp_err"; then
15722   eval "$as_ac_Header=yes"
15723 else
15724   echo "$as_me: failed program was:" >&5
15725   cat conftest.$ac_ext >&5
15726   eval "$as_ac_Header=no"
15727 fi
15728 rm -f conftest.err conftest.$ac_ext
15729 fi
15730 echo "$as_me:15730: result: `eval echo '${'$as_ac_Header'}'`" >&5
15731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15733   cat >>confdefs.h <<EOF
15734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15735 EOF
15736
15737 fi
15738 done
15739
15740 fi
15741 if test "$ac_cv_header_termios_h" = yes ; then
15742         case "$CFLAGS $CPPFLAGS" in
15743         *-D_POSIX_SOURCE*)
15744                 termios_bad=dunno ;;
15745         *)      termios_bad=maybe ;;
15746         esac
15747         if test "$termios_bad" = maybe ; then
15748         echo "$as_me:15748: checking whether termios.h needs _POSIX_SOURCE" >&5
15749 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15750         cat >conftest.$ac_ext <<_ACEOF
15751 #line 15751 "configure"
15752 #include "confdefs.h"
15753 #include <termios.h>
15754 int
15755 main ()
15756 {
15757 struct termios foo; int x = foo.c_iflag
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 rm -f conftest.$ac_objext
15763 if { (eval echo "$as_me:15763: \"$ac_compile\"") >&5
15764   (eval $ac_compile) 2>&5
15765   ac_status=$?
15766   echo "$as_me:15766: \$? = $ac_status" >&5
15767   (exit $ac_status); } &&
15768          { ac_try='test -s conftest.$ac_objext'
15769   { (eval echo "$as_me:15769: \"$ac_try\"") >&5
15770   (eval $ac_try) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); }; }; then
15774   termios_bad=no
15775 else
15776   echo "$as_me: failed program was:" >&5
15777 cat conftest.$ac_ext >&5
15778
15779                 cat >conftest.$ac_ext <<_ACEOF
15780 #line 15780 "configure"
15781 #include "confdefs.h"
15782
15783 #define _POSIX_SOURCE
15784 #include <termios.h>
15785 int
15786 main ()
15787 {
15788 struct termios foo; int x = foo.c_iflag
15789   ;
15790   return 0;
15791 }
15792 _ACEOF
15793 rm -f conftest.$ac_objext
15794 if { (eval echo "$as_me:15794: \"$ac_compile\"") >&5
15795   (eval $ac_compile) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); } &&
15799          { ac_try='test -s conftest.$ac_objext'
15800   { (eval echo "$as_me:15800: \"$ac_try\"") >&5
15801   (eval $ac_try) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); }; }; then
15805   termios_bad=unknown
15806 else
15807   echo "$as_me: failed program was:" >&5
15808 cat conftest.$ac_ext >&5
15809 termios_bad=yes cat >>confdefs.h <<\EOF
15810 #define _POSIX_SOURCE 1
15811 EOF
15812
15813 fi
15814 rm -f conftest.$ac_objext conftest.$ac_ext
15815
15816 fi
15817 rm -f conftest.$ac_objext conftest.$ac_ext
15818         echo "$as_me:15818: result: $termios_bad" >&5
15819 echo "${ECHO_T}$termios_bad" >&6
15820         fi
15821 fi
15822
15823 echo "$as_me:15823: checking for tcgetattr" >&5
15824 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15825 if test "${cf_cv_have_tcgetattr+set}" = set; then
15826   echo $ECHO_N "(cached) $ECHO_C" >&6
15827 else
15828
15829 cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832
15833 #include <sys/types.h>
15834 #ifdef HAVE_UNISTD_H
15835 #include <unistd.h>
15836 #endif
15837 #ifdef HAVE_TERMIOS_H
15838 #include <termios.h>
15839 #define TTY struct termios
15840 #else
15841 #ifdef HAVE_TERMIO_H
15842 #include <termio.h>
15843 #define TTY struct termio
15844 #endif
15845 #endif
15846
15847 int
15848 main ()
15849 {
15850
15851 TTY foo;
15852 tcgetattr(1, &foo);
15853   ;
15854   return 0;
15855 }
15856 _ACEOF
15857 rm -f conftest.$ac_objext conftest$ac_exeext
15858 if { (eval echo "$as_me:15858: \"$ac_link\"") >&5
15859   (eval $ac_link) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } &&
15863          { ac_try='test -s conftest$ac_exeext'
15864   { (eval echo "$as_me:15864: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:15867: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   cf_cv_have_tcgetattr=yes
15870 else
15871   echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 cf_cv_have_tcgetattr=no
15874 fi
15875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15876 fi
15877 echo "$as_me:15877: result: $cf_cv_have_tcgetattr" >&5
15878 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15879 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15880 #define HAVE_TCGETATTR 1
15881 EOF
15882
15883 echo "$as_me:15883: checking for vsscanf function or workaround" >&5
15884 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15885 if test "${cf_cv_func_vsscanf+set}" = set; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888
15889 cat >conftest.$ac_ext <<_ACEOF
15890 #line 15890 "configure"
15891 #include "confdefs.h"
15892
15893 #include <stdarg.h>
15894 #include <stdio.h>
15895 int
15896 main ()
15897 {
15898
15899         va_list ap;
15900         vsscanf("from", "%d", ap)
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   cf_cv_func_vsscanf=vsscanf
15918 else
15919   echo "$as_me: failed program was:" >&5
15920 cat conftest.$ac_ext >&5
15921
15922 cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925
15926 #include <stdarg.h>
15927 #include <stdio.h>
15928 int
15929 main ()
15930 {
15931
15932     FILE strbuf;
15933     char *str = "from";
15934
15935     strbuf._flag = _IOREAD;
15936     strbuf._ptr = strbuf._base = (unsigned char *) str;
15937     strbuf._cnt = strlen(str);
15938     strbuf._file = _NFILE;
15939     return (vfscanf(&strbuf, "%d", ap))
15940   ;
15941   return 0;
15942 }
15943 _ACEOF
15944 rm -f conftest.$ac_objext conftest$ac_exeext
15945 if { (eval echo "$as_me:15945: \"$ac_link\"") >&5
15946   (eval $ac_link) 2>&5
15947   ac_status=$?
15948   echo "$as_me:15948: \$? = $ac_status" >&5
15949   (exit $ac_status); } &&
15950          { ac_try='test -s conftest$ac_exeext'
15951   { (eval echo "$as_me:15951: \"$ac_try\"") >&5
15952   (eval $ac_try) 2>&5
15953   ac_status=$?
15954   echo "$as_me:15954: \$? = $ac_status" >&5
15955   (exit $ac_status); }; }; then
15956   cf_cv_func_vsscanf=vfscanf
15957 else
15958   echo "$as_me: failed program was:" >&5
15959 cat conftest.$ac_ext >&5
15960
15961 cat >conftest.$ac_ext <<_ACEOF
15962 #line 15962 "configure"
15963 #include "confdefs.h"
15964
15965 #include <stdarg.h>
15966 #include <stdio.h>
15967 int
15968 main ()
15969 {
15970
15971     FILE strbuf;
15972     char *str = "from";
15973
15974     strbuf._flag = _IOREAD;
15975     strbuf._ptr = strbuf._base = (unsigned char *) str;
15976     strbuf._cnt = strlen(str);
15977     strbuf._file = _NFILE;
15978     return (_doscan(&strbuf, "%d", ap))
15979   ;
15980   return 0;
15981 }
15982 _ACEOF
15983 rm -f conftest.$ac_objext conftest$ac_exeext
15984 if { (eval echo "$as_me:15984: \"$ac_link\"") >&5
15985   (eval $ac_link) 2>&5
15986   ac_status=$?
15987   echo "$as_me:15987: \$? = $ac_status" >&5
15988   (exit $ac_status); } &&
15989          { ac_try='test -s conftest$ac_exeext'
15990   { (eval echo "$as_me:15990: \"$ac_try\"") >&5
15991   (eval $ac_try) 2>&5
15992   ac_status=$?
15993   echo "$as_me:15993: \$? = $ac_status" >&5
15994   (exit $ac_status); }; }; then
15995   cf_cv_func_vsscanf=_doscan
15996 else
15997   echo "$as_me: failed program was:" >&5
15998 cat conftest.$ac_ext >&5
15999
16000 cf_cv_func_vsscanf=no
16001 fi
16002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16003 fi
16004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16005 fi
16006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16007 fi
16008 echo "$as_me:16008: result: $cf_cv_func_vsscanf" >&5
16009 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16010
16011 case $cf_cv_func_vsscanf in #(vi
16012 vsscanf) cat >>confdefs.h <<\EOF
16013 #define HAVE_VSSCANF 1
16014 EOF
16015 ;; #(vi
16016 vfscanf) cat >>confdefs.h <<\EOF
16017 #define HAVE_VFSCANF 1
16018 EOF
16019 ;; #(vi
16020 _doscan) cat >>confdefs.h <<\EOF
16021 #define HAVE__DOSCAN 1
16022 EOF
16023 ;;
16024 esac
16025
16026 echo "$as_me:16026: checking for working mkstemp" >&5
16027 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16028 if test "${cf_cv_func_mkstemp+set}" = set; then
16029   echo $ECHO_N "(cached) $ECHO_C" >&6
16030 else
16031
16032 rm -rf conftest*
16033 if test "$cross_compiling" = yes; then
16034   echo "$as_me:16034: checking for mkstemp" >&5
16035 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16036 if test "${ac_cv_func_mkstemp+set}" = set; then
16037   echo $ECHO_N "(cached) $ECHO_C" >&6
16038 else
16039   cat >conftest.$ac_ext <<_ACEOF
16040 #line 16040 "configure"
16041 #include "confdefs.h"
16042 /* System header to define __stub macros and hopefully few prototypes,
16043     which can conflict with char mkstemp (); below.  */
16044 #include <assert.h>
16045 /* Override any gcc2 internal prototype to avoid an error.  */
16046 #ifdef __cplusplus
16047 extern "C"
16048 #endif
16049 /* We use char because int might match the return type of a gcc2
16050    builtin and then its argument prototype would still apply.  */
16051 char mkstemp ();
16052 char (*f) ();
16053
16054 int
16055 main ()
16056 {
16057 /* The GNU C library defines this for functions which it implements
16058     to always fail with ENOSYS.  Some functions are actually named
16059     something starting with __ and the normal name is an alias.  */
16060 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16061 choke me
16062 #else
16063 f = mkstemp;
16064 #endif
16065
16066   ;
16067   return 0;
16068 }
16069 _ACEOF
16070 rm -f conftest.$ac_objext conftest$ac_exeext
16071 if { (eval echo "$as_me:16071: \"$ac_link\"") >&5
16072   (eval $ac_link) 2>&5
16073   ac_status=$?
16074   echo "$as_me:16074: \$? = $ac_status" >&5
16075   (exit $ac_status); } &&
16076          { ac_try='test -s conftest$ac_exeext'
16077   { (eval echo "$as_me:16077: \"$ac_try\"") >&5
16078   (eval $ac_try) 2>&5
16079   ac_status=$?
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); }; }; then
16082   ac_cv_func_mkstemp=yes
16083 else
16084   echo "$as_me: failed program was:" >&5
16085 cat conftest.$ac_ext >&5
16086 ac_cv_func_mkstemp=no
16087 fi
16088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16089 fi
16090 echo "$as_me:16090: result: $ac_cv_func_mkstemp" >&5
16091 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16092
16093 else
16094   cat >conftest.$ac_ext <<_ACEOF
16095 #line 16095 "configure"
16096 #include "confdefs.h"
16097
16098 #include <sys/types.h>
16099 #include <stdlib.h>
16100 #include <stdio.h>
16101 #include <string.h>
16102 #include <sys/stat.h>
16103 int main()
16104 {
16105         char *tmpl = "conftestXXXXXX";
16106         char name[2][80];
16107         int n;
16108         int result = 0;
16109         int fd;
16110         struct stat sb;
16111
16112         umask(077);
16113         for (n = 0; n < 2; ++n) {
16114                 strcpy(name[n], tmpl);
16115                 if ((fd = mkstemp(name[n])) >= 0) {
16116                         if (!strcmp(name[n], tmpl)
16117                          || stat(name[n], &sb) != 0
16118                          || (sb.st_mode & S_IFMT) != S_IFREG
16119                          || (sb.st_mode & 077) != 0) {
16120                                 result = 1;
16121                         }
16122                         close(fd);
16123                 }
16124         }
16125         if (result == 0
16126          && !strcmp(name[0], name[1]))
16127                 result = 1;
16128         ${cf_cv_main_return:-return}(result);
16129 }
16130
16131 _ACEOF
16132 rm -f conftest$ac_exeext
16133 if { (eval echo "$as_me:16133: \"$ac_link\"") >&5
16134   (eval $ac_link) 2>&5
16135   ac_status=$?
16136   echo "$as_me:16136: \$? = $ac_status" >&5
16137   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   cf_cv_func_mkstemp=yes
16144
16145 else
16146   echo "$as_me: program exited with status $ac_status" >&5
16147 echo "$as_me: failed program was:" >&5
16148 cat conftest.$ac_ext >&5
16149 cf_cv_func_mkstemp=no
16150
16151 fi
16152 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16153 fi
16154
16155 fi
16156 echo "$as_me:16156: result: $cf_cv_func_mkstemp" >&5
16157 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16158 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16159         cat >>confdefs.h <<\EOF
16160 #define HAVE_MKSTEMP 1
16161 EOF
16162
16163 fi
16164
16165 # setup for prototype of fallback for vsscanf()
16166
16167 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16168         HAVE_VSSCANF=1
16169 else
16170         HAVE_VSSCANF=0
16171 fi
16172
16173 if test "$cross_compiling" = yes ; then
16174         { echo "$as_me:16174: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16175 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16176 else
16177         echo "$as_me:16177: checking whether setvbuf arguments are reversed" >&5
16178 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16179 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16180   echo $ECHO_N "(cached) $ECHO_C" >&6
16181 else
16182   if test "$cross_compiling" = yes; then
16183   { { echo "$as_me:16183: error: cannot run test program while cross compiling" >&5
16184 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16185    { (exit 1); exit 1; }; }
16186 else
16187   cat >conftest.$ac_ext <<_ACEOF
16188 #line 16188 "configure"
16189 #include "confdefs.h"
16190 #include <stdio.h>
16191 /* If setvbuf has the reversed format, exit 0. */
16192 int
16193 main ()
16194 {
16195   /* This call has the arguments reversed.
16196      A reversed system may check and see that the address of main
16197      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16198   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16199     $ac_main_return(1);
16200   putc('\r', stdout);
16201   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16202 }
16203 _ACEOF
16204 rm -f conftest$ac_exeext
16205 if { (eval echo "$as_me:16205: \"$ac_link\"") >&5
16206   (eval $ac_link) 2>&5
16207   ac_status=$?
16208   echo "$as_me:16208: \$? = $ac_status" >&5
16209   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16210   { (eval echo "$as_me:16210: \"$ac_try\"") >&5
16211   (eval $ac_try) 2>&5
16212   ac_status=$?
16213   echo "$as_me:16213: \$? = $ac_status" >&5
16214   (exit $ac_status); }; }; then
16215   ac_cv_func_setvbuf_reversed=yes
16216 else
16217   echo "$as_me: program exited with status $ac_status" >&5
16218 echo "$as_me: failed program was:" >&5
16219 cat conftest.$ac_ext >&5
16220 ac_cv_func_setvbuf_reversed=no
16221 fi
16222 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16223 fi
16224 rm -f core core.* *.core
16225 fi
16226 echo "$as_me:16226: result: $ac_cv_func_setvbuf_reversed" >&5
16227 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16228 if test $ac_cv_func_setvbuf_reversed = yes; then
16229
16230 cat >>confdefs.h <<\EOF
16231 #define SETVBUF_REVERSED 1
16232 EOF
16233
16234 fi
16235
16236 fi
16237 echo "$as_me:16237: checking return type of signal handlers" >&5
16238 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16239 if test "${ac_cv_type_signal+set}" = set; then
16240   echo $ECHO_N "(cached) $ECHO_C" >&6
16241 else
16242   cat >conftest.$ac_ext <<_ACEOF
16243 #line 16243 "configure"
16244 #include "confdefs.h"
16245 #include <sys/types.h>
16246 #include <signal.h>
16247 #ifdef signal
16248 # undef signal
16249 #endif
16250 #ifdef __cplusplus
16251 extern "C" void (*signal (int, void (*)(int)))(int);
16252 #else
16253 void (*signal ()) ();
16254 #endif
16255
16256 int
16257 main ()
16258 {
16259 int i;
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f conftest.$ac_objext
16265 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266   (eval $ac_compile) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); } &&
16270          { ac_try='test -s conftest.$ac_objext'
16271   { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272   (eval $ac_try) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); }; }; then
16276   ac_cv_type_signal=void
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 cat conftest.$ac_ext >&5
16280 ac_cv_type_signal=int
16281 fi
16282 rm -f conftest.$ac_objext conftest.$ac_ext
16283 fi
16284 echo "$as_me:16284: result: $ac_cv_type_signal" >&5
16285 echo "${ECHO_T}$ac_cv_type_signal" >&6
16286
16287 cat >>confdefs.h <<EOF
16288 #define RETSIGTYPE $ac_cv_type_signal
16289 EOF
16290
16291 echo "$as_me:16291: checking for intptr_t" >&5
16292 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16293 if test "${ac_cv_type_intptr_t+set}" = set; then
16294   echo $ECHO_N "(cached) $ECHO_C" >&6
16295 else
16296   cat >conftest.$ac_ext <<_ACEOF
16297 #line 16297 "configure"
16298 #include "confdefs.h"
16299 $ac_includes_default
16300 int
16301 main ()
16302 {
16303 if ((intptr_t *) 0)
16304   return 0;
16305 if (sizeof (intptr_t))
16306   return 0;
16307   ;
16308   return 0;
16309 }
16310 _ACEOF
16311 rm -f conftest.$ac_objext
16312 if { (eval echo "$as_me:16312: \"$ac_compile\"") >&5
16313   (eval $ac_compile) 2>&5
16314   ac_status=$?
16315   echo "$as_me:16315: \$? = $ac_status" >&5
16316   (exit $ac_status); } &&
16317          { ac_try='test -s conftest.$ac_objext'
16318   { (eval echo "$as_me:16318: \"$ac_try\"") >&5
16319   (eval $ac_try) 2>&5
16320   ac_status=$?
16321   echo "$as_me:16321: \$? = $ac_status" >&5
16322   (exit $ac_status); }; }; then
16323   ac_cv_type_intptr_t=yes
16324 else
16325   echo "$as_me: failed program was:" >&5
16326 cat conftest.$ac_ext >&5
16327 ac_cv_type_intptr_t=no
16328 fi
16329 rm -f conftest.$ac_objext conftest.$ac_ext
16330 fi
16331 echo "$as_me:16331: result: $ac_cv_type_intptr_t" >&5
16332 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16333 if test $ac_cv_type_intptr_t = yes; then
16334   :
16335 else
16336
16337 cat >>confdefs.h <<EOF
16338 #define intptr_t long
16339 EOF
16340
16341 fi
16342
16343 echo "$as_me:16343: checking for type sigaction_t" >&5
16344 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16345 if test "${cf_cv_type_sigaction+set}" = set; then
16346   echo $ECHO_N "(cached) $ECHO_C" >&6
16347 else
16348
16349         cat >conftest.$ac_ext <<_ACEOF
16350 #line 16350 "configure"
16351 #include "confdefs.h"
16352
16353 #include <signal.h>
16354 int
16355 main ()
16356 {
16357 sigaction_t x
16358   ;
16359   return 0;
16360 }
16361 _ACEOF
16362 rm -f conftest.$ac_objext
16363 if { (eval echo "$as_me:16363: \"$ac_compile\"") >&5
16364   (eval $ac_compile) 2>&5
16365   ac_status=$?
16366   echo "$as_me:16366: \$? = $ac_status" >&5
16367   (exit $ac_status); } &&
16368          { ac_try='test -s conftest.$ac_objext'
16369   { (eval echo "$as_me:16369: \"$ac_try\"") >&5
16370   (eval $ac_try) 2>&5
16371   ac_status=$?
16372   echo "$as_me:16372: \$? = $ac_status" >&5
16373   (exit $ac_status); }; }; then
16374   cf_cv_type_sigaction=yes
16375 else
16376   echo "$as_me: failed program was:" >&5
16377 cat conftest.$ac_ext >&5
16378 cf_cv_type_sigaction=no
16379 fi
16380 rm -f conftest.$ac_objext conftest.$ac_ext
16381 fi
16382
16383 echo "$as_me:16383: result: $cf_cv_type_sigaction" >&5
16384 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16385 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16386 #define HAVE_TYPE_SIGACTION 1
16387 EOF
16388
16389 echo "$as_me:16389: checking declaration of size-change" >&5
16390 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16391 if test "${cf_cv_sizechange+set}" = set; then
16392   echo $ECHO_N "(cached) $ECHO_C" >&6
16393 else
16394
16395     cf_cv_sizechange=unknown
16396     cf_save_CPPFLAGS="$CPPFLAGS"
16397
16398 for cf_opts in "" "NEED_PTEM_H"
16399 do
16400
16401     CPPFLAGS="$cf_save_CPPFLAGS"
16402     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16403     cat >conftest.$ac_ext <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16406 #include <sys/types.h>
16407 #ifdef HAVE_TERMIOS_H
16408 #include <termios.h>
16409 #else
16410 #ifdef HAVE_TERMIO_H
16411 #include <termio.h>
16412 #endif
16413 #endif
16414 #ifdef NEED_PTEM_H
16415 /* This is a workaround for SCO:  they neglected to define struct winsize in
16416  * termios.h -- it's only in termio.h and ptem.h
16417  */
16418 #include        <sys/stream.h>
16419 #include        <sys/ptem.h>
16420 #endif
16421 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16422 #include <sys/ioctl.h>
16423 #endif
16424
16425 int
16426 main ()
16427 {
16428
16429 #ifdef TIOCGSIZE
16430         struct ttysize win;     /* FIXME: what system is this? */
16431         int y = win.ts_lines;
16432         int x = win.ts_cols;
16433 #else
16434 #ifdef TIOCGWINSZ
16435         struct winsize win;
16436         int y = win.ws_row;
16437         int x = win.ws_col;
16438 #else
16439         no TIOCGSIZE or TIOCGWINSZ
16440 #endif /* TIOCGWINSZ */
16441 #endif /* TIOCGSIZE */
16442
16443   ;
16444   return 0;
16445 }
16446 _ACEOF
16447 rm -f conftest.$ac_objext
16448 if { (eval echo "$as_me:16448: \"$ac_compile\"") >&5
16449   (eval $ac_compile) 2>&5
16450   ac_status=$?
16451   echo "$as_me:16451: \$? = $ac_status" >&5
16452   (exit $ac_status); } &&
16453          { ac_try='test -s conftest.$ac_objext'
16454   { (eval echo "$as_me:16454: \"$ac_try\"") >&5
16455   (eval $ac_try) 2>&5
16456   ac_status=$?
16457   echo "$as_me:16457: \$? = $ac_status" >&5
16458   (exit $ac_status); }; }; then
16459   cf_cv_sizechange=yes
16460 else
16461   echo "$as_me: failed program was:" >&5
16462 cat conftest.$ac_ext >&5
16463 cf_cv_sizechange=no
16464 fi
16465 rm -f conftest.$ac_objext conftest.$ac_ext
16466
16467         CPPFLAGS="$cf_save_CPPFLAGS"
16468         if test "$cf_cv_sizechange" = yes ; then
16469                 echo "size-change succeeded ($cf_opts)" >&5
16470                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16471                 break
16472         fi
16473 done
16474
16475 fi
16476 echo "$as_me:16476: result: $cf_cv_sizechange" >&5
16477 echo "${ECHO_T}$cf_cv_sizechange" >&6
16478 if test "$cf_cv_sizechange" != no ; then
16479         cat >>confdefs.h <<\EOF
16480 #define HAVE_SIZECHANGE 1
16481 EOF
16482
16483         case $cf_cv_sizechange in #(vi
16484         NEED*)
16485                 cat >>confdefs.h <<EOF
16486 #define $cf_cv_sizechange  1
16487 EOF
16488
16489                 ;;
16490         esac
16491 fi
16492
16493 echo "$as_me:16493: checking for memmove" >&5
16494 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16495 if test "${ac_cv_func_memmove+set}" = set; then
16496   echo $ECHO_N "(cached) $ECHO_C" >&6
16497 else
16498   cat >conftest.$ac_ext <<_ACEOF
16499 #line 16499 "configure"
16500 #include "confdefs.h"
16501 /* System header to define __stub macros and hopefully few prototypes,
16502     which can conflict with char memmove (); below.  */
16503 #include <assert.h>
16504 /* Override any gcc2 internal prototype to avoid an error.  */
16505 #ifdef __cplusplus
16506 extern "C"
16507 #endif
16508 /* We use char because int might match the return type of a gcc2
16509    builtin and then its argument prototype would still apply.  */
16510 char memmove ();
16511 char (*f) ();
16512
16513 int
16514 main ()
16515 {
16516 /* The GNU C library defines this for functions which it implements
16517     to always fail with ENOSYS.  Some functions are actually named
16518     something starting with __ and the normal name is an alias.  */
16519 #if defined (__stub_memmove) || defined (__stub___memmove)
16520 choke me
16521 #else
16522 f = memmove;
16523 #endif
16524
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext conftest$ac_exeext
16530 if { (eval echo "$as_me:16530: \"$ac_link\"") >&5
16531   (eval $ac_link) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest$ac_exeext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   ac_cv_func_memmove=yes
16542 else
16543   echo "$as_me: failed program was:" >&5
16544 cat conftest.$ac_ext >&5
16545 ac_cv_func_memmove=no
16546 fi
16547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16548 fi
16549 echo "$as_me:16549: result: $ac_cv_func_memmove" >&5
16550 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16551 if test $ac_cv_func_memmove = yes; then
16552   :
16553 else
16554
16555 echo "$as_me:16555: checking for bcopy" >&5
16556 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16557 if test "${ac_cv_func_bcopy+set}" = set; then
16558   echo $ECHO_N "(cached) $ECHO_C" >&6
16559 else
16560   cat >conftest.$ac_ext <<_ACEOF
16561 #line 16561 "configure"
16562 #include "confdefs.h"
16563 /* System header to define __stub macros and hopefully few prototypes,
16564     which can conflict with char bcopy (); below.  */
16565 #include <assert.h>
16566 /* Override any gcc2 internal prototype to avoid an error.  */
16567 #ifdef __cplusplus
16568 extern "C"
16569 #endif
16570 /* We use char because int might match the return type of a gcc2
16571    builtin and then its argument prototype would still apply.  */
16572 char bcopy ();
16573 char (*f) ();
16574
16575 int
16576 main ()
16577 {
16578 /* The GNU C library defines this for functions which it implements
16579     to always fail with ENOSYS.  Some functions are actually named
16580     something starting with __ and the normal name is an alias.  */
16581 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16582 choke me
16583 #else
16584 f = bcopy;
16585 #endif
16586
16587   ;
16588   return 0;
16589 }
16590 _ACEOF
16591 rm -f conftest.$ac_objext conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593   (eval $ac_link) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); } &&
16597          { ac_try='test -s conftest$ac_exeext'
16598   { (eval echo "$as_me:16598: \"$ac_try\"") >&5
16599   (eval $ac_try) 2>&5
16600   ac_status=$?
16601   echo "$as_me:16601: \$? = $ac_status" >&5
16602   (exit $ac_status); }; }; then
16603   ac_cv_func_bcopy=yes
16604 else
16605   echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16607 ac_cv_func_bcopy=no
16608 fi
16609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16610 fi
16611 echo "$as_me:16611: result: $ac_cv_func_bcopy" >&5
16612 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16613 if test $ac_cv_func_bcopy = yes; then
16614
16615         echo "$as_me:16615: checking if bcopy does overlapping moves" >&5
16616 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16617 if test "${cf_cv_good_bcopy+set}" = set; then
16618   echo $ECHO_N "(cached) $ECHO_C" >&6
16619 else
16620
16621                 if test "$cross_compiling" = yes; then
16622   cf_cv_good_bcopy=unknown
16623 else
16624   cat >conftest.$ac_ext <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16627
16628 int main() {
16629         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16630         char temp[40];
16631         bcopy(data, temp, sizeof(data));
16632         bcopy(temp+10, temp, 15);
16633         bcopy(temp+5, temp+15, 10);
16634         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16635 }
16636
16637 _ACEOF
16638 rm -f conftest$ac_exeext
16639 if { (eval echo "$as_me:16639: \"$ac_link\"") >&5
16640   (eval $ac_link) 2>&5
16641   ac_status=$?
16642   echo "$as_me:16642: \$? = $ac_status" >&5
16643   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16644   { (eval echo "$as_me:16644: \"$ac_try\"") >&5
16645   (eval $ac_try) 2>&5
16646   ac_status=$?
16647   echo "$as_me:16647: \$? = $ac_status" >&5
16648   (exit $ac_status); }; }; then
16649   cf_cv_good_bcopy=yes
16650 else
16651   echo "$as_me: program exited with status $ac_status" >&5
16652 echo "$as_me: failed program was:" >&5
16653 cat conftest.$ac_ext >&5
16654 cf_cv_good_bcopy=no
16655 fi
16656 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16657 fi
16658
16659 fi
16660 echo "$as_me:16660: result: $cf_cv_good_bcopy" >&5
16661 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16662
16663 else
16664   cf_cv_good_bcopy=no
16665 fi
16666
16667         if test "$cf_cv_good_bcopy" = yes ; then
16668                 cat >>confdefs.h <<\EOF
16669 #define USE_OK_BCOPY 1
16670 EOF
16671
16672         else
16673                 cat >>confdefs.h <<\EOF
16674 #define USE_MY_MEMMOVE 1
16675 EOF
16676
16677         fi
16678
16679 fi
16680
16681 echo "$as_me:16681: checking if poll really works" >&5
16682 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16683 if test "${cf_cv_working_poll+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686
16687 if test "$cross_compiling" = yes; then
16688   cf_cv_working_poll=unknown
16689 else
16690   cat >conftest.$ac_ext <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16693
16694 #include <stdio.h>
16695 #ifdef HAVE_POLL_H
16696 #include <poll.h>
16697 #else
16698 #include <sys/poll.h>
16699 #endif
16700 int main() {
16701         struct pollfd myfds;
16702         int ret;
16703
16704         myfds.fd = 0;
16705         myfds.events = POLLIN;
16706
16707         ret = poll(&myfds, 1, 100);
16708         ${cf_cv_main_return:-return}(ret != 0);
16709 }
16710 _ACEOF
16711 rm -f conftest$ac_exeext
16712 if { (eval echo "$as_me:16712: \"$ac_link\"") >&5
16713   (eval $ac_link) 2>&5
16714   ac_status=$?
16715   echo "$as_me:16715: \$? = $ac_status" >&5
16716   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16717   { (eval echo "$as_me:16717: \"$ac_try\"") >&5
16718   (eval $ac_try) 2>&5
16719   ac_status=$?
16720   echo "$as_me:16720: \$? = $ac_status" >&5
16721   (exit $ac_status); }; }; then
16722   cf_cv_working_poll=yes
16723 else
16724   echo "$as_me: program exited with status $ac_status" >&5
16725 echo "$as_me: failed program was:" >&5
16726 cat conftest.$ac_ext >&5
16727 cf_cv_working_poll=no
16728 fi
16729 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16730 fi
16731 fi
16732 echo "$as_me:16732: result: $cf_cv_working_poll" >&5
16733 echo "${ECHO_T}$cf_cv_working_poll" >&6
16734 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16735 #define HAVE_WORKING_POLL 1
16736 EOF
16737
16738 echo "$as_me:16738: checking for va_copy" >&5
16739 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16740 if test "${cf_cv_have_va_copy+set}" = set; then
16741   echo $ECHO_N "(cached) $ECHO_C" >&6
16742 else
16743
16744 cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747
16748 #include <stdarg.h>
16749
16750 int
16751 main ()
16752 {
16753
16754         static va_list dst;
16755         static va_list src;
16756         va_copy(dst, src)
16757   ;
16758   return 0;
16759 }
16760 _ACEOF
16761 rm -f conftest.$ac_objext conftest$ac_exeext
16762 if { (eval echo "$as_me:16762: \"$ac_link\"") >&5
16763   (eval $ac_link) 2>&5
16764   ac_status=$?
16765   echo "$as_me:16765: \$? = $ac_status" >&5
16766   (exit $ac_status); } &&
16767          { ac_try='test -s conftest$ac_exeext'
16768   { (eval echo "$as_me:16768: \"$ac_try\"") >&5
16769   (eval $ac_try) 2>&5
16770   ac_status=$?
16771   echo "$as_me:16771: \$? = $ac_status" >&5
16772   (exit $ac_status); }; }; then
16773   cf_cv_have_va_copy=yes
16774 else
16775   echo "$as_me: failed program was:" >&5
16776 cat conftest.$ac_ext >&5
16777 cf_cv_have_va_copy=no
16778 fi
16779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16780 fi
16781 echo "$as_me:16781: result: $cf_cv_have_va_copy" >&5
16782 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16783
16784 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16785 #define HAVE_VA_COPY 1
16786 EOF
16787
16788 echo "$as_me:16788: checking for __va_copy" >&5
16789 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16790 if test "${cf_cv_have___va_copy+set}" = set; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 else
16793
16794 cat >conftest.$ac_ext <<_ACEOF
16795 #line 16795 "configure"
16796 #include "confdefs.h"
16797
16798 #include <stdarg.h>
16799
16800 int
16801 main ()
16802 {
16803
16804         static va_list dst;
16805         static va_list src;
16806         __va_copy(dst, src)
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 rm -f conftest.$ac_objext conftest$ac_exeext
16812 if { (eval echo "$as_me:16812: \"$ac_link\"") >&5
16813   (eval $ac_link) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -s conftest$ac_exeext'
16818   { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823   cf_cv_have___va_copy=yes
16824 else
16825   echo "$as_me: failed program was:" >&5
16826 cat conftest.$ac_ext >&5
16827 cf_cv_have___va_copy=no
16828 fi
16829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16830 fi
16831 echo "$as_me:16831: result: $cf_cv_have___va_copy" >&5
16832 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16833
16834 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16835 #define HAVE___VA_COPY 1
16836 EOF
16837
16838 echo "$as_me:16838: checking for pid_t" >&5
16839 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16840 if test "${ac_cv_type_pid_t+set}" = set; then
16841   echo $ECHO_N "(cached) $ECHO_C" >&6
16842 else
16843   cat >conftest.$ac_ext <<_ACEOF
16844 #line 16844 "configure"
16845 #include "confdefs.h"
16846 $ac_includes_default
16847 int
16848 main ()
16849 {
16850 if ((pid_t *) 0)
16851   return 0;
16852 if (sizeof (pid_t))
16853   return 0;
16854   ;
16855   return 0;
16856 }
16857 _ACEOF
16858 rm -f conftest.$ac_objext
16859 if { (eval echo "$as_me:16859: \"$ac_compile\"") >&5
16860   (eval $ac_compile) 2>&5
16861   ac_status=$?
16862   echo "$as_me:16862: \$? = $ac_status" >&5
16863   (exit $ac_status); } &&
16864          { ac_try='test -s conftest.$ac_objext'
16865   { (eval echo "$as_me:16865: \"$ac_try\"") >&5
16866   (eval $ac_try) 2>&5
16867   ac_status=$?
16868   echo "$as_me:16868: \$? = $ac_status" >&5
16869   (exit $ac_status); }; }; then
16870   ac_cv_type_pid_t=yes
16871 else
16872   echo "$as_me: failed program was:" >&5
16873 cat conftest.$ac_ext >&5
16874 ac_cv_type_pid_t=no
16875 fi
16876 rm -f conftest.$ac_objext conftest.$ac_ext
16877 fi
16878 echo "$as_me:16878: result: $ac_cv_type_pid_t" >&5
16879 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16880 if test $ac_cv_type_pid_t = yes; then
16881   :
16882 else
16883
16884 cat >>confdefs.h <<EOF
16885 #define pid_t int
16886 EOF
16887
16888 fi
16889
16890 for ac_header in unistd.h vfork.h
16891 do
16892 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16893 echo "$as_me:16893: checking for $ac_header" >&5
16894 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16896   echo $ECHO_N "(cached) $ECHO_C" >&6
16897 else
16898   cat >conftest.$ac_ext <<_ACEOF
16899 #line 16899 "configure"
16900 #include "confdefs.h"
16901 #include <$ac_header>
16902 _ACEOF
16903 if { (eval echo "$as_me:16903: \"$ac_cpp conftest.$ac_ext\"") >&5
16904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16905   ac_status=$?
16906   egrep -v '^ *\+' conftest.er1 >conftest.err
16907   rm -f conftest.er1
16908   cat conftest.err >&5
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); } >/dev/null; then
16911   if test -s conftest.err; then
16912     ac_cpp_err=$ac_c_preproc_warn_flag
16913   else
16914     ac_cpp_err=
16915   fi
16916 else
16917   ac_cpp_err=yes
16918 fi
16919 if test -z "$ac_cpp_err"; then
16920   eval "$as_ac_Header=yes"
16921 else
16922   echo "$as_me: failed program was:" >&5
16923   cat conftest.$ac_ext >&5
16924   eval "$as_ac_Header=no"
16925 fi
16926 rm -f conftest.err conftest.$ac_ext
16927 fi
16928 echo "$as_me:16928: result: `eval echo '${'$as_ac_Header'}'`" >&5
16929 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16930 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16931   cat >>confdefs.h <<EOF
16932 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16933 EOF
16934
16935 fi
16936 done
16937
16938 for ac_func in fork vfork
16939 do
16940 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16941 echo "$as_me:16941: checking for $ac_func" >&5
16942 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16943 if eval "test \"\${$as_ac_var+set}\" = set"; then
16944   echo $ECHO_N "(cached) $ECHO_C" >&6
16945 else
16946   cat >conftest.$ac_ext <<_ACEOF
16947 #line 16947 "configure"
16948 #include "confdefs.h"
16949 /* System header to define __stub macros and hopefully few prototypes,
16950     which can conflict with char $ac_func (); below.  */
16951 #include <assert.h>
16952 /* Override any gcc2 internal prototype to avoid an error.  */
16953 #ifdef __cplusplus
16954 extern "C"
16955 #endif
16956 /* We use char because int might match the return type of a gcc2
16957    builtin and then its argument prototype would still apply.  */
16958 char $ac_func ();
16959 char (*f) ();
16960
16961 int
16962 main ()
16963 {
16964 /* The GNU C library defines this for functions which it implements
16965     to always fail with ENOSYS.  Some functions are actually named
16966     something starting with __ and the normal name is an alias.  */
16967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16968 choke me
16969 #else
16970 f = $ac_func;
16971 #endif
16972
16973   ;
16974   return 0;
16975 }
16976 _ACEOF
16977 rm -f conftest.$ac_objext conftest$ac_exeext
16978 if { (eval echo "$as_me:16978: \"$ac_link\"") >&5
16979   (eval $ac_link) 2>&5
16980   ac_status=$?
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit $ac_status); } &&
16983          { ac_try='test -s conftest$ac_exeext'
16984   { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985   (eval $ac_try) 2>&5
16986   ac_status=$?
16987   echo "$as_me:16987: \$? = $ac_status" >&5
16988   (exit $ac_status); }; }; then
16989   eval "$as_ac_var=yes"
16990 else
16991   echo "$as_me: failed program was:" >&5
16992 cat conftest.$ac_ext >&5
16993 eval "$as_ac_var=no"
16994 fi
16995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16996 fi
16997 echo "$as_me:16997: result: `eval echo '${'$as_ac_var'}'`" >&5
16998 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16999 if test `eval echo '${'$as_ac_var'}'` = yes; then
17000   cat >>confdefs.h <<EOF
17001 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17002 EOF
17003
17004 fi
17005 done
17006
17007 ac_cv_func_fork_works=$ac_cv_func_fork
17008 if test "x$ac_cv_func_fork" = xyes; then
17009   echo "$as_me:17009: checking for working fork" >&5
17010 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17011 if test "${ac_cv_func_fork_works+set}" = set; then
17012   echo $ECHO_N "(cached) $ECHO_C" >&6
17013 else
17014   if test "$cross_compiling" = yes; then
17015   ac_cv_func_fork_works=cross
17016 else
17017   cat >conftest.$ac_ext <<_ACEOF
17018 /* By Rüdiger Kuhlmann. */
17019       #include <sys/types.h>
17020       #if HAVE_UNISTD_H
17021       # include <unistd.h>
17022       #endif
17023       /* Some systems only have a dummy stub for fork() */
17024       int main ()
17025       {
17026         if (fork() < 0)
17027           $ac_main_return (1);
17028         $ac_main_return (0);
17029       }
17030 _ACEOF
17031 rm -f conftest$ac_exeext
17032 if { (eval echo "$as_me:17032: \"$ac_link\"") >&5
17033   (eval $ac_link) 2>&5
17034   ac_status=$?
17035   echo "$as_me:17035: \$? = $ac_status" >&5
17036   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17037   { (eval echo "$as_me:17037: \"$ac_try\"") >&5
17038   (eval $ac_try) 2>&5
17039   ac_status=$?
17040   echo "$as_me:17040: \$? = $ac_status" >&5
17041   (exit $ac_status); }; }; then
17042   ac_cv_func_fork_works=yes
17043 else
17044   echo "$as_me: program exited with status $ac_status" >&5
17045 echo "$as_me: failed program was:" >&5
17046 cat conftest.$ac_ext >&5
17047 ac_cv_func_fork_works=no
17048 fi
17049 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17050 fi
17051 fi
17052 echo "$as_me:17052: result: $ac_cv_func_fork_works" >&5
17053 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17054
17055 fi
17056 if test "x$ac_cv_func_fork_works" = xcross; then
17057   case $host in
17058     *-*-amigaos* | *-*-msdosdjgpp*)
17059       # Override, as these systems have only a dummy fork() stub
17060       ac_cv_func_fork_works=no
17061       ;;
17062     *)
17063       ac_cv_func_fork_works=yes
17064       ;;
17065   esac
17066   { echo "$as_me:17066: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17067 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17068 fi
17069 ac_cv_func_vfork_works=$ac_cv_func_vfork
17070 if test "x$ac_cv_func_vfork" = xyes; then
17071   echo "$as_me:17071: checking for working vfork" >&5
17072 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17073 if test "${ac_cv_func_vfork_works+set}" = set; then
17074   echo $ECHO_N "(cached) $ECHO_C" >&6
17075 else
17076   if test "$cross_compiling" = yes; then
17077   ac_cv_func_vfork_works=cross
17078 else
17079   cat >conftest.$ac_ext <<_ACEOF
17080 #line 17080 "configure"
17081 #include "confdefs.h"
17082 /* Thanks to Paul Eggert for this test.  */
17083 #include <stdio.h>
17084 #include <sys/types.h>
17085 #include <sys/stat.h>
17086 #if HAVE_UNISTD_H
17087 # include <unistd.h>
17088 #endif
17089 #if HAVE_VFORK_H
17090 # include <vfork.h>
17091 #endif
17092 /* On some sparc systems, changes by the child to local and incoming
17093    argument registers are propagated back to the parent.  The compiler
17094    is told about this with #include <vfork.h>, but some compilers
17095    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17096    static variable whose address is put into a register that is
17097    clobbered by the vfork.  */
17098 static
17099 #ifdef __cplusplus
17100 sparc_address_test (int arg)
17101 # else
17102 sparc_address_test (arg) int arg;
17103 #endif
17104 {
17105   static pid_t child;
17106   if (!child) {
17107     child = vfork ();
17108     if (child < 0) {
17109       perror ("vfork");
17110       _exit(2);
17111     }
17112     if (!child) {
17113       arg = getpid();
17114       write(-1, "", 0);
17115       _exit (arg);
17116     }
17117   }
17118 }
17119
17120 int
17121 main ()
17122 {
17123   pid_t parent = getpid ();
17124   pid_t child;
17125
17126   sparc_address_test ();
17127
17128   child = vfork ();
17129
17130   if (child == 0) {
17131     /* Here is another test for sparc vfork register problems.  This
17132        test uses lots of local variables, at least as many local
17133        variables as main has allocated so far including compiler
17134        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17135        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17136        reuse the register of parent for one of the local variables,
17137        since it will think that parent can't possibly be used any more
17138        in this routine.  Assigning to the local variable will thus
17139        munge parent in the parent process.  */
17140     pid_t
17141       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17142       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17143     /* Convince the compiler that p..p7 are live; otherwise, it might
17144        use the same hardware register for all 8 local variables.  */
17145     if (p != p1 || p != p2 || p != p3 || p != p4
17146         || p != p5 || p != p6 || p != p7)
17147       _exit(1);
17148
17149     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17150        from child file descriptors.  If the child closes a descriptor
17151        before it execs or exits, this munges the parent's descriptor
17152        as well.  Test for this by closing stdout in the child.  */
17153     _exit(close(fileno(stdout)) != 0);
17154   } else {
17155     int status;
17156     struct stat st;
17157
17158     while (wait(&status) != child)
17159       ;
17160     $ac_main_return(
17161          /* Was there some problem with vforking?  */
17162          child < 0
17163
17164          /* Did the child fail?  (This shouldn't happen.)  */
17165          || status
17166
17167          /* Did the vfork/compiler bug occur?  */
17168          || parent != getpid()
17169
17170          /* Did the file descriptor bug occur?  */
17171          || fstat(fileno(stdout), &st) != 0
17172          );
17173   }
17174 }
17175 _ACEOF
17176 rm -f conftest$ac_exeext
17177 if { (eval echo "$as_me:17177: \"$ac_link\"") >&5
17178   (eval $ac_link) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17182   { (eval echo "$as_me:17182: \"$ac_try\"") >&5
17183   (eval $ac_try) 2>&5
17184   ac_status=$?
17185   echo "$as_me:17185: \$? = $ac_status" >&5
17186   (exit $ac_status); }; }; then
17187   ac_cv_func_vfork_works=yes
17188 else
17189   echo "$as_me: program exited with status $ac_status" >&5
17190 echo "$as_me: failed program was:" >&5
17191 cat conftest.$ac_ext >&5
17192 ac_cv_func_vfork_works=no
17193 fi
17194 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17195 fi
17196 fi
17197 echo "$as_me:17197: result: $ac_cv_func_vfork_works" >&5
17198 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17199
17200 fi;
17201 if test "x$ac_cv_func_fork_works" = xcross; then
17202   ac_cv_func_vfork_works=ac_cv_func_vfork
17203   { echo "$as_me:17203: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17204 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17205 fi
17206
17207 if test "x$ac_cv_func_vfork_works" = xyes; then
17208
17209 cat >>confdefs.h <<\EOF
17210 #define HAVE_WORKING_VFORK 1
17211 EOF
17212
17213 else
17214
17215 cat >>confdefs.h <<\EOF
17216 #define vfork fork
17217 EOF
17218
17219 fi
17220 if test "x$ac_cv_func_fork_works" = xyes; then
17221
17222 cat >>confdefs.h <<\EOF
17223 #define HAVE_WORKING_FORK 1
17224 EOF
17225
17226 fi
17227
17228 # special check for test/ditto.c
17229
17230 echo "$as_me:17230: checking for openpty in -lutil" >&5
17231 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17232 if test "${ac_cv_lib_util_openpty+set}" = set; then
17233   echo $ECHO_N "(cached) $ECHO_C" >&6
17234 else
17235   ac_check_lib_save_LIBS=$LIBS
17236 LIBS="-lutil  $LIBS"
17237 cat >conftest.$ac_ext <<_ACEOF
17238 #line 17238 "configure"
17239 #include "confdefs.h"
17240
17241 /* Override any gcc2 internal prototype to avoid an error.  */
17242 #ifdef __cplusplus
17243 extern "C"
17244 #endif
17245 /* We use char because int might match the return type of a gcc2
17246    builtin and then its argument prototype would still apply.  */
17247 char openpty ();
17248 int
17249 main ()
17250 {
17251 openpty ();
17252   ;
17253   return 0;
17254 }
17255 _ACEOF
17256 rm -f conftest.$ac_objext conftest$ac_exeext
17257 if { (eval echo "$as_me:17257: \"$ac_link\"") >&5
17258   (eval $ac_link) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); } &&
17262          { ac_try='test -s conftest$ac_exeext'
17263   { (eval echo "$as_me:17263: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); }; }; then
17268   ac_cv_lib_util_openpty=yes
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 cat conftest.$ac_ext >&5
17272 ac_cv_lib_util_openpty=no
17273 fi
17274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17275 LIBS=$ac_check_lib_save_LIBS
17276 fi
17277 echo "$as_me:17277: result: $ac_cv_lib_util_openpty" >&5
17278 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17279 if test $ac_cv_lib_util_openpty = yes; then
17280   cf_cv_lib_util=yes
17281 else
17282   cf_cv_lib_util=no
17283 fi
17284
17285 echo "$as_me:17285: checking for openpty header" >&5
17286 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17287 if test "${cf_cv_func_openpty+set}" = set; then
17288   echo $ECHO_N "(cached) $ECHO_C" >&6
17289 else
17290
17291     cf_save_LIBS="$LIBS"
17292     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17293     for cf_header in pty.h libutil.h util.h
17294     do
17295     cat >conftest.$ac_ext <<_ACEOF
17296 #line 17296 "configure"
17297 #include "confdefs.h"
17298
17299 #include <$cf_header>
17300
17301 int
17302 main ()
17303 {
17304
17305     int x = openpty((int *)0, (int *)0, (char *)0,
17306                    (struct termios *)0, (struct winsize *)0);
17307
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext conftest$ac_exeext
17313 if { (eval echo "$as_me:17313: \"$ac_link\"") >&5
17314   (eval $ac_link) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); } &&
17318          { ac_try='test -s conftest$ac_exeext'
17319   { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324
17325         cf_cv_func_openpty=$cf_header
17326         break
17327
17328 else
17329   echo "$as_me: failed program was:" >&5
17330 cat conftest.$ac_ext >&5
17331
17332         cf_cv_func_openpty=no
17333
17334 fi
17335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17336     done
17337     LIBS="$cf_save_LIBS"
17338
17339 fi
17340 echo "$as_me:17340: result: $cf_cv_func_openpty" >&5
17341 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17342
17343 if test "$cf_cv_func_openpty" != no ; then
17344     cat >>confdefs.h <<EOF
17345 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17346 EOF
17347
17348     cat >>confdefs.h <<\EOF
17349 #define USE_XTERM_PTY 1
17350 EOF
17351
17352     if test "$cf_cv_lib_util" = yes ; then
17353         TEST_LIBS="-lutil $TEST_LIBS"
17354     fi
17355 fi
17356
17357 if test "$with_hashed_db" != no ; then
17358         cat >>confdefs.h <<\EOF
17359 #define USE_HASHED_DB 1
17360 EOF
17361
17362 case $with_hashed_db in #(vi
17363 yes|*able*) #(vi
17364     ;;
17365 *)
17366     if test -d "$with_hashed_db" ; then
17367
17368 if test -n "$with_hashed_db/include" ; then
17369   for cf_add_incdir in $with_hashed_db/include
17370   do
17371         while test $cf_add_incdir != /usr/include
17372         do
17373           if test -d $cf_add_incdir
17374           then
17375                 cf_have_incdir=no
17376                 if test -n "$CFLAGS$CPPFLAGS" ; then
17377                   # a loop is needed to ensure we can add subdirs of existing dirs
17378                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17379                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17380                           cf_have_incdir=yes; break
17381                         fi
17382                   done
17383                 fi
17384
17385                 if test "$cf_have_incdir" = no ; then
17386                   if test "$cf_add_incdir" = /usr/local/include ; then
17387                         if test "$GCC" = yes
17388                         then
17389                           cf_save_CPPFLAGS=$CPPFLAGS
17390                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17391                           cat >conftest.$ac_ext <<_ACEOF
17392 #line 17392 "configure"
17393 #include "confdefs.h"
17394 #include <stdio.h>
17395 int
17396 main ()
17397 {
17398 printf("Hello")
17399   ;
17400   return 0;
17401 }
17402 _ACEOF
17403 rm -f conftest.$ac_objext
17404 if { (eval echo "$as_me:17404: \"$ac_compile\"") >&5
17405   (eval $ac_compile) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); } &&
17409          { ac_try='test -s conftest.$ac_objext'
17410   { (eval echo "$as_me:17410: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:17413: \$? = $ac_status" >&5
17414   (exit $ac_status); }; }; then
17415   :
17416 else
17417   echo "$as_me: failed program was:" >&5
17418 cat conftest.$ac_ext >&5
17419 cf_have_incdir=yes
17420 fi
17421 rm -f conftest.$ac_objext conftest.$ac_ext
17422                           CPPFLAGS=$cf_save_CPPFLAGS
17423                         fi
17424                   fi
17425                 fi
17426
17427                 if test "$cf_have_incdir" = no ; then
17428                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17429
17430 echo "${as_me:-configure}:17430: testing adding $cf_add_incdir to include-path ..." 1>&5
17431
17432                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17433
17434                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17435                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17436                   cf_add_incdir="$cf_top_incdir"
17437                 else
17438                   break
17439                 fi
17440           fi
17441         done
17442   done
17443 fi
17444
17445 if test -n "$with_hashed_db/lib" ; then
17446   for cf_add_libdir in $with_hashed_db/lib
17447   do
17448     if test $cf_add_libdir = /usr/lib ; then
17449       :
17450     elif test -d $cf_add_libdir
17451     then
17452       cf_have_libdir=no
17453       if test -n "$LDFLAGS$LIBS" ; then
17454         # a loop is needed to ensure we can add subdirs of existing dirs
17455         for cf_test_libdir in $LDFLAGS $LIBS ; do
17456           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17457             cf_have_libdir=yes; break
17458           fi
17459         done
17460       fi
17461       if test "$cf_have_libdir" = no ; then
17462         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17463
17464 echo "${as_me:-configure}:17464: testing adding $cf_add_libdir to library-path ..." 1>&5
17465
17466         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17467       fi
17468     fi
17469   done
17470 fi
17471
17472     fi
17473 esac
17474
17475 echo "$as_me:17475: checking for db.h" >&5
17476 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17477 if test "${ac_cv_header_db_h+set}" = set; then
17478   echo $ECHO_N "(cached) $ECHO_C" >&6
17479 else
17480   cat >conftest.$ac_ext <<_ACEOF
17481 #line 17481 "configure"
17482 #include "confdefs.h"
17483 #include <db.h>
17484 _ACEOF
17485 if { (eval echo "$as_me:17485: \"$ac_cpp conftest.$ac_ext\"") >&5
17486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17487   ac_status=$?
17488   egrep -v '^ *\+' conftest.er1 >conftest.err
17489   rm -f conftest.er1
17490   cat conftest.err >&5
17491   echo "$as_me:17491: \$? = $ac_status" >&5
17492   (exit $ac_status); } >/dev/null; then
17493   if test -s conftest.err; then
17494     ac_cpp_err=$ac_c_preproc_warn_flag
17495   else
17496     ac_cpp_err=
17497   fi
17498 else
17499   ac_cpp_err=yes
17500 fi
17501 if test -z "$ac_cpp_err"; then
17502   ac_cv_header_db_h=yes
17503 else
17504   echo "$as_me: failed program was:" >&5
17505   cat conftest.$ac_ext >&5
17506   ac_cv_header_db_h=no
17507 fi
17508 rm -f conftest.err conftest.$ac_ext
17509 fi
17510 echo "$as_me:17510: result: $ac_cv_header_db_h" >&5
17511 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17512 if test $ac_cv_header_db_h = yes; then
17513
17514 echo "$as_me:17514: checking for version of db" >&5
17515 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17516 if test "${cf_cv_hashed_db_version+set}" = set; then
17517   echo $ECHO_N "(cached) $ECHO_C" >&6
17518 else
17519
17520 cf_cv_hashed_db_version=unknown
17521
17522 for cf_db_version in 1 2 3 4 5
17523 do
17524
17525 echo "${as_me:-configure}:17525: testing checking for db version $cf_db_version ..." 1>&5
17526
17527         cat >conftest.$ac_ext <<_ACEOF
17528 #line 17528 "configure"
17529 #include "confdefs.h"
17530
17531 $ac_includes_default
17532 #include <db.h>
17533
17534 #ifdef DB_VERSION_MAJOR
17535         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17536 #if $cf_db_version == DB_VERSION_MAJOR
17537         /* ok */
17538 #else
17539         make an error
17540 #endif
17541 #else
17542 #if $cf_db_version == 1
17543         /* ok: assuming this is DB 1.8.5 */
17544 #else
17545         make an error
17546 #endif
17547 #endif
17548
17549 int
17550 main ()
17551 {
17552 DBT *foo = 0
17553   ;
17554   return 0;
17555 }
17556 _ACEOF
17557 rm -f conftest.$ac_objext
17558 if { (eval echo "$as_me:17558: \"$ac_compile\"") >&5
17559   (eval $ac_compile) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); } &&
17563          { ac_try='test -s conftest.$ac_objext'
17564   { (eval echo "$as_me:17564: \"$ac_try\"") >&5
17565   (eval $ac_try) 2>&5
17566   ac_status=$?
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); }; }; then
17569
17570         cf_cv_hashed_db_version=$cf_db_version
17571         break
17572
17573 else
17574   echo "$as_me: failed program was:" >&5
17575 cat conftest.$ac_ext >&5
17576 fi
17577 rm -f conftest.$ac_objext conftest.$ac_ext
17578 done
17579
17580 fi
17581 echo "$as_me:17581: result: $cf_cv_hashed_db_version" >&5
17582 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17583
17584 if test "$cf_cv_hashed_db_version" = unknown ; then
17585         { { echo "$as_me:17585: error: Cannot determine version of db" >&5
17586 echo "$as_me: error: Cannot determine version of db" >&2;}
17587    { (exit 1); exit 1; }; }
17588 else
17589
17590 echo "$as_me:17590: checking for db libraries" >&5
17591 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17592 if test "${cf_cv_hashed_db_libs+set}" = set; then
17593   echo $ECHO_N "(cached) $ECHO_C" >&6
17594 else
17595
17596 cf_cv_hashed_db_libs=unknown
17597 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17598 do
17599         cf_save_libs="$LIBS"
17600         if test -n "$cf_db_libs"; then
17601                 LIBS="-l$cf_db_libs $LIBS"
17602         fi
17603
17604 echo "${as_me:-configure}:17604: testing checking for library "$cf_db_libs" ..." 1>&5
17605
17606         cat >conftest.$ac_ext <<_ACEOF
17607 #line 17607 "configure"
17608 #include "confdefs.h"
17609
17610 $ac_includes_default
17611 #include <db.h>
17612
17613 int
17614 main ()
17615 {
17616
17617         char *path = "/tmp/foo";
17618 #ifdef DB_VERSION_MAJOR
17619 #if DB_VERSION_MAJOR >= 4
17620         DB *result = 0;
17621         db_create(&result, NULL, 0);
17622         result->open(result,
17623                 NULL,
17624                 path,
17625                 path,
17626                 DB_HASH,
17627                 DB_CREATE,
17628                 0644);
17629 #elif DB_VERSION_MAJOR >= 3
17630         DB *result = 0;
17631         db_create(&result, NULL, 0);
17632         result->open(result,
17633                 path,
17634                 path,
17635                 DB_HASH,
17636                 DB_CREATE,
17637                 0644);
17638 #elif DB_VERSION_MAJOR >= 2
17639         DB *result = 0;
17640         db_open(path,
17641                 DB_HASH,
17642                 DB_CREATE,
17643                 0644,
17644                 (DB_ENV *) 0,
17645                 (DB_INFO *) 0,
17646                 &result);
17647 #endif /* DB_VERSION_MAJOR */
17648 #else
17649         DB *result = dbopen(path,
17650                      2,
17651                      0644,
17652                      DB_HASH,
17653                      0);
17654 #endif
17655         ${cf_cv_main_return:-return}(result != 0)
17656
17657   ;
17658   return 0;
17659 }
17660 _ACEOF
17661 rm -f conftest.$ac_objext conftest$ac_exeext
17662 if { (eval echo "$as_me:17662: \"$ac_link\"") >&5
17663   (eval $ac_link) 2>&5
17664   ac_status=$?
17665   echo "$as_me:17665: \$? = $ac_status" >&5
17666   (exit $ac_status); } &&
17667          { ac_try='test -s conftest$ac_exeext'
17668   { (eval echo "$as_me:17668: \"$ac_try\"") >&5
17669   (eval $ac_try) 2>&5
17670   ac_status=$?
17671   echo "$as_me:17671: \$? = $ac_status" >&5
17672   (exit $ac_status); }; }; then
17673
17674         if test -n "$cf_db_libs" ; then
17675                 cf_cv_hashed_db_libs=$cf_db_libs
17676         else
17677                 cf_cv_hashed_db_libs=default
17678         fi
17679         LIBS="$cf_save_libs"
17680         break
17681
17682 else
17683   echo "$as_me: failed program was:" >&5
17684 cat conftest.$ac_ext >&5
17685 fi
17686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17687         LIBS="$cf_save_libs"
17688 done
17689
17690 fi
17691 echo "$as_me:17691: result: $cf_cv_hashed_db_libs" >&5
17692 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17693
17694         if test "$cf_cv_hashed_db_libs" = unknown ; then
17695                 { { echo "$as_me:17695: error: Cannot determine library for db" >&5
17696 echo "$as_me: error: Cannot determine library for db" >&2;}
17697    { (exit 1); exit 1; }; }
17698         elif test "$cf_cv_hashed_db_libs" != default ; then
17699                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17700         fi
17701 fi
17702
17703 else
17704
17705         { { echo "$as_me:17705: error: Cannot find db.h" >&5
17706 echo "$as_me: error: Cannot find db.h" >&2;}
17707    { (exit 1); exit 1; }; }
17708
17709 fi
17710
17711 fi
17712
17713 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17714         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17715         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17716 fi
17717
17718 # Just in case, check if the C compiler has a bool type.
17719
17720 echo "$as_me:17720: checking if we should include stdbool.h" >&5
17721 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17722
17723 if test "${cf_cv_header_stdbool_h+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726
17727         cat >conftest.$ac_ext <<_ACEOF
17728 #line 17728 "configure"
17729 #include "confdefs.h"
17730
17731 int
17732 main ()
17733 {
17734 bool foo = false
17735   ;
17736   return 0;
17737 }
17738 _ACEOF
17739 rm -f conftest.$ac_objext
17740 if { (eval echo "$as_me:17740: \"$ac_compile\"") >&5
17741   (eval $ac_compile) 2>&5
17742   ac_status=$?
17743   echo "$as_me:17743: \$? = $ac_status" >&5
17744   (exit $ac_status); } &&
17745          { ac_try='test -s conftest.$ac_objext'
17746   { (eval echo "$as_me:17746: \"$ac_try\"") >&5
17747   (eval $ac_try) 2>&5
17748   ac_status=$?
17749   echo "$as_me:17749: \$? = $ac_status" >&5
17750   (exit $ac_status); }; }; then
17751   cf_cv_header_stdbool_h=0
17752 else
17753   echo "$as_me: failed program was:" >&5
17754 cat conftest.$ac_ext >&5
17755 cat >conftest.$ac_ext <<_ACEOF
17756 #line 17756 "configure"
17757 #include "confdefs.h"
17758
17759 #ifndef __BEOS__
17760 #include <stdbool.h>
17761 #endif
17762
17763 int
17764 main ()
17765 {
17766 bool foo = false
17767   ;
17768   return 0;
17769 }
17770 _ACEOF
17771 rm -f conftest.$ac_objext
17772 if { (eval echo "$as_me:17772: \"$ac_compile\"") >&5
17773   (eval $ac_compile) 2>&5
17774   ac_status=$?
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); } &&
17777          { ac_try='test -s conftest.$ac_objext'
17778   { (eval echo "$as_me:17778: \"$ac_try\"") >&5
17779   (eval $ac_try) 2>&5
17780   ac_status=$?
17781   echo "$as_me:17781: \$? = $ac_status" >&5
17782   (exit $ac_status); }; }; then
17783   cf_cv_header_stdbool_h=1
17784 else
17785   echo "$as_me: failed program was:" >&5
17786 cat conftest.$ac_ext >&5
17787 cf_cv_header_stdbool_h=0
17788 fi
17789 rm -f conftest.$ac_objext conftest.$ac_ext
17790 fi
17791 rm -f conftest.$ac_objext conftest.$ac_ext
17792 fi
17793
17794 if test "$cf_cv_header_stdbool_h" = 1
17795 then    echo "$as_me:17795: result: yes" >&5
17796 echo "${ECHO_T}yes" >&6
17797 else    echo "$as_me:17797: result: no" >&5
17798 echo "${ECHO_T}no" >&6
17799 fi
17800
17801 echo "$as_me:17801: checking for builtin bool type" >&5
17802 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17803
17804 if test "${cf_cv_cc_bool_type+set}" = set; then
17805   echo $ECHO_N "(cached) $ECHO_C" >&6
17806 else
17807
17808         cat >conftest.$ac_ext <<_ACEOF
17809 #line 17809 "configure"
17810 #include "confdefs.h"
17811
17812 #include <stdio.h>
17813 #include <sys/types.h>
17814
17815 int
17816 main ()
17817 {
17818 bool x = false
17819   ;
17820   return 0;
17821 }
17822 _ACEOF
17823 rm -f conftest.$ac_objext
17824 if { (eval echo "$as_me:17824: \"$ac_compile\"") >&5
17825   (eval $ac_compile) 2>&5
17826   ac_status=$?
17827   echo "$as_me:17827: \$? = $ac_status" >&5
17828   (exit $ac_status); } &&
17829          { ac_try='test -s conftest.$ac_objext'
17830   { (eval echo "$as_me:17830: \"$ac_try\"") >&5
17831   (eval $ac_try) 2>&5
17832   ac_status=$?
17833   echo "$as_me:17833: \$? = $ac_status" >&5
17834   (exit $ac_status); }; }; then
17835   cf_cv_cc_bool_type=1
17836 else
17837   echo "$as_me: failed program was:" >&5
17838 cat conftest.$ac_ext >&5
17839 cf_cv_cc_bool_type=0
17840 fi
17841 rm -f conftest.$ac_objext conftest.$ac_ext
17842
17843 fi
17844
17845 if test "$cf_cv_cc_bool_type" = 1
17846 then    echo "$as_me:17846: result: yes" >&5
17847 echo "${ECHO_T}yes" >&6
17848 else    echo "$as_me:17848: result: no" >&5
17849 echo "${ECHO_T}no" >&6
17850 fi
17851
17852 # Check for C++ compiler characteristics (and ensure that it's there!)
17853 if test -n "$CXX" ; then
17854         ac_ext=cc
17855 ac_cpp='$CXXCPP $CPPFLAGS'
17856 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17857 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17858 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17859 ac_main_return=return
17860
17861 if test -n "$GXX" ; then
17862 case $cf_cv_system_name in #(vi
17863 os2*) #(vi
17864         cf_stdcpp_libname=stdcpp
17865         ;;
17866 *)
17867         cf_stdcpp_libname=stdc++
17868         ;;
17869 esac
17870 echo "$as_me:17870: checking for library $cf_stdcpp_libname" >&5
17871 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17872 if test "${cf_cv_libstdcpp+set}" = set; then
17873   echo $ECHO_N "(cached) $ECHO_C" >&6
17874 else
17875
17876         cf_save="$LIBS"
17877         LIBS="-l$cf_stdcpp_libname $LIBS"
17878 cat >conftest.$ac_ext <<_ACEOF
17879 #line 17879 "configure"
17880 #include "confdefs.h"
17881
17882 #include <strstream.h>
17883 int
17884 main ()
17885 {
17886
17887 char buf[80];
17888 strstreambuf foo(buf, sizeof(buf))
17889
17890   ;
17891   return 0;
17892 }
17893 _ACEOF
17894 rm -f conftest.$ac_objext conftest$ac_exeext
17895 if { (eval echo "$as_me:17895: \"$ac_link\"") >&5
17896   (eval $ac_link) 2>&5
17897   ac_status=$?
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit $ac_status); } &&
17900          { ac_try='test -s conftest$ac_exeext'
17901   { (eval echo "$as_me:17901: \"$ac_try\"") >&5
17902   (eval $ac_try) 2>&5
17903   ac_status=$?
17904   echo "$as_me:17904: \$? = $ac_status" >&5
17905   (exit $ac_status); }; }; then
17906   cf_cv_libstdcpp=yes
17907 else
17908   echo "$as_me: failed program was:" >&5
17909 cat conftest.$ac_ext >&5
17910 cf_cv_libstdcpp=no
17911 fi
17912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17913         LIBS="$cf_save"
17914
17915 fi
17916 echo "$as_me:17916: result: $cf_cv_libstdcpp" >&5
17917 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17918 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17919 fi
17920
17921         echo "$as_me:17921: checking whether $CXX understands -c and -o together" >&5
17922 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17923 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17924   echo $ECHO_N "(cached) $ECHO_C" >&6
17925 else
17926
17927 cat > conftest.$ac_ext <<CF_EOF
17928 #include <stdio.h>
17929 int main()
17930 {
17931         ${cf_cv_main_return:-return}(0);
17932 }
17933 CF_EOF
17934 # We do the test twice because some compilers refuse to overwrite an
17935 # existing .o file with -o, though they will create one.
17936 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17937 if { (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); } &&
17942   test -f conftest2.$ac_objext && { (eval echo "$as_me:17942: \"$ac_try\"") >&5
17943   (eval $ac_try) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); };
17947 then
17948   eval cf_cv_prog_CXX_c_o=yes
17949 else
17950   eval cf_cv_prog_CXX_c_o=no
17951 fi
17952 rm -rf conftest*
17953
17954 fi
17955 if test $cf_cv_prog_CXX_c_o = yes; then
17956   echo "$as_me:17956: result: yes" >&5
17957 echo "${ECHO_T}yes" >&6
17958 else
17959   echo "$as_me:17959: result: no" >&5
17960 echo "${ECHO_T}no" >&6
17961 fi
17962
17963         case $GXX_VERSION in
17964         1*|2.0-6*)
17965                 cf_cxx_library=yes
17966                 ;;
17967         *-2.7*|2.7*)
17968
17969 cf_cxx_library=unknown
17970 case $cf_cv_system_name in #(vi
17971 os2*) #(vi
17972         cf_gpp_libname=gpp
17973         ;;
17974 *)
17975         cf_gpp_libname=g++
17976         ;;
17977 esac
17978 if test "$GXX" = yes; then
17979         echo "$as_me:17979: checking for lib$cf_gpp_libname" >&5
17980 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17981         cf_save="$LIBS"
17982         LIBS="-l$cf_gpp_libname $LIBS"
17983         cat >conftest.$ac_ext <<_ACEOF
17984 #line 17984 "configure"
17985 #include "confdefs.h"
17986
17987 #include <$cf_gpp_libname/builtin.h>
17988
17989 int
17990 main ()
17991 {
17992 two_arg_error_handler_t foo2 = lib_error_handler
17993   ;
17994   return 0;
17995 }
17996 _ACEOF
17997 rm -f conftest.$ac_objext conftest$ac_exeext
17998 if { (eval echo "$as_me:17998: \"$ac_link\"") >&5
17999   (eval $ac_link) 2>&5
18000   ac_status=$?
18001   echo "$as_me:18001: \$? = $ac_status" >&5
18002   (exit $ac_status); } &&
18003          { ac_try='test -s conftest$ac_exeext'
18004   { (eval echo "$as_me:18004: \"$ac_try\"") >&5
18005   (eval $ac_try) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit $ac_status); }; }; then
18009   cf_cxx_library=yes
18010          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18011          if test "$cf_gpp_libname" = cpp ; then
18012             cat >>confdefs.h <<\EOF
18013 #define HAVE_GPP_BUILTIN_H 1
18014 EOF
18015
18016          else
18017             cat >>confdefs.h <<\EOF
18018 #define HAVE_GXX_BUILTIN_H 1
18019 EOF
18020
18021          fi
18022 else
18023   echo "$as_me: failed program was:" >&5
18024 cat conftest.$ac_ext >&5
18025 cat >conftest.$ac_ext <<_ACEOF
18026 #line 18026 "configure"
18027 #include "confdefs.h"
18028
18029 #include <builtin.h>
18030
18031 int
18032 main ()
18033 {
18034 two_arg_error_handler_t foo2 = lib_error_handler
18035   ;
18036   return 0;
18037 }
18038 _ACEOF
18039 rm -f conftest.$ac_objext conftest$ac_exeext
18040 if { (eval echo "$as_me:18040: \"$ac_link\"") >&5
18041   (eval $ac_link) 2>&5
18042   ac_status=$?
18043   echo "$as_me:18043: \$? = $ac_status" >&5
18044   (exit $ac_status); } &&
18045          { ac_try='test -s conftest$ac_exeext'
18046   { (eval echo "$as_me:18046: \"$ac_try\"") >&5
18047   (eval $ac_try) 2>&5
18048   ac_status=$?
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit $ac_status); }; }; then
18051   cf_cxx_library=yes
18052          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18053          cat >>confdefs.h <<\EOF
18054 #define HAVE_BUILTIN_H 1
18055 EOF
18056
18057 else
18058   echo "$as_me: failed program was:" >&5
18059 cat conftest.$ac_ext >&5
18060 cf_cxx_library=no
18061 fi
18062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18063 fi
18064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18065         LIBS="$cf_save"
18066         echo "$as_me:18066: result: $cf_cxx_library" >&5
18067 echo "${ECHO_T}$cf_cxx_library" >&6
18068 fi
18069
18070                 ;;
18071         *)
18072                 cf_cxx_library=no
18073                 ;;
18074         esac
18075
18076         ac_ext=cc
18077 ac_cpp='$CXXCPP $CPPFLAGS'
18078 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18079 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18080 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18081 ac_main_return=return
18082 echo "$as_me:18082: checking how to run the C++ preprocessor" >&5
18083 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18084 if test -z "$CXXCPP"; then
18085   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18086   echo $ECHO_N "(cached) $ECHO_C" >&6
18087 else
18088       # Double quotes because CXXCPP needs to be expanded
18089     for CXXCPP in "$CXX -E" "/lib/cpp"
18090     do
18091       ac_preproc_ok=false
18092 for ac_cxx_preproc_warn_flag in '' yes
18093 do
18094   # Use a header file that comes with gcc, so configuring glibc
18095   # with a fresh cross-compiler works.
18096   # On the NeXT, cc -E runs the code through the compiler's parser,
18097   # not just through cpp. "Syntax error" is here to catch this case.
18098   cat >conftest.$ac_ext <<_ACEOF
18099 #line 18099 "configure"
18100 #include "confdefs.h"
18101 #include <assert.h>
18102                      Syntax error
18103 _ACEOF
18104 if { (eval echo "$as_me:18104: \"$ac_cpp conftest.$ac_ext\"") >&5
18105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18106   ac_status=$?
18107   egrep -v '^ *\+' conftest.er1 >conftest.err
18108   rm -f conftest.er1
18109   cat conftest.err >&5
18110   echo "$as_me:18110: \$? = $ac_status" >&5
18111   (exit $ac_status); } >/dev/null; then
18112   if test -s conftest.err; then
18113     ac_cpp_err=$ac_cxx_preproc_warn_flag
18114   else
18115     ac_cpp_err=
18116   fi
18117 else
18118   ac_cpp_err=yes
18119 fi
18120 if test -z "$ac_cpp_err"; then
18121   :
18122 else
18123   echo "$as_me: failed program was:" >&5
18124   cat conftest.$ac_ext >&5
18125   # Broken: fails on valid input.
18126 continue
18127 fi
18128 rm -f conftest.err conftest.$ac_ext
18129
18130   # OK, works on sane cases.  Now check whether non-existent headers
18131   # can be detected and how.
18132   cat >conftest.$ac_ext <<_ACEOF
18133 #line 18133 "configure"
18134 #include "confdefs.h"
18135 #include <ac_nonexistent.h>
18136 _ACEOF
18137 if { (eval echo "$as_me:18137: \"$ac_cpp conftest.$ac_ext\"") >&5
18138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18139   ac_status=$?
18140   egrep -v '^ *\+' conftest.er1 >conftest.err
18141   rm -f conftest.er1
18142   cat conftest.err >&5
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit $ac_status); } >/dev/null; then
18145   if test -s conftest.err; then
18146     ac_cpp_err=$ac_cxx_preproc_warn_flag
18147   else
18148     ac_cpp_err=
18149   fi
18150 else
18151   ac_cpp_err=yes
18152 fi
18153 if test -z "$ac_cpp_err"; then
18154   # Broken: success on invalid input.
18155 continue
18156 else
18157   echo "$as_me: failed program was:" >&5
18158   cat conftest.$ac_ext >&5
18159   # Passes both tests.
18160 ac_preproc_ok=:
18161 break
18162 fi
18163 rm -f conftest.err conftest.$ac_ext
18164
18165 done
18166 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18167 rm -f conftest.err conftest.$ac_ext
18168 if $ac_preproc_ok; then
18169   break
18170 fi
18171
18172     done
18173     ac_cv_prog_CXXCPP=$CXXCPP
18174
18175 fi
18176   CXXCPP=$ac_cv_prog_CXXCPP
18177 else
18178   ac_cv_prog_CXXCPP=$CXXCPP
18179 fi
18180 echo "$as_me:18180: result: $CXXCPP" >&5
18181 echo "${ECHO_T}$CXXCPP" >&6
18182 ac_preproc_ok=false
18183 for ac_cxx_preproc_warn_flag in '' yes
18184 do
18185   # Use a header file that comes with gcc, so configuring glibc
18186   # with a fresh cross-compiler works.
18187   # On the NeXT, cc -E runs the code through the compiler's parser,
18188   # not just through cpp. "Syntax error" is here to catch this case.
18189   cat >conftest.$ac_ext <<_ACEOF
18190 #line 18190 "configure"
18191 #include "confdefs.h"
18192 #include <assert.h>
18193                      Syntax error
18194 _ACEOF
18195 if { (eval echo "$as_me:18195: \"$ac_cpp conftest.$ac_ext\"") >&5
18196   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18197   ac_status=$?
18198   egrep -v '^ *\+' conftest.er1 >conftest.err
18199   rm -f conftest.er1
18200   cat conftest.err >&5
18201   echo "$as_me:18201: \$? = $ac_status" >&5
18202   (exit $ac_status); } >/dev/null; then
18203   if test -s conftest.err; then
18204     ac_cpp_err=$ac_cxx_preproc_warn_flag
18205   else
18206     ac_cpp_err=
18207   fi
18208 else
18209   ac_cpp_err=yes
18210 fi
18211 if test -z "$ac_cpp_err"; then
18212   :
18213 else
18214   echo "$as_me: failed program was:" >&5
18215   cat conftest.$ac_ext >&5
18216   # Broken: fails on valid input.
18217 continue
18218 fi
18219 rm -f conftest.err conftest.$ac_ext
18220
18221   # OK, works on sane cases.  Now check whether non-existent headers
18222   # can be detected and how.
18223   cat >conftest.$ac_ext <<_ACEOF
18224 #line 18224 "configure"
18225 #include "confdefs.h"
18226 #include <ac_nonexistent.h>
18227 _ACEOF
18228 if { (eval echo "$as_me:18228: \"$ac_cpp conftest.$ac_ext\"") >&5
18229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18230   ac_status=$?
18231   egrep -v '^ *\+' conftest.er1 >conftest.err
18232   rm -f conftest.er1
18233   cat conftest.err >&5
18234   echo "$as_me:18234: \$? = $ac_status" >&5
18235   (exit $ac_status); } >/dev/null; then
18236   if test -s conftest.err; then
18237     ac_cpp_err=$ac_cxx_preproc_warn_flag
18238   else
18239     ac_cpp_err=
18240   fi
18241 else
18242   ac_cpp_err=yes
18243 fi
18244 if test -z "$ac_cpp_err"; then
18245   # Broken: success on invalid input.
18246 continue
18247 else
18248   echo "$as_me: failed program was:" >&5
18249   cat conftest.$ac_ext >&5
18250   # Passes both tests.
18251 ac_preproc_ok=:
18252 break
18253 fi
18254 rm -f conftest.err conftest.$ac_ext
18255
18256 done
18257 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18258 rm -f conftest.err conftest.$ac_ext
18259 if $ac_preproc_ok; then
18260   :
18261 else
18262   { { echo "$as_me:18262: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18263 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18264    { (exit 1); exit 1; }; }
18265 fi
18266
18267 ac_ext=cc
18268 ac_cpp='$CXXCPP $CPPFLAGS'
18269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18272 ac_main_return=return
18273
18274 for ac_header in typeinfo
18275 do
18276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18277 echo "$as_me:18277: checking for $ac_header" >&5
18278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18280   echo $ECHO_N "(cached) $ECHO_C" >&6
18281 else
18282   cat >conftest.$ac_ext <<_ACEOF
18283 #line 18283 "configure"
18284 #include "confdefs.h"
18285 #include <$ac_header>
18286 _ACEOF
18287 if { (eval echo "$as_me:18287: \"$ac_cpp conftest.$ac_ext\"") >&5
18288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18289   ac_status=$?
18290   egrep -v '^ *\+' conftest.er1 >conftest.err
18291   rm -f conftest.er1
18292   cat conftest.err >&5
18293   echo "$as_me:18293: \$? = $ac_status" >&5
18294   (exit $ac_status); } >/dev/null; then
18295   if test -s conftest.err; then
18296     ac_cpp_err=$ac_cxx_preproc_warn_flag
18297   else
18298     ac_cpp_err=
18299   fi
18300 else
18301   ac_cpp_err=yes
18302 fi
18303 if test -z "$ac_cpp_err"; then
18304   eval "$as_ac_Header=yes"
18305 else
18306   echo "$as_me: failed program was:" >&5
18307   cat conftest.$ac_ext >&5
18308   eval "$as_ac_Header=no"
18309 fi
18310 rm -f conftest.err conftest.$ac_ext
18311 fi
18312 echo "$as_me:18312: result: `eval echo '${'$as_ac_Header'}'`" >&5
18313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18314 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18315   cat >>confdefs.h <<EOF
18316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18317 EOF
18318
18319 fi
18320 done
18321
18322 for ac_header in iostream
18323 do
18324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18325 echo "$as_me:18325: checking for $ac_header" >&5
18326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18328   echo $ECHO_N "(cached) $ECHO_C" >&6
18329 else
18330   cat >conftest.$ac_ext <<_ACEOF
18331 #line 18331 "configure"
18332 #include "confdefs.h"
18333 #include <$ac_header>
18334 _ACEOF
18335 if { (eval echo "$as_me:18335: \"$ac_cpp conftest.$ac_ext\"") >&5
18336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18337   ac_status=$?
18338   egrep -v '^ *\+' conftest.er1 >conftest.err
18339   rm -f conftest.er1
18340   cat conftest.err >&5
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); } >/dev/null; then
18343   if test -s conftest.err; then
18344     ac_cpp_err=$ac_cxx_preproc_warn_flag
18345   else
18346     ac_cpp_err=
18347   fi
18348 else
18349   ac_cpp_err=yes
18350 fi
18351 if test -z "$ac_cpp_err"; then
18352   eval "$as_ac_Header=yes"
18353 else
18354   echo "$as_me: failed program was:" >&5
18355   cat conftest.$ac_ext >&5
18356   eval "$as_ac_Header=no"
18357 fi
18358 rm -f conftest.err conftest.$ac_ext
18359 fi
18360 echo "$as_me:18360: result: `eval echo '${'$as_ac_Header'}'`" >&5
18361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18363   cat >>confdefs.h <<EOF
18364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18365 EOF
18366
18367 fi
18368 done
18369
18370 if test x"$ac_cv_header_iostream" = xyes ; then
18371         echo "$as_me:18371: checking if iostream uses std-namespace" >&5
18372 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18373         cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376
18377 #include <iostream>
18378 using std::endl;
18379 using std::cerr;
18380 int
18381 main ()
18382 {
18383
18384 cerr << "testing" << endl;
18385
18386   ;
18387   return 0;
18388 }
18389 _ACEOF
18390 rm -f conftest.$ac_objext
18391 if { (eval echo "$as_me:18391: \"$ac_compile\"") >&5
18392   (eval $ac_compile) 2>&5
18393   ac_status=$?
18394   echo "$as_me:18394: \$? = $ac_status" >&5
18395   (exit $ac_status); } &&
18396          { ac_try='test -s conftest.$ac_objext'
18397   { (eval echo "$as_me:18397: \"$ac_try\"") >&5
18398   (eval $ac_try) 2>&5
18399   ac_status=$?
18400   echo "$as_me:18400: \$? = $ac_status" >&5
18401   (exit $ac_status); }; }; then
18402   cf_iostream_namespace=yes
18403 else
18404   echo "$as_me: failed program was:" >&5
18405 cat conftest.$ac_ext >&5
18406 cf_iostream_namespace=no
18407 fi
18408 rm -f conftest.$ac_objext conftest.$ac_ext
18409         echo "$as_me:18409: result: $cf_iostream_namespace" >&5
18410 echo "${ECHO_T}$cf_iostream_namespace" >&6
18411         if test "$cf_iostream_namespace" = yes ; then
18412                 cat >>confdefs.h <<\EOF
18413 #define IOSTREAM_NAMESPACE 1
18414 EOF
18415
18416         fi
18417 fi
18418
18419 echo "$as_me:18419: checking if we should include stdbool.h" >&5
18420 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18421
18422 if test "${cf_cv_header_stdbool_h+set}" = set; then
18423   echo $ECHO_N "(cached) $ECHO_C" >&6
18424 else
18425
18426         cat >conftest.$ac_ext <<_ACEOF
18427 #line 18427 "configure"
18428 #include "confdefs.h"
18429
18430 int
18431 main ()
18432 {
18433 bool foo = false
18434   ;
18435   return 0;
18436 }
18437 _ACEOF
18438 rm -f conftest.$ac_objext
18439 if { (eval echo "$as_me:18439: \"$ac_compile\"") >&5
18440   (eval $ac_compile) 2>&5
18441   ac_status=$?
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit $ac_status); } &&
18444          { ac_try='test -s conftest.$ac_objext'
18445   { (eval echo "$as_me:18445: \"$ac_try\"") >&5
18446   (eval $ac_try) 2>&5
18447   ac_status=$?
18448   echo "$as_me:18448: \$? = $ac_status" >&5
18449   (exit $ac_status); }; }; then
18450   cf_cv_header_stdbool_h=0
18451 else
18452   echo "$as_me: failed program was:" >&5
18453 cat conftest.$ac_ext >&5
18454 cat >conftest.$ac_ext <<_ACEOF
18455 #line 18455 "configure"
18456 #include "confdefs.h"
18457
18458 #ifndef __BEOS__
18459 #include <stdbool.h>
18460 #endif
18461
18462 int
18463 main ()
18464 {
18465 bool foo = false
18466   ;
18467   return 0;
18468 }
18469 _ACEOF
18470 rm -f conftest.$ac_objext
18471 if { (eval echo "$as_me:18471: \"$ac_compile\"") >&5
18472   (eval $ac_compile) 2>&5
18473   ac_status=$?
18474   echo "$as_me:18474: \$? = $ac_status" >&5
18475   (exit $ac_status); } &&
18476          { ac_try='test -s conftest.$ac_objext'
18477   { (eval echo "$as_me:18477: \"$ac_try\"") >&5
18478   (eval $ac_try) 2>&5
18479   ac_status=$?
18480   echo "$as_me:18480: \$? = $ac_status" >&5
18481   (exit $ac_status); }; }; then
18482   cf_cv_header_stdbool_h=1
18483 else
18484   echo "$as_me: failed program was:" >&5
18485 cat conftest.$ac_ext >&5
18486 cf_cv_header_stdbool_h=0
18487 fi
18488 rm -f conftest.$ac_objext conftest.$ac_ext
18489 fi
18490 rm -f conftest.$ac_objext conftest.$ac_ext
18491 fi
18492
18493 if test "$cf_cv_header_stdbool_h" = 1
18494 then    echo "$as_me:18494: result: yes" >&5
18495 echo "${ECHO_T}yes" >&6
18496 else    echo "$as_me:18496: result: no" >&5
18497 echo "${ECHO_T}no" >&6
18498 fi
18499
18500 echo "$as_me:18500: checking for builtin bool type" >&5
18501 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18502
18503 if test "${cf_cv_builtin_bool+set}" = set; then
18504   echo $ECHO_N "(cached) $ECHO_C" >&6
18505 else
18506
18507         cat >conftest.$ac_ext <<_ACEOF
18508 #line 18508 "configure"
18509 #include "confdefs.h"
18510
18511 #include <stdio.h>
18512 #include <sys/types.h>
18513
18514 int
18515 main ()
18516 {
18517 bool x = false
18518   ;
18519   return 0;
18520 }
18521 _ACEOF
18522 rm -f conftest.$ac_objext
18523 if { (eval echo "$as_me:18523: \"$ac_compile\"") >&5
18524   (eval $ac_compile) 2>&5
18525   ac_status=$?
18526   echo "$as_me:18526: \$? = $ac_status" >&5
18527   (exit $ac_status); } &&
18528          { ac_try='test -s conftest.$ac_objext'
18529   { (eval echo "$as_me:18529: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit $ac_status); }; }; then
18534   cf_cv_builtin_bool=1
18535 else
18536   echo "$as_me: failed program was:" >&5
18537 cat conftest.$ac_ext >&5
18538 cf_cv_builtin_bool=0
18539 fi
18540 rm -f conftest.$ac_objext conftest.$ac_ext
18541
18542 fi
18543
18544 if test "$cf_cv_builtin_bool" = 1
18545 then    echo "$as_me:18545: result: yes" >&5
18546 echo "${ECHO_T}yes" >&6
18547 else    echo "$as_me:18547: result: no" >&5
18548 echo "${ECHO_T}no" >&6
18549 fi
18550
18551 echo "$as_me:18551: checking for size of bool" >&5
18552 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18553 if test "${cf_cv_type_of_bool+set}" = set; then
18554   echo $ECHO_N "(cached) $ECHO_C" >&6
18555 else
18556
18557         rm -f cf_test.out
18558         if test "$cross_compiling" = yes; then
18559   cf_cv_type_of_bool=unknown
18560 else
18561   cat >conftest.$ac_ext <<_ACEOF
18562 #line 18562 "configure"
18563 #include "confdefs.h"
18564
18565 #include <stdlib.h>
18566 #include <stdio.h>
18567
18568 #if defined(__cplusplus)
18569
18570 #ifdef HAVE_GXX_BUILTIN_H
18571 #include <g++/builtin.h>
18572 #elif HAVE_GPP_BUILTIN_H
18573 #include <gpp/builtin.h>
18574 #elif HAVE_BUILTIN_H
18575 #include <builtin.h>
18576 #endif
18577
18578 #else
18579
18580 #if $cf_cv_header_stdbool_h
18581 #include <stdbool.h>
18582 #endif
18583
18584 #endif
18585
18586 main()
18587 {
18588         FILE *fp = fopen("cf_test.out", "w");
18589         if (fp != 0) {
18590                 bool x = true;
18591                 if ((bool)(-x) >= 0)
18592                         fputs("unsigned ", fp);
18593                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18594                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18595                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18596                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18597                 fclose(fp);
18598         }
18599         ${cf_cv_main_return:-return}(0);
18600 }
18601
18602 _ACEOF
18603 rm -f conftest$ac_exeext
18604 if { (eval echo "$as_me:18604: \"$ac_link\"") >&5
18605   (eval $ac_link) 2>&5
18606   ac_status=$?
18607   echo "$as_me:18607: \$? = $ac_status" >&5
18608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18609   { (eval echo "$as_me:18609: \"$ac_try\"") >&5
18610   (eval $ac_try) 2>&5
18611   ac_status=$?
18612   echo "$as_me:18612: \$? = $ac_status" >&5
18613   (exit $ac_status); }; }; then
18614   cf_cv_type_of_bool=`cat cf_test.out`
18615                  if test -z "$cf_cv_type_of_bool"; then
18616                    cf_cv_type_of_bool=unknown
18617                  fi
18618 else
18619   echo "$as_me: program exited with status $ac_status" >&5
18620 echo "$as_me: failed program was:" >&5
18621 cat conftest.$ac_ext >&5
18622 cf_cv_type_of_bool=unknown
18623 fi
18624 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18625 fi
18626
18627 fi
18628
18629         rm -f cf_test.out
18630 echo "$as_me:18630: result: $cf_cv_type_of_bool" >&5
18631 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18632 if test "$cf_cv_type_of_bool" = unknown ; then
18633         case .$NCURSES_BOOL in #(vi
18634         .auto|.) NCURSES_BOOL=unsigned;;
18635         esac
18636         { echo "$as_me:18636: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18637 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18638         cf_cv_type_of_bool=$NCURSES_BOOL
18639 fi
18640
18641 echo "$as_me:18641: checking for special defines needed for etip.h" >&5
18642 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18643 cf_save_CXXFLAGS="$CXXFLAGS"
18644 cf_result="none"
18645
18646 # etip.h includes ncurses.h which includes ncurses_dll.h
18647 # But ncurses_dll.h is generated - fix here.
18648 test -d include || mkdir include
18649 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18650
18651 for cf_math in "" MATH_H
18652 do
18653 for cf_excp in "" MATH_EXCEPTION
18654 do
18655         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18656         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18657         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18658 cat >conftest.$ac_ext <<_ACEOF
18659 #line 18659 "configure"
18660 #include "confdefs.h"
18661
18662 #include <etip.h.in>
18663
18664 int
18665 main ()
18666 {
18667
18668   ;
18669   return 0;
18670 }
18671 _ACEOF
18672 rm -f conftest.$ac_objext
18673 if { (eval echo "$as_me:18673: \"$ac_compile\"") >&5
18674   (eval $ac_compile) 2>&5
18675   ac_status=$?
18676   echo "$as_me:18676: \$? = $ac_status" >&5
18677   (exit $ac_status); } &&
18678          { ac_try='test -s conftest.$ac_objext'
18679   { (eval echo "$as_me:18679: \"$ac_try\"") >&5
18680   (eval $ac_try) 2>&5
18681   ac_status=$?
18682   echo "$as_me:18682: \$? = $ac_status" >&5
18683   (exit $ac_status); }; }; then
18684
18685         test -n "$cf_math" && cat >>confdefs.h <<EOF
18686 #define ETIP_NEEDS_${cf_math} 1
18687 EOF
18688
18689         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18690 #define ETIP_NEEDS_${cf_excp} 1
18691 EOF
18692
18693         cf_result="$cf_math $cf_excp"
18694         break
18695
18696 else
18697   echo "$as_me: failed program was:" >&5
18698 cat conftest.$ac_ext >&5
18699 fi
18700 rm -f conftest.$ac_objext conftest.$ac_ext
18701 done
18702 done
18703 echo "$as_me:18703: result: $cf_result" >&5
18704 echo "${ECHO_T}$cf_result" >&6
18705 CXXFLAGS="$cf_save_CXXFLAGS"
18706
18707 if test -n "$CXX"; then
18708 echo "$as_me:18708: checking if $CXX accepts parameter initialization" >&5
18709 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18710 if test "${cf_cv_cpp_param_init+set}" = set; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713
18714         ac_ext=cc
18715 ac_cpp='$CXXCPP $CPPFLAGS'
18716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18719 ac_main_return=return
18720
18721         if test "$cross_compiling" = yes; then
18722   cf_cv_cpp_param_init=unknown
18723 else
18724   cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18727
18728 class TEST {
18729 private:
18730         int value;
18731 public:
18732         TEST(int x = 1);
18733         ~TEST();
18734 };
18735
18736 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18737 {
18738         value = x;
18739 }
18740 int main() { }
18741
18742 _ACEOF
18743 rm -f conftest$ac_exeext
18744 if { (eval echo "$as_me:18744: \"$ac_link\"") >&5
18745   (eval $ac_link) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18749   { (eval echo "$as_me:18749: \"$ac_try\"") >&5
18750   (eval $ac_try) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit $ac_status); }; }; then
18754   cf_cv_cpp_param_init=yes
18755 else
18756   echo "$as_me: program exited with status $ac_status" >&5
18757 echo "$as_me: failed program was:" >&5
18758 cat conftest.$ac_ext >&5
18759 cf_cv_cpp_param_init=no
18760 fi
18761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18762 fi
18763         ac_ext=cc
18764 ac_cpp='$CXXCPP $CPPFLAGS'
18765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18768 ac_main_return=return
18769
18770 fi
18771 echo "$as_me:18771: result: $cf_cv_cpp_param_init" >&5
18772 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18773 fi
18774 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18775 #define CPP_HAS_PARAM_INIT 1
18776 EOF
18777
18778 if test -n "$CXX"; then
18779
18780 echo "$as_me:18780: checking if $CXX accepts static_cast" >&5
18781 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18782 if test "${cf_cv_cpp_static_cast+set}" = set; then
18783   echo $ECHO_N "(cached) $ECHO_C" >&6
18784 else
18785
18786         ac_ext=cc
18787 ac_cpp='$CXXCPP $CPPFLAGS'
18788 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18789 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18790 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18791 ac_main_return=return
18792
18793         cat >conftest.$ac_ext <<_ACEOF
18794 #line 18794 "configure"
18795 #include "confdefs.h"
18796
18797 class NCursesPanel
18798 {
18799 public:
18800   NCursesPanel(int nlines,
18801                int ncols,
18802                int begin_y = 0,
18803                int begin_x = 0)
18804   {
18805   }
18806
18807   ~NCursesPanel();
18808 };
18809
18810 template<class T> class NCursesUserPanel : public NCursesPanel
18811 {
18812 public:
18813   NCursesUserPanel (int nlines,
18814                     int ncols,
18815                     int begin_y = 0,
18816                     int begin_x = 0,
18817                     const T* p_UserData = static_cast<T*>(0))
18818     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18819   {
18820   };
18821   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18822   {
18823   };
18824
18825   virtual ~NCursesUserPanel() {};
18826 };
18827
18828 int
18829 main ()
18830 {
18831
18832         const char* p_UserData = static_cast<char*>(0)
18833   ;
18834   return 0;
18835 }
18836 _ACEOF
18837 rm -f conftest.$ac_objext
18838 if { (eval echo "$as_me:18838: \"$ac_compile\"") >&5
18839   (eval $ac_compile) 2>&5
18840   ac_status=$?
18841   echo "$as_me:18841: \$? = $ac_status" >&5
18842   (exit $ac_status); } &&
18843          { ac_try='test -s conftest.$ac_objext'
18844   { (eval echo "$as_me:18844: \"$ac_try\"") >&5
18845   (eval $ac_try) 2>&5
18846   ac_status=$?
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit $ac_status); }; }; then
18849   cf_cv_cpp_static_cast=yes
18850 else
18851   echo "$as_me: failed program was:" >&5
18852 cat conftest.$ac_ext >&5
18853 cf_cv_cpp_static_cast=no
18854 fi
18855 rm -f conftest.$ac_objext conftest.$ac_ext
18856
18857         ac_ext=cc
18858 ac_cpp='$CXXCPP $CPPFLAGS'
18859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18860 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18862 ac_main_return=return
18863
18864 fi
18865 echo "$as_me:18865: result: $cf_cv_cpp_static_cast" >&5
18866 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18867
18868 fi
18869
18870 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18871 #define CPP_HAS_STATIC_CAST 1
18872 EOF
18873
18874         CXX_AR='$(AR)'
18875         CXX_ARFLAGS='$(ARFLAGS)'
18876         case $cf_cv_system_name in #(vi
18877         irix*) #(vi
18878             if test "$GXX" != yes ; then
18879                 CXX_AR='$(CXX)'
18880                 CXX_ARFLAGS='-ar -o'
18881             fi
18882             ;;
18883         sco3.2v5*) #(vi
18884             CXXLDFLAGS="-u main"
18885             ;;
18886         solaris2*)
18887             if test "$GXX" != yes ; then
18888                 CXX_AR='$(CXX)'
18889                 CXX_ARFLAGS='-xar -o'
18890             fi
18891             ;;
18892         esac
18893
18894 else
18895         cf_cxx_library=no
18896         cf_cv_builtin_bool=1
18897
18898         # Just because we are not configuring against C++ right now does not
18899         # mean that a user will not want to use C++.  Some distributors disable
18900         # the C++ portion of this configuration as a shortcut (or just to avoid
18901         # compiling the demo in the c++ directory).  So we need a reasonable
18902         # default for the 'bool' type.
18903         #
18904         # Caveat: since the storage of the bool type is not standardized, it
18905         # may change.
18906
18907         if test "$NCURSES_BOOL" != auto ; then
18908                 cf_cv_type_of_bool=$NCURSES_BOOL
18909                 cf_cv_header_stdbool_h=0
18910         else
18911                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18912
18913 echo "$as_me:18913: checking for size of bool" >&5
18914 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18915 if test "${cf_cv_type_of_bool+set}" = set; then
18916   echo $ECHO_N "(cached) $ECHO_C" >&6
18917 else
18918
18919         rm -f cf_test.out
18920         if test "$cross_compiling" = yes; then
18921   cf_cv_type_of_bool=unknown
18922 else
18923   cat >conftest.$ac_ext <<_ACEOF
18924 #line 18924 "configure"
18925 #include "confdefs.h"
18926
18927 #include <stdlib.h>
18928 #include <stdio.h>
18929
18930 #if defined(__cplusplus)
18931
18932 #ifdef HAVE_GXX_BUILTIN_H
18933 #include <g++/builtin.h>
18934 #elif HAVE_GPP_BUILTIN_H
18935 #include <gpp/builtin.h>
18936 #elif HAVE_BUILTIN_H
18937 #include <builtin.h>
18938 #endif
18939
18940 #else
18941
18942 #if $cf_cv_header_stdbool_h
18943 #include <stdbool.h>
18944 #endif
18945
18946 #endif
18947
18948 main()
18949 {
18950         FILE *fp = fopen("cf_test.out", "w");
18951         if (fp != 0) {
18952                 bool x = true;
18953                 if ((bool)(-x) >= 0)
18954                         fputs("unsigned ", fp);
18955                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18956                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18957                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18958                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18959                 fclose(fp);
18960         }
18961         ${cf_cv_main_return:-return}(0);
18962 }
18963
18964 _ACEOF
18965 rm -f conftest$ac_exeext
18966 if { (eval echo "$as_me:18966: \"$ac_link\"") >&5
18967   (eval $ac_link) 2>&5
18968   ac_status=$?
18969   echo "$as_me:18969: \$? = $ac_status" >&5
18970   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18971   { (eval echo "$as_me:18971: \"$ac_try\"") >&5
18972   (eval $ac_try) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit $ac_status); }; }; then
18976   cf_cv_type_of_bool=`cat cf_test.out`
18977                  if test -z "$cf_cv_type_of_bool"; then
18978                    cf_cv_type_of_bool=unknown
18979                  fi
18980 else
18981   echo "$as_me: program exited with status $ac_status" >&5
18982 echo "$as_me: failed program was:" >&5
18983 cat conftest.$ac_ext >&5
18984 cf_cv_type_of_bool=unknown
18985 fi
18986 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18987 fi
18988
18989 fi
18990
18991         rm -f cf_test.out
18992 echo "$as_me:18992: result: $cf_cv_type_of_bool" >&5
18993 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18994 if test "$cf_cv_type_of_bool" = unknown ; then
18995         case .$NCURSES_BOOL in #(vi
18996         .auto|.) NCURSES_BOOL=unsigned;;
18997         esac
18998         { echo "$as_me:18998: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18999 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19000         cf_cv_type_of_bool=$NCURSES_BOOL
19001 fi
19002
19003                 else
19004                         echo "$as_me:19004: checking for fallback type of bool" >&5
19005 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19006                         case "$host_cpu" in #(vi
19007                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19008                         *)      cf_cv_type_of_bool=int  ;;
19009                         esac
19010                         echo "$as_me:19010: result: $cf_cv_type_of_bool" >&5
19011 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19012                 fi
19013         fi
19014 fi
19015
19016 # If the C compiler did not declare bool, and we did not determine that the C++
19017 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19018 # ncurses library use the same type as C++ bool.  Note that this allows one to
19019 # specify the type of bool in a configure-script option and postpone
19020 # integration with the C++ compiler provided that the types are compatible.
19021 USE_CXX_BOOL=1
19022 if test $cf_cv_cc_bool_type = 1
19023 then
19024         # oops: C has a bool.  Unlikely, but C++ could differ.
19025         USE_CXX_BOOL=0
19026 elif test $cf_cv_builtin_bool = 0
19027 then
19028         # C++ has no bool
19029         USE_CXX_BOOL=0
19030 else
19031         # this is the normal case
19032         USE_CXX_BOOL='defined(__cplusplus)'
19033 fi
19034
19035 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19036
19037         if test "$cf_with_ada" != "no" ; then
19038                 if test "$with_libtool" != "no"; then
19039                         { echo "$as_me:19039: WARNING: libtool does not support Ada - disabling feature" >&5
19040 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19041                         cf_with_ada=no
19042                 fi
19043         fi
19044
19045         if test "$cf_with_ada" != "no" ; then
19046
19047 cf_ada_make=gnatmake
19048 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19049 set dummy $cf_ada_make; ac_word=$2
19050 echo "$as_me:19050: checking for $ac_word" >&5
19051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19052 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19053   echo $ECHO_N "(cached) $ECHO_C" >&6
19054 else
19055   if test -n "$gnat_exists"; then
19056   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19057 else
19058   ac_save_IFS=$IFS; IFS=$ac_path_separator
19059 ac_dummy="$PATH"
19060 for ac_dir in $ac_dummy; do
19061   IFS=$ac_save_IFS
19062   test -z "$ac_dir" && ac_dir=.
19063   $as_executable_p "$ac_dir/$ac_word" || continue
19064 ac_cv_prog_gnat_exists="yes"
19065 echo "$as_me:19065: found $ac_dir/$ac_word" >&5
19066 break
19067 done
19068
19069   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19070 fi
19071 fi
19072 gnat_exists=$ac_cv_prog_gnat_exists
19073 if test -n "$gnat_exists"; then
19074   echo "$as_me:19074: result: $gnat_exists" >&5
19075 echo "${ECHO_T}$gnat_exists" >&6
19076 else
19077   echo "$as_me:19077: result: no" >&5
19078 echo "${ECHO_T}no" >&6
19079 fi
19080
19081 if test "$ac_cv_prog_gnat_exists" = no; then
19082    cf_ada_make=
19083    cf_cv_prog_gnat_correct=no
19084 else
19085
19086 echo "$as_me:19086: checking for gnat version" >&5
19087 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19088 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19089         grep '[0-9].[0-9][0-9]*' |\
19090     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19091 echo "$as_me:19091: result: $cf_gnat_version" >&5
19092 echo "${ECHO_T}$cf_gnat_version" >&6
19093
19094 case $cf_gnat_version in #(vi
19095 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
19096         cf_cv_prog_gnat_correct=yes
19097         ;;
19098 *)
19099         { echo "$as_me:19099: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19100 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19101         cf_cv_prog_gnat_correct=no
19102         ;;
19103 esac
19104
19105    # Extract the first word of "m4", so it can be a program name with args.
19106 set dummy m4; ac_word=$2
19107 echo "$as_me:19107: checking for $ac_word" >&5
19108 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19109 if test "${ac_cv_prog_M4_exists+set}" = set; then
19110   echo $ECHO_N "(cached) $ECHO_C" >&6
19111 else
19112   if test -n "$M4_exists"; then
19113   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19114 else
19115   ac_save_IFS=$IFS; IFS=$ac_path_separator
19116 ac_dummy="$PATH"
19117 for ac_dir in $ac_dummy; do
19118   IFS=$ac_save_IFS
19119   test -z "$ac_dir" && ac_dir=.
19120   $as_executable_p "$ac_dir/$ac_word" || continue
19121 ac_cv_prog_M4_exists="yes"
19122 echo "$as_me:19122: found $ac_dir/$ac_word" >&5
19123 break
19124 done
19125
19126   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19127 fi
19128 fi
19129 M4_exists=$ac_cv_prog_M4_exists
19130 if test -n "$M4_exists"; then
19131   echo "$as_me:19131: result: $M4_exists" >&5
19132 echo "${ECHO_T}$M4_exists" >&6
19133 else
19134   echo "$as_me:19134: result: no" >&5
19135 echo "${ECHO_T}no" >&6
19136 fi
19137
19138    if test "$ac_cv_prog_M4_exists" = no; then
19139       cf_cv_prog_gnat_correct=no
19140       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19141    fi
19142    if test "$cf_cv_prog_gnat_correct" = yes; then
19143       echo "$as_me:19143: checking if GNAT works" >&5
19144 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19145
19146 rm -rf conftest* *~conftest*
19147 cat >>conftest.ads <<CF_EOF
19148 procedure conftest;
19149 CF_EOF
19150 cat >>conftest.adb <<CF_EOF
19151 with Text_IO;
19152 with GNAT.OS_Lib;
19153 procedure conftest is
19154 begin
19155    Text_IO.Put ("Hello World");
19156    Text_IO.New_Line;
19157    GNAT.OS_Lib.OS_Exit (0);
19158 end conftest;
19159 CF_EOF
19160 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19161    if ( ./conftest 1>&5 2>&1 ) ; then
19162       cf_cv_prog_gnat_correct=yes
19163    else
19164       cf_cv_prog_gnat_correct=no
19165    fi
19166 else
19167    cf_cv_prog_gnat_correct=no
19168 fi
19169 rm -rf conftest* *~conftest*
19170
19171       echo "$as_me:19171: result: $cf_cv_prog_gnat_correct" >&5
19172 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19173    fi
19174 fi
19175
19176                 if test "$cf_cv_prog_gnat_correct" = yes; then
19177
19178         ADAFLAGS="$ADAFLAGS -gnatpn"
19179
19180                         # make ADAFLAGS consistent with CFLAGS
19181                         case "$CFLAGS" in
19182                         *-g*)
19183
19184         ADAFLAGS="$ADAFLAGS -g"
19185
19186                                 ;;
19187                         esac
19188                         case "$CFLAGS" in
19189                         *-O*)
19190
19191         ADAFLAGS="$ADAFLAGS -O3"
19192
19193                                 ;;
19194                         esac
19195
19196 echo "$as_me:19196: checking if GNAT supports generics" >&5
19197 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19198 case $cf_gnat_version in #(vi
19199 3.[1-9]*|[4-9].*) #(vi
19200         cf_gnat_generics=yes
19201         ;;
19202 *)
19203         cf_gnat_generics=no
19204         ;;
19205 esac
19206 echo "$as_me:19206: result: $cf_gnat_generics" >&5
19207 echo "${ECHO_T}$cf_gnat_generics" >&6
19208
19209 if test "$cf_gnat_generics" = yes
19210 then
19211         cf_compile_generics=generics
19212         cf_generic_objects="\${GENOBJS}"
19213 else
19214         cf_compile_generics=
19215         cf_generic_objects=
19216 fi
19217
19218 echo "$as_me:19218: checking if GNAT supports SIGINT" >&5
19219 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19220 if test "${cf_cv_gnat_sigint+set}" = set; then
19221   echo $ECHO_N "(cached) $ECHO_C" >&6
19222 else
19223
19224 rm -rf conftest* *~conftest*
19225 cat >>conftest.ads <<CF_EOF
19226 with Ada.Interrupts.Names;
19227
19228 package ConfTest is
19229
19230    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19231    pragma Unreserve_All_Interrupts;
19232    pragma Warnings (On);
19233
19234    protected Process is
19235       procedure Stop;
19236       function Continue return Boolean;
19237       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19238    private
19239       Done : Boolean := False;
19240    end Process;
19241
19242 end ConfTest;
19243 CF_EOF
19244 cat >>conftest.adb <<CF_EOF
19245 package body ConfTest is
19246    protected body Process is
19247       procedure Stop is
19248       begin
19249          Done := True;
19250       end Stop;
19251       function Continue return Boolean is
19252       begin
19253          return not Done;
19254       end Continue;
19255    end Process;
19256 end ConfTest;
19257 CF_EOF
19258 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19259       cf_cv_gnat_sigint=yes
19260 else
19261    cf_cv_gnat_sigint=no
19262 fi
19263 rm -rf conftest* *~conftest*
19264
19265 fi
19266 echo "$as_me:19266: result: $cf_cv_gnat_sigint" >&5
19267 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19268
19269 if test $cf_cv_gnat_sigint = yes ; then
19270         USE_GNAT_SIGINT=""
19271 else
19272         USE_GNAT_SIGINT="#"
19273 fi
19274
19275 echo "$as_me:19275: checking if GNAT pragma Unreferenced works" >&5
19276 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19277 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19278   echo $ECHO_N "(cached) $ECHO_C" >&6
19279 else
19280
19281 rm -rf conftest* *~conftest*
19282 cat >>conftest.ads <<CF_EOF
19283 procedure conftest;
19284 CF_EOF
19285 cat >>conftest.adb <<CF_EOF
19286 with Text_IO;
19287 with GNAT.OS_Lib;
19288 procedure conftest is
19289    test : Integer;
19290    pragma Unreferenced (test);
19291 begin
19292    test := 1;
19293    Text_IO.Put ("Hello World");
19294    Text_IO.New_Line;
19295    GNAT.OS_Lib.OS_Exit (0);
19296 end conftest;
19297 CF_EOF
19298 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19299       cf_cv_pragma_unreferenced=yes
19300 else
19301    cf_cv_pragma_unreferenced=no
19302 fi
19303 rm -rf conftest* *~conftest*
19304
19305 fi
19306 echo "$as_me:19306: result: $cf_cv_pragma_unreferenced" >&5
19307 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19308
19309 # if the pragma is supported, use it (needed in the Trace code).
19310 if test $cf_cv_pragma_unreferenced = yes ; then
19311         PRAGMA_UNREF=TRUE
19312 else
19313         PRAGMA_UNREF=FALSE
19314 fi
19315
19316 cf_gnat_libraries=no
19317 cf_gnat_projects=no
19318
19319 echo "$as_me:19319: checking if GNAT supports project files" >&5
19320 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19321 case $cf_gnat_version in #(vi
19322 3.[0-9]*) #(vi
19323         ;;
19324 *)
19325         case $cf_cv_system_name in #(vi
19326         cygwin*) #(vi
19327                 ;;
19328         *)
19329                 mkdir conftest.src conftest.bin conftest.lib
19330                 cd conftest.src
19331                 rm -rf conftest* *~conftest*
19332                 cat >>library.gpr <<CF_EOF
19333 project Library is
19334   Kind := External ("LIB_KIND");
19335   for Library_Name use "ConfTest";
19336   for Object_Dir use ".";
19337   for Library_ALI_Dir use External("LIBRARY_DIR");
19338   for Library_Version use External ("SONAME");
19339   for Library_Kind use Kind;
19340   for Library_Dir use External("BUILD_DIR");
19341   Source_Dir := External ("SOURCE_DIR");
19342   for Source_Dirs use (Source_Dir);
19343   package Compiler is
19344      for Default_Switches ("Ada") use
19345        ("-g",
19346         "-O2",
19347         "-gnatafno",
19348         "-gnatVa",   -- All validity checks
19349         "-gnatwa");  -- Activate all optional errors
19350   end Compiler;
19351 end Library;
19352 CF_EOF
19353                 cat >>confpackage.ads <<CF_EOF
19354 package ConfPackage is
19355    procedure conftest;
19356 end ConfPackage;
19357 CF_EOF
19358                 cat >>confpackage.adb <<CF_EOF
19359 with Text_IO;
19360 package body ConfPackage is
19361    procedure conftest is
19362    begin
19363       Text_IO.Put ("Hello World");
19364       Text_IO.New_Line;
19365    end conftest;
19366 end ConfPackage;
19367 CF_EOF
19368                 if ( $cf_ada_make $ADAFLAGS \
19369                                 -Plibrary.gpr \
19370                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19371                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19372                                 -XSOURCE_DIR=`pwd` \
19373                                 -XSONAME=libConfTest.so.1 \
19374                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19375                         cf_gnat_projects=yes
19376                 fi
19377                 cd ..
19378                 if test -f conftest.lib/confpackage.ali
19379                 then
19380                         cf_gnat_libraries=yes
19381                 fi
19382                 rm -rf conftest* *~conftest*
19383                 ;;
19384         esac
19385         ;;
19386 esac
19387 echo "$as_me:19387: result: $cf_gnat_projects" >&5
19388 echo "${ECHO_T}$cf_gnat_projects" >&6
19389
19390 if test $cf_gnat_projects = yes
19391 then
19392         echo "$as_me:19392: checking if GNAT supports libraries" >&5
19393 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19394         echo "$as_me:19394: result: $cf_gnat_libraries" >&5
19395 echo "${ECHO_T}$cf_gnat_libraries" >&6
19396 fi
19397
19398 if test "$cf_gnat_projects" = yes
19399 then
19400         USE_OLD_MAKERULES="#"
19401         USE_GNAT_PROJECTS=""
19402 else
19403         USE_OLD_MAKERULES=""
19404         USE_GNAT_PROJECTS="#"
19405 fi
19406
19407 if test "$cf_gnat_libraries" = yes
19408 then
19409         USE_GNAT_LIBRARIES=""
19410 else
19411         USE_GNAT_LIBRARIES="#"
19412 fi
19413
19414 echo "$as_me:19414: checking for ada-compiler" >&5
19415 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19416
19417 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19418 if test "${with_ada_compiler+set}" = set; then
19419   withval="$with_ada_compiler"
19420   cf_ada_compiler=$withval
19421 else
19422   cf_ada_compiler=gnatmake
19423 fi;
19424
19425 echo "$as_me:19425: result: $cf_ada_compiler" >&5
19426 echo "${ECHO_T}$cf_ada_compiler" >&6
19427
19428                         cf_ada_package=terminal_interface
19429
19430 echo "$as_me:19430: checking for ada-include" >&5
19431 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19432
19433 # Check whether --with-ada-include or --without-ada-include was given.
19434 if test "${with_ada_include+set}" = set; then
19435   withval="$with_ada_include"
19436
19437 else
19438   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19439 fi; if test -n "$prefix/share/ada/adainclude" ; then
19440
19441 if test "x$prefix" != xNONE; then
19442   cf_path_syntax="$prefix"
19443 else
19444   cf_path_syntax="$ac_default_prefix"
19445 fi
19446
19447 case ".$withval" in #(vi
19448 .\$\(*\)*|.\'*\'*) #(vi
19449   ;;
19450 ..|./*|.\\*) #(vi
19451   ;;
19452 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19453   ;;
19454 .\${*prefix}*) #(vi
19455   eval withval="$withval"
19456   case ".$withval" in #(vi
19457   .NONE/*)
19458     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19459     ;;
19460   esac
19461   ;; #(vi
19462 .no|.NONE/*)
19463   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19464   ;;
19465 *)
19466   { { echo "$as_me:19466: error: expected a pathname, not \"$withval\"" >&5
19467 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19468    { (exit 1); exit 1; }; }
19469   ;;
19470 esac
19471
19472 fi
19473 ADA_INCLUDE="$withval"
19474
19475 echo "$as_me:19475: result: $ADA_INCLUDE" >&5
19476 echo "${ECHO_T}$ADA_INCLUDE" >&6
19477
19478 echo "$as_me:19478: checking for ada-objects" >&5
19479 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19480
19481 # Check whether --with-ada-objects or --without-ada-objects was given.
19482 if test "${with_ada_objects+set}" = set; then
19483   withval="$with_ada_objects"
19484
19485 else
19486   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19487 fi; if test -n "$prefix/lib/ada/adalib" ; then
19488
19489 if test "x$prefix" != xNONE; then
19490   cf_path_syntax="$prefix"
19491 else
19492   cf_path_syntax="$ac_default_prefix"
19493 fi
19494
19495 case ".$withval" in #(vi
19496 .\$\(*\)*|.\'*\'*) #(vi
19497   ;;
19498 ..|./*|.\\*) #(vi
19499   ;;
19500 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19501   ;;
19502 .\${*prefix}*) #(vi
19503   eval withval="$withval"
19504   case ".$withval" in #(vi
19505   .NONE/*)
19506     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19507     ;;
19508   esac
19509   ;; #(vi
19510 .no|.NONE/*)
19511   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19512   ;;
19513 *)
19514   { { echo "$as_me:19514: error: expected a pathname, not \"$withval\"" >&5
19515 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19516    { (exit 1); exit 1; }; }
19517   ;;
19518 esac
19519
19520 fi
19521 ADA_OBJECTS="$withval"
19522
19523 echo "$as_me:19523: result: $ADA_OBJECTS" >&5
19524 echo "${ECHO_T}$ADA_OBJECTS" >&6
19525
19526 echo "$as_me:19526: checking if an Ada95 shared-library should be built" >&5
19527 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19528
19529 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19530 if test "${with_ada_sharedlib+set}" = set; then
19531   withval="$with_ada_sharedlib"
19532   with_ada_sharedlib=$withval
19533 else
19534   with_ada_sharedlib=no
19535 fi;
19536 echo "$as_me:19536: result: $with_ada_sharedlib" >&5
19537 echo "${ECHO_T}$with_ada_sharedlib" >&6
19538
19539 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19540 MAKE_ADA_SHAREDLIB="#"
19541
19542 if test "x$with_ada_sharedlib" != xno
19543 then
19544         MAKE_ADA_SHAREDLIB=
19545         if test "x$with_ada_sharedlib" != xyes
19546         then
19547                 ADA_SHAREDLIB="$with_ada_sharedlib"
19548         fi
19549 fi
19550
19551                 fi
19552         fi
19553 else
19554         cf_with_ada=no
19555 fi
19556
19557 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19558 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19559 ###
19560 ### ticlib modules may be a separate library, otherwise contained in termlib.
19561 ### termlib modules may be a separate library, otherwise contained in ncurses.
19562 ###
19563 ### The of "+" or " " between the tokens controls the way the script
19564 ### chooses to split module lists into libraries.
19565 ###
19566 ### (see CF_LIB_RULES).
19567 echo "$as_me:19567: checking for library subsets" >&5
19568 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19569 LIB_SUBSETS=
19570
19571 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19572         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19573         if test "$with_ticlib" != no ; then
19574                 LIB_SUBSETS="${LIB_SUBSETS} "
19575         else
19576                 LIB_SUBSETS="${LIB_SUBSETS}+"
19577         fi
19578 fi
19579
19580 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19581 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19582
19583 if test "$with_termlib" != no ; then
19584         LIB_SUBSETS="${LIB_SUBSETS} "
19585 else
19586         LIB_SUBSETS="${LIB_SUBSETS}+"
19587 fi
19588
19589 LIB_SUBSETS="${LIB_SUBSETS}base"
19590
19591 # Most term-driver calls are to tinfo, but some like init_pair are to the
19592 # base library (so it resides in base).
19593 if test "$with_term_driver" != no ; then
19594         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19595         case $cf_cv_system_name in #(vi
19596         *mingw32*) #(vi
19597                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19598                 ;;
19599         *) #(vi
19600                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19601                 ;;
19602         esac
19603 fi
19604
19605 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19606 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19607
19608 echo "$as_me:19608: result: $LIB_SUBSETS" >&5
19609 echo "${ECHO_T}$LIB_SUBSETS" >&6
19610
19611 ### Construct the list of include-directories to be generated
19612
19613 CPPFLAGS="$CPPFLAGS -I. -I../include"
19614 if test "$srcdir" != "."; then
19615         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19616 fi
19617 if test "$GCC" != yes; then
19618         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19619 elif test "$includedir" != "/usr/include"; then
19620         if test "$includedir" = '${prefix}/include' ; then
19621                 if test $prefix != /usr ; then
19622                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19623                 fi
19624         else
19625                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19626         fi
19627 fi
19628
19629 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19630 if test "$srcdir" != "."; then
19631         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19632 fi
19633 if test "$GCC" != yes; then
19634         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19635 elif test "$includedir" != "/usr/include"; then
19636         if test "$includedir" = '${prefix}/include' ; then
19637                 if test $prefix != /usr ; then
19638                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19639                 fi
19640         else
19641                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19642         fi
19643 fi
19644
19645 ### Build up pieces for makefile rules
19646 echo "$as_me:19646: checking default library suffix" >&5
19647 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19648
19649         case $DFT_LWR_MODEL in
19650         libtool) DFT_ARG_SUFFIX=''   ;;
19651         normal)  DFT_ARG_SUFFIX=''   ;;
19652         debug)   DFT_ARG_SUFFIX='_g' ;;
19653         profile) DFT_ARG_SUFFIX='_p' ;;
19654         shared)  DFT_ARG_SUFFIX=''   ;;
19655         esac
19656         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19657 echo "$as_me:19657: result: $DFT_ARG_SUFFIX" >&5
19658 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19659
19660 echo "$as_me:19660: checking default library-dependency suffix" >&5
19661 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19662
19663         case $DFT_LWR_MODEL in #(vi
19664         libtool) #(vi
19665                 DFT_LIB_SUFFIX='.la'
19666                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19667                 ;;
19668         normal) #(vi
19669                 DFT_LIB_SUFFIX='.a'
19670                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19671                 ;;
19672         debug) #(vi
19673                 DFT_LIB_SUFFIX='_g.a'
19674                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19675                 ;;
19676         profile) #(vi
19677                 DFT_LIB_SUFFIX='_p.a'
19678                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19679                 ;;
19680         shared) #(vi
19681                 case $cf_cv_system_name in
19682                 aix[5-7]*) #(vi
19683                         DFT_LIB_SUFFIX='.a'
19684                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19685                         ;;
19686                 cygwin*) #(vi
19687                         DFT_LIB_SUFFIX='.dll'
19688                         DFT_DEP_SUFFIX='.dll.a'
19689                         ;;
19690                 darwin*) #(vi
19691                         DFT_LIB_SUFFIX='.dylib'
19692                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19693                         ;;
19694                 hpux*) #(vi
19695                         case $target in
19696                         ia64*) #(vi
19697                                 DFT_LIB_SUFFIX='.so'
19698                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19699                                 ;;
19700                         *) #(vi
19701                                 DFT_LIB_SUFFIX='.sl'
19702                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19703                                 ;;
19704                         esac
19705                         ;;
19706                 *)      DFT_LIB_SUFFIX='.so'
19707                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19708                         ;;
19709                 esac
19710         esac
19711         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19712         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19713 echo "$as_me:19713: result: $DFT_DEP_SUFFIX" >&5
19714 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19715
19716 echo "$as_me:19716: checking default object directory" >&5
19717 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19718
19719         case $DFT_LWR_MODEL in
19720         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19721         normal)  DFT_OBJ_SUBDIR='objects' ;;
19722         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19723         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19724         shared)
19725                 case $cf_cv_system_name in #(vi
19726                 cygwin) #(vi
19727                         DFT_OBJ_SUBDIR='objects' ;;
19728                 *)
19729                         DFT_OBJ_SUBDIR='obj_s' ;;
19730                 esac
19731         esac
19732 echo "$as_me:19732: result: $DFT_OBJ_SUBDIR" >&5
19733 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19734
19735 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19736 if test "$cf_with_cxx" = yes ; then
19737 echo "$as_me:19737: checking c++ library-dependency suffix" >&5
19738 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19739 if test "$with_libtool" != "no"; then
19740         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19741 else
19742
19743         case normal in #(vi
19744         libtool) #(vi
19745                 CXX_LIB_SUFFIX='.la'
19746                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19747                 ;;
19748         normal) #(vi
19749                 CXX_LIB_SUFFIX='.a'
19750                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19751                 ;;
19752         debug) #(vi
19753                 CXX_LIB_SUFFIX='_g.a'
19754                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19755                 ;;
19756         profile) #(vi
19757                 CXX_LIB_SUFFIX='_p.a'
19758                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19759                 ;;
19760         shared) #(vi
19761                 case $cf_cv_system_name in
19762                 aix[5-7]*) #(vi
19763                         CXX_LIB_SUFFIX='.a'
19764                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19765                         ;;
19766                 cygwin*) #(vi
19767                         CXX_LIB_SUFFIX='.dll'
19768                         CXX_DEP_SUFFIX='.dll.a'
19769                         ;;
19770                 darwin*) #(vi
19771                         CXX_LIB_SUFFIX='.dylib'
19772                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19773                         ;;
19774                 hpux*) #(vi
19775                         case $target in
19776                         ia64*) #(vi
19777                                 CXX_LIB_SUFFIX='.so'
19778                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19779                                 ;;
19780                         *) #(vi
19781                                 CXX_LIB_SUFFIX='.sl'
19782                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19783                                 ;;
19784                         esac
19785                         ;;
19786                 *)      CXX_LIB_SUFFIX='.so'
19787                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19788                         ;;
19789                 esac
19790         esac
19791         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19792         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19793 fi
19794 echo "$as_me:19794: result: $CXX_LIB_SUFFIX" >&5
19795 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19796
19797 fi
19798
19799 # do not want -ldl in build except as needed for -lncurses dependency
19800 if test "$with_dlsym" = yes ; then
19801 if test $DFT_LWR_MODEL = shared || \
19802    test $DFT_LWR_MODEL = libtool ; then
19803
19804 # remove dl library from $LIBS
19805 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19806
19807 fi
19808 fi
19809 ### Set up low-level terminfo dependencies for makefiles.
19810
19811 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19812 # do not need libdl
19813 TICS_LIST=
19814 if test "$with_dlsym" = yes ; then
19815
19816 # remove dl library from $SHLIB_LIST
19817 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19818
19819 fi
19820
19821 if test "$with_ticlib" != no ; then
19822
19823         if test "$with_ticlib" != yes ; then
19824                 TICS_NAME=$with_ticlib
19825                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19826                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19827                 TICS_LIB_SUFFIX="${with_ticlib}"
19828         else
19829                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19830                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19831                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19832         fi
19833         TICS_LDFLAGS="-L${LIB_DIR}"
19834         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19835 else
19836         TICS_LDFLAGS="-L${LIB_DIR}"
19837         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19838 fi
19839
19840 if test "$with_termlib" != no ; then
19841
19842         if test "$with_termlib" != yes ; then
19843                 TINFO_NAME=$with_termlib
19844                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19845                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19846                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19847                 TINFO_LIB_SUFFIX="${with_termlib}"
19848         else
19849                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19850                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19851                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19852                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19853         fi
19854
19855         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19856         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19857         if test "$DFT_LWR_MODEL" = "libtool"; then
19858                 TEST_ARGS="${TEST_DEPS}"
19859                 TEST_ARG2="${TEST_DEP2}"
19860                 TINFO_LDFLAGS="-L${LIB_DIR}"
19861                 TINFO_LIBS="$TEST_ARGS"
19862                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19863                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19864         else
19865                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19866                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19867                 if test "x$with_term_driver" != xno ; then
19868                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19869                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19870                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19871                 else
19872                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19873                         TINFO_LIBS="$TEST_ARGS"
19874                 fi
19875                 TINFO_LDFLAGS="-L${LIB_DIR}"
19876                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19877         fi
19878 else
19879         # the next lines are needed for linking libtic over libncurses
19880         TINFO_NAME=${LIB_NAME}
19881         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19882         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19883         if test "$with_tic_depends" = yes ; then
19884                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19885         else
19886                 TICS_LIST="$SHLIB_LIST"
19887         fi
19888
19889         TINFO_LDFLAGS="-L${LIB_DIR}"
19890         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19891 fi
19892
19893 if test "$DFT_LWR_MODEL" = shared ; then
19894         case $cf_cv_system_name in #(vi
19895         cygwin*)
19896                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19897                 TINFO_SUFFIX=.dll
19898                 ;;
19899         esac
19900 fi
19901
19902 if test "$with_dlsym" = yes ; then
19903
19904 # remove dl library from $TICS_LIST
19905 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19906
19907 fi
19908
19909 if test "$DFT_LWR_MODEL" = "libtool"; then
19910     OBJEXT=lo
19911 fi
19912
19913 # needed for Ada95
19914 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19915
19916 case $DFT_LWR_MODEL in
19917 normal|debug|profile)
19918
19919 if test "$GCC" = yes ; then
19920         case $cf_cv_system_name in #(
19921         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19922                 LDFLAGS_STATIC=
19923                 LDFLAGS_SHARED=
19924                 ;;
19925     *)  #( normally, except when broken
19926         LDFLAGS_STATIC=-static
19927         LDFLAGS_SHARED=-dynamic
19928         ;;
19929     esac
19930 else
19931         case $cf_cv_system_name in #(
19932         aix[4-7]*)      #( from ld manpage
19933                 LDFLAGS_STATIC=-bstatic
19934                 LDFLAGS_SHARED=-bdynamic
19935                 ;;
19936         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19937                 # We could also use just "archive" and "shared".
19938                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19939                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19940                 ;;
19941         irix*)          #( from ld manpage IRIX64
19942                 LDFLAGS_STATIC=-Bstatic
19943                 LDFLAGS_SHARED=-Bdynamic
19944                 ;;
19945         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19946                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19947                 LDFLAGS_STATIC=-noso
19948                 LDFLAGS_SHARED=-so_archive
19949                 ;;
19950         solaris2*)
19951                 LDFLAGS_STATIC=-Bstatic
19952                 LDFLAGS_SHARED=-Bdynamic
19953                 ;;
19954         esac
19955 fi
19956
19957 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19958 then
19959         echo "$as_me:19959: checking if linker supports switching between static/dynamic" >&5
19960 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19961
19962         rm -f libconftest.a
19963         cat >conftest.$ac_ext <<EOF
19964 #line 19964 "configure"
19965 #include <stdio.h>
19966 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19967 EOF
19968         if { (eval echo "$as_me:19968: \"$ac_compile\"") >&5
19969   (eval $ac_compile) 2>&5
19970   ac_status=$?
19971   echo "$as_me:19971: \$? = $ac_status" >&5
19972   (exit $ac_status); } ; then
19973                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19974                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19975         fi
19976         rm -f conftest.*
19977
19978         cf_save_LIBS="$LIBS"
19979
19980         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19981         cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984
19985 #line 19985 "configure"
19986 #include <stdio.h>
19987 int cf_ldflags_static(FILE *fp);
19988
19989 int
19990 main ()
19991 {
19992
19993         return cf_ldflags_static(stdin);
19994
19995   ;
19996   return 0;
19997 }
19998 _ACEOF
19999 rm -f conftest.$ac_objext conftest$ac_exeext
20000 if { (eval echo "$as_me:20000: \"$ac_link\"") >&5
20001   (eval $ac_link) 2>&5
20002   ac_status=$?
20003   echo "$as_me:20003: \$? = $ac_status" >&5
20004   (exit $ac_status); } &&
20005          { ac_try='test -s conftest$ac_exeext'
20006   { (eval echo "$as_me:20006: \"$ac_try\"") >&5
20007   (eval $ac_try) 2>&5
20008   ac_status=$?
20009   echo "$as_me:20009: \$? = $ac_status" >&5
20010   (exit $ac_status); }; }; then
20011
20012         # some linkers simply ignore the -dynamic
20013         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20014         *static*) # (vi
20015                 cf_ldflags_static=no
20016                 ;;
20017         *)
20018                 cf_ldflags_static=yes
20019                 ;;
20020         esac
20021
20022 else
20023   echo "$as_me: failed program was:" >&5
20024 cat conftest.$ac_ext >&5
20025 cf_ldflags_static=no
20026 fi
20027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20028
20029         rm -f libconftest.*
20030         LIBS="$cf_save_LIBS"
20031
20032         echo "$as_me:20032: result: $cf_ldflags_static" >&5
20033 echo "${ECHO_T}$cf_ldflags_static" >&6
20034
20035         if test $cf_ldflags_static != yes
20036         then
20037                 LDFLAGS_STATIC=
20038                 LDFLAGS_SHARED=
20039         fi
20040 else
20041         LDFLAGS_STATIC=
20042         LDFLAGS_SHARED=
20043 fi
20044
20045         ;;
20046 esac
20047
20048 echo "$as_me:20048: checking where we will install curses.h" >&5
20049 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20050 test "$with_overwrite" = no && \
20051 test "x$includedir" = 'x${prefix}/include' && \
20052         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20053 echo "$as_me:20053: result: $includedir" >&5
20054 echo "${ECHO_T}$includedir" >&6
20055
20056 ### Resolve a conflict between normal and wide-curses by forcing applications
20057 ### that will need libutf8 to add it to their configure script.
20058 if test "$with_overwrite" != no ; then
20059 if test "$NCURSES_LIBUTF8" = 1 ; then
20060         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20061         { echo "$as_me:20061: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20062 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20063 fi
20064 fi
20065 WITH_OVERWRITE=$with_overwrite
20066
20067 # used to separate tack out of the tree
20068 NCURSES_TREE=
20069
20070 ### predefined stuff for the test programs
20071 cat >>confdefs.h <<\EOF
20072 #define HAVE_SLK_COLOR 1
20073 EOF
20074
20075 ### Construct the list of subdirectories for which we'll customize makefiles
20076 ### with the appropriate compile-rules.
20077
20078 echo "$as_me:20078: checking for src modules" >&5
20079 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20080
20081 # dependencies and linker-arguments for test-programs
20082 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20083 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20084 if test "$DFT_LWR_MODEL" = "libtool"; then
20085         TEST_ARGS="${TEST_DEPS}"
20086         TEST_ARG2="${TEST_DEP2}"
20087 else
20088         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20089         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20090 fi
20091
20092 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20093 cf_cv_src_modules=
20094 for cf_dir in $modules_to_build
20095 do
20096         if test -f $srcdir/$cf_dir/modules; then
20097
20098                 # We may/may not have tack in the distribution, though the
20099                 # makefile is.
20100                 if test $cf_dir = tack ; then
20101                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20102                                 continue
20103                         fi
20104                 fi
20105
20106                 if test -z "$cf_cv_src_modules"; then
20107                         cf_cv_src_modules=$cf_dir
20108                 else
20109                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20110                 fi
20111
20112                 # Make the ncurses_cfg.h file record the library interface files as
20113                 # well.  These are header files that are the same name as their
20114                 # directory.  Ncurses is the only library that does not follow
20115                 # that pattern.
20116                 if test $cf_dir = tack ; then
20117                         continue
20118                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20119
20120 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20121
20122                         cat >>confdefs.h <<EOF
20123 #define HAVE_${cf_have_include}_H 1
20124 EOF
20125
20126                         cat >>confdefs.h <<EOF
20127 #define HAVE_LIB${cf_have_include} 1
20128 EOF
20129
20130                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20131                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20132                         if test "$DFT_LWR_MODEL" = "libtool"; then
20133                                 TEST_ARGS="${TEST_DEPS}"
20134                                 TEST_ARG2="${TEST_DEP2}"
20135                         else
20136                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20137                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20138                         fi
20139                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20140                 fi
20141         fi
20142 done
20143 echo "$as_me:20143: result: $cf_cv_src_modules" >&5
20144 echo "${ECHO_T}$cf_cv_src_modules" >&6
20145
20146 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20147 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20148
20149 SRC_SUBDIRS=
20150 if test "x$cf_with_manpages" != xno ; then
20151         SRC_SUBDIRS="$SRC_SUBDIRS man"
20152 fi
20153 SRC_SUBDIRS="$SRC_SUBDIRS include"
20154 for cf_dir in $cf_cv_src_modules
20155 do
20156         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20157 done
20158 if test "x$cf_with_tests" != "xno" ; then
20159         SRC_SUBDIRS="$SRC_SUBDIRS test"
20160 fi
20161 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20162 if test "$cf_with_cxx_binding" != no; then
20163         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20164         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20165 fi
20166
20167 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20168 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20169
20170 ADA_SUBDIRS=
20171 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20172         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20173         ADA_SUBDIRS="gen src"
20174         if test "x$cf_with_tests" != "xno" ; then
20175                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20176         fi
20177 fi
20178
20179 SUB_MAKEFILES=
20180 for cf_dir in $SRC_SUBDIRS
20181 do
20182         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20183 done
20184
20185 if test -n "$ADA_SUBDIRS"; then
20186         for cf_dir in $ADA_SUBDIRS
20187         do
20188                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20189         done
20190
20191 fi
20192
20193 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20194    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20195    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20196 fi
20197
20198 DIRS_TO_MAKE="lib"
20199 for cf_item in $cf_list_models
20200 do
20201
20202         case $cf_item in
20203         libtool) cf_subdir='obj_lo'  ;;
20204         normal)  cf_subdir='objects' ;;
20205         debug)   cf_subdir='obj_g' ;;
20206         profile) cf_subdir='obj_p' ;;
20207         shared)
20208                 case $cf_cv_system_name in #(vi
20209                 cygwin) #(vi
20210                         cf_subdir='objects' ;;
20211                 *)
20212                         cf_subdir='obj_s' ;;
20213                 esac
20214         esac
20215
20216         for cf_item2 in $DIRS_TO_MAKE
20217         do
20218                 test $cf_item2 = $cf_subdir && break
20219         done
20220         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20221 done
20222 for cf_dir in $DIRS_TO_MAKE
20223 do
20224         test ! -d $cf_dir && mkdir $cf_dir
20225 done
20226
20227 # symbols that differ when compiling Ada95 by itself.
20228 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20229
20230 # values to use as strings
20231 cat >>confdefs.h <<EOF
20232 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20233 EOF
20234
20235 cat >>confdefs.h <<EOF
20236 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20237 EOF
20238
20239 ### Now that we're done running tests, add the compiler-warnings, if any
20240
20241 cf_fix_cppflags=no
20242 cf_new_cflags=
20243 cf_new_cppflags=
20244 cf_new_extra_cppflags=
20245
20246 for cf_add_cflags in $EXTRA_CFLAGS
20247 do
20248 case $cf_fix_cppflags in
20249 no)
20250         case $cf_add_cflags in #(vi
20251         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20252                 case $cf_add_cflags in
20253                 -D*)
20254                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20255
20256                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20257                                 && test -z "${cf_tst_cflags}" \
20258                                 && cf_fix_cppflags=yes
20259
20260                         if test $cf_fix_cppflags = yes ; then
20261                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20262                                 continue
20263                         elif test "${cf_tst_cflags}" = "\"'" ; then
20264                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20265                                 continue
20266                         fi
20267                         ;;
20268                 esac
20269                 case "$CPPFLAGS" in
20270                 *$cf_add_cflags) #(vi
20271                         ;;
20272                 *) #(vi
20273                         case $cf_add_cflags in #(vi
20274                         -D*)
20275                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20276
20277 CPPFLAGS=`echo "$CPPFLAGS" | \
20278         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20279                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20280
20281                                 ;;
20282                         esac
20283                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20284                         ;;
20285                 esac
20286                 ;;
20287         *)
20288                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20289                 ;;
20290         esac
20291         ;;
20292 yes)
20293         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20294
20295         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20296
20297         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20298                 && test -z "${cf_tst_cflags}" \
20299                 && cf_fix_cppflags=no
20300         ;;
20301 esac
20302 done
20303
20304 if test -n "$cf_new_cflags" ; then
20305
20306         CFLAGS="$CFLAGS $cf_new_cflags"
20307 fi
20308
20309 if test -n "$cf_new_cppflags" ; then
20310
20311         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20312 fi
20313
20314 if test -n "$cf_new_extra_cppflags" ; then
20315
20316         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20317 fi
20318
20319 ### Define substitutions for header files to avoid name-pollution
20320
20321 if test "$cf_cv_have_tcgetattr" = yes ; then
20322         HAVE_TCGETATTR=1
20323 else
20324         HAVE_TCGETATTR=0
20325 fi
20326
20327 if test "$ac_cv_header_termio_h" = yes ; then
20328         HAVE_TERMIO_H=1
20329 else
20330         HAVE_TERMIO_H=0
20331 fi
20332
20333 if test "$ac_cv_header_termios_h" = yes ; then
20334         HAVE_TERMIOS_H=1
20335 else
20336         HAVE_TERMIOS_H=0
20337 fi
20338
20339 ################################################################################
20340 test "$use_database" = yes && \
20341 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20342
20343 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20344 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20345
20346 if test x"$enable_pc_files" = xyes ; then \
20347 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20348 MAKE_PC_FILES=
20349 else
20350 MAKE_PC_FILES="#"
20351 fi
20352
20353 # Extract the first word of "tic", so it can be a program name with args.
20354 set dummy tic; ac_word=$2
20355 echo "$as_me:20355: checking for $ac_word" >&5
20356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20357 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20358   echo $ECHO_N "(cached) $ECHO_C" >&6
20359 else
20360   case $TIC_PATH in
20361   [\\/]* | ?:[\\/]*)
20362   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20363   ;;
20364   *)
20365   ac_save_IFS=$IFS; IFS=$ac_path_separator
20366 ac_dummy="$PATH:/usr/local/ncurses/bin"
20367 for ac_dir in $ac_dummy; do
20368   IFS=$ac_save_IFS
20369   test -z "$ac_dir" && ac_dir=.
20370   if $as_executable_p "$ac_dir/$ac_word"; then
20371    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20372    echo "$as_me:20372: found $ac_dir/$ac_word" >&5
20373    break
20374 fi
20375 done
20376
20377   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20378   ;;
20379 esac
20380 fi
20381 TIC_PATH=$ac_cv_path_TIC_PATH
20382
20383 if test -n "$TIC_PATH"; then
20384   echo "$as_me:20384: result: $TIC_PATH" >&5
20385 echo "${ECHO_T}$TIC_PATH" >&6
20386 else
20387   echo "$as_me:20387: result: no" >&5
20388 echo "${ECHO_T}no" >&6
20389 fi
20390
20391 if test -n "$FALLBACK_LIST"
20392 then
20393         if test "$TIC_PATH" = unknown
20394         then
20395                 { echo "$as_me:20395: WARNING: no tic program found for fallbacks" >&5
20396 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20397         fi
20398 fi
20399
20400 if test "x$cf_with_tests" != xno ; then
20401         MAKE_TESTS=
20402 else
20403         MAKE_TESTS="#"
20404 fi
20405
20406 ADAHTML_DIR=../../doc/html/ada
20407
20408 SUB_SCRIPTS=
20409
20410 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"
20411 ac_config_commands="$ac_config_commands default"
20412 cat >confcache <<\_ACEOF
20413 # This file is a shell script that caches the results of configure
20414 # tests run on this system so they can be shared between configure
20415 # scripts and configure runs, see configure's option --config-cache.
20416 # It is not useful on other systems.  If it contains results you don't
20417 # want to keep, you may remove or edit it.
20418 #
20419 # config.status only pays attention to the cache file if you give it
20420 # the --recheck option to rerun configure.
20421 #
20422 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20423 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20424 # following values.
20425
20426 _ACEOF
20427
20428 # The following way of writing the cache mishandles newlines in values,
20429 # but we know of no workaround that is simple, portable, and efficient.
20430 # So, don't put newlines in cache variables' values.
20431 # Ultrix sh set writes to stderr and can't be redirected directly,
20432 # and sets the high bit in the cache file unless we assign to the vars.
20433 {
20434   (set) 2>&1 |
20435     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20436     *ac_space=\ *)
20437       # `set' does not quote correctly, so add quotes (double-quote
20438       # substitution turns \\\\ into \\, and sed turns \\ into \).
20439       sed -n \
20440         "s/'/'\\\\''/g;
20441           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20442       ;;
20443     *)
20444       # `set' quotes correctly as required by POSIX, so do not add quotes.
20445       sed -n \
20446         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20447       ;;
20448     esac;
20449 } |
20450   sed '
20451      t clear
20452      : clear
20453      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20454      t end
20455      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20456      : end' >>confcache
20457 if cmp -s $cache_file confcache; then :; else
20458   if test -w $cache_file; then
20459     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20460     cat confcache >$cache_file
20461   else
20462     echo "not updating unwritable cache $cache_file"
20463   fi
20464 fi
20465 rm -f confcache
20466
20467 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20468 # Let make expand exec_prefix.
20469 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20470
20471 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20472 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20473 # trailing colons and then remove the whole line if VPATH becomes empty
20474 # (actually we leave an empty line to preserve line numbers).
20475 if test "x$srcdir" = x.; then
20476   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20477 s/:*\$(srcdir):*/:/;
20478 s/:*\${srcdir}:*/:/;
20479 s/:*@srcdir@:*/:/;
20480 s/^\([^=]*=[    ]*\):*/\1/;
20481 s/:*$//;
20482 s/^[^=]*=[      ]*$//;
20483 }'
20484 fi
20485
20486 DEFS=-DHAVE_CONFIG_H
20487
20488 : ${CONFIG_STATUS=./config.status}
20489 ac_clean_files_save=$ac_clean_files
20490 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20491 { echo "$as_me:20491: creating $CONFIG_STATUS" >&5
20492 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20493 cat >$CONFIG_STATUS <<_ACEOF
20494 #! $SHELL
20495 # Generated automatically by configure.
20496 # Run this file to recreate the current configuration.
20497 # Compiler output produced by configure, useful for debugging
20498 # configure, is in config.log if it exists.
20499
20500 debug=false
20501 SHELL=\${CONFIG_SHELL-$SHELL}
20502 ac_cs_invocation="\$0 \$@"
20503
20504 _ACEOF
20505
20506 cat >>$CONFIG_STATUS <<\_ACEOF
20507 # Be Bourne compatible
20508 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20509   emulate sh
20510   NULLCMD=:
20511 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20512   set -o posix
20513 fi
20514
20515 # Name of the executable.
20516 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20517
20518 if expr a : '\(a\)' >/dev/null 2>&1; then
20519   as_expr=expr
20520 else
20521   as_expr=false
20522 fi
20523
20524 rm -f conf$$ conf$$.exe conf$$.file
20525 echo >conf$$.file
20526 if ln -s conf$$.file conf$$ 2>/dev/null; then
20527   # We could just check for DJGPP; but this test a) works b) is more generic
20528   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20529   if test -f conf$$.exe; then
20530     # Don't use ln at all; we don't have any links
20531     as_ln_s='cp -p'
20532   else
20533     as_ln_s='ln -s'
20534   fi
20535 elif ln conf$$.file conf$$ 2>/dev/null; then
20536   as_ln_s=ln
20537 else
20538   as_ln_s='cp -p'
20539 fi
20540 rm -f conf$$ conf$$.exe conf$$.file
20541
20542 as_executable_p="test -f"
20543
20544 # Support unset when possible.
20545 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20546   as_unset=unset
20547 else
20548   as_unset=false
20549 fi
20550
20551 # NLS nuisances.
20552 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20553 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20554 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20555 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20556 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20557 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20558 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20559 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20560
20561 # IFS
20562 # We need space, tab and new line, in precisely that order.
20563 as_nl='
20564 '
20565 IFS="   $as_nl"
20566
20567 # CDPATH.
20568 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20569
20570 exec 6>&1
20571
20572 _ACEOF
20573
20574 # Files that config.status was made for.
20575 if test -n "$ac_config_files"; then
20576   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20577 fi
20578
20579 if test -n "$ac_config_headers"; then
20580   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20581 fi
20582
20583 if test -n "$ac_config_links"; then
20584   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20585 fi
20586
20587 if test -n "$ac_config_commands"; then
20588   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20589 fi
20590
20591 cat >>$CONFIG_STATUS <<\EOF
20592
20593 ac_cs_usage="\
20594 \`$as_me' instantiates files from templates according to the
20595 current configuration.
20596
20597 Usage: $0 [OPTIONS] [FILE]...
20598
20599   -h, --help       print this help, then exit
20600   -V, --version    print version number, then exit
20601   -d, --debug      don't remove temporary files
20602       --recheck    update $as_me by reconfiguring in the same conditions
20603   --file=FILE[:TEMPLATE]
20604                    instantiate the configuration file FILE
20605   --header=FILE[:TEMPLATE]
20606                    instantiate the configuration header FILE
20607
20608 Configuration files:
20609 $config_files
20610
20611 Configuration headers:
20612 $config_headers
20613
20614 Configuration commands:
20615 $config_commands
20616
20617 Report bugs to <dickey@invisible-island.net>."
20618 EOF
20619
20620 cat >>$CONFIG_STATUS <<EOF
20621 ac_cs_version="\\
20622 config.status
20623 configured by $0, generated by GNU Autoconf 2.52.20101002,
20624   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20625
20626 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20627 Free Software Foundation, Inc.
20628 This config.status script is free software; the Free Software Foundation
20629 gives unlimited permission to copy, distribute and modify it."
20630 srcdir=$srcdir
20631 INSTALL="$INSTALL"
20632 EOF
20633
20634 cat >>$CONFIG_STATUS <<\EOF
20635 # If no file are specified by the user, then we need to provide default
20636 # value.  By we need to know if files were specified by the user.
20637 ac_need_defaults=:
20638 while test $# != 0
20639 do
20640   case $1 in
20641   --*=*)
20642     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20643     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20644     shift
20645     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20646     shift
20647     ;;
20648   -*);;
20649   *) # This is not an option, so the user has probably given explicit
20650      # arguments.
20651      ac_need_defaults=false;;
20652   esac
20653
20654   case $1 in
20655   # Handling of the options.
20656 EOF
20657 cat >>$CONFIG_STATUS <<EOF
20658   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20659     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20660     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20661 EOF
20662 cat >>$CONFIG_STATUS <<\EOF
20663   --version | --vers* | -V )
20664     echo "$ac_cs_version"; exit 0 ;;
20665   --he | --h)
20666     # Conflict between --help and --header
20667     { { echo "$as_me:20667: error: ambiguous option: $1
20668 Try \`$0 --help' for more information." >&5
20669 echo "$as_me: error: ambiguous option: $1
20670 Try \`$0 --help' for more information." >&2;}
20671    { (exit 1); exit 1; }; };;
20672   --help | --hel | -h )
20673     echo "$ac_cs_usage"; exit 0 ;;
20674   --debug | --d* | -d )
20675     debug=: ;;
20676   --file | --fil | --fi | --f )
20677     shift
20678     CONFIG_FILES="$CONFIG_FILES $1"
20679     ac_need_defaults=false;;
20680   --header | --heade | --head | --hea )
20681     shift
20682     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20683     ac_need_defaults=false;;
20684
20685   # This is an error.
20686   -*) { { echo "$as_me:20686: error: unrecognized option: $1
20687 Try \`$0 --help' for more information." >&5
20688 echo "$as_me: error: unrecognized option: $1
20689 Try \`$0 --help' for more information." >&2;}
20690    { (exit 1); exit 1; }; } ;;
20691
20692   *) ac_config_targets="$ac_config_targets $1" ;;
20693
20694   esac
20695   shift
20696 done
20697
20698 exec 5>>config.log
20699 cat >&5 << _ACEOF
20700
20701 ## ----------------------- ##
20702 ## Running config.status.  ##
20703 ## ----------------------- ##
20704
20705 This file was extended by $as_me 2.52.20101002, executed with
20706   CONFIG_FILES    = $CONFIG_FILES
20707   CONFIG_HEADERS  = $CONFIG_HEADERS
20708   CONFIG_LINKS    = $CONFIG_LINKS
20709   CONFIG_COMMANDS = $CONFIG_COMMANDS
20710   > $ac_cs_invocation
20711 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20712
20713 _ACEOF
20714 EOF
20715
20716 cat >>$CONFIG_STATUS <<EOF
20717 #
20718 # INIT-COMMANDS section.
20719 #
20720
20721 ### Special initialization commands, used to pass information from the
20722 ### configuration-run into config.status
20723
20724 AWK="$AWK"
20725 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20726 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20727 ECHO_LINK="$ECHO_LINK"
20728 LDCONFIG="$LDCONFIG"
20729 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20730 LIB_NAME="$LIB_NAME"
20731 LIB_SUBSETS="$LIB_SUBSETS"
20732 LIB_SUFFIX="$LIB_SUFFIX"
20733 LIB_TRACING="$LIB_TRACING"
20734 LN_S="$LN_S"
20735 MAKE_TERMINFO="$MAKE_TERMINFO"
20736 NCURSES_MAJOR="$NCURSES_MAJOR"
20737 NCURSES_MINOR="$NCURSES_MINOR"
20738 NCURSES_OSPEED="$NCURSES_OSPEED"
20739 NCURSES_PATCH="$NCURSES_PATCH"
20740 SRC_SUBDIRS="$SRC_SUBDIRS"
20741 TERMINFO="$TERMINFO"
20742 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20743 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20744 TICS_NAME="$TICS_NAME"
20745 TIC_PATH="$TIC_PATH"
20746 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20747 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20748 TINFO_NAME="$TINFO_NAME"
20749 TINFO_SUFFIX="$TINFO_SUFFIX"
20750 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20751 WITH_CURSES_H="$with_curses_h"
20752 WITH_ECHO="$with_echo"
20753 WITH_OVERWRITE="$with_overwrite"
20754 cf_LIST_MODELS="$cf_list_models"
20755 cf_cv_abi_version="$cf_cv_abi_version"
20756 cf_cv_do_relink="$cf_cv_do_relink"
20757 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20758 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20759 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20760 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20761 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20762 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20763 cf_cv_rel_version="$cf_cv_rel_version"
20764 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20765 cf_cv_shared_soname='$cf_cv_shared_soname'
20766 cf_cv_shlib_version="$cf_cv_shlib_version"
20767 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20768 cf_cv_system_name="$cf_cv_system_name"
20769 cf_cv_term_driver="$with_term_driver"
20770 cf_with_ada="$cf_with_ada"
20771 cf_with_cxx_binding="$cf_with_cxx_binding"
20772 cf_with_manpages="$cf_with_manpages"
20773 cf_with_tests="$cf_with_tests"
20774 host="$host"
20775 target="$target"
20776
20777 EOF
20778
20779 cat >>$CONFIG_STATUS <<\EOF
20780 for ac_config_target in $ac_config_targets
20781 do
20782   case "$ac_config_target" in
20783   # Handling of arguments.
20784   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20785   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20786   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20787   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20788   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20789   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20790   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20791   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20792   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20793   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20794   *) { { echo "$as_me:20794: error: invalid argument: $ac_config_target" >&5
20795 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20796    { (exit 1); exit 1; }; };;
20797   esac
20798 done
20799
20800 # If the user did not use the arguments to specify the items to instantiate,
20801 # then the envvar interface is used.  Set only those that are not.
20802 # We use the long form for the default assignment because of an extremely
20803 # bizarre bug on SunOS 4.1.3.
20804 if $ac_need_defaults; then
20805   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20806   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20807   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20808 fi
20809
20810 # Create a temporary directory, and hook for its removal unless debugging.
20811 $debug ||
20812 {
20813   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20814   trap '{ (exit 1); exit 1; }' 1 2 13 15
20815 }
20816
20817 # Create a (secure) tmp directory for tmp files.
20818 : ${TMPDIR=/tmp}
20819 {
20820   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20821   test -n "$tmp" && test -d "$tmp"
20822 }  ||
20823 {
20824   tmp=$TMPDIR/cs$$-$RANDOM
20825   (umask 077 && mkdir $tmp)
20826 } ||
20827 {
20828    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20829    { (exit 1); exit 1; }
20830 }
20831
20832 EOF
20833
20834 cat >>$CONFIG_STATUS <<EOF
20835
20836 #
20837 # CONFIG_FILES section.
20838 #
20839
20840 # No need to generate the scripts if there are no CONFIG_FILES.
20841 # This happens for instance when ./config.status config.h
20842 if test -n "\$CONFIG_FILES"; then
20843   # Protect against being on the right side of a sed subst in config.status.
20844   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20845    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20846 s,@SHELL@,$SHELL,;t t
20847 s,@exec_prefix@,$exec_prefix,;t t
20848 s,@prefix@,$prefix,;t t
20849 s,@program_transform_name@,$program_transform_name,;t t
20850 s,@bindir@,$bindir,;t t
20851 s,@sbindir@,$sbindir,;t t
20852 s,@libexecdir@,$libexecdir,;t t
20853 s,@datadir@,$datadir,;t t
20854 s,@sysconfdir@,$sysconfdir,;t t
20855 s,@sharedstatedir@,$sharedstatedir,;t t
20856 s,@localstatedir@,$localstatedir,;t t
20857 s,@libdir@,$libdir,;t t
20858 s,@includedir@,$includedir,;t t
20859 s,@oldincludedir@,$oldincludedir,;t t
20860 s,@infodir@,$infodir,;t t
20861 s,@mandir@,$mandir,;t t
20862 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20863 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20864 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20865 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20866 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20867 s,@build_alias@,$build_alias,;t t
20868 s,@host_alias@,$host_alias,;t t
20869 s,@target_alias@,$target_alias,;t t
20870 s,@ECHO_C@,$ECHO_C,;t t
20871 s,@ECHO_N@,$ECHO_N,;t t
20872 s,@ECHO_T@,$ECHO_T,;t t
20873 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20874 s,@DEFS@,$DEFS,;t t
20875 s,@LIBS@,$LIBS,;t t
20876 s,@top_builddir@,$top_builddir,;t t
20877 s,@EGREP@,$EGREP,;t t
20878 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20879 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20880 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20881 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20882 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20883 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20884 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20885 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20886 s,@build@,$build,;t t
20887 s,@build_cpu@,$build_cpu,;t t
20888 s,@build_vendor@,$build_vendor,;t t
20889 s,@build_os@,$build_os,;t t
20890 s,@host@,$host,;t t
20891 s,@host_cpu@,$host_cpu,;t t
20892 s,@host_vendor@,$host_vendor,;t t
20893 s,@host_os@,$host_os,;t t
20894 s,@target@,$target,;t t
20895 s,@target_cpu@,$target_cpu,;t t
20896 s,@target_vendor@,$target_vendor,;t t
20897 s,@target_os@,$target_os,;t t
20898 s,@CC@,$CC,;t t
20899 s,@CFLAGS@,$CFLAGS,;t t
20900 s,@LDFLAGS@,$LDFLAGS,;t t
20901 s,@CPPFLAGS@,$CPPFLAGS,;t t
20902 s,@ac_ct_CC@,$ac_ct_CC,;t t
20903 s,@EXEEXT@,$EXEEXT,;t t
20904 s,@OBJEXT@,$OBJEXT,;t t
20905 s,@CPP@,$CPP,;t t
20906 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20907 s,@PROG_EXT@,$PROG_EXT,;t t
20908 s,@LDCONFIG@,$LDCONFIG,;t t
20909 s,@CXX@,$CXX,;t t
20910 s,@CXXFLAGS@,$CXXFLAGS,;t t
20911 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20912 s,@AWK@,$AWK,;t t
20913 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20914 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20915 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20916 s,@LINT@,$LINT,;t t
20917 s,@LINT_OPTS@,$LINT_OPTS,;t t
20918 s,@LN_S@,$LN_S,;t t
20919 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20920 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20921 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20922 s,@SET_MAKE@,$SET_MAKE,;t t
20923 s,@CTAGS@,$CTAGS,;t t
20924 s,@ETAGS@,$ETAGS,;t t
20925 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20926 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20927 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20928 s,@RANLIB@,$RANLIB,;t t
20929 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20930 s,@LD@,$LD,;t t
20931 s,@ac_ct_LD@,$ac_ct_LD,;t t
20932 s,@AR@,$AR,;t t
20933 s,@ac_ct_AR@,$ac_ct_AR,;t t
20934 s,@ARFLAGS@,$ARFLAGS,;t t
20935 s,@DESTDIR@,$DESTDIR,;t t
20936 s,@BUILD_CC@,$BUILD_CC,;t t
20937 s,@BUILD_CPP@,$BUILD_CPP,;t t
20938 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20939 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20940 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20941 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20942 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20943 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20944 s,@cf_list_models@,$cf_list_models,;t t
20945 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20946 s,@LIBTOOL@,$LIBTOOL,;t t
20947 s,@LT_UNDEF@,$LT_UNDEF,;t t
20948 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20949 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20950 s,@LIB_CREATE@,$LIB_CREATE,;t t
20951 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20952 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20953 s,@LIB_PREP@,$LIB_PREP,;t t
20954 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20955 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20956 s,@LIB_LINK@,$LIB_LINK,;t t
20957 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20958 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20959 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20960 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20961 s,@TICS_NAME@,$TICS_NAME,;t t
20962 s,@TINFO_NAME@,$TINFO_NAME,;t t
20963 s,@LIB_NAME@,$LIB_NAME,;t t
20964 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20965 s,@CC_G_OPT@,$CC_G_OPT,;t t
20966 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20967 s,@LD_MODEL@,$LD_MODEL,;t t
20968 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20969 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20970 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20971 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20972 s,@LINK_PROGS@,$LINK_PROGS,;t t
20973 s,@LINK_TESTS@,$LINK_TESTS,;t t
20974 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20975 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20976 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20977 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20978 s,@RPATH_LIST@,$RPATH_LIST,;t t
20979 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20980 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20981 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20982 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20983 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20984 s,@TERMINFO@,$TERMINFO,;t t
20985 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20986 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20987 s,@TERMPATH@,$TERMPATH,;t t
20988 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20989 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20990 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20991 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20992 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20993 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20994 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20995 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20996 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20997 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20998 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20999 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21000 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21001 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21002 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21003 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21004 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21005 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21006 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21007 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21008 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21009 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21010 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21011 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21012 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21013 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21014 s,@PTHREAD@,$PTHREAD,;t t
21015 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21016 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21017 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21018 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21019 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21020 s,@ECHO_LINK@,$ECHO_LINK,;t t
21021 s,@ADAFLAGS@,$ADAFLAGS,;t t
21022 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21023 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21024 s,@ADA_TRACE@,$ADA_TRACE,;t t
21025 s,@MATH_LIB@,$MATH_LIB,;t t
21026 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21027 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21028 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21029 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21030 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21031 s,@TEST_LIBS@,$TEST_LIBS,;t t
21032 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21033 s,@CXXCPP@,$CXXCPP,;t t
21034 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21035 s,@CXX_AR@,$CXX_AR,;t t
21036 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21037 s,@CXXLIBS@,$CXXLIBS,;t t
21038 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21039 s,@gnat_exists@,$gnat_exists,;t t
21040 s,@M4_exists@,$M4_exists,;t t
21041 s,@cf_ada_make@,$cf_ada_make,;t t
21042 s,@cf_compile_generics@,$cf_compile_generics,;t t
21043 s,@cf_generic_objects@,$cf_generic_objects,;t t
21044 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21045 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21046 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21047 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21048 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21049 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21050 s,@cf_ada_package@,$cf_ada_package,;t t
21051 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21052 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21053 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21054 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21055 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21056 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21057 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21058 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21059 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21060 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21061 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21062 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21063 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21064 s,@TICS_LIBS@,$TICS_LIBS,;t t
21065 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21066 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21067 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21068 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21069 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21070 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21071 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21072 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21073 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21074 s,@TICS_LIST@,$TICS_LIST,;t t
21075 s,@TINFO_LIST@,$TINFO_LIST,;t t
21076 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21077 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21078 s,@TEST_ARGS@,$TEST_ARGS,;t t
21079 s,@TEST_DEPS@,$TEST_DEPS,;t t
21080 s,@TEST_ARG2@,$TEST_ARG2,;t t
21081 s,@TEST_DEP2@,$TEST_DEP2,;t t
21082 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21083 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21084 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21085 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21086 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21087 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21088 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21089 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21090 s,@cross_compiling@,$cross_compiling,;t t
21091 s,@TIC_PATH@,$TIC_PATH,;t t
21092 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21093 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21094 CEOF
21095
21096 EOF
21097
21098   cat >>$CONFIG_STATUS <<\EOF
21099   # Split the substitutions into bite-sized pieces for seds with
21100   # small command number limits, like on Digital OSF/1 and HP-UX.
21101   ac_max_sed_lines=48
21102   ac_sed_frag=1 # Number of current file.
21103   ac_beg=1 # First line for current file.
21104   ac_end=$ac_max_sed_lines # Line after last line for current file.
21105   ac_more_lines=:
21106   ac_sed_cmds=
21107   while $ac_more_lines; do
21108     if test $ac_beg -gt 1; then
21109       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21110     else
21111       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21112     fi
21113     if test ! -s $tmp/subs.frag; then
21114       ac_more_lines=false
21115     else
21116       # The purpose of the label and of the branching condition is to
21117       # speed up the sed processing (if there are no `@' at all, there
21118       # is no need to browse any of the substitutions).
21119       # These are the two extra sed commands mentioned above.
21120       (echo ':t
21121   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21122       if test -z "$ac_sed_cmds"; then
21123         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21124       else
21125         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21126       fi
21127       ac_sed_frag=`expr $ac_sed_frag + 1`
21128       ac_beg=$ac_end
21129       ac_end=`expr $ac_end + $ac_max_sed_lines`
21130     fi
21131   done
21132   if test -z "$ac_sed_cmds"; then
21133     ac_sed_cmds=cat
21134   fi
21135 fi # test -n "$CONFIG_FILES"
21136
21137 EOF
21138 cat >>$CONFIG_STATUS <<\EOF
21139 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21140   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21141   case $ac_file in
21142   - | *:- | *:-:* ) # input from stdin
21143         cat >$tmp/stdin
21144         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21145         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21146   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21147         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21148   * )   ac_file_in=$ac_file.in ;;
21149   esac
21150
21151   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21152   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21153          X"$ac_file" : 'X\(//\)[^/]' \| \
21154          X"$ac_file" : 'X\(//\)$' \| \
21155          X"$ac_file" : 'X\(/\)' \| \
21156          .     : '\(.\)' 2>/dev/null ||
21157 echo X"$ac_file" |
21158     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21159           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21160           /^X\(\/\/\)$/{ s//\1/; q; }
21161           /^X\(\/\).*/{ s//\1/; q; }
21162           s/.*/./; q'`
21163   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21164     { case "$ac_dir" in
21165   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21166   *)                      as_incr_dir=.;;
21167 esac
21168 as_dummy="$ac_dir"
21169 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21170   case $as_mkdir_dir in
21171     # Skip DOS drivespec
21172     ?:) as_incr_dir=$as_mkdir_dir ;;
21173     *)
21174       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21175       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21176     ;;
21177   esac
21178 done; }
21179
21180     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21181     # A "../" for each directory in $ac_dir_suffix.
21182     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21183   else
21184     ac_dir_suffix= ac_dots=
21185   fi
21186
21187   case $srcdir in
21188   .)  ac_srcdir=.
21189       if test -z "$ac_dots"; then
21190          ac_top_srcdir=.
21191       else
21192          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21193       fi ;;
21194   [\\/]* | ?:[\\/]* )
21195       ac_srcdir=$srcdir$ac_dir_suffix;
21196       ac_top_srcdir=$srcdir ;;
21197   *) # Relative path.
21198     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21199     ac_top_srcdir=$ac_dots$srcdir ;;
21200   esac
21201
21202   case $INSTALL in
21203   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21204   *) ac_INSTALL=$ac_dots$INSTALL ;;
21205   esac
21206
21207   if test x"$ac_file" != x-; then
21208     { echo "$as_me:21208: creating $ac_file" >&5
21209 echo "$as_me: creating $ac_file" >&6;}
21210     rm -f "$ac_file"
21211   fi
21212   # Let's still pretend it is `configure' which instantiates (i.e., don't
21213   # use $as_me), people would be surprised to read:
21214   #    /* config.h.  Generated automatically by config.status.  */
21215   configure_input="Generated automatically from `echo $ac_file_in |
21216                                                  sed 's,.*/,,'` by configure."
21217
21218   # First look for the input files in the build tree, otherwise in the
21219   # src tree.
21220   ac_file_inputs=`IFS=:
21221     for f in $ac_file_in; do
21222       case $f in
21223       -) echo $tmp/stdin ;;
21224       [\\/$]*)
21225          # Absolute (can't be DOS-style, as IFS=:)
21226          test -f "$f" || { { echo "$as_me:21226: error: cannot find input file: $f" >&5
21227 echo "$as_me: error: cannot find input file: $f" >&2;}
21228    { (exit 1); exit 1; }; }
21229          echo $f;;
21230       *) # Relative
21231          if test -f "$f"; then
21232            # Build tree
21233            echo $f
21234          elif test -f "$srcdir/$f"; then
21235            # Source tree
21236            echo $srcdir/$f
21237          else
21238            # /dev/null tree
21239            { { echo "$as_me:21239: error: cannot find input file: $f" >&5
21240 echo "$as_me: error: cannot find input file: $f" >&2;}
21241    { (exit 1); exit 1; }; }
21242          fi;;
21243       esac
21244     done` || { (exit 1); exit 1; }
21245 EOF
21246 cat >>$CONFIG_STATUS <<EOF
21247   sed "$ac_vpsub
21248 $extrasub
21249 EOF
21250 cat >>$CONFIG_STATUS <<\EOF
21251 :t
21252 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21253 s,@configure_input@,$configure_input,;t t
21254 s,@srcdir@,$ac_srcdir,;t t
21255 s,@top_srcdir@,$ac_top_srcdir,;t t
21256 s,@INSTALL@,$ac_INSTALL,;t t
21257 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21258   rm -f $tmp/stdin
21259   if test x"$ac_file" != x-; then
21260     mv $tmp/out $ac_file
21261   else
21262     cat $tmp/out
21263     rm -f $tmp/out
21264   fi
21265
21266 done
21267 EOF
21268 cat >>$CONFIG_STATUS <<\EOF
21269
21270 #
21271 # CONFIG_HEADER section.
21272 #
21273
21274 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21275 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21276 #
21277 # ac_d sets the value in "#define NAME VALUE" lines.
21278 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21279 ac_dB='[        ].*$,\1#\2'
21280 ac_dC=' '
21281 ac_dD=',;t'
21282 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21283 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21284 ac_iB='\([      ]\),\1#\2define\3'
21285 ac_iC=' '
21286 ac_iD='\4,;t'
21287 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21288 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21289 ac_uB='$,\1#\2define\3'
21290 ac_uC=' '
21291 ac_uD=',;t'
21292
21293 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21294   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21295   case $ac_file in
21296   - | *:- | *:-:* ) # input from stdin
21297         cat >$tmp/stdin
21298         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21299         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21300   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21301         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21302   * )   ac_file_in=$ac_file.in ;;
21303   esac
21304
21305   test x"$ac_file" != x- && { echo "$as_me:21305: creating $ac_file" >&5
21306 echo "$as_me: creating $ac_file" >&6;}
21307
21308   # First look for the input files in the build tree, otherwise in the
21309   # src tree.
21310   ac_file_inputs=`IFS=:
21311     for f in $ac_file_in; do
21312       case $f in
21313       -) echo $tmp/stdin ;;
21314       [\\/$]*)
21315          # Absolute (can't be DOS-style, as IFS=:)
21316          test -f "$f" || { { echo "$as_me:21316: error: cannot find input file: $f" >&5
21317 echo "$as_me: error: cannot find input file: $f" >&2;}
21318    { (exit 1); exit 1; }; }
21319          echo $f;;
21320       *) # Relative
21321          if test -f "$f"; then
21322            # Build tree
21323            echo $f
21324          elif test -f "$srcdir/$f"; then
21325            # Source tree
21326            echo $srcdir/$f
21327          else
21328            # /dev/null tree
21329            { { echo "$as_me:21329: error: cannot find input file: $f" >&5
21330 echo "$as_me: error: cannot find input file: $f" >&2;}
21331    { (exit 1); exit 1; }; }
21332          fi;;
21333       esac
21334     done` || { (exit 1); exit 1; }
21335   # Remove the trailing spaces.
21336   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21337
21338 EOF
21339
21340 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21341 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21342 # be either 'cat' or 'sort'.
21343 cat confdefs.h | uniq >conftest.vals
21344
21345 # Break up conftest.vals because some shells have a limit on
21346 # the size of here documents, and old seds have small limits too.
21347
21348 rm -f conftest.tail
21349 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21350 while grep . conftest.vals >/dev/null
21351 do
21352   # Write chunks of a limited-size here document to conftest.frag.
21353   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21354   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21355   echo 'CEOF' >> $CONFIG_STATUS
21356   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21357   rm -f conftest.vals
21358   mv conftest.tail conftest.vals
21359 done
21360 rm -f conftest.vals
21361
21362 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21363 # marker @DEFS@.
21364 echo '  cat >> conftest.edit <<CEOF
21365 /@DEFS@/r conftest.frag
21366 /@DEFS@/d
21367 CEOF
21368 sed -f conftest.edit $tmp/in > $tmp/out
21369 rm -f $tmp/in
21370 mv $tmp/out $tmp/in
21371 rm -f conftest.edit conftest.frag
21372 ' >> $CONFIG_STATUS
21373
21374 cat >>$CONFIG_STATUS <<\EOF
21375   # Let's still pretend it is `configure' which instantiates (i.e., don't
21376   # use $as_me), people would be surprised to read:
21377   #    /* config.h.  Generated automatically by config.status.  */
21378   if test x"$ac_file" = x-; then
21379     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21380   else
21381     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21382   fi
21383   cat $tmp/in >>$tmp/config.h
21384   rm -f $tmp/in
21385   if test x"$ac_file" != x-; then
21386     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21387       { echo "$as_me:21387: $ac_file is unchanged" >&5
21388 echo "$as_me: $ac_file is unchanged" >&6;}
21389     else
21390       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21391          X"$ac_file" : 'X\(//\)[^/]' \| \
21392          X"$ac_file" : 'X\(//\)$' \| \
21393          X"$ac_file" : 'X\(/\)' \| \
21394          .     : '\(.\)' 2>/dev/null ||
21395 echo X"$ac_file" |
21396     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21397           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21398           /^X\(\/\/\)$/{ s//\1/; q; }
21399           /^X\(\/\).*/{ s//\1/; q; }
21400           s/.*/./; q'`
21401       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21402         { case "$ac_dir" in
21403   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21404   *)                      as_incr_dir=.;;
21405 esac
21406 as_dummy="$ac_dir"
21407 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21408   case $as_mkdir_dir in
21409     # Skip DOS drivespec
21410     ?:) as_incr_dir=$as_mkdir_dir ;;
21411     *)
21412       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21413       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21414     ;;
21415   esac
21416 done; }
21417
21418       fi
21419       rm -f $ac_file
21420       mv $tmp/config.h $ac_file
21421     fi
21422   else
21423     cat $tmp/config.h
21424     rm -f $tmp/config.h
21425   fi
21426 done
21427 EOF
21428 cat >>$CONFIG_STATUS <<\EOF
21429 #
21430 # CONFIG_COMMANDS section.
21431 #
21432 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21433   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21434   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21435
21436   case $ac_dest in
21437     default )
21438 if test "x$cf_with_tests" != xno ; then
21439
21440 for cf_dir in test
21441 do
21442         if test ! -d $srcdir/$cf_dir; then
21443                 continue
21444         elif test -f $srcdir/$cf_dir/programs; then
21445                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21446         fi
21447 done
21448
21449 fi
21450
21451         case $cf_cv_system_name in #(vi
21452         OS/2*|os2*) #(vi
21453         LIB_PREFIX=''
21454         ;;
21455         *)      LIB_PREFIX='lib'
21456         ;;
21457         esac
21458 cf_prefix=$LIB_PREFIX
21459
21460 if test $cf_cv_shlib_version = cygdll ; then
21461         TINFO_NAME=$TINFO_ARG_SUFFIX
21462         TINFO_SUFFIX=.dll
21463 fi
21464
21465 if test -n "$TINFO_SUFFIX" ; then
21466         case $TINFO_SUFFIX in
21467         tw*)
21468                 TINFO_NAME="${TINFO_NAME}tw"
21469                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21470                 ;;
21471         t*)
21472                 TINFO_NAME="${TINFO_NAME}t"
21473                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21474                 ;;
21475         w*)
21476                 TINFO_NAME="${TINFO_NAME}w"
21477                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21478                 ;;
21479         esac
21480 fi
21481
21482 for cf_dir in $SRC_SUBDIRS
21483 do
21484         if test ! -d $srcdir/$cf_dir ; then
21485                 continue
21486         elif test -f $srcdir/$cf_dir/modules; then
21487
21488                 SHARED_LIB=
21489                 LIBS_TO_MAKE=
21490                 for cf_item in $cf_LIST_MODELS
21491                 do
21492
21493         case $cf_item in #(vi
21494         libtool) #(vi
21495                 cf_suffix='.la'
21496                 cf_depsuf=$cf_suffix
21497                 ;;
21498         normal) #(vi
21499                 cf_suffix='.a'
21500                 cf_depsuf=$cf_suffix
21501                 ;;
21502         debug) #(vi
21503                 cf_suffix='_g.a'
21504                 cf_depsuf=$cf_suffix
21505                 ;;
21506         profile) #(vi
21507                 cf_suffix='_p.a'
21508                 cf_depsuf=$cf_suffix
21509                 ;;
21510         shared) #(vi
21511                 case $cf_cv_system_name in
21512                 aix[5-7]*) #(vi
21513                         cf_suffix='.a'
21514                         cf_depsuf=$cf_suffix
21515                         ;;
21516                 cygwin*) #(vi
21517                         cf_suffix='.dll'
21518                         cf_depsuf='.dll.a'
21519                         ;;
21520                 darwin*) #(vi
21521                         cf_suffix='.dylib'
21522                         cf_depsuf=$cf_suffix
21523                         ;;
21524                 hpux*) #(vi
21525                         case $target in
21526                         ia64*) #(vi
21527                                 cf_suffix='.so'
21528                                 cf_depsuf=$cf_suffix
21529                                 ;;
21530                         *) #(vi
21531                                 cf_suffix='.sl'
21532                                 cf_depsuf=$cf_suffix
21533                                 ;;
21534                         esac
21535                         ;;
21536                 *)      cf_suffix='.so'
21537                         cf_depsuf=$cf_suffix
21538                         ;;
21539                 esac
21540         esac
21541         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21542         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21543
21544                         if test $cf_item = shared ; then
21545                         if test "$cf_cv_do_symlinks" = yes ; then
21546                                 case "$cf_cv_shlib_version" in #(vi
21547                                 rel) #(vi
21548                                         case "$cf_cv_system_name" in #(vi
21549                                         darwin*)
21550                                         case .${LIB_SUFFIX} in
21551                                         .tw*)
21552                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21553                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21554                                                 ;;
21555                                         .t*)
21556                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21557                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21558                                                 ;;
21559                                         .w*)
21560                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21561                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21562                                                 ;;
21563                                         *)
21564                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21565                                                 ;;
21566                                         esac
21567                                         ;; #(vi
21568                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21569                                         esac
21570                                         ;;
21571                                 abi)
21572                                         case "$cf_cv_system_name" in #(vi
21573                                         darwin*)
21574                                         case .${LIB_SUFFIX} in
21575                                         .tw*)
21576                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21577                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21578                                                 ;;
21579                                         .t*)
21580                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21581                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21582                                                 ;;
21583                                         .w*)
21584                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21585                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21586                                                 ;;
21587                                         *)
21588                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21589                                                 ;;
21590                                         esac
21591                                         ;; #(vi
21592                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21593                                         esac
21594                                         ;;
21595                                 esac
21596                         fi
21597                         # cygwin needs import library, and has unique naming convention
21598                         # use autodetected ${cf_prefix} for import lib and static lib, but
21599                         # use 'cyg' prefix for shared lib.
21600                         if test $cf_cv_shlib_version = cygdll ; then
21601                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21602                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21603                                 continue
21604                         fi
21605                         fi
21606                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21607                 done
21608
21609                 if test $cf_dir = ncurses ; then
21610                         cf_subsets="$LIB_SUBSETS"
21611                         cf_r_parts="$cf_subsets"
21612                         cf_liblist="$LIBS_TO_MAKE"
21613
21614                         while test -n "$cf_r_parts"
21615                         do
21616                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21617                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21618                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21619                                         cf_item=
21620                                         case $cf_l_parts in #(vi
21621                                         *termlib*) #(vi
21622                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21623                                                 ;;
21624                                         *ticlib*)
21625                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21626                                                 ;;
21627                                         *)
21628                                                 break
21629                                                 ;;
21630                                         esac
21631                                         if test -n "$cf_item"; then
21632                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21633                                         fi
21634                                 else
21635                                         break
21636                                 fi
21637                         done
21638                 else
21639                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21640                 fi
21641
21642                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21643                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21644                         $cf_dir/Makefile >$cf_dir/Makefile.out
21645                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21646
21647                 $AWK -f $srcdir/mk-0th.awk \
21648                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21649                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21650
21651                 for cf_subset in $cf_subsets
21652                 do
21653                         cf_subdirs=
21654                         for cf_item in $cf_LIST_MODELS
21655                         do
21656                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21657
21658 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21659
21660         case $cf_item in #(vi
21661         libtool) #(vi
21662                 cf_suffix='.la'
21663                 cf_depsuf=$cf_suffix
21664                 ;;
21665         normal) #(vi
21666                 cf_suffix='.a'
21667                 cf_depsuf=$cf_suffix
21668                 ;;
21669         debug) #(vi
21670                 cf_suffix='_g.a'
21671                 cf_depsuf=$cf_suffix
21672                 ;;
21673         profile) #(vi
21674                 cf_suffix='_p.a'
21675                 cf_depsuf=$cf_suffix
21676                 ;;
21677         shared) #(vi
21678                 case $cf_cv_system_name in
21679                 aix[5-7]*) #(vi
21680                         cf_suffix='.a'
21681                         cf_depsuf=$cf_suffix
21682                         ;;
21683                 cygwin*) #(vi
21684                         cf_suffix='.dll'
21685                         cf_depsuf='.dll.a'
21686                         ;;
21687                 darwin*) #(vi
21688                         cf_suffix='.dylib'
21689                         cf_depsuf=$cf_suffix
21690                         ;;
21691                 hpux*) #(vi
21692                         case $target in
21693                         ia64*) #(vi
21694                                 cf_suffix='.so'
21695                                 cf_depsuf=$cf_suffix
21696                                 ;;
21697                         *) #(vi
21698                                 cf_suffix='.sl'
21699                                 cf_depsuf=$cf_suffix
21700                                 ;;
21701                         esac
21702                         ;;
21703                 *)      cf_suffix='.so'
21704                         cf_depsuf=$cf_suffix
21705                         ;;
21706                 esac
21707         esac
21708         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21709         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21710
21711         case $cf_item in
21712         libtool) cf_subdir='obj_lo'  ;;
21713         normal)  cf_subdir='objects' ;;
21714         debug)   cf_subdir='obj_g' ;;
21715         profile) cf_subdir='obj_p' ;;
21716         shared)
21717                 case $cf_cv_system_name in #(vi
21718                 cygwin) #(vi
21719                         cf_subdir='objects' ;;
21720                 *)
21721                         cf_subdir='obj_s' ;;
21722                 esac
21723         esac
21724
21725                         # Test for case where we build libtinfo with a different name.
21726                         cf_libname=$cf_dir
21727                         if test $cf_dir = ncurses ; then
21728                                 case $cf_subset in
21729                                 *base*)
21730                                         cf_libname=${cf_libname}$LIB_SUFFIX
21731                                         ;;
21732                                 *termlib*)
21733                                         cf_libname=$TINFO_LIB_SUFFIX
21734                                         ;;
21735                                 ticlib*)
21736                                         cf_libname=$TICS_LIB_SUFFIX
21737                                         ;;
21738                                 esac
21739                         else
21740                                 cf_libname=${cf_libname}$LIB_SUFFIX
21741                         fi
21742                         if test -n "${DFT_ARG_SUFFIX}" ; then
21743                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21744                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21745                         fi
21746
21747                         # These dependencies really are for development, not
21748                         # builds, but they are useful in porting, too.
21749                         cf_depend="../include/ncurses_cfg.h"
21750                         if test "$srcdir" = "."; then
21751                                 cf_reldir="."
21752                         else
21753                                 cf_reldir="\${srcdir}"
21754                         fi
21755
21756                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21757                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21758                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21759                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21760                         fi
21761
21762                         cf_dir_suffix=
21763                         old_cf_suffix="$cf_suffix"
21764                         if test "$cf_cv_shlib_version_infix" = yes ; then
21765                         if test -n "$LIB_SUFFIX" ; then
21766                                 case $LIB_SUFFIX in
21767                                 tw*)
21768                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21769                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21770                                         cf_dir_suffix=tw
21771                                         ;;
21772                                 t*)
21773                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21774                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21775                                         cf_dir_suffix=t
21776                                         ;;
21777                                 w*)
21778                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21779                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21780                                         cf_dir_suffix=w
21781                                         ;;
21782                                 esac
21783                         fi
21784                         fi
21785
21786                         $AWK -f $srcdir/mk-1st.awk \
21787                                 name=${cf_libname}${cf_dir_suffix} \
21788                                 traces=$LIB_TRACING \
21789                                 MODEL=$cf_ITEM \
21790                                 model=$cf_subdir \
21791                                 prefix=$cf_prefix \
21792                                 suffix=$cf_suffix \
21793                                 subset=$cf_subset \
21794                                 driver=$cf_cv_term_driver \
21795                                 SymLink="$LN_S" \
21796                                 TermlibRoot=$TINFO_NAME \
21797                                 TermlibSuffix=$TINFO_SUFFIX \
21798                                 ShlibVer=$cf_cv_shlib_version \
21799                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21800                                 ReLink=${cf_cv_do_relink:-no} \
21801                                 DoLinks=$cf_cv_do_symlinks \
21802                                 rmSoLocs=$cf_cv_rm_so_locs \
21803                                 ldconfig="$LDCONFIG" \
21804                                 overwrite=$WITH_OVERWRITE \
21805                                 depend="$cf_depend" \
21806                                 host="$host" \
21807                                 libtool_version="$LIBTOOL_VERSION" \
21808                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21809
21810                         cf_suffix="$old_cf_suffix"
21811
21812                         for cf_subdir2 in $cf_subdirs lib
21813                         do
21814                                 test $cf_subdir = $cf_subdir2 && break
21815                         done
21816                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21817                         $AWK -f $srcdir/mk-2nd.awk \
21818                                 name=$cf_dir \
21819                                 traces=$LIB_TRACING \
21820                                 MODEL=$cf_ITEM \
21821                                 model=$cf_subdir \
21822                                 subset=$cf_subset \
21823                                 srcdir=$srcdir \
21824                                 echo=$WITH_ECHO \
21825                                 crenames=$cf_cv_prog_CC_c_o \
21826                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21827                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21828                         cf_subdirs="$cf_subdirs $cf_subdir"
21829                         done
21830                 done
21831         fi
21832
21833         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21834 done
21835
21836 for cf_dir in $SRC_SUBDIRS
21837 do
21838         if test ! -d $srcdir/$cf_dir ; then
21839                 continue
21840         fi
21841
21842         if test -f $cf_dir/Makefile ; then
21843                 case "$cf_dir" in
21844                 Ada95) #(vi
21845                         echo 'libs \' >> Makefile
21846                         echo 'install.libs \' >> Makefile
21847                         echo 'uninstall.libs ::' >> Makefile
21848                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21849                         ;;
21850                 esac
21851         fi
21852
21853         if test -f $srcdir/$cf_dir/modules; then
21854                 echo >> Makefile
21855                 if test -f $srcdir/$cf_dir/headers; then
21856 cat >> Makefile <<CF_EOF
21857 install.includes \\
21858 uninstall.includes \\
21859 CF_EOF
21860                 fi
21861 if test "$cf_dir" != "c++" ; then
21862 echo 'lint \' >> Makefile
21863 fi
21864 cat >> Makefile <<CF_EOF
21865 libs \\
21866 lintlib \\
21867 install.libs \\
21868 uninstall.libs \\
21869 install.$cf_dir \\
21870 uninstall.$cf_dir ::
21871         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21872 CF_EOF
21873         elif test -f $srcdir/$cf_dir/headers; then
21874 cat >> Makefile <<CF_EOF
21875
21876 libs \\
21877 install.libs \\
21878 uninstall.libs \\
21879 install.includes \\
21880 uninstall.includes ::
21881         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21882 CF_EOF
21883 fi
21884 done
21885
21886 cat >> Makefile <<CF_EOF
21887
21888 install.libs uninstall.libs \\
21889 install.data uninstall.data ::
21890 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21891 CF_EOF
21892
21893 if test "x$cf_with_manpages" = xyes; then
21894 cat >> Makefile <<CF_EOF
21895
21896 install.man \\
21897 uninstall.man ::
21898         cd man && \${MAKE} \${CF_MFLAGS} \$@
21899 CF_EOF
21900 fi
21901
21902 cat >> Makefile <<CF_EOF
21903
21904 distclean ::
21905         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21906         rm -f headers.sh headers.sed mk_shared_lib.sh
21907         rm -f edit_man.* man_alias.*
21908         rm -rf \${DIRS_TO_MAKE}
21909 CF_EOF
21910
21911 # Special case: tack's manpage lives in its own directory.
21912 if test "x$cf_with_manpages" = xyes; then
21913 if test -d tack ; then
21914 if test -f $srcdir/$tack.h; then
21915 cat >> Makefile <<CF_EOF
21916
21917 install.man \\
21918 uninstall.man ::
21919         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21920 CF_EOF
21921 fi
21922 fi
21923 fi
21924
21925 rm -f headers.sed headers.sh
21926
21927 echo creating headers.sh
21928 cat >headers.sh <<CF_EOF
21929 #! /bin/sh
21930 # This shell script is generated by the 'configure' script.  It is invoked in a
21931 # subdirectory of the build tree.  It generates a sed-script in the parent
21932 # directory that is used to adjust includes for header files that reside in a
21933 # subdirectory of /usr/include, etc.
21934 PRG=""
21935 while test \$# != 3
21936 do
21937 PRG="\$PRG \$1"; shift
21938 done
21939 DST=\$1
21940 REF=\$2
21941 SRC=\$3
21942 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21943 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21944 echo installing \$SRC in \$DST
21945 CF_EOF
21946
21947 if test $WITH_CURSES_H = yes; then
21948         cat >>headers.sh <<CF_EOF
21949 case \$DST in
21950 /*/include/*)
21951         END=\`basename \$DST\`
21952         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21953         do
21954                 NAME=\`basename \$i\`
21955                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21956         done
21957         ;;
21958 *)
21959         echo "" >> \$TMPSED
21960         ;;
21961 esac
21962 CF_EOF
21963
21964 else
21965         cat >>headers.sh <<CF_EOF
21966 case \$DST in
21967 /*/include/*)
21968         END=\`basename \$DST\`
21969         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21970         do
21971                 NAME=\`basename \$i\`
21972                 if test "\$NAME" = "curses.h"
21973                 then
21974                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21975                         NAME=ncurses.h
21976                 fi
21977                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21978         done
21979         ;;
21980 *)
21981         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21982         ;;
21983 esac
21984 CF_EOF
21985 fi
21986 cat >>headers.sh <<CF_EOF
21987 rm -f \$TMPSRC
21988 sed -f \$TMPSED \$SRC > \$TMPSRC
21989 NAME=\`basename \$SRC\`
21990 CF_EOF
21991 if test $WITH_CURSES_H != yes; then
21992         cat >>headers.sh <<CF_EOF
21993 test "\$NAME" = "curses.h" && NAME=ncurses.h
21994 CF_EOF
21995 fi
21996 cat >>headers.sh <<CF_EOF
21997 # Just in case someone gzip'd manpages, remove the conflicting copy.
21998 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21999
22000 eval \$PRG \$TMPSRC \$DST/\$NAME
22001 rm -f \$TMPSRC \$TMPSED
22002 CF_EOF
22003
22004 chmod 0755 headers.sh
22005
22006 for cf_dir in $SRC_SUBDIRS
22007 do
22008         if test ! -d $srcdir/$cf_dir ; then
22009                 continue
22010         fi
22011
22012         if test -f $srcdir/$cf_dir/headers; then
22013                 $AWK -f $srcdir/mk-hdr.awk \
22014                         subset="$LIB_SUBSETS" \
22015                         compat="$WITH_CURSES_H" \
22016                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22017         fi
22018
22019         if test -f $srcdir/$cf_dir/modules; then
22020                 if test "$cf_dir" != "c++" ; then
22021                         cat >>$cf_dir/Makefile <<"CF_EOF"
22022 depend : ${AUTO_SRC}
22023         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22024
22025 # DO NOT DELETE THIS LINE -- make depend depends on it.
22026 CF_EOF
22027                 fi
22028         fi
22029 done
22030
22031 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22032 if test -z "$USE_OLD_MAKERULES" ; then
22033         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22034 fi
22035 fi
22036  ;;
22037   esac
22038 done
22039 EOF
22040
22041 cat >>$CONFIG_STATUS <<\EOF
22042
22043 { (exit 0); exit 0; }
22044 EOF
22045 chmod +x $CONFIG_STATUS
22046 ac_clean_files=$ac_clean_files_save
22047
22048 # configure is writing to config.log, and then calls config.status.
22049 # config.status does its own redirection, appending to config.log.
22050 # Unfortunately, on DOS this fails, as config.log is still kept open
22051 # by configure, so config.status won't be able to write to it; its
22052 # output is simply discarded.  So we exec the FD to /dev/null,
22053 # effectively closing config.log, so it can be properly (re)opened and
22054 # appended to by config.status.  When coming back to configure, we
22055 # need to make the FD available again.
22056 if test "$no_create" != yes; then
22057   ac_cs_success=:
22058   exec 5>/dev/null
22059   $SHELL $CONFIG_STATUS || ac_cs_success=false
22060   exec 5>>config.log
22061   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22062   # would make configure fail if this is the last instruction.
22063   $ac_cs_success || { (exit 1); exit 1; }
22064 fi
22065 ${MAKE:-make} preinstall