]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.8 - patch 20110402
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.520 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); } &&
2380   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 echo "$as_me:2425: checking for ${CC:-cc} option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2427 if test "${cf_cv_ansi_cc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430
2431 cf_cv_ansi_cc=no
2432 cf_save_CFLAGS="$CFLAGS"
2433 cf_save_CPPFLAGS="$CPPFLAGS"
2434 # Don't try gcc -ansi; that turns off useful extensions and
2435 # breaks some systems' header files.
2436 # AIX                   -qlanglvl=ansi
2437 # Ultrix and OSF/1      -std1
2438 # HP-UX                 -Aa -D_HPUX_SOURCE
2439 # SVR4                  -Xc
2440 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2441 for cf_arg in "-DCC_HAS_PROTOS" \
2442         "" \
2443         -qlanglvl=ansi \
2444         -std1 \
2445         -Ae \
2446         "-Aa -D_HPUX_SOURCE" \
2447         -Xc
2448 do
2449
2450 cf_fix_cppflags=no
2451 cf_new_cflags=
2452 cf_new_cppflags=
2453 cf_new_extra_cppflags=
2454
2455 for cf_add_cflags in $cf_arg
2456 do
2457 case $cf_fix_cppflags in
2458 no)
2459         case $cf_add_cflags in #(vi
2460         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2461                 case $cf_add_cflags in
2462                 -D*)
2463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2464
2465                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2466                                 && test -z "${cf_tst_cflags}" \
2467                                 && cf_fix_cppflags=yes
2468
2469                         if test $cf_fix_cppflags = yes ; then
2470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2471                                 continue
2472                         elif test "${cf_tst_cflags}" = "\"'" ; then
2473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2474                                 continue
2475                         fi
2476                         ;;
2477                 esac
2478                 case "$CPPFLAGS" in
2479                 *$cf_add_cflags) #(vi
2480                         ;;
2481                 *) #(vi
2482                         case $cf_add_cflags in #(vi
2483                         -D*)
2484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2485
2486 CPPFLAGS=`echo "$CPPFLAGS" | \
2487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2489
2490                                 ;;
2491                         esac
2492                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2493                         ;;
2494                 esac
2495                 ;;
2496         *)
2497                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2498                 ;;
2499         esac
2500         ;;
2501 yes)
2502         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2503
2504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2505
2506         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2507                 && test -z "${cf_tst_cflags}" \
2508                 && cf_fix_cppflags=no
2509         ;;
2510 esac
2511 done
2512
2513 if test -n "$cf_new_cflags" ; then
2514
2515         CFLAGS="$CFLAGS $cf_new_cflags"
2516 fi
2517
2518 if test -n "$cf_new_cppflags" ; then
2519
2520         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2521 fi
2522
2523 if test -n "$cf_new_extra_cppflags" ; then
2524
2525         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2526 fi
2527
2528         cat >conftest.$ac_ext <<_ACEOF
2529 #line 2529 "configure"
2530 #include "confdefs.h"
2531
2532 #ifndef CC_HAS_PROTOS
2533 #if !defined(__STDC__) || (__STDC__ != 1)
2534 choke me
2535 #endif
2536 #endif
2537
2538 int
2539 main ()
2540 {
2541
2542         int test (int i, double x);
2543         struct s1 {int (*f) (int a);};
2544         struct s2 {int (*f) (double a);};
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>&5
2552   ac_status=$?
2553   echo "$as_me:2553: \$? = $ac_status" >&5
2554   (exit $ac_status); } &&
2555          { ac_try='test -s conftest.$ac_objext'
2556   { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); }; }; then
2561   cf_cv_ansi_cc="$cf_arg"; break
2562 else
2563   echo "$as_me: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2565 fi
2566 rm -f conftest.$ac_objext conftest.$ac_ext
2567 done
2568 CFLAGS="$cf_save_CFLAGS"
2569 CPPFLAGS="$cf_save_CPPFLAGS"
2570
2571 fi
2572 echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
2573 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2574
2575 if test "$cf_cv_ansi_cc" != "no"; then
2576 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2577
2578 cf_fix_cppflags=no
2579 cf_new_cflags=
2580 cf_new_cppflags=
2581 cf_new_extra_cppflags=
2582
2583 for cf_add_cflags in $cf_cv_ansi_cc
2584 do
2585 case $cf_fix_cppflags in
2586 no)
2587         case $cf_add_cflags in #(vi
2588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2589                 case $cf_add_cflags in
2590                 -D*)
2591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2592
2593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594                                 && test -z "${cf_tst_cflags}" \
2595                                 && cf_fix_cppflags=yes
2596
2597                         if test $cf_fix_cppflags = yes ; then
2598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599                                 continue
2600                         elif test "${cf_tst_cflags}" = "\"'" ; then
2601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2602                                 continue
2603                         fi
2604                         ;;
2605                 esac
2606                 case "$CPPFLAGS" in
2607                 *$cf_add_cflags) #(vi
2608                         ;;
2609                 *) #(vi
2610                         case $cf_add_cflags in #(vi
2611                         -D*)
2612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2613
2614 CPPFLAGS=`echo "$CPPFLAGS" | \
2615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2617
2618                                 ;;
2619                         esac
2620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2621                         ;;
2622                 esac
2623                 ;;
2624         *)
2625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2626                 ;;
2627         esac
2628         ;;
2629 yes)
2630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2631
2632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2633
2634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2635                 && test -z "${cf_tst_cflags}" \
2636                 && cf_fix_cppflags=no
2637         ;;
2638 esac
2639 done
2640
2641 if test -n "$cf_new_cflags" ; then
2642
2643         CFLAGS="$CFLAGS $cf_new_cflags"
2644 fi
2645
2646 if test -n "$cf_new_cppflags" ; then
2647
2648         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2649 fi
2650
2651 if test -n "$cf_new_extra_cppflags" ; then
2652
2653         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2654 fi
2655
2656 else
2657         cat >>confdefs.h <<\EOF
2658 #define CC_HAS_PROTOS 1
2659 EOF
2660
2661 fi
2662 fi
2663
2664 if test "$cf_cv_ansi_cc" = "no"; then
2665         { { echo "$as_me:2665: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&5
2670 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2671 You have the following choices:
2672         a. adjust your compiler options
2673         b. get an up-to-date compiler
2674         c. use a wrapper such as unproto" >&2;}
2675    { (exit 1); exit 1; }; }
2676 fi
2677
2678 case $cf_cv_system_name in
2679 os2*)
2680     CFLAGS="$CFLAGS -Zmt"
2681     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2682     CXXFLAGS="$CXXFLAGS -Zmt"
2683     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2684     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2685     ac_cv_exeext=.exe
2686     ;;
2687 esac
2688
2689 PROG_EXT="$EXEEXT"
2690
2691 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2692 #define PROG_EXT "$PROG_EXT"
2693 EOF
2694
2695 if test "$cross_compiling" = yes ; then
2696   LDCONFIG=:
2697 else
2698 case "$cf_cv_system_name" in #(vi
2699 dragonfly*|freebsd*) #(vi
2700   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2701   ;;
2702 *) LDPATH=$PATH:/sbin:/usr/sbin
2703   # Extract the first word of "ldconfig", so it can be a program name with args.
2704 set dummy ldconfig; ac_word=$2
2705 echo "$as_me:2705: checking for $ac_word" >&5
2706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2707 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2708   echo $ECHO_N "(cached) $ECHO_C" >&6
2709 else
2710   case $LDCONFIG in
2711   [\\/]* | ?:[\\/]*)
2712   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2713   ;;
2714   *)
2715   ac_save_IFS=$IFS; IFS=$ac_path_separator
2716 ac_dummy="$LDPATH"
2717 for ac_dir in $ac_dummy; do
2718   IFS=$ac_save_IFS
2719   test -z "$ac_dir" && ac_dir=.
2720   if $as_executable_p "$ac_dir/$ac_word"; then
2721    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2722    echo "$as_me:2722: found $ac_dir/$ac_word" >&5
2723    break
2724 fi
2725 done
2726
2727   ;;
2728 esac
2729 fi
2730 LDCONFIG=$ac_cv_path_LDCONFIG
2731
2732 if test -n "$LDCONFIG"; then
2733   echo "$as_me:2733: result: $LDCONFIG" >&5
2734 echo "${ECHO_T}$LDCONFIG" >&6
2735 else
2736   echo "$as_me:2736: result: no" >&5
2737 echo "${ECHO_T}no" >&6
2738 fi
2739
2740   ;;
2741 esac
2742 fi
2743
2744 echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
2745 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2746
2747 # Check whether --with-cxx or --without-cxx was given.
2748 if test "${with_cxx+set}" = set; then
2749   withval="$with_cxx"
2750   cf_with_cxx=$withval
2751 else
2752   cf_with_cxx=yes
2753 fi;
2754 echo "$as_me:2754: result: $cf_with_cxx" >&5
2755 echo "${ECHO_T}$cf_with_cxx" >&6
2756 if test "X$cf_with_cxx" = Xno ; then
2757         CXX=""
2758         GXX=""
2759 else
2760         # with autoconf 2.13, we can change the error to a warning:
2761                 ac_ext=cc
2762 ac_cpp='$CXXCPP $CPPFLAGS'
2763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2766 ac_main_return=return
2767 if test -n "$ac_tool_prefix"; then
2768   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2769   do
2770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2772 echo "$as_me:2772: checking for $ac_word" >&5
2773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2774 if test "${ac_cv_prog_CXX+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   if test -n "$CXX"; then
2778   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2779 else
2780   ac_save_IFS=$IFS; IFS=$ac_path_separator
2781 ac_dummy="$PATH"
2782 for ac_dir in $ac_dummy; do
2783   IFS=$ac_save_IFS
2784   test -z "$ac_dir" && ac_dir=.
2785   $as_executable_p "$ac_dir/$ac_word" || continue
2786 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2787 echo "$as_me:2787: found $ac_dir/$ac_word" >&5
2788 break
2789 done
2790
2791 fi
2792 fi
2793 CXX=$ac_cv_prog_CXX
2794 if test -n "$CXX"; then
2795   echo "$as_me:2795: result: $CXX" >&5
2796 echo "${ECHO_T}$CXX" >&6
2797 else
2798   echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 fi
2801
2802     test -n "$CXX" && break
2803   done
2804 fi
2805 if test -z "$CXX"; then
2806   ac_ct_CXX=$CXX
2807   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2808 do
2809   # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$ac_ct_CXX"; then
2817   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2818 else
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   $as_executable_p "$ac_dir/$ac_word" || continue
2825 ac_cv_prog_ac_ct_CXX="$ac_prog"
2826 echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827 break
2828 done
2829
2830 fi
2831 fi
2832 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2833 if test -n "$ac_ct_CXX"; then
2834   echo "$as_me:2834: result: $ac_ct_CXX" >&5
2835 echo "${ECHO_T}$ac_ct_CXX" >&6
2836 else
2837   echo "$as_me:2837: result: no" >&5
2838 echo "${ECHO_T}no" >&6
2839 fi
2840
2841   test -n "$ac_ct_CXX" && break
2842 done
2843 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2844
2845   CXX=$ac_ct_CXX
2846 fi
2847
2848 # Provide some information about the compiler.
2849 echo "$as_me:2849:" \
2850      "checking for C++ compiler version" >&5
2851 ac_compiler=`set X $ac_compile; echo $2`
2852 { (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
2853   (eval $ac_compiler --version </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
2858   (eval $ac_compiler -v </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862 { (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
2863   (eval $ac_compiler -V </dev/null >&5) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }
2867
2868 echo "$as_me:2868: checking whether we are using the GNU C++ compiler" >&5
2869 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2870 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873   cat >conftest.$ac_ext <<_ACEOF
2874 #line 2874 "configure"
2875 #include "confdefs.h"
2876
2877 int
2878 main ()
2879 {
2880 #ifndef __GNUC__
2881        choke me
2882 #endif
2883
2884   ;
2885   return 0;
2886 }
2887 _ACEOF
2888 rm -f conftest.$ac_objext
2889 if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
2890   (eval $ac_compile) 2>&5
2891   ac_status=$?
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit $ac_status); } &&
2894          { ac_try='test -s conftest.$ac_objext'
2895   { (eval echo "$as_me:2895: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); }; }; then
2900   ac_compiler_gnu=yes
2901 else
2902   echo "$as_me: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 ac_compiler_gnu=no
2905 fi
2906 rm -f conftest.$ac_objext conftest.$ac_ext
2907 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2908
2909 fi
2910 echo "$as_me:2910: result: $ac_cv_cxx_compiler_gnu" >&5
2911 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2912 GXX=`test $ac_compiler_gnu = yes && echo yes`
2913 ac_test_CXXFLAGS=${CXXFLAGS+set}
2914 ac_save_CXXFLAGS=$CXXFLAGS
2915 CXXFLAGS="-g"
2916 echo "$as_me:2916: checking whether $CXX accepts -g" >&5
2917 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2918 if test "${ac_cv_prog_cxx_g+set}" = set; then
2919   echo $ECHO_N "(cached) $ECHO_C" >&6
2920 else
2921   cat >conftest.$ac_ext <<_ACEOF
2922 #line 2922 "configure"
2923 #include "confdefs.h"
2924
2925 int
2926 main ()
2927 {
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 rm -f conftest.$ac_objext
2934 if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
2935   (eval $ac_compile) 2>&5
2936   ac_status=$?
2937   echo "$as_me:2937: \$? = $ac_status" >&5
2938   (exit $ac_status); } &&
2939          { ac_try='test -s conftest.$ac_objext'
2940   { (eval echo "$as_me:2940: \"$ac_try\"") >&5
2941   (eval $ac_try) 2>&5
2942   ac_status=$?
2943   echo "$as_me:2943: \$? = $ac_status" >&5
2944   (exit $ac_status); }; }; then
2945   ac_cv_prog_cxx_g=yes
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 cat conftest.$ac_ext >&5
2949 ac_cv_prog_cxx_g=no
2950 fi
2951 rm -f conftest.$ac_objext conftest.$ac_ext
2952 fi
2953 echo "$as_me:2953: result: $ac_cv_prog_cxx_g" >&5
2954 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2955 if test "$ac_test_CXXFLAGS" = set; then
2956   CXXFLAGS=$ac_save_CXXFLAGS
2957 elif test $ac_cv_prog_cxx_g = yes; then
2958   if test "$GXX" = yes; then
2959     CXXFLAGS="-g -O2"
2960   else
2961     CXXFLAGS="-g"
2962   fi
2963 else
2964   if test "$GXX" = yes; then
2965     CXXFLAGS="-O2"
2966   else
2967     CXXFLAGS=
2968   fi
2969 fi
2970 for ac_declaration in \
2971    ''\
2972    '#include <stdlib.h>' \
2973    'extern "C" void std::exit (int) throw (); using std::exit;' \
2974    'extern "C" void std::exit (int); using std::exit;' \
2975    'extern "C" void exit (int) throw ();' \
2976    'extern "C" void exit (int);' \
2977    'void exit (int);'
2978 do
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <stdlib.h>
2983 $ac_declaration
2984 int
2985 main ()
2986 {
2987 exit (42);
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   :
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 continue
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011   cat >conftest.$ac_ext <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 $ac_declaration
3015 int
3016 main ()
3017 {
3018 exit (42);
3019   ;
3020   return 0;
3021 }
3022 _ACEOF
3023 rm -f conftest.$ac_objext
3024 if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
3025   (eval $ac_compile) 2>&5
3026   ac_status=$?
3027   echo "$as_me:3027: \$? = $ac_status" >&5
3028   (exit $ac_status); } &&
3029          { ac_try='test -s conftest.$ac_objext'
3030   { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3031   (eval $ac_try) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); }; }; then
3035   break
3036 else
3037   echo "$as_me: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 fi
3040 rm -f conftest.$ac_objext conftest.$ac_ext
3041 done
3042 rm -rf conftest*
3043 if test -n "$ac_declaration"; then
3044   echo '#ifdef __cplusplus' >>confdefs.h
3045   echo $ac_declaration      >>confdefs.h
3046   echo '#endif'             >>confdefs.h
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return=return
3055
3056                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3057         if test "$CXX" = "g++" ; then
3058                 # Extract the first word of "g++", so it can be a program name with args.
3059 set dummy g++; ac_word=$2
3060 echo "$as_me:3060: checking for $ac_word" >&5
3061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3062 if test "${ac_cv_path_CXX+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065   case $CXX in
3066   [\\/]* | ?:[\\/]*)
3067   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3068   ;;
3069   *)
3070   ac_save_IFS=$IFS; IFS=$ac_path_separator
3071 ac_dummy="$PATH"
3072 for ac_dir in $ac_dummy; do
3073   IFS=$ac_save_IFS
3074   test -z "$ac_dir" && ac_dir=.
3075   if $as_executable_p "$ac_dir/$ac_word"; then
3076    ac_cv_path_CXX="$ac_dir/$ac_word"
3077    echo "$as_me:3077: found $ac_dir/$ac_word" >&5
3078    break
3079 fi
3080 done
3081
3082   ;;
3083 esac
3084 fi
3085 CXX=$ac_cv_path_CXX
3086
3087 if test -n "$CXX"; then
3088   echo "$as_me:3088: result: $CXX" >&5
3089 echo "${ECHO_T}$CXX" >&6
3090 else
3091   echo "$as_me:3091: result: no" >&5
3092 echo "${ECHO_T}no" >&6
3093 fi
3094
3095         fi
3096         if test "$CXX" = "g++" ; then
3097                 { echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
3098 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3099                 cf_with_cxx=no; CXX=""; GXX="";
3100         fi
3101 fi
3102
3103 GXX_VERSION=none
3104 if test "$GXX" = yes; then
3105         echo "$as_me:3105: checking version of g++" >&5
3106 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3107         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3108         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3109         echo "$as_me:3109: result: $GXX_VERSION" >&5
3110 echo "${ECHO_T}$GXX_VERSION" >&6
3111 fi
3112
3113 case $GXX_VERSION in
3114 1*|2.[0-6]*)
3115         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3116         # cf_cxx_library=no
3117         { echo "$as_me:3117: WARNING: templates do not work" >&5
3118 echo "$as_me: WARNING: templates do not work" >&2;}
3119         ;;
3120 esac
3121
3122 echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
3123 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3124
3125 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3126 if test "${with_cxx_binding+set}" = set; then
3127   withval="$with_cxx_binding"
3128   cf_with_cxx_binding=$withval
3129 else
3130   cf_with_cxx_binding=$cf_with_cxx
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
3133 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3134
3135 echo "$as_me:3135: checking if you want to build with Ada95" >&5
3136 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3137
3138 # Check whether --with-ada or --without-ada was given.
3139 if test "${with_ada+set}" = set; then
3140   withval="$with_ada"
3141   cf_with_ada=$withval
3142 else
3143   cf_with_ada=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_ada" >&5
3146 echo "${ECHO_T}$cf_with_ada" >&6
3147
3148 echo "$as_me:3148: checking if you want to install manpages" >&5
3149 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3150
3151 # Check whether --with-manpages or --without-manpages was given.
3152 if test "${with_manpages+set}" = set; then
3153   withval="$with_manpages"
3154   cf_with_manpages=$withval
3155 else
3156   cf_with_manpages=yes
3157 fi;
3158 echo "$as_me:3158: result: $cf_with_manpages" >&5
3159 echo "${ECHO_T}$cf_with_manpages" >&6
3160
3161 echo "$as_me:3161: checking if you want to build programs such as tic" >&5
3162 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3163
3164 # Check whether --with-progs or --without-progs was given.
3165 if test "${with_progs+set}" = set; then
3166   withval="$with_progs"
3167   cf_with_progs=$withval
3168 else
3169   cf_with_progs=yes
3170 fi;
3171 echo "$as_me:3171: result: $cf_with_progs" >&5
3172 echo "${ECHO_T}$cf_with_progs" >&6
3173
3174 echo "$as_me:3174: checking if you want to build test-programs" >&5
3175 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3176
3177 # Check whether --with-tests or --without-tests was given.
3178 if test "${with_tests+set}" = set; then
3179   withval="$with_tests"
3180   cf_with_tests=$withval
3181 else
3182   cf_with_tests=yes
3183 fi;
3184 echo "$as_me:3184: result: $cf_with_tests" >&5
3185 echo "${ECHO_T}$cf_with_tests" >&6
3186
3187 echo "$as_me:3187: checking if you wish to install curses.h" >&5
3188 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3189
3190 # Check whether --with-curses-h or --without-curses-h was given.
3191 if test "${with_curses_h+set}" = set; then
3192   withval="$with_curses_h"
3193   with_curses_h=$withval
3194 else
3195   with_curses_h=yes
3196 fi;
3197 echo "$as_me:3197: result: $with_curses_h" >&5
3198 echo "${ECHO_T}$with_curses_h" >&6
3199
3200 modules_to_build="ncurses"
3201 if test "X$cf_with_progs" != Xno ; then
3202 modules_to_build="$modules_to_build progs tack"
3203 fi
3204 modules_to_build="$modules_to_build panel menu form"
3205
3206 test "$program_prefix" != NONE &&
3207   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3208 # Use a double $ so make ignores it.
3209 test "$program_suffix" != NONE &&
3210   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3211 # Double any \ or $.  echo might interpret backslashes.
3212 # By default was `s,x,x', remove it if useless.
3213 cat <<\_ACEOF >conftest.sed
3214 s/[\\$]/&&/g;s/;s,x,x,$//
3215 _ACEOF
3216 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3217 rm conftest.sed
3218
3219 for ac_prog in mawk gawk nawk awk
3220 do
3221   # Extract the first word of "$ac_prog", so it can be a program name with args.
3222 set dummy $ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_AWK+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$AWK"; then
3229   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_AWK="$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 AWK=$ac_cv_prog_AWK
3245 if test -n "$AWK"; then
3246   echo "$as_me:3246: result: $AWK" >&5
3247 echo "${ECHO_T}$AWK" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253   test -n "$AWK" && break
3254 done
3255
3256 test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
3257 echo "$as_me: error: No awk program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 echo "$as_me:3260: checking for egrep" >&5
3261 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3262 if test "${ac_cv_prog_egrep+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3266     then ac_cv_prog_egrep='grep -E'
3267     else ac_cv_prog_egrep='egrep'
3268     fi
3269 fi
3270 echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
3271 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3272  EGREP=$ac_cv_prog_egrep
3273
3274 test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
3275 echo "$as_me: error: No egrep program found" >&2;}
3276    { (exit 1); exit 1; }; }
3277
3278 # Find a good install program.  We prefer a C program (faster),
3279 # so one script is as good as another.  But avoid the broken or
3280 # incompatible versions:
3281 # SysV /etc/install, /usr/sbin/install
3282 # SunOS /usr/etc/install
3283 # IRIX /sbin/install
3284 # AIX /bin/install
3285 # AmigaOS /C/install, which installs bootblocks on floppy discs
3286 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3287 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3288 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3289 # ./install, which can be erroneously created by make from ./install.sh.
3290 echo "$as_me:3290: checking for a BSD compatible install" >&5
3291 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3292 if test -z "$INSTALL"; then
3293 if test "${ac_cv_path_install+set}" = set; then
3294   echo $ECHO_N "(cached) $ECHO_C" >&6
3295 else
3296     ac_save_IFS=$IFS; IFS=$ac_path_separator
3297   for ac_dir in $PATH; do
3298     IFS=$ac_save_IFS
3299     # Account for people who put trailing slashes in PATH elements.
3300     case $ac_dir/ in
3301     / | ./ | .// | /cC/* \
3302     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3303     | /usr/ucb/* ) ;;
3304     *)
3305       # OSF1 and SCO ODT 3.0 have their own names for install.
3306       # Don't use installbsd from OSF since it installs stuff as root
3307       # by default.
3308       for ac_prog in ginstall scoinst install; do
3309         if $as_executable_p "$ac_dir/$ac_prog"; then
3310           if test $ac_prog = install &&
3311             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3312             # AIX install.  It has an incompatible calling convention.
3313             :
3314           elif test $ac_prog = install &&
3315             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3316             # program-specific install script used by HP pwplus--don't use.
3317             :
3318           else
3319             ac_cv_path_install="$ac_dir/$ac_prog -c"
3320             break 2
3321           fi
3322         fi
3323       done
3324       ;;
3325     esac
3326   done
3327
3328 fi
3329   if test "${ac_cv_path_install+set}" = set; then
3330     INSTALL=$ac_cv_path_install
3331   else
3332     # As a last resort, use the slow shell script.  We don't cache a
3333     # path for INSTALL within a source directory, because that will
3334     # break other packages using the cache if that directory is
3335     # removed, or if the path is relative.
3336     INSTALL=$ac_install_sh
3337   fi
3338 fi
3339 echo "$as_me:3339: result: $INSTALL" >&5
3340 echo "${ECHO_T}$INSTALL" >&6
3341
3342 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3343 # It thinks the first close brace ends the variable substitution.
3344 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3345
3346 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3347
3348 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3349
3350 case $INSTALL in
3351 /*)
3352   ;;
3353 *)
3354   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3355   test -z "$cf_dir" && cf_dir=.
3356   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3357   ;;
3358 esac
3359
3360 for ac_prog in tdlint lint alint splint lclint
3361 do
3362   # Extract the first word of "$ac_prog", so it can be a program name with args.
3363 set dummy $ac_prog; ac_word=$2
3364 echo "$as_me:3364: checking for $ac_word" >&5
3365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3366 if test "${ac_cv_prog_LINT+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if test -n "$LINT"; then
3370   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3371 else
3372   ac_save_IFS=$IFS; IFS=$ac_path_separator
3373 ac_dummy="$PATH"
3374 for ac_dir in $ac_dummy; do
3375   IFS=$ac_save_IFS
3376   test -z "$ac_dir" && ac_dir=.
3377   $as_executable_p "$ac_dir/$ac_word" || continue
3378 ac_cv_prog_LINT="$ac_prog"
3379 echo "$as_me:3379: found $ac_dir/$ac_word" >&5
3380 break
3381 done
3382
3383 fi
3384 fi
3385 LINT=$ac_cv_prog_LINT
3386 if test -n "$LINT"; then
3387   echo "$as_me:3387: result: $LINT" >&5
3388 echo "${ECHO_T}$LINT" >&6
3389 else
3390   echo "$as_me:3390: result: no" >&5
3391 echo "${ECHO_T}no" >&6
3392 fi
3393
3394   test -n "$LINT" && break
3395 done
3396
3397 echo "$as_me:3397: checking whether ln -s works" >&5
3398 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3399 LN_S=$as_ln_s
3400 if test "$LN_S" = "ln -s"; then
3401   echo "$as_me:3401: result: yes" >&5
3402 echo "${ECHO_T}yes" >&6
3403 else
3404   echo "$as_me:3404: result: no, using $LN_S" >&5
3405 echo "${ECHO_T}no, using $LN_S" >&6
3406 fi
3407
3408 echo "$as_me:3408: checking if $LN_S -f options work" >&5
3409 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3410
3411 rm -f conf$$.src conf$$dst
3412 echo >conf$$.dst
3413 echo first >conf$$.src
3414 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3415         cf_prog_ln_sf=yes
3416 else
3417         cf_prog_ln_sf=no
3418 fi
3419 rm -f conf$$.dst conf$$src
3420 echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
3421 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3422
3423 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3424
3425 echo "$as_me:3425: checking for long file names" >&5
3426 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3427 if test "${ac_cv_sys_long_file_names+set}" = set; then
3428   echo $ECHO_N "(cached) $ECHO_C" >&6
3429 else
3430   ac_cv_sys_long_file_names=yes
3431 # Test for long file names in all the places we know might matter:
3432 #      .                the current directory, where building will happen
3433 #      $prefix/lib      where we will be installing things
3434 #      $exec_prefix/lib likewise
3435 # eval it to expand exec_prefix.
3436 #      $TMPDIR          if set, where it might want to write temporary files
3437 # if $TMPDIR is not set:
3438 #      /tmp             where it might want to write temporary files
3439 #      /var/tmp         likewise
3440 #      /usr/tmp         likewise
3441 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3442   ac_tmpdirs=$TMPDIR
3443 else
3444   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3445 fi
3446 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3447   test -d $ac_dir || continue
3448   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3449   ac_xdir=$ac_dir/cf$$
3450   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3451   ac_tf1=$ac_xdir/conftest9012345
3452   ac_tf2=$ac_xdir/conftest9012346
3453   (echo 1 >$ac_tf1) 2>/dev/null
3454   (echo 2 >$ac_tf2) 2>/dev/null
3455   ac_val=`cat $ac_tf1 2>/dev/null`
3456   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3457     ac_cv_sys_long_file_names=no
3458     rm -rf $ac_xdir 2>/dev/null
3459     break
3460   fi
3461   rm -rf $ac_xdir 2>/dev/null
3462 done
3463 fi
3464 echo "$as_me:3464: result: $ac_cv_sys_long_file_names" >&5
3465 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3466 if test $ac_cv_sys_long_file_names = yes; then
3467
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_LONG_FILE_NAMES 1
3470 EOF
3471
3472 fi
3473
3474 # if we find pkg-config, check if we should install the ".pc" files.
3475
3476 echo "$as_me:3476: checking if you want to use pkg-config" >&5
3477 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3478
3479 # Check whether --with-pkg-config or --without-pkg-config was given.
3480 if test "${with_pkg_config+set}" = set; then
3481   withval="$with_pkg_config"
3482   cf_pkg_config=$withval
3483 else
3484   cf_pkg_config=yes
3485 fi;
3486 echo "$as_me:3486: result: $cf_pkg_config" >&5
3487 echo "${ECHO_T}$cf_pkg_config" >&6
3488
3489 case $cf_pkg_config in #(vi
3490 no) #(vi
3491         PKG_CONFIG=none
3492         ;;
3493 yes) #(vi
3494         if test -n "$ac_tool_prefix"; then
3495   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3496 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3497 echo "$as_me:3497: checking for $ac_word" >&5
3498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3499 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3500   echo $ECHO_N "(cached) $ECHO_C" >&6
3501 else
3502   case $PKG_CONFIG in
3503   [\\/]* | ?:[\\/]*)
3504   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3505   ;;
3506   *)
3507   ac_save_IFS=$IFS; IFS=$ac_path_separator
3508 ac_dummy="$PATH"
3509 for ac_dir in $ac_dummy; do
3510   IFS=$ac_save_IFS
3511   test -z "$ac_dir" && ac_dir=.
3512   if $as_executable_p "$ac_dir/$ac_word"; then
3513    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3514    echo "$as_me:3514: found $ac_dir/$ac_word" >&5
3515    break
3516 fi
3517 done
3518
3519   ;;
3520 esac
3521 fi
3522 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3523
3524 if test -n "$PKG_CONFIG"; then
3525   echo "$as_me:3525: result: $PKG_CONFIG" >&5
3526 echo "${ECHO_T}$PKG_CONFIG" >&6
3527 else
3528   echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532 fi
3533 if test -z "$ac_cv_path_PKG_CONFIG"; then
3534   ac_pt_PKG_CONFIG=$PKG_CONFIG
3535   # Extract the first word of "pkg-config", so it can be a program name with args.
3536 set dummy pkg-config; ac_word=$2
3537 echo "$as_me:3537: checking for $ac_word" >&5
3538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3539 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3540   echo $ECHO_N "(cached) $ECHO_C" >&6
3541 else
3542   case $ac_pt_PKG_CONFIG in
3543   [\\/]* | ?:[\\/]*)
3544   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3545   ;;
3546   *)
3547   ac_save_IFS=$IFS; IFS=$ac_path_separator
3548 ac_dummy="$PATH"
3549 for ac_dir in $ac_dummy; do
3550   IFS=$ac_save_IFS
3551   test -z "$ac_dir" && ac_dir=.
3552   if $as_executable_p "$ac_dir/$ac_word"; then
3553    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3554    echo "$as_me:3554: found $ac_dir/$ac_word" >&5
3555    break
3556 fi
3557 done
3558
3559   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3560   ;;
3561 esac
3562 fi
3563 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3564
3565 if test -n "$ac_pt_PKG_CONFIG"; then
3566   echo "$as_me:3566: result: $ac_pt_PKG_CONFIG" >&5
3567 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3568 else
3569   echo "$as_me:3569: result: no" >&5
3570 echo "${ECHO_T}no" >&6
3571 fi
3572
3573   PKG_CONFIG=$ac_pt_PKG_CONFIG
3574 else
3575   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3576 fi
3577
3578         ;;
3579 *)
3580         PKG_CONFIG=$withval
3581         ;;
3582 esac
3583
3584 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3585 if test "$PKG_CONFIG" != none ; then
3586
3587 if test "x$prefix" != xNONE; then
3588   cf_path_syntax="$prefix"
3589 else
3590   cf_path_syntax="$ac_default_prefix"
3591 fi
3592
3593 case ".$PKG_CONFIG" in #(vi
3594 .\$\(*\)*|.\'*\'*) #(vi
3595   ;;
3596 ..|./*|.\\*) #(vi
3597   ;;
3598 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3599   ;;
3600 .\${*prefix}*) #(vi
3601   eval PKG_CONFIG="$PKG_CONFIG"
3602   case ".$PKG_CONFIG" in #(vi
3603   .NONE/*)
3604     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3605     ;;
3606   esac
3607   ;; #(vi
3608 .no|.NONE/*)
3609   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3610   ;;
3611 *)
3612   { { echo "$as_me:3612: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3613 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3614    { (exit 1); exit 1; }; }
3615   ;;
3616 esac
3617
3618 fi
3619
3620 if test "$PKG_CONFIG" != no ; then
3621         echo "$as_me:3621: checking if we should install .pc files for $PKG_CONFIG" >&5
3622 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3623
3624         # Leave this as something that can be overridden in the environment.
3625         if test -z "$PKG_CONFIG_LIBDIR" ; then
3626                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3627         fi
3628         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3629         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3630
3631 # Check whether --enable-pc-files or --disable-pc-files was given.
3632 if test "${enable_pc_files+set}" = set; then
3633   enableval="$enable_pc_files"
3634   enable_pc_files=$enableval
3635 else
3636   enable_pc_files=no
3637 fi;
3638                 echo "$as_me:3638: result: $enable_pc_files" >&5
3639 echo "${ECHO_T}$enable_pc_files" >&6
3640         else
3641                 echo "$as_me:3641: result: no" >&5
3642 echo "${ECHO_T}no" >&6
3643                 { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3644 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3645                 enable_pc_files=no
3646         fi
3647 fi
3648
3649 echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
3650 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3651
3652 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3653 if test "${enable_mixed_case+set}" = set; then
3654   enableval="$enable_mixed_case"
3655   enable_mixedcase=$enableval
3656 else
3657   enable_mixedcase=auto
3658 fi;
3659 echo "$as_me:3659: result: $enable_mixedcase" >&5
3660 echo "${ECHO_T}$enable_mixedcase" >&6
3661 if test "$enable_mixedcase" = "auto" ; then
3662
3663 echo "$as_me:3663: checking if filesystem supports mixed-case filenames" >&5
3664 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3665 if test "${cf_cv_mixedcase+set}" = set; then
3666   echo $ECHO_N "(cached) $ECHO_C" >&6
3667 else
3668
3669 if test "$cross_compiling" = yes ; then
3670         case $target_alias in #(vi
3671         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3672                 cf_cv_mixedcase=no
3673                 ;;
3674         *)
3675                 cf_cv_mixedcase=yes
3676                 ;;
3677         esac
3678 else
3679         rm -f conftest CONFTEST
3680         echo test >conftest
3681         if test -f CONFTEST ; then
3682                 cf_cv_mixedcase=no
3683         else
3684                 cf_cv_mixedcase=yes
3685         fi
3686         rm -f conftest CONFTEST
3687 fi
3688
3689 fi
3690 echo "$as_me:3690: result: $cf_cv_mixedcase" >&5
3691 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3692 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3693 #define MIXEDCASE_FILENAMES 1
3694 EOF
3695
3696 else
3697     cf_cv_mixedcase=$enable_mixedcase
3698     if test "$enable_mixedcase" = "yes" ; then
3699         cat >>confdefs.h <<\EOF
3700 #define MIXEDCASE_FILENAMES 1
3701 EOF
3702
3703     fi
3704 fi
3705
3706 # do this after mixed-case option (tags/TAGS is not as important as tic).
3707 echo "$as_me:3707: checking whether ${MAKE-make} sets \${MAKE}" >&5
3708 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3709 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3710 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3711   echo $ECHO_N "(cached) $ECHO_C" >&6
3712 else
3713   cat >conftest.make <<\EOF
3714 all:
3715         @echo 'ac_maketemp="${MAKE}"'
3716 EOF
3717 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3718 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3719 if test -n "$ac_maketemp"; then
3720   eval ac_cv_prog_make_${ac_make}_set=yes
3721 else
3722   eval ac_cv_prog_make_${ac_make}_set=no
3723 fi
3724 rm -f conftest.make
3725 fi
3726 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3727   echo "$as_me:3727: result: yes" >&5
3728 echo "${ECHO_T}yes" >&6
3729   SET_MAKE=
3730 else
3731   echo "$as_me:3731: result: no" >&5
3732 echo "${ECHO_T}no" >&6
3733   SET_MAKE="MAKE=${MAKE-make}"
3734 fi
3735
3736 for ac_prog in exctags ctags
3737 do
3738   # Extract the first word of "$ac_prog", so it can be a program name with args.
3739 set dummy $ac_prog; ac_word=$2
3740 echo "$as_me:3740: checking for $ac_word" >&5
3741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3742 if test "${ac_cv_prog_CTAGS+set}" = set; then
3743   echo $ECHO_N "(cached) $ECHO_C" >&6
3744 else
3745   if test -n "$CTAGS"; then
3746   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3747 else
3748   ac_save_IFS=$IFS; IFS=$ac_path_separator
3749 ac_dummy="$PATH"
3750 for ac_dir in $ac_dummy; do
3751   IFS=$ac_save_IFS
3752   test -z "$ac_dir" && ac_dir=.
3753   $as_executable_p "$ac_dir/$ac_word" || continue
3754 ac_cv_prog_CTAGS="$ac_prog"
3755 echo "$as_me:3755: found $ac_dir/$ac_word" >&5
3756 break
3757 done
3758
3759 fi
3760 fi
3761 CTAGS=$ac_cv_prog_CTAGS
3762 if test -n "$CTAGS"; then
3763   echo "$as_me:3763: result: $CTAGS" >&5
3764 echo "${ECHO_T}$CTAGS" >&6
3765 else
3766   echo "$as_me:3766: result: no" >&5
3767 echo "${ECHO_T}no" >&6
3768 fi
3769
3770   test -n "$CTAGS" && break
3771 done
3772
3773 for ac_prog in exetags etags
3774 do
3775   # Extract the first word of "$ac_prog", so it can be a program name with args.
3776 set dummy $ac_prog; ac_word=$2
3777 echo "$as_me:3777: checking for $ac_word" >&5
3778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3779 if test "${ac_cv_prog_ETAGS+set}" = set; then
3780   echo $ECHO_N "(cached) $ECHO_C" >&6
3781 else
3782   if test -n "$ETAGS"; then
3783   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3784 else
3785   ac_save_IFS=$IFS; IFS=$ac_path_separator
3786 ac_dummy="$PATH"
3787 for ac_dir in $ac_dummy; do
3788   IFS=$ac_save_IFS
3789   test -z "$ac_dir" && ac_dir=.
3790   $as_executable_p "$ac_dir/$ac_word" || continue
3791 ac_cv_prog_ETAGS="$ac_prog"
3792 echo "$as_me:3792: found $ac_dir/$ac_word" >&5
3793 break
3794 done
3795
3796 fi
3797 fi
3798 ETAGS=$ac_cv_prog_ETAGS
3799 if test -n "$ETAGS"; then
3800   echo "$as_me:3800: result: $ETAGS" >&5
3801 echo "${ECHO_T}$ETAGS" >&6
3802 else
3803   echo "$as_me:3803: result: no" >&5
3804 echo "${ECHO_T}no" >&6
3805 fi
3806
3807   test -n "$ETAGS" && break
3808 done
3809
3810 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3811 set dummy ${CTAGS:-ctags}; ac_word=$2
3812 echo "$as_me:3812: checking for $ac_word" >&5
3813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3814 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817   if test -n "$MAKE_LOWER_TAGS"; then
3818   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3819 else
3820   ac_save_IFS=$IFS; IFS=$ac_path_separator
3821 ac_dummy="$PATH"
3822 for ac_dir in $ac_dummy; do
3823   IFS=$ac_save_IFS
3824   test -z "$ac_dir" && ac_dir=.
3825   $as_executable_p "$ac_dir/$ac_word" || continue
3826 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3827 echo "$as_me:3827: found $ac_dir/$ac_word" >&5
3828 break
3829 done
3830
3831   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3832 fi
3833 fi
3834 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3835 if test -n "$MAKE_LOWER_TAGS"; then
3836   echo "$as_me:3836: result: $MAKE_LOWER_TAGS" >&5
3837 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3838 else
3839   echo "$as_me:3839: result: no" >&5
3840 echo "${ECHO_T}no" >&6
3841 fi
3842
3843 if test "$cf_cv_mixedcase" = yes ; then
3844         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3845 set dummy ${ETAGS:-etags}; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$MAKE_UPPER_TAGS"; then
3852   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3866 fi
3867 fi
3868 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3869 if test -n "$MAKE_UPPER_TAGS"; then
3870   echo "$as_me:3870: result: $MAKE_UPPER_TAGS" >&5
3871 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877 else
3878         MAKE_UPPER_TAGS=no
3879 fi
3880
3881 if test "$MAKE_UPPER_TAGS" = yes ; then
3882         MAKE_UPPER_TAGS=
3883 else
3884         MAKE_UPPER_TAGS="#"
3885 fi
3886
3887 if test "$MAKE_LOWER_TAGS" = yes ; then
3888         MAKE_LOWER_TAGS=
3889 else
3890         MAKE_LOWER_TAGS="#"
3891 fi
3892
3893 echo "$as_me:3893: checking for makeflags variable" >&5
3894 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3895 if test "${cf_cv_makeflags+set}" = set; then
3896   echo $ECHO_N "(cached) $ECHO_C" >&6
3897 else
3898
3899         cf_cv_makeflags=''
3900         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3901         do
3902                 cat >cf_makeflags.tmp <<CF_EOF
3903 SHELL = /bin/sh
3904 all :
3905         @ echo '.$cf_option'
3906 CF_EOF
3907                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3908                 case "$cf_result" in
3909                 .*k)
3910                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3911                         case "$cf_result" in
3912                         .*CC=*) cf_cv_makeflags=
3913                                 ;;
3914                         *)      cf_cv_makeflags=$cf_option
3915                                 ;;
3916                         esac
3917                         break
3918                         ;;
3919                 .-)     ;;
3920                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3921                         ;;
3922                 esac
3923         done
3924         rm -f cf_makeflags.tmp
3925
3926 fi
3927 echo "$as_me:3927: result: $cf_cv_makeflags" >&5
3928 echo "${ECHO_T}$cf_cv_makeflags" >&6
3929
3930 if test -n "$ac_tool_prefix"; then
3931   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3932 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3933 echo "$as_me:3933: checking for $ac_word" >&5
3934 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3935 if test "${ac_cv_prog_RANLIB+set}" = set; then
3936   echo $ECHO_N "(cached) $ECHO_C" >&6
3937 else
3938   if test -n "$RANLIB"; then
3939   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3940 else
3941   ac_save_IFS=$IFS; IFS=$ac_path_separator
3942 ac_dummy="$PATH"
3943 for ac_dir in $ac_dummy; do
3944   IFS=$ac_save_IFS
3945   test -z "$ac_dir" && ac_dir=.
3946   $as_executable_p "$ac_dir/$ac_word" || continue
3947 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3948 echo "$as_me:3948: found $ac_dir/$ac_word" >&5
3949 break
3950 done
3951
3952 fi
3953 fi
3954 RANLIB=$ac_cv_prog_RANLIB
3955 if test -n "$RANLIB"; then
3956   echo "$as_me:3956: result: $RANLIB" >&5
3957 echo "${ECHO_T}$RANLIB" >&6
3958 else
3959   echo "$as_me:3959: result: no" >&5
3960 echo "${ECHO_T}no" >&6
3961 fi
3962
3963 fi
3964 if test -z "$ac_cv_prog_RANLIB"; then
3965   ac_ct_RANLIB=$RANLIB
3966   # Extract the first word of "ranlib", so it can be a program name with args.
3967 set dummy ranlib; ac_word=$2
3968 echo "$as_me:3968: checking for $ac_word" >&5
3969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3970 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3971   echo $ECHO_N "(cached) $ECHO_C" >&6
3972 else
3973   if test -n "$ac_ct_RANLIB"; then
3974   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3975 else
3976   ac_save_IFS=$IFS; IFS=$ac_path_separator
3977 ac_dummy="$PATH"
3978 for ac_dir in $ac_dummy; do
3979   IFS=$ac_save_IFS
3980   test -z "$ac_dir" && ac_dir=.
3981   $as_executable_p "$ac_dir/$ac_word" || continue
3982 ac_cv_prog_ac_ct_RANLIB="ranlib"
3983 echo "$as_me:3983: found $ac_dir/$ac_word" >&5
3984 break
3985 done
3986
3987   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3988 fi
3989 fi
3990 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3991 if test -n "$ac_ct_RANLIB"; then
3992   echo "$as_me:3992: result: $ac_ct_RANLIB" >&5
3993 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3994 else
3995   echo "$as_me:3995: result: no" >&5
3996 echo "${ECHO_T}no" >&6
3997 fi
3998
3999   RANLIB=$ac_ct_RANLIB
4000 else
4001   RANLIB="$ac_cv_prog_RANLIB"
4002 fi
4003
4004 if test -n "$ac_tool_prefix"; then
4005   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4006 set dummy ${ac_tool_prefix}ld; ac_word=$2
4007 echo "$as_me:4007: checking for $ac_word" >&5
4008 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4009 if test "${ac_cv_prog_LD+set}" = set; then
4010   echo $ECHO_N "(cached) $ECHO_C" >&6
4011 else
4012   if test -n "$LD"; then
4013   ac_cv_prog_LD="$LD" # Let the user override the test.
4014 else
4015   ac_save_IFS=$IFS; IFS=$ac_path_separator
4016 ac_dummy="$PATH"
4017 for ac_dir in $ac_dummy; do
4018   IFS=$ac_save_IFS
4019   test -z "$ac_dir" && ac_dir=.
4020   $as_executable_p "$ac_dir/$ac_word" || continue
4021 ac_cv_prog_LD="${ac_tool_prefix}ld"
4022 echo "$as_me:4022: found $ac_dir/$ac_word" >&5
4023 break
4024 done
4025
4026 fi
4027 fi
4028 LD=$ac_cv_prog_LD
4029 if test -n "$LD"; then
4030   echo "$as_me:4030: result: $LD" >&5
4031 echo "${ECHO_T}$LD" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037 fi
4038 if test -z "$ac_cv_prog_LD"; then
4039   ac_ct_LD=$LD
4040   # Extract the first word of "ld", so it can be a program name with args.
4041 set dummy ld; ac_word=$2
4042 echo "$as_me:4042: checking for $ac_word" >&5
4043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4044 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4045   echo $ECHO_N "(cached) $ECHO_C" >&6
4046 else
4047   if test -n "$ac_ct_LD"; then
4048   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4049 else
4050   ac_save_IFS=$IFS; IFS=$ac_path_separator
4051 ac_dummy="$PATH"
4052 for ac_dir in $ac_dummy; do
4053   IFS=$ac_save_IFS
4054   test -z "$ac_dir" && ac_dir=.
4055   $as_executable_p "$ac_dir/$ac_word" || continue
4056 ac_cv_prog_ac_ct_LD="ld"
4057 echo "$as_me:4057: found $ac_dir/$ac_word" >&5
4058 break
4059 done
4060
4061   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4062 fi
4063 fi
4064 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4065 if test -n "$ac_ct_LD"; then
4066   echo "$as_me:4066: result: $ac_ct_LD" >&5
4067 echo "${ECHO_T}$ac_ct_LD" >&6
4068 else
4069   echo "$as_me:4069: result: no" >&5
4070 echo "${ECHO_T}no" >&6
4071 fi
4072
4073   LD=$ac_ct_LD
4074 else
4075   LD="$ac_cv_prog_LD"
4076 fi
4077
4078 if test -n "$ac_tool_prefix"; then
4079   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4080 set dummy ${ac_tool_prefix}ar; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_prog_AR+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   if test -n "$AR"; then
4087   ac_cv_prog_AR="$AR" # Let the user override the test.
4088 else
4089   ac_save_IFS=$IFS; IFS=$ac_path_separator
4090 ac_dummy="$PATH"
4091 for ac_dir in $ac_dummy; do
4092   IFS=$ac_save_IFS
4093   test -z "$ac_dir" && ac_dir=.
4094   $as_executable_p "$ac_dir/$ac_word" || continue
4095 ac_cv_prog_AR="${ac_tool_prefix}ar"
4096 echo "$as_me:4096: found $ac_dir/$ac_word" >&5
4097 break
4098 done
4099
4100 fi
4101 fi
4102 AR=$ac_cv_prog_AR
4103 if test -n "$AR"; then
4104   echo "$as_me:4104: result: $AR" >&5
4105 echo "${ECHO_T}$AR" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111 fi
4112 if test -z "$ac_cv_prog_AR"; then
4113   ac_ct_AR=$AR
4114   # Extract the first word of "ar", so it can be a program name with args.
4115 set dummy ar; ac_word=$2
4116 echo "$as_me:4116: checking for $ac_word" >&5
4117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4118 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4119   echo $ECHO_N "(cached) $ECHO_C" >&6
4120 else
4121   if test -n "$ac_ct_AR"; then
4122   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4123 else
4124   ac_save_IFS=$IFS; IFS=$ac_path_separator
4125 ac_dummy="$PATH"
4126 for ac_dir in $ac_dummy; do
4127   IFS=$ac_save_IFS
4128   test -z "$ac_dir" && ac_dir=.
4129   $as_executable_p "$ac_dir/$ac_word" || continue
4130 ac_cv_prog_ac_ct_AR="ar"
4131 echo "$as_me:4131: found $ac_dir/$ac_word" >&5
4132 break
4133 done
4134
4135   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4136 fi
4137 fi
4138 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4139 if test -n "$ac_ct_AR"; then
4140   echo "$as_me:4140: result: $ac_ct_AR" >&5
4141 echo "${ECHO_T}$ac_ct_AR" >&6
4142 else
4143   echo "$as_me:4143: result: no" >&5
4144 echo "${ECHO_T}no" >&6
4145 fi
4146
4147   AR=$ac_ct_AR
4148 else
4149   AR="$ac_cv_prog_AR"
4150 fi
4151
4152 if test -n "$ac_tool_prefix"; then
4153   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4154 set dummy ${ac_tool_prefix}ar; ac_word=$2
4155 echo "$as_me:4155: checking for $ac_word" >&5
4156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4157 if test "${ac_cv_prog_AR+set}" = set; then
4158   echo $ECHO_N "(cached) $ECHO_C" >&6
4159 else
4160   if test -n "$AR"; then
4161   ac_cv_prog_AR="$AR" # Let the user override the test.
4162 else
4163   ac_save_IFS=$IFS; IFS=$ac_path_separator
4164 ac_dummy="$PATH"
4165 for ac_dir in $ac_dummy; do
4166   IFS=$ac_save_IFS
4167   test -z "$ac_dir" && ac_dir=.
4168   $as_executable_p "$ac_dir/$ac_word" || continue
4169 ac_cv_prog_AR="${ac_tool_prefix}ar"
4170 echo "$as_me:4170: found $ac_dir/$ac_word" >&5
4171 break
4172 done
4173
4174 fi
4175 fi
4176 AR=$ac_cv_prog_AR
4177 if test -n "$AR"; then
4178   echo "$as_me:4178: result: $AR" >&5
4179 echo "${ECHO_T}$AR" >&6
4180 else
4181   echo "$as_me:4181: result: no" >&5
4182 echo "${ECHO_T}no" >&6
4183 fi
4184
4185 fi
4186 if test -z "$ac_cv_prog_AR"; then
4187   ac_ct_AR=$AR
4188   # Extract the first word of "ar", so it can be a program name with args.
4189 set dummy ar; ac_word=$2
4190 echo "$as_me:4190: checking for $ac_word" >&5
4191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4192 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4193   echo $ECHO_N "(cached) $ECHO_C" >&6
4194 else
4195   if test -n "$ac_ct_AR"; then
4196   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4197 else
4198   ac_save_IFS=$IFS; IFS=$ac_path_separator
4199 ac_dummy="$PATH"
4200 for ac_dir in $ac_dummy; do
4201   IFS=$ac_save_IFS
4202   test -z "$ac_dir" && ac_dir=.
4203   $as_executable_p "$ac_dir/$ac_word" || continue
4204 ac_cv_prog_ac_ct_AR="ar"
4205 echo "$as_me:4205: found $ac_dir/$ac_word" >&5
4206 break
4207 done
4208
4209   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4210 fi
4211 fi
4212 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4213 if test -n "$ac_ct_AR"; then
4214   echo "$as_me:4214: result: $ac_ct_AR" >&5
4215 echo "${ECHO_T}$ac_ct_AR" >&6
4216 else
4217   echo "$as_me:4217: result: no" >&5
4218 echo "${ECHO_T}no" >&6
4219 fi
4220
4221   AR=$ac_ct_AR
4222 else
4223   AR="$ac_cv_prog_AR"
4224 fi
4225
4226 echo "$as_me:4226: checking for options to update archives" >&5
4227 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4228 if test "${cf_cv_ar_flags+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231
4232         cf_cv_ar_flags=unknown
4233         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4234         do
4235
4236                 # check if $ARFLAGS already contains this choice
4237                 if test "x$ARFLAGS" != "x" ; then
4238                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4239                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4240                                 cf_cv_ar_flags=
4241                                 break
4242                         fi
4243                 fi
4244
4245                 rm -f conftest.$ac_cv_objext
4246                 rm -f conftest.a
4247
4248                 cat >conftest.$ac_ext <<EOF
4249 #line 4249 "configure"
4250 int     testdata[3] = { 123, 456, 789 };
4251 EOF
4252                 if { (eval echo "$as_me:4252: \"$ac_compile\"") >&5
4253   (eval $ac_compile) 2>&5
4254   ac_status=$?
4255   echo "$as_me:4255: \$? = $ac_status" >&5
4256   (exit $ac_status); } ; then
4257                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4258                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4259                         if test -f conftest.a ; then
4260                                 cf_cv_ar_flags=$cf_ar_flags
4261                                 break
4262                         fi
4263                 else
4264                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4265
4266 echo "${as_me:-configure}:4266: testing cannot compile test-program ..." 1>&5
4267
4268                         break
4269                 fi
4270         done
4271         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4272
4273 fi
4274 echo "$as_me:4274: result: $cf_cv_ar_flags" >&5
4275 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4276
4277 if test -n "$ARFLAGS" ; then
4278         if test -n "$cf_cv_ar_flags" ; then
4279                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4280         fi
4281 else
4282         ARFLAGS=$cf_cv_ar_flags
4283 fi
4284
4285 echo "$as_me:4285: checking if you have specified an install-prefix" >&5
4286 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4287
4288 # Check whether --with-install-prefix or --without-install-prefix was given.
4289 if test "${with_install_prefix+set}" = set; then
4290   withval="$with_install_prefix"
4291   case "$withval" in #(vi
4292         yes|no) #(vi
4293                 ;;
4294         *)      DESTDIR="$withval"
4295                 ;;
4296         esac
4297 fi;
4298 echo "$as_me:4298: result: $DESTDIR" >&5
4299 echo "${ECHO_T}$DESTDIR" >&6
4300
4301 ###############################################################################
4302
4303 # If we're cross-compiling, allow the user to override the tools and their
4304 # options.  The configure script is oriented toward identifying the host
4305 # compiler, etc., but we need a build compiler to generate parts of the source.
4306
4307 if test "$cross_compiling" = yes ; then
4308
4309         # defaults that we might want to override
4310         : ${BUILD_CFLAGS:=''}
4311         : ${BUILD_CPPFLAGS:=''}
4312         : ${BUILD_LDFLAGS:=''}
4313         : ${BUILD_LIBS:=''}
4314         : ${BUILD_EXEEXT:='$x'}
4315         : ${BUILD_OBJEXT:='o'}
4316
4317 # Check whether --with-build-cc or --without-build-cc was given.
4318 if test "${with_build_cc+set}" = set; then
4319   withval="$with_build_cc"
4320   BUILD_CC="$withval"
4321 else
4322   for ac_prog in gcc cc cl
4323 do
4324   # Extract the first word of "$ac_prog", so it can be a program name with args.
4325 set dummy $ac_prog; ac_word=$2
4326 echo "$as_me:4326: checking for $ac_word" >&5
4327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4328 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4329   echo $ECHO_N "(cached) $ECHO_C" >&6
4330 else
4331   if test -n "$BUILD_CC"; then
4332   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4333 else
4334   ac_save_IFS=$IFS; IFS=$ac_path_separator
4335 ac_dummy="$PATH"
4336 for ac_dir in $ac_dummy; do
4337   IFS=$ac_save_IFS
4338   test -z "$ac_dir" && ac_dir=.
4339   $as_executable_p "$ac_dir/$ac_word" || continue
4340 ac_cv_prog_BUILD_CC="$ac_prog"
4341 echo "$as_me:4341: found $ac_dir/$ac_word" >&5
4342 break
4343 done
4344
4345 fi
4346 fi
4347 BUILD_CC=$ac_cv_prog_BUILD_CC
4348 if test -n "$BUILD_CC"; then
4349   echo "$as_me:4349: result: $BUILD_CC" >&5
4350 echo "${ECHO_T}$BUILD_CC" >&6
4351 else
4352   echo "$as_me:4352: result: no" >&5
4353 echo "${ECHO_T}no" >&6
4354 fi
4355
4356   test -n "$BUILD_CC" && break
4357 done
4358
4359 fi;
4360         echo "$as_me:4360: checking for native build C compiler" >&5
4361 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4362         echo "$as_me:4362: result: $BUILD_CC" >&5
4363 echo "${ECHO_T}$BUILD_CC" >&6
4364
4365         echo "$as_me:4365: checking for native build C preprocessor" >&5
4366 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4367
4368 # Check whether --with-build-cpp or --without-build-cpp was given.
4369 if test "${with_build_cpp+set}" = set; then
4370   withval="$with_build_cpp"
4371   BUILD_CPP="$withval"
4372 else
4373   BUILD_CPP='${BUILD_CC} -E'
4374 fi;
4375         echo "$as_me:4375: result: $BUILD_CPP" >&5
4376 echo "${ECHO_T}$BUILD_CPP" >&6
4377
4378         echo "$as_me:4378: checking for native build C flags" >&5
4379 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4380
4381 # Check whether --with-build-cflags or --without-build-cflags was given.
4382 if test "${with_build_cflags+set}" = set; then
4383   withval="$with_build_cflags"
4384   BUILD_CFLAGS="$withval"
4385 fi;
4386         echo "$as_me:4386: result: $BUILD_CFLAGS" >&5
4387 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4388
4389         echo "$as_me:4389: checking for native build C preprocessor-flags" >&5
4390 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4391
4392 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4393 if test "${with_build_cppflags+set}" = set; then
4394   withval="$with_build_cppflags"
4395   BUILD_CPPFLAGS="$withval"
4396 fi;
4397         echo "$as_me:4397: result: $BUILD_CPPFLAGS" >&5
4398 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4399
4400         echo "$as_me:4400: checking for native build linker-flags" >&5
4401 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4402
4403 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4404 if test "${with_build_ldflags+set}" = set; then
4405   withval="$with_build_ldflags"
4406   BUILD_LDFLAGS="$withval"
4407 fi;
4408         echo "$as_me:4408: result: $BUILD_LDFLAGS" >&5
4409 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4410
4411         echo "$as_me:4411: checking for native build linker-libraries" >&5
4412 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4413
4414 # Check whether --with-build-libs or --without-build-libs was given.
4415 if test "${with_build_libs+set}" = set; then
4416   withval="$with_build_libs"
4417   BUILD_LIBS="$withval"
4418 fi;
4419         echo "$as_me:4419: result: $BUILD_LIBS" >&5
4420 echo "${ECHO_T}$BUILD_LIBS" >&6
4421
4422         # this assumes we're on Unix.
4423         BUILD_EXEEXT=
4424         BUILD_OBJEXT=o
4425
4426         : ${BUILD_CC:='${CC}'}
4427
4428         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4429                 { { echo "$as_me:4429: error: Cross-build requires two compilers.
4430 Use --with-build-cc to specify the native compiler." >&5
4431 echo "$as_me: error: Cross-build requires two compilers.
4432 Use --with-build-cc to specify the native compiler." >&2;}
4433    { (exit 1); exit 1; }; }
4434         fi
4435
4436 else
4437         : ${BUILD_CC:='${CC}'}
4438         : ${BUILD_CPP:='${CPP}'}
4439         : ${BUILD_CFLAGS:='${CFLAGS}'}
4440         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4441         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4442         : ${BUILD_LIBS:='${LIBS}'}
4443         : ${BUILD_EXEEXT:='$x'}
4444         : ${BUILD_OBJEXT:='o'}
4445 fi
4446
4447 ###############################################################################
4448
4449 ### Options to allow the user to specify the set of libraries which are used.
4450 ### Use "--without-normal --with-shared" to allow the default model to be
4451 ### shared, for example.
4452 cf_list_models=""
4453
4454 echo "$as_me:4454: checking if libtool -version-number should be used" >&5
4455 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4456
4457 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4458 if test "${enable_libtool_version+set}" = set; then
4459   enableval="$enable_libtool_version"
4460   test "$enableval" != no && enableval=yes
4461   if test "$enableval" != "yes" ; then
4462     cf_libtool_version=no
4463   else
4464     cf_libtool_version=yes
4465   fi
4466 else
4467   enableval=yes
4468   cf_libtool_version=yes
4469
4470 fi;
4471 echo "$as_me:4471: result: $cf_libtool_version" >&5
4472 echo "${ECHO_T}$cf_libtool_version" >&6
4473
4474 if test "$cf_libtool_version" = yes ; then
4475         LIBTOOL_VERSION="-version-number"
4476 else
4477         LIBTOOL_VERSION="-version-info"
4478 fi
4479
4480 LIBTOOL=
4481
4482 # common library maintenance symbols that are convenient for libtool scripts:
4483 LIB_CREATE='${AR} -cr'
4484 LIB_OBJECT='${OBJECTS}'
4485 LIB_SUFFIX=.a
4486 LIB_PREP="$RANLIB"
4487
4488 # symbols used to prop libtool up to enable it to determine what it should be
4489 # doing:
4490 LIB_CLEAN=
4491 LIB_COMPILE=
4492 LIB_LINK='${CC}'
4493 LIB_INSTALL=
4494 LIB_UNINSTALL=
4495
4496 echo "$as_me:4496: checking if you want to build libraries with libtool" >&5
4497 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4498
4499 # Check whether --with-libtool or --without-libtool was given.
4500 if test "${with_libtool+set}" = set; then
4501   withval="$with_libtool"
4502   with_libtool=$withval
4503 else
4504   with_libtool=no
4505 fi;
4506 echo "$as_me:4506: result: $with_libtool" >&5
4507 echo "${ECHO_T}$with_libtool" >&6
4508 if test "$with_libtool" != "no"; then
4509
4510         if test "$with_libtool" != "yes" ; then
4511
4512 if test "x$prefix" != xNONE; then
4513   cf_path_syntax="$prefix"
4514 else
4515   cf_path_syntax="$ac_default_prefix"
4516 fi
4517
4518 case ".$with_libtool" in #(vi
4519 .\$\(*\)*|.\'*\'*) #(vi
4520   ;;
4521 ..|./*|.\\*) #(vi
4522   ;;
4523 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4524   ;;
4525 .\${*prefix}*) #(vi
4526   eval with_libtool="$with_libtool"
4527   case ".$with_libtool" in #(vi
4528   .NONE/*)
4529     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4530     ;;
4531   esac
4532   ;; #(vi
4533 .no|.NONE/*)
4534   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4535   ;;
4536 *)
4537   { { echo "$as_me:4537: error: expected a pathname, not \"$with_libtool\"" >&5
4538 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4539    { (exit 1); exit 1; }; }
4540   ;;
4541 esac
4542
4543                 LIBTOOL=$with_libtool
4544         else
4545                 # Extract the first word of "libtool", so it can be a program name with args.
4546 set dummy libtool; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   case $LIBTOOL in
4553   [\\/]* | ?:[\\/]*)
4554   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4555   ;;
4556   *)
4557   ac_save_IFS=$IFS; IFS=$ac_path_separator
4558 ac_dummy="$PATH"
4559 for ac_dir in $ac_dummy; do
4560   IFS=$ac_save_IFS
4561   test -z "$ac_dir" && ac_dir=.
4562   if $as_executable_p "$ac_dir/$ac_word"; then
4563    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4564    echo "$as_me:4564: found $ac_dir/$ac_word" >&5
4565    break
4566 fi
4567 done
4568
4569   ;;
4570 esac
4571 fi
4572 LIBTOOL=$ac_cv_path_LIBTOOL
4573
4574 if test -n "$LIBTOOL"; then
4575   echo "$as_me:4575: result: $LIBTOOL" >&5
4576 echo "${ECHO_T}$LIBTOOL" >&6
4577 else
4578   echo "$as_me:4578: result: no" >&5
4579 echo "${ECHO_T}no" >&6
4580 fi
4581
4582         fi
4583         if test -z "$LIBTOOL" ; then
4584                 { { echo "$as_me:4584: error: Cannot find libtool" >&5
4585 echo "$as_me: error: Cannot find libtool" >&2;}
4586    { (exit 1); exit 1; }; }
4587         fi
4588         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4589         LIB_OBJECT='${OBJECTS:.o=.lo}'
4590         LIB_SUFFIX=.la
4591         LIB_CLEAN='${LIBTOOL} --mode=clean'
4592         LIB_COMPILE='${LIBTOOL} --mode=compile'
4593         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4594         LIB_INSTALL='${LIBTOOL} --mode=install'
4595         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4596         LIB_PREP=:
4597
4598         # Show the version of libtool
4599         echo "$as_me:4599: checking version of libtool" >&5
4600 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4601
4602         # Save the version in a cache variable - this is not entirely a good
4603         # thing, but the version string from libtool is very ugly, and for
4604         # bug reports it might be useful to have the original string. "("
4605         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.].*//'`
4606         echo "$as_me:4606: result: $cf_cv_libtool_version" >&5
4607 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4608         if test -z "$cf_cv_libtool_version" ; then
4609                 { { echo "$as_me:4609: error: This is not GNU libtool" >&5
4610 echo "$as_me: error: This is not GNU libtool" >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613
4614         # special hack to add -no-undefined (which libtool should do for itself)
4615         LT_UNDEF=
4616         case "$cf_cv_system_name" in #(vi
4617         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4618                 LT_UNDEF=-no-undefined
4619                 ;;
4620         esac
4621
4622         # special hack to add --tag option for C++ compiler
4623         case $cf_cv_libtool_version in #(vi
4624         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4625                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4626                 LIBTOOL="$LIBTOOL --tag=CC"
4627                 ;;
4628         *)
4629                 LIBTOOL_CXX="$LIBTOOL"
4630                 ;;
4631         esac
4632 else
4633         LIBTOOL=""
4634         LIBTOOL_CXX=""
4635 fi
4636
4637 test -z "$LIBTOOL" && ECHO_LT=
4638
4639 if test "$with_libtool" != "no" ; then
4640
4641 cf_list_models="$cf_list_models libtool"
4642
4643 else
4644
4645 echo "$as_me:4645: checking if you want to build shared libraries" >&5
4646 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4647
4648 # Check whether --with-shared or --without-shared was given.
4649 if test "${with_shared+set}" = set; then
4650   withval="$with_shared"
4651   with_shared=$withval
4652 else
4653   with_shared=no
4654 fi;
4655 echo "$as_me:4655: result: $with_shared" >&5
4656 echo "${ECHO_T}$with_shared" >&6
4657 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4658
4659 echo "$as_me:4659: checking if you want to build static libraries" >&5
4660 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4661
4662 # Check whether --with-normal or --without-normal was given.
4663 if test "${with_normal+set}" = set; then
4664   withval="$with_normal"
4665   with_normal=$withval
4666 else
4667   with_normal=yes
4668 fi;
4669 echo "$as_me:4669: result: $with_normal" >&5
4670 echo "${ECHO_T}$with_normal" >&6
4671 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4672
4673 echo "$as_me:4673: checking if you want to build debug libraries" >&5
4674 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4675
4676 # Check whether --with-debug or --without-debug was given.
4677 if test "${with_debug+set}" = set; then
4678   withval="$with_debug"
4679   with_debug=$withval
4680 else
4681   with_debug=yes
4682 fi;
4683 echo "$as_me:4683: result: $with_debug" >&5
4684 echo "${ECHO_T}$with_debug" >&6
4685 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4686
4687 echo "$as_me:4687: checking if you want to build profiling libraries" >&5
4688 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4689
4690 # Check whether --with-profile or --without-profile was given.
4691 if test "${with_profile+set}" = set; then
4692   withval="$with_profile"
4693   with_profile=$withval
4694 else
4695   with_profile=no
4696 fi;
4697 echo "$as_me:4697: result: $with_profile" >&5
4698 echo "${ECHO_T}$with_profile" >&6
4699 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4700
4701 fi
4702
4703 ###############################################################################
4704
4705 echo "$as_me:4705: checking for specified models" >&5
4706 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4707 test -z "$cf_list_models" && cf_list_models=normal
4708 test "$with_libtool" != "no" && cf_list_models=libtool
4709 echo "$as_me:4709: result: $cf_list_models" >&5
4710 echo "${ECHO_T}$cf_list_models" >&6
4711
4712 ### Use the first model as the default, and save its suffix for use in building
4713 ### up test-applications.
4714 echo "$as_me:4714: checking for default model" >&5
4715 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4716 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4717 echo "$as_me:4717: result: $DFT_LWR_MODEL" >&5
4718 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4719
4720 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4721
4722 TICS_NAME=tic
4723
4724 TINFO_NAME=tinfo
4725
4726 LIB_NAME=ncurses
4727
4728 LIB_DIR=../lib
4729 LIB_2ND=../../lib
4730
4731         case $cf_cv_system_name in #(vi
4732         OS/2*|os2*) #(vi
4733         LIB_PREFIX=''
4734         ;;
4735         *)      LIB_PREFIX='lib'
4736         ;;
4737         esac
4738 cf_prefix=$LIB_PREFIX
4739
4740 LIB_PREFIX=$cf_prefix
4741
4742 LIB_SUFFIX=
4743
4744 ###############################################################################
4745
4746 echo "$as_me:4746: checking if you want to build a separate terminfo library" >&5
4747 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4748
4749 # Check whether --with-termlib or --without-termlib was given.
4750 if test "${with_termlib+set}" = set; then
4751   withval="$with_termlib"
4752   with_termlib=$withval
4753 else
4754   with_termlib=no
4755 fi;
4756 echo "$as_me:4756: result: $with_termlib" >&5
4757 echo "${ECHO_T}$with_termlib" >&6
4758
4759 echo "$as_me:4759: checking if you want to build a separate tic library" >&5
4760 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4761
4762 # Check whether --with-ticlib or --without-ticlib was given.
4763 if test "${with_ticlib+set}" = set; then
4764   withval="$with_ticlib"
4765   with_ticlib=$withval
4766 else
4767   with_ticlib=no
4768 fi;
4769 echo "$as_me:4769: result: $with_ticlib" >&5
4770 echo "${ECHO_T}$with_ticlib" >&6
4771
4772 ### Checks for special libraries, must be done up-front.
4773 SHLIB_LIST=""
4774
4775 echo "$as_me:4775: checking if you want to link with the GPM mouse library" >&5
4776 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4777
4778 # Check whether --with-gpm or --without-gpm was given.
4779 if test "${with_gpm+set}" = set; then
4780   withval="$with_gpm"
4781   with_gpm=$withval
4782 else
4783   with_gpm=maybe
4784 fi;
4785 echo "$as_me:4785: result: $with_gpm" >&5
4786 echo "${ECHO_T}$with_gpm" >&6
4787
4788 if test "$with_gpm" != no ; then
4789         echo "$as_me:4789: checking for gpm.h" >&5
4790 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4791 if test "${ac_cv_header_gpm_h+set}" = set; then
4792   echo $ECHO_N "(cached) $ECHO_C" >&6
4793 else
4794   cat >conftest.$ac_ext <<_ACEOF
4795 #line 4795 "configure"
4796 #include "confdefs.h"
4797 #include <gpm.h>
4798 _ACEOF
4799 if { (eval echo "$as_me:4799: \"$ac_cpp conftest.$ac_ext\"") >&5
4800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4801   ac_status=$?
4802   egrep -v '^ *\+' conftest.er1 >conftest.err
4803   rm -f conftest.er1
4804   cat conftest.err >&5
4805   echo "$as_me:4805: \$? = $ac_status" >&5
4806   (exit $ac_status); } >/dev/null; then
4807   if test -s conftest.err; then
4808     ac_cpp_err=$ac_c_preproc_warn_flag
4809   else
4810     ac_cpp_err=
4811   fi
4812 else
4813   ac_cpp_err=yes
4814 fi
4815 if test -z "$ac_cpp_err"; then
4816   ac_cv_header_gpm_h=yes
4817 else
4818   echo "$as_me: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   ac_cv_header_gpm_h=no
4821 fi
4822 rm -f conftest.err conftest.$ac_ext
4823 fi
4824 echo "$as_me:4824: result: $ac_cv_header_gpm_h" >&5
4825 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4826 if test $ac_cv_header_gpm_h = yes; then
4827
4828                 cat >>confdefs.h <<\EOF
4829 #define HAVE_GPM_H 1
4830 EOF
4831
4832                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4833                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4834
4835 echo "${as_me:-configure}:4835: testing assuming we really have GPM library ..." 1>&5
4836
4837                         cat >>confdefs.h <<\EOF
4838 #define HAVE_LIBGPM 1
4839 EOF
4840
4841                 else
4842                         echo "$as_me:4842: checking for Gpm_Open in -lgpm" >&5
4843 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4844 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   ac_check_lib_save_LIBS=$LIBS
4848 LIBS="-lgpm  $LIBS"
4849 cat >conftest.$ac_ext <<_ACEOF
4850 #line 4850 "configure"
4851 #include "confdefs.h"
4852
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 #ifdef __cplusplus
4855 extern "C"
4856 #endif
4857 /* We use char because int might match the return type of a gcc2
4858    builtin and then its argument prototype would still apply.  */
4859 char Gpm_Open ();
4860 int
4861 main ()
4862 {
4863 Gpm_Open ();
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 rm -f conftest.$ac_objext conftest$ac_exeext
4869 if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
4870   (eval $ac_link) 2>&5
4871   ac_status=$?
4872   echo "$as_me:4872: \$? = $ac_status" >&5
4873   (exit $ac_status); } &&
4874          { ac_try='test -s conftest$ac_exeext'
4875   { (eval echo "$as_me:4875: \"$ac_try\"") >&5
4876   (eval $ac_try) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); }; }; then
4880   ac_cv_lib_gpm_Gpm_Open=yes
4881 else
4882   echo "$as_me: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 ac_cv_lib_gpm_Gpm_Open=no
4885 fi
4886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4887 LIBS=$ac_check_lib_save_LIBS
4888 fi
4889 echo "$as_me:4889: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4890 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4891 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4892   :
4893 else
4894
4895                                 { { echo "$as_me:4895: error: Cannot link with GPM library" >&5
4896 echo "$as_me: error: Cannot link with GPM library" >&2;}
4897    { (exit 1); exit 1; }; }
4898                 fi
4899                 with_gpm=yes
4900
4901 fi
4902
4903 else
4904
4905                 test "$with_gpm" != maybe && { echo "$as_me:4905: WARNING: Cannot find GPM header" >&5
4906 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4907                 with_gpm=no
4908
4909 fi
4910
4911 fi
4912
4913 if test "$with_gpm" != no ; then
4914         echo "$as_me:4914: checking if you want to load GPM dynamically" >&5
4915 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4916
4917 # Check whether --with-dlsym or --without-dlsym was given.
4918 if test "${with_dlsym+set}" = set; then
4919   withval="$with_dlsym"
4920   with_dlsym=$withval
4921 else
4922   with_dlsym=yes
4923 fi;
4924         echo "$as_me:4924: result: $with_dlsym" >&5
4925 echo "${ECHO_T}$with_dlsym" >&6
4926         if test "$with_dlsym" = yes ; then
4927
4928 cf_have_dlsym=no
4929 echo "$as_me:4929: checking for dlsym" >&5
4930 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4931 if test "${ac_cv_func_dlsym+set}" = set; then
4932   echo $ECHO_N "(cached) $ECHO_C" >&6
4933 else
4934   cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937 /* System header to define __stub macros and hopefully few prototypes,
4938     which can conflict with char dlsym (); below.  */
4939 #include <assert.h>
4940 /* Override any gcc2 internal prototype to avoid an error.  */
4941 #ifdef __cplusplus
4942 extern "C"
4943 #endif
4944 /* We use char because int might match the return type of a gcc2
4945    builtin and then its argument prototype would still apply.  */
4946 char dlsym ();
4947 char (*f) ();
4948
4949 int
4950 main ()
4951 {
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4956 choke me
4957 #else
4958 f = dlsym;
4959 #endif
4960
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext conftest$ac_exeext
4966 if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
4967   (eval $ac_link) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest$ac_exeext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977   ac_cv_func_dlsym=yes
4978 else
4979   echo "$as_me: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 ac_cv_func_dlsym=no
4982 fi
4983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4984 fi
4985 echo "$as_me:4985: result: $ac_cv_func_dlsym" >&5
4986 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4987 if test $ac_cv_func_dlsym = yes; then
4988   cf_have_dlsym=yes
4989 else
4990
4991 cf_have_libdl=no
4992 echo "$as_me:4992: checking for dlsym in -ldl" >&5
4993 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4994 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4995   echo $ECHO_N "(cached) $ECHO_C" >&6
4996 else
4997   ac_check_lib_save_LIBS=$LIBS
4998 LIBS="-ldl  $LIBS"
4999 cat >conftest.$ac_ext <<_ACEOF
5000 #line 5000 "configure"
5001 #include "confdefs.h"
5002
5003 /* Override any gcc2 internal prototype to avoid an error.  */
5004 #ifdef __cplusplus
5005 extern "C"
5006 #endif
5007 /* We use char because int might match the return type of a gcc2
5008    builtin and then its argument prototype would still apply.  */
5009 char dlsym ();
5010 int
5011 main ()
5012 {
5013 dlsym ();
5014   ;
5015   return 0;
5016 }
5017 _ACEOF
5018 rm -f conftest.$ac_objext conftest$ac_exeext
5019 if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
5020   (eval $ac_link) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); } &&
5024          { ac_try='test -s conftest$ac_exeext'
5025   { (eval echo "$as_me:5025: \"$ac_try\"") >&5
5026   (eval $ac_try) 2>&5
5027   ac_status=$?
5028   echo "$as_me:5028: \$? = $ac_status" >&5
5029   (exit $ac_status); }; }; then
5030   ac_cv_lib_dl_dlsym=yes
5031 else
5032   echo "$as_me: failed program was:" >&5
5033 cat conftest.$ac_ext >&5
5034 ac_cv_lib_dl_dlsym=no
5035 fi
5036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5037 LIBS=$ac_check_lib_save_LIBS
5038 fi
5039 echo "$as_me:5039: result: $ac_cv_lib_dl_dlsym" >&5
5040 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5041 if test $ac_cv_lib_dl_dlsym = yes; then
5042
5043         cf_have_dlsym=yes
5044         cf_have_libdl=yes
5045 fi
5046
5047 fi
5048
5049 if test "$cf_have_dlsym" = yes ; then
5050         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5051
5052         echo "$as_me:5052: checking whether able to link to dl*() functions" >&5
5053 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5054         cat >conftest.$ac_ext <<_ACEOF
5055 #line 5055 "configure"
5056 #include "confdefs.h"
5057 #include <dlfcn.h>
5058 int
5059 main ()
5060 {
5061
5062                 void *obj;
5063                 if ((obj = dlopen("filename", 0)) != 0) {
5064                         if (dlsym(obj, "symbolname") == 0) {
5065                         dlclose(obj);
5066                         }
5067                 }
5068   ;
5069   return 0;
5070 }
5071 _ACEOF
5072 rm -f conftest.$ac_objext conftest$ac_exeext
5073 if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
5074   (eval $ac_link) 2>&5
5075   ac_status=$?
5076   echo "$as_me:5076: \$? = $ac_status" >&5
5077   (exit $ac_status); } &&
5078          { ac_try='test -s conftest$ac_exeext'
5079   { (eval echo "$as_me:5079: \"$ac_try\"") >&5
5080   (eval $ac_try) 2>&5
5081   ac_status=$?
5082   echo "$as_me:5082: \$? = $ac_status" >&5
5083   (exit $ac_status); }; }; then
5084
5085                 cat >>confdefs.h <<\EOF
5086 #define HAVE_LIBDL 1
5087 EOF
5088
5089 else
5090   echo "$as_me: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092
5093                 { { echo "$as_me:5093: error: Cannot link test program for libdl" >&5
5094 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5095    { (exit 1); exit 1; }; }
5096 fi
5097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5098         echo "$as_me:5098: result: ok" >&5
5099 echo "${ECHO_T}ok" >&6
5100 else
5101         { { echo "$as_me:5101: error: Cannot find dlsym function" >&5
5102 echo "$as_me: error: Cannot find dlsym function" >&2;}
5103    { (exit 1); exit 1; }; }
5104 fi
5105
5106                 if test "$with_gpm" != yes ; then
5107                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5108
5109 echo "${as_me:-configure}:5109: testing assuming soname for gpm is $with_gpm ..." 1>&5
5110
5111                         cf_cv_gpm_soname="$with_gpm"
5112                 else
5113
5114 echo "$as_me:5114: checking for soname of gpm library" >&5
5115 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5116 if test "${cf_cv_gpm_soname+set}" = set; then
5117   echo $ECHO_N "(cached) $ECHO_C" >&6
5118 else
5119
5120 cf_cv_gpm_soname=unknown
5121 if test "$cross_compiling" != yes ; then
5122 cat >conftest.$ac_ext <<CF_EOF
5123 #include <gpm.h>
5124 int main()
5125 {
5126 if (Gpm_Open(0,0)) Gpm_Close();
5127         ${cf_cv_main_return:-return}(0);
5128 }
5129 CF_EOF
5130 cf_save_LIBS="$LIBS"
5131         LIBS="-lgpm $LIBS"
5132         if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                 if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
5138   (eval $ac_link) 2>&5
5139   ac_status=$?
5140   echo "$as_me:5140: \$? = $ac_status" >&5
5141   (exit $ac_status); } ; then
5142                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5143                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5144                 fi
5145         fi
5146 rm -rf conftest*
5147 LIBS="$cf_save_LIBS"
5148 fi
5149
5150 fi
5151 echo "$as_me:5151: result: $cf_cv_gpm_soname" >&5
5152 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5153
5154                 fi
5155                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5156 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5157 EOF
5158
5159                 SHLIB_LIST="-ldl $SHLIB_LIST"
5160         else
5161                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5162                 TEST_LIBS="-lgpm $TEST_LIBS"
5163         fi
5164         cat >>confdefs.h <<\EOF
5165 #define HAVE_LIBGPM 1
5166 EOF
5167
5168 echo "$as_me:5168: checking for Gpm_Wgetch in -lgpm" >&5
5169 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5170 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5171   echo $ECHO_N "(cached) $ECHO_C" >&6
5172 else
5173   ac_check_lib_save_LIBS=$LIBS
5174 LIBS="-lgpm  $LIBS"
5175 cat >conftest.$ac_ext <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5178
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 #ifdef __cplusplus
5181 extern "C"
5182 #endif
5183 /* We use char because int might match the return type of a gcc2
5184    builtin and then its argument prototype would still apply.  */
5185 char Gpm_Wgetch ();
5186 int
5187 main ()
5188 {
5189 Gpm_Wgetch ();
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext conftest$ac_exeext
5195 if { (eval echo "$as_me:5195: \"$ac_link\"") >&5
5196   (eval $ac_link) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); } &&
5200          { ac_try='test -s conftest$ac_exeext'
5201   { (eval echo "$as_me:5201: \"$ac_try\"") >&5
5202   (eval $ac_try) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); }; }; then
5206   ac_cv_lib_gpm_Gpm_Wgetch=yes
5207 else
5208   echo "$as_me: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5210 ac_cv_lib_gpm_Gpm_Wgetch=no
5211 fi
5212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5213 LIBS=$ac_check_lib_save_LIBS
5214 fi
5215 echo "$as_me:5215: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5216 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5217 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5218
5219 echo "$as_me:5219: checking if GPM is weakly bound to curses library" >&5
5220 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5221 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5222   echo $ECHO_N "(cached) $ECHO_C" >&6
5223 else
5224
5225 cf_cv_check_gpm_wgetch=unknown
5226 if test "$cross_compiling" != yes ; then
5227
5228 cat >conftest.$ac_ext <<CF_EOF
5229 #include <gpm.h>
5230 int main()
5231 {
5232         Gpm_Wgetch();
5233         ${cf_cv_main_return:-return}(0);
5234 }
5235 CF_EOF
5236
5237         cf_save_LIBS="$LIBS"
5238         # This only works if we can look at the symbol table.  If a shared
5239         # library is stripped for install, we cannot use that.  So we're forced
5240         # to rely on the static library, noting that some packagers may not
5241         # include it.
5242         LIBS="-static -lgpm -dynamic $LIBS"
5243         if { (eval echo "$as_me:5243: \"$ac_compile\"") >&5
5244   (eval $ac_compile) 2>&5
5245   ac_status=$?
5246   echo "$as_me:5246: \$? = $ac_status" >&5
5247   (exit $ac_status); } ; then
5248                 if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
5249   (eval $ac_link) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5254                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5255                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5256                 fi
5257         fi
5258         rm -rf conftest*
5259         LIBS="$cf_save_LIBS"
5260 fi
5261
5262 fi
5263 echo "$as_me:5263: result: $cf_cv_check_gpm_wgetch" >&5
5264 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5265
5266 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5267         { echo "$as_me:5267: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5268 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5269 fi
5270
5271 fi
5272
5273 fi
5274
5275 # not everyone has "test -c"
5276 if test -c /dev/sysmouse 2>/dev/null ; then
5277 echo "$as_me:5277: checking if you want to use sysmouse" >&5
5278 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5279
5280 # Check whether --with-sysmouse or --without-sysmouse was given.
5281 if test "${with_sysmouse+set}" = set; then
5282   withval="$with_sysmouse"
5283   cf_with_sysmouse=$withval
5284 else
5285   cf_with_sysmouse=maybe
5286 fi;
5287         if test "$cf_with_sysmouse" != no ; then
5288         cat >conftest.$ac_ext <<_ACEOF
5289 #line 5289 "configure"
5290 #include "confdefs.h"
5291
5292 #include <osreldate.h>
5293 #if (__FreeBSD_version >= 400017)
5294 #include <sys/consio.h>
5295 #include <sys/fbio.h>
5296 #else
5297 #include <machine/console.h>
5298 #endif
5299
5300 int
5301 main ()
5302 {
5303
5304         struct mouse_info the_mouse;
5305         ioctl(0, CONS_MOUSECTL, &the_mouse);
5306
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext
5312 if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
5313   (eval $ac_compile) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest.$ac_objext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   cf_with_sysmouse=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 cf_with_sysmouse=no
5328 fi
5329 rm -f conftest.$ac_objext conftest.$ac_ext
5330         fi
5331 echo "$as_me:5331: result: $cf_with_sysmouse" >&5
5332 echo "${ECHO_T}$cf_with_sysmouse" >&6
5333 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5334 #define USE_SYSMOUSE 1
5335 EOF
5336
5337 fi
5338
5339 if test X"$CC_G_OPT" = X"" ; then
5340         CC_G_OPT='-g'
5341         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5342 fi
5343
5344 if test X"$CXX_G_OPT" = X"" ; then
5345         CXX_G_OPT='-g'
5346         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5347 fi
5348
5349 echo "$as_me:5349: checking for default loader flags" >&5
5350 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5351 case $DFT_LWR_MODEL in
5352 libtool) LD_MODEL=''   ;;
5353 normal)  LD_MODEL=''   ;;
5354 debug)   LD_MODEL=$CC_G_OPT ;;
5355 profile) LD_MODEL='-pg';;
5356 shared)  LD_MODEL=''   ;;
5357 esac
5358 echo "$as_me:5358: result: $LD_MODEL" >&5
5359 echo "${ECHO_T}$LD_MODEL" >&6
5360
5361 case $DFT_LWR_MODEL in
5362 shared)
5363
5364 echo "$as_me:5364: checking if rpath option should be used" >&5
5365 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5366
5367 # Check whether --enable-rpath or --disable-rpath was given.
5368 if test "${enable_rpath+set}" = set; then
5369   enableval="$enable_rpath"
5370   cf_cv_enable_rpath=$enableval
5371 else
5372   cf_cv_enable_rpath=no
5373 fi;
5374 echo "$as_me:5374: result: $cf_cv_enable_rpath" >&5
5375 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5376
5377 echo "$as_me:5377: checking if shared libraries should be relinked during install" >&5
5378 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5379
5380 # Check whether --enable-relink or --disable-relink was given.
5381 if test "${enable_relink+set}" = set; then
5382   enableval="$enable_relink"
5383   cf_cv_do_relink=$enableval
5384 else
5385   cf_cv_do_relink=yes
5386 fi;
5387 echo "$as_me:5387: result: $cf_cv_do_relink" >&5
5388 echo "${ECHO_T}$cf_cv_do_relink" >&6
5389         ;;
5390 esac
5391
5392 LD_RPATH_OPT=
5393 echo "$as_me:5393: checking for an rpath option" >&5
5394 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5395 case $cf_cv_system_name in #(vi
5396 irix*) #(vi
5397         if test "$GCC" = yes; then
5398                 LD_RPATH_OPT="-Wl,-rpath,"
5399         else
5400                 LD_RPATH_OPT="-rpath "
5401         fi
5402         ;;
5403 linux*|gnu*|k*bsd*-gnu) #(vi
5404         LD_RPATH_OPT="-Wl,-rpath,"
5405         ;;
5406 openbsd[2-9].*) #(vi
5407         LD_RPATH_OPT="-Wl,-rpath,"
5408         ;;
5409 freebsd*) #(vi
5410         LD_RPATH_OPT="-rpath "
5411         ;;
5412 netbsd*) #(vi
5413         LD_RPATH_OPT="-Wl,-rpath,"
5414         ;;
5415 osf*|mls+*) #(vi
5416         LD_RPATH_OPT="-rpath "
5417         ;;
5418 solaris2*) #(vi
5419         LD_RPATH_OPT="-R"
5420         ;;
5421 *)
5422         ;;
5423 esac
5424 echo "$as_me:5424: result: $LD_RPATH_OPT" >&5
5425 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5426
5427 case "x$LD_RPATH_OPT" in #(vi
5428 x-R*)
5429         echo "$as_me:5429: checking if we need a space after rpath option" >&5
5430 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5431         cf_save_LIBS="$LIBS"
5432         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5433         cat >conftest.$ac_ext <<_ACEOF
5434 #line 5434 "configure"
5435 #include "confdefs.h"
5436
5437 int
5438 main ()
5439 {
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext conftest$ac_exeext
5446 if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
5447   (eval $ac_link) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest$ac_exeext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_rpath_space=no
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_rpath_space=yes
5462 fi
5463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5464         LIBS="$cf_save_LIBS"
5465         echo "$as_me:5465: result: $cf_rpath_space" >&5
5466 echo "${ECHO_T}$cf_rpath_space" >&6
5467         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5468         ;;
5469 esac
5470
5471         LOCAL_LDFLAGS=
5472         LOCAL_LDFLAGS2=
5473         LD_SHARED_OPTS=
5474         INSTALL_LIB="-m 644"
5475
5476         cf_cv_do_symlinks=no
5477         cf_ld_rpath_opt=
5478         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5479
5480         echo "$as_me:5480: checking if release/abi version should be used for shared libs" >&5
5481 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5482
5483 # Check whether --with-shlib-version or --without-shlib-version was given.
5484 if test "${with_shlib_version+set}" = set; then
5485   withval="$with_shlib_version"
5486   test -z "$withval" && withval=auto
5487         case $withval in #(vi
5488         yes) #(vi
5489                 cf_cv_shlib_version=auto
5490                 ;;
5491         rel|abi|auto|no) #(vi
5492                 cf_cv_shlib_version=$withval
5493                 ;;
5494         *)
5495                 { { echo "$as_me:5495: error: option value must be one of: rel, abi, auto or no" >&5
5496 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5497    { (exit 1); exit 1; }; }
5498                 ;;
5499         esac
5500
5501 else
5502   cf_cv_shlib_version=auto
5503 fi;
5504         echo "$as_me:5504: result: $cf_cv_shlib_version" >&5
5505 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5506
5507         cf_cv_rm_so_locs=no
5508
5509         # Some less-capable ports of gcc support only -fpic
5510         CC_SHARED_OPTS=
5511         if test "$GCC" = yes
5512         then
5513                 echo "$as_me:5513: checking which $CC option to use" >&5
5514 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5515                 cf_save_CFLAGS="$CFLAGS"
5516                 for CC_SHARED_OPTS in -fPIC -fpic ''
5517                 do
5518                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5519                         cat >conftest.$ac_ext <<_ACEOF
5520 #line 5520 "configure"
5521 #include "confdefs.h"
5522 #include <stdio.h>
5523 int
5524 main ()
5525 {
5526 int x = 1
5527   ;
5528   return 0;
5529 }
5530 _ACEOF
5531 rm -f conftest.$ac_objext
5532 if { (eval echo "$as_me:5532: \"$ac_compile\"") >&5
5533   (eval $ac_compile) 2>&5
5534   ac_status=$?
5535   echo "$as_me:5535: \$? = $ac_status" >&5
5536   (exit $ac_status); } &&
5537          { ac_try='test -s conftest.$ac_objext'
5538   { (eval echo "$as_me:5538: \"$ac_try\"") >&5
5539   (eval $ac_try) 2>&5
5540   ac_status=$?
5541   echo "$as_me:5541: \$? = $ac_status" >&5
5542   (exit $ac_status); }; }; then
5543   break
5544 else
5545   echo "$as_me: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5547 fi
5548 rm -f conftest.$ac_objext conftest.$ac_ext
5549                 done
5550                 echo "$as_me:5550: result: $CC_SHARED_OPTS" >&5
5551 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5552                 CFLAGS="$cf_save_CFLAGS"
5553         fi
5554
5555         cf_cv_shlib_version_infix=no
5556
5557         case $cf_cv_system_name in #(vi
5558         aix[56]*) #(vi
5559                 if test "$GCC" = yes; then
5560                         CC_SHARED_OPTS=
5561                         MK_SHARED_LIB='$(CC) -shared'
5562                 fi
5563                 ;;
5564         beos*) #(vi
5565                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5566                 ;;
5567         cygwin*) #(vi
5568                 CC_SHARED_OPTS=
5569                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5570                 cf_cv_shlib_version=cygdll
5571                 cf_cv_shlib_version_infix=cygdll
5572                 cat >mk_shared_lib.sh <<-CF_EOF
5573                 #!/bin/sh
5574                 SHARED_LIB=\$1
5575                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5576                 shift
5577                 cat <<-EOF
5578                 Linking shared library
5579                 ** SHARED_LIB \$SHARED_LIB
5580                 ** IMPORT_LIB \$IMPORT_LIB
5581 EOF
5582                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5583 CF_EOF
5584                 chmod +x mk_shared_lib.sh
5585                 ;;
5586         darwin*) #(vi
5587                 EXTRA_CFLAGS="-no-cpp-precomp"
5588                 CC_SHARED_OPTS="-dynamic"
5589                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5590                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5591                 cf_cv_shlib_version_infix=yes
5592                 echo "$as_me:5592: checking if ld -search_paths_first works" >&5
5593 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5594 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5595   echo $ECHO_N "(cached) $ECHO_C" >&6
5596 else
5597
5598                         cf_save_LDFLAGS=$LDFLAGS
5599                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5600                         cat >conftest.$ac_ext <<_ACEOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5603
5604 int
5605 main ()
5606 {
5607 int i;
5608   ;
5609   return 0;
5610 }
5611 _ACEOF
5612 rm -f conftest.$ac_objext conftest$ac_exeext
5613 if { (eval echo "$as_me:5613: \"$ac_link\"") >&5
5614   (eval $ac_link) 2>&5
5615   ac_status=$?
5616   echo "$as_me:5616: \$? = $ac_status" >&5
5617   (exit $ac_status); } &&
5618          { ac_try='test -s conftest$ac_exeext'
5619   { (eval echo "$as_me:5619: \"$ac_try\"") >&5
5620   (eval $ac_try) 2>&5
5621   ac_status=$?
5622   echo "$as_me:5622: \$? = $ac_status" >&5
5623   (exit $ac_status); }; }; then
5624   cf_cv_ldflags_search_paths_first=yes
5625 else
5626   echo "$as_me: failed program was:" >&5
5627 cat conftest.$ac_ext >&5
5628 cf_cv_ldflags_search_paths_first=no
5629 fi
5630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5631                                 LDFLAGS=$cf_save_LDFLAGS
5632 fi
5633 echo "$as_me:5633: result: $cf_cv_ldflags_search_paths_first" >&5
5634 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5635                 if test $cf_cv_ldflags_search_paths_first = yes; then
5636                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5637                 fi
5638                 ;;
5639         hpux*) #(vi
5640                 # (tested with gcc 2.7.2 -- I don't have c89)
5641                 if test "$GCC" = yes; then
5642                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5643                 else
5644                         CC_SHARED_OPTS='+Z'
5645                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5646                 fi
5647                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5648                 # HP-UX shared libraries must be executable, and should be
5649                 # readonly to exploit a quirk in the memory manager.
5650                 INSTALL_LIB="-m 555"
5651                 ;;
5652         irix*) #(vi
5653                 if test "$cf_cv_enable_rpath" = yes ; then
5654                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5655                 fi
5656                 # tested with IRIX 5.2 and 'cc'.
5657                 if test "$GCC" != yes; then
5658                         CC_SHARED_OPTS='-KPIC'
5659                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5660                 else
5661                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5662                 fi
5663                 cf_cv_rm_so_locs=yes
5664                 ;;
5665         linux*|gnu*|k*bsd*-gnu) #(vi
5666                 if test "$DFT_LWR_MODEL" = "shared" ; then
5667                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5668                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5669                 fi
5670                 if test "$cf_cv_enable_rpath" = yes ; then
5671                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5672                 fi
5673
5674         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5675         if test "$cf_cv_shlib_version" = rel; then
5676                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5677         else
5678                 cf_cv_shared_soname='`basename $@`'
5679         fi
5680
5681                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5682                 ;;
5683         openbsd[2-9].*) #(vi
5684                 if test "$DFT_LWR_MODEL" = "shared" ; then
5685                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5686                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5687                 fi
5688                 if test "$cf_cv_enable_rpath" = yes ; then
5689                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5690                 fi
5691                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5692
5693         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5694         if test "$cf_cv_shlib_version" = rel; then
5695                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5696         else
5697                 cf_cv_shared_soname='`basename $@`'
5698         fi
5699
5700                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5701                 ;;
5702         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5703                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5704                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5705                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5706                 ;;
5707         freebsd*) #(vi
5708                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5709                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5710                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5711                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5712                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5713                 fi
5714
5715         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5716         if test "$cf_cv_shlib_version" = rel; then
5717                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5718         else
5719                 cf_cv_shared_soname='`basename $@`'
5720         fi
5721
5722                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5723                 ;;
5724         netbsd*) #(vi
5725                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5726                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5727                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5728                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5729                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5730                         if test "$cf_cv_shlib_version" = auto; then
5731                         if test -f /usr/libexec/ld.elf_so; then
5732                                 cf_cv_shlib_version=abi
5733                         else
5734                                 cf_cv_shlib_version=rel
5735                         fi
5736                         fi
5737
5738         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5739         if test "$cf_cv_shlib_version" = rel; then
5740                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5741         else
5742                 cf_cv_shared_soname='`basename $@`'
5743         fi
5744
5745                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5746                 else
5747                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5748                 fi
5749                 ;;
5750         osf*|mls+*) #(vi
5751                 # tested with OSF/1 V3.2 and 'cc'
5752                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5753                 # link with shared libs).
5754                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5755                 case $host_os in #(vi
5756                 osf4*)
5757                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5758                         ;;
5759                 esac
5760                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5761                 if test "$DFT_LWR_MODEL" = "shared" ; then
5762                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5763                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5764                 fi
5765                 cf_cv_rm_so_locs=yes
5766                 ;;
5767         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5768                 # tested with osr5.0.5
5769                 if test "$GCC" != yes; then
5770                         CC_SHARED_OPTS='-belf -KPIC'
5771                 fi
5772                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5773                 if test "$cf_cv_enable_rpath" = yes ; then
5774                         # only way is to set LD_RUN_PATH but no switch for it
5775                         RUN_PATH=$libdir
5776                 fi
5777                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5778                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5779                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5780                 ;;
5781         sunos4*) #(vi
5782                 # tested with SunOS 4.1.1 and gcc 2.7.0
5783                 if test "$GCC" != yes; then
5784                         CC_SHARED_OPTS='-KPIC'
5785                 fi
5786                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5787                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5788                 ;;
5789         solaris2*) #(vi
5790                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5791                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5792                 if test "$DFT_LWR_MODEL" = "shared" ; then
5793                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5794                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5795                 fi
5796                 if test "$cf_cv_enable_rpath" = yes ; then
5797                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5798                 fi
5799
5800         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5801         if test "$cf_cv_shlib_version" = rel; then
5802                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5803         else
5804                 cf_cv_shared_soname='`basename $@`'
5805         fi
5806
5807                 if test "$GCC" != yes; then
5808                         cf_save_CFLAGS="$CFLAGS"
5809                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5810                         do
5811                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5812                                 cat >conftest.$ac_ext <<_ACEOF
5813 #line 5813 "configure"
5814 #include "confdefs.h"
5815 #include <stdio.h>
5816 int
5817 main ()
5818 {
5819 printf("Hello\n");
5820   ;
5821   return 0;
5822 }
5823 _ACEOF
5824 rm -f conftest.$ac_objext
5825 if { (eval echo "$as_me:5825: \"$ac_compile\"") >&5
5826   (eval $ac_compile) 2>&5
5827   ac_status=$?
5828   echo "$as_me:5828: \$? = $ac_status" >&5
5829   (exit $ac_status); } &&
5830          { ac_try='test -s conftest.$ac_objext'
5831   { (eval echo "$as_me:5831: \"$ac_try\"") >&5
5832   (eval $ac_try) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); }; }; then
5836   break
5837 else
5838   echo "$as_me: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840 fi
5841 rm -f conftest.$ac_objext conftest.$ac_ext
5842                         done
5843                         CFLAGS="$cf_save_CFLAGS"
5844                         CC_SHARED_OPTS=$cf_shared_opts
5845                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5846                 else
5847                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5848                 fi
5849                 ;;
5850         sysv5uw7*|unix_sv*) #(vi
5851                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5852                 if test "$GCC" != yes; then
5853                         CC_SHARED_OPTS='-KPIC'
5854                 fi
5855                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5856                 ;;
5857         *)
5858                 CC_SHARED_OPTS='unknown'
5859                 MK_SHARED_LIB='echo unknown'
5860                 ;;
5861         esac
5862
5863         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5864         case "$cf_cv_shlib_version" in #(vi
5865         rel|abi)
5866                 case "$MK_SHARED_LIB" in #(vi
5867                 *'-o $@') #(vi
5868                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5869                         ;;
5870                 *)
5871                         { echo "$as_me:5871: WARNING: ignored --with-shlib-version" >&5
5872 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5873                         ;;
5874                 esac
5875                 ;;
5876         esac
5877
5878         if test -n "$cf_ld_rpath_opt" ; then
5879                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5880         fi
5881
5882 if test "$CC_SHARED_OPTS" = "unknown"; then
5883         for model in $cf_list_models; do
5884                 if test "$model" = "shared"; then
5885                         { { echo "$as_me:5885: error: Shared libraries are not supported in this version" >&5
5886 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5887    { (exit 1); exit 1; }; }
5888                 fi
5889         done
5890 fi
5891
5892 ### If we're building with rpath, try to link non-standard libs that way too.
5893 if test "$DFT_LWR_MODEL" = "shared"; then
5894
5895 echo "$as_me:5895: checking if rpath-hack should be disabled" >&5
5896 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5897
5898 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5899 if test "${enable_rpath_hack+set}" = set; then
5900   enableval="$enable_rpath_hack"
5901   test "$enableval" != no && enableval=yes
5902   if test "$enableval" != "yes" ; then
5903     cf_disable_rpath_hack=yes
5904   else
5905     cf_disable_rpath_hack=no
5906   fi
5907 else
5908   enableval=yes
5909   cf_disable_rpath_hack=no
5910
5911 fi;
5912 echo "$as_me:5912: result: $cf_disable_rpath_hack" >&5
5913 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5914 if test "$cf_disable_rpath_hack" = no ; then
5915
5916 echo "$as_me:5916: checking for updated LDFLAGS" >&5
5917 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5918 if test -n "$LD_RPATH_OPT" ; then
5919         echo "$as_me:5919: result: maybe" >&5
5920 echo "${ECHO_T}maybe" >&6
5921
5922         for ac_prog in ldd
5923 do
5924   # Extract the first word of "$ac_prog", so it can be a program name with args.
5925 set dummy $ac_prog; ac_word=$2
5926 echo "$as_me:5926: checking for $ac_word" >&5
5927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5928 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5929   echo $ECHO_N "(cached) $ECHO_C" >&6
5930 else
5931   if test -n "$cf_ldd_prog"; then
5932   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5933 else
5934   ac_save_IFS=$IFS; IFS=$ac_path_separator
5935 ac_dummy="$PATH"
5936 for ac_dir in $ac_dummy; do
5937   IFS=$ac_save_IFS
5938   test -z "$ac_dir" && ac_dir=.
5939   $as_executable_p "$ac_dir/$ac_word" || continue
5940 ac_cv_prog_cf_ldd_prog="$ac_prog"
5941 echo "$as_me:5941: found $ac_dir/$ac_word" >&5
5942 break
5943 done
5944
5945 fi
5946 fi
5947 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5948 if test -n "$cf_ldd_prog"; then
5949   echo "$as_me:5949: result: $cf_ldd_prog" >&5
5950 echo "${ECHO_T}$cf_ldd_prog" >&6
5951 else
5952   echo "$as_me:5952: result: no" >&5
5953 echo "${ECHO_T}no" >&6
5954 fi
5955
5956   test -n "$cf_ldd_prog" && break
5957 done
5958 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5959
5960         cf_rpath_list="/usr/lib /lib"
5961         if test "$cf_ldd_prog" != no
5962         then
5963                 cf_rpath_oops=
5964
5965 cat >conftest.$ac_ext <<_ACEOF
5966 #line 5966 "configure"
5967 #include "confdefs.h"
5968 #include <stdio.h>
5969 int
5970 main ()
5971 {
5972 printf("Hello");
5973   ;
5974   return 0;
5975 }
5976 _ACEOF
5977 rm -f conftest.$ac_objext conftest$ac_exeext
5978 if { (eval echo "$as_me:5978: \"$ac_link\"") >&5
5979   (eval $ac_link) 2>&5
5980   ac_status=$?
5981   echo "$as_me:5981: \$? = $ac_status" >&5
5982   (exit $ac_status); } &&
5983          { ac_try='test -s conftest$ac_exeext'
5984   { (eval echo "$as_me:5984: \"$ac_try\"") >&5
5985   (eval $ac_try) 2>&5
5986   ac_status=$?
5987   echo "$as_me:5987: \$? = $ac_status" >&5
5988   (exit $ac_status); }; }; then
5989   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5990                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5991 else
5992   echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5994 fi
5995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5996
5997                 # If we passed the link-test, but get a "not found" on a given library,
5998                 # this could be due to inept reconfiguration of gcc to make it only
5999                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6000                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6001                 # /usr/local libraries.
6002                 if test -n "$cf_rpath_oops"
6003                 then
6004                         for cf_rpath_src in $cf_rpath_oops
6005                         do
6006                                 for cf_rpath_dir in \
6007                                         /usr/local \
6008                                         /usr/pkg \
6009                                         /opt/sfw
6010                                 do
6011                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6012                                         then
6013                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6014
6015 echo "${as_me:-configure}:6015: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6016
6017                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6018                                                 break
6019                                         fi
6020                                 done
6021                         done
6022                 fi
6023         fi
6024
6025         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6026
6027 echo "${as_me:-configure}:6027: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6028
6029 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6030
6031 echo "${as_me:-configure}:6031: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6032
6033 cf_rpath_dst=
6034 for cf_rpath_src in $LDFLAGS
6035 do
6036         case $cf_rpath_src in #(vi
6037         -L*) #(vi
6038
6039                 # check if this refers to a directory which we will ignore
6040                 cf_rpath_skip=no
6041                 if test -n "$cf_rpath_list"
6042                 then
6043                         for cf_rpath_item in $cf_rpath_list
6044                         do
6045                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6046                                 then
6047                                         cf_rpath_skip=yes
6048                                         break
6049                                 fi
6050                         done
6051                 fi
6052
6053                 if test "$cf_rpath_skip" = no
6054                 then
6055                         # transform the option
6056                         if test "$LD_RPATH_OPT" = "-R " ; then
6057                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6058                         else
6059                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6060                         fi
6061
6062                         # if we have not already added this, add it now
6063                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6064                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6065                         then
6066                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6067
6068 echo "${as_me:-configure}:6068: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6069
6070                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6071                         fi
6072                 fi
6073                 ;;
6074         esac
6075         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6076 done
6077 LDFLAGS=$cf_rpath_dst
6078
6079 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6080
6081 echo "${as_me:-configure}:6081: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6082
6083 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6084
6085 echo "${as_me:-configure}:6085: testing ...checking LIBS $LIBS ..." 1>&5
6086
6087 cf_rpath_dst=
6088 for cf_rpath_src in $LIBS
6089 do
6090         case $cf_rpath_src in #(vi
6091         -L*) #(vi
6092
6093                 # check if this refers to a directory which we will ignore
6094                 cf_rpath_skip=no
6095                 if test -n "$cf_rpath_list"
6096                 then
6097                         for cf_rpath_item in $cf_rpath_list
6098                         do
6099                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6100                                 then
6101                                         cf_rpath_skip=yes
6102                                         break
6103                                 fi
6104                         done
6105                 fi
6106
6107                 if test "$cf_rpath_skip" = no
6108                 then
6109                         # transform the option
6110                         if test "$LD_RPATH_OPT" = "-R " ; then
6111                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6112                         else
6113                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6114                         fi
6115
6116                         # if we have not already added this, add it now
6117                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6118                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6119                         then
6120                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6121
6122 echo "${as_me:-configure}:6122: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6123
6124                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6125                         fi
6126                 fi
6127                 ;;
6128         esac
6129         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6130 done
6131 LIBS=$cf_rpath_dst
6132
6133 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6134
6135 echo "${as_me:-configure}:6135: testing ...checked LIBS $LIBS ..." 1>&5
6136
6137         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6138
6139 echo "${as_me:-configure}:6139: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6140
6141 fi
6142
6143 fi
6144
6145 fi
6146
6147 ###############################################################################
6148
6149 ###     use option --disable-overwrite to leave out the link to -lcurses
6150 echo "$as_me:6150: checking if you wish to install ncurses overwriting curses" >&5
6151 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6152
6153 # Check whether --enable-overwrite or --disable-overwrite was given.
6154 if test "${enable_overwrite+set}" = set; then
6155   enableval="$enable_overwrite"
6156   with_overwrite=$enableval
6157 else
6158   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6159 fi;
6160 echo "$as_me:6160: result: $with_overwrite" >&5
6161 echo "${ECHO_T}$with_overwrite" >&6
6162
6163 echo "$as_me:6163: checking if external terminfo-database is used" >&5
6164 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6165
6166 # Check whether --enable-database or --disable-database was given.
6167 if test "${enable_database+set}" = set; then
6168   enableval="$enable_database"
6169   use_database=$enableval
6170 else
6171   use_database=yes
6172 fi;
6173 echo "$as_me:6173: result: $use_database" >&5
6174 echo "${ECHO_T}$use_database" >&6
6175
6176 case $host_os in #(vi
6177 os2*) #(vi
6178         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6179         ;;
6180 *) #(vi
6181         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6182         ;;
6183 esac
6184
6185         case $cf_cv_system_name in
6186         os2*)   PATH_SEPARATOR=';'  ;;
6187         *)      PATH_SEPARATOR=':'  ;;
6188         esac
6189
6190 if test "$use_database" != no ; then
6191         cat >>confdefs.h <<\EOF
6192 #define USE_DATABASE 1
6193 EOF
6194
6195         echo "$as_me:6195: checking which terminfo source-file will be installed" >&5
6196 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6197
6198 # Check whether --with-database or --without-database was given.
6199 if test "${with_database+set}" = set; then
6200   withval="$with_database"
6201   TERMINFO_SRC=$withval
6202 fi;
6203         echo "$as_me:6203: result: $TERMINFO_SRC" >&5
6204 echo "${ECHO_T}$TERMINFO_SRC" >&6
6205
6206         echo "$as_me:6206: checking whether to use hashed database instead of directory/tree" >&5
6207 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6208
6209 # Check whether --with-hashed-db or --without-hashed-db was given.
6210 if test "${with_hashed_db+set}" = set; then
6211   withval="$with_hashed_db"
6212
6213 else
6214   with_hashed_db=no
6215 fi;
6216         echo "$as_me:6216: result: $with_hashed_db" >&5
6217 echo "${ECHO_T}$with_hashed_db" >&6
6218 else
6219         with_hashed_db=no
6220 fi
6221
6222 echo "$as_me:6222: checking for list of fallback descriptions" >&5
6223 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6224
6225 # Check whether --with-fallbacks or --without-fallbacks was given.
6226 if test "${with_fallbacks+set}" = set; then
6227   withval="$with_fallbacks"
6228   with_fallback=$withval
6229 else
6230   with_fallback=
6231 fi;
6232 echo "$as_me:6232: result: $with_fallback" >&5
6233 echo "${ECHO_T}$with_fallback" >&6
6234 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6235
6236 echo "$as_me:6236: checking if you want modern xterm or antique" >&5
6237 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6238
6239 # Check whether --with-xterm-new or --without-xterm-new was given.
6240 if test "${with_xterm_new+set}" = set; then
6241   withval="$with_xterm_new"
6242   with_xterm_new=$withval
6243 else
6244   with_xterm_new=yes
6245 fi;
6246 case $with_xterm_new in
6247 no)     with_xterm_new=xterm-old;;
6248 *)      with_xterm_new=xterm-new;;
6249 esac
6250 echo "$as_me:6250: result: $with_xterm_new" >&5
6251 echo "${ECHO_T}$with_xterm_new" >&6
6252 WHICH_XTERM=$with_xterm_new
6253
6254 MAKE_TERMINFO=
6255 if test "$use_database" = no ; then
6256         TERMINFO="${datadir}/terminfo"
6257         MAKE_TERMINFO="#"
6258 else
6259
6260 echo "$as_me:6260: checking for list of terminfo directories" >&5
6261 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6262
6263 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6264 if test "${with_terminfo_dirs+set}" = set; then
6265   withval="$with_terminfo_dirs"
6266
6267 else
6268   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6269 fi;
6270 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6271 cf_dst_path=
6272 for cf_src_path in $withval
6273 do
6274
6275 if test "x$prefix" != xNONE; then
6276   cf_path_syntax="$prefix"
6277 else
6278   cf_path_syntax="$ac_default_prefix"
6279 fi
6280
6281 case ".$cf_src_path" in #(vi
6282 .\$\(*\)*|.\'*\'*) #(vi
6283   ;;
6284 ..|./*|.\\*) #(vi
6285   ;;
6286 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6287   ;;
6288 .\${*prefix}*) #(vi
6289   eval cf_src_path="$cf_src_path"
6290   case ".$cf_src_path" in #(vi
6291   .NONE/*)
6292     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6293     ;;
6294   esac
6295   ;; #(vi
6296 .no|.NONE/*)
6297   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6298   ;;
6299 *)
6300   { { echo "$as_me:6300: error: expected a pathname, not \"$cf_src_path\"" >&5
6301 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6302    { (exit 1); exit 1; }; }
6303   ;;
6304 esac
6305
6306   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6307   cf_dst_path="${cf_dst_path}${cf_src_path}"
6308 done
6309 IFS="$ac_save_ifs"
6310
6311 eval 'TERMINFO_DIRS="$cf_dst_path"'
6312
6313 echo "$as_me:6313: result: $TERMINFO_DIRS" >&5
6314 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6315 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6316 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6317 EOF
6318
6319 echo "$as_me:6319: checking for default terminfo directory" >&5
6320 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6321
6322 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6323 if test "${with_default_terminfo_dir+set}" = set; then
6324   withval="$with_default_terminfo_dir"
6325
6326 else
6327   withval="${TERMINFO:-${datadir}/terminfo}"
6328 fi; if test -n "${datadir}/terminfo" ; then
6329
6330 if test "x$prefix" != xNONE; then
6331   cf_path_syntax="$prefix"
6332 else
6333   cf_path_syntax="$ac_default_prefix"
6334 fi
6335
6336 case ".$withval" in #(vi
6337 .\$\(*\)*|.\'*\'*) #(vi
6338   ;;
6339 ..|./*|.\\*) #(vi
6340   ;;
6341 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6342   ;;
6343 .\${*prefix}*) #(vi
6344   eval withval="$withval"
6345   case ".$withval" in #(vi
6346   .NONE/*)
6347     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6348     ;;
6349   esac
6350   ;; #(vi
6351 .no|.NONE/*)
6352   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6353   ;;
6354 *)
6355   { { echo "$as_me:6355: error: expected a pathname, not \"$withval\"" >&5
6356 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6357    { (exit 1); exit 1; }; }
6358   ;;
6359 esac
6360
6361 fi
6362 TERMINFO="$withval"
6363
6364 echo "$as_me:6364: result: $TERMINFO" >&5
6365 echo "${ECHO_T}$TERMINFO" >&6
6366 cat >>confdefs.h <<EOF
6367 #define TERMINFO "$TERMINFO"
6368 EOF
6369
6370 fi
6371
6372 ###     use option --disable-big-core to make tic run on small machines
6373 ###     We need 4Mb, check if we can allocate 50% more than that.
6374 echo "$as_me:6374: checking if big-core option selected" >&5
6375 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6376
6377 # Check whether --enable-big-core or --disable-big-core was given.
6378 if test "${enable_big_core+set}" = set; then
6379   enableval="$enable_big_core"
6380   with_big_core=$enableval
6381 else
6382   if test "$cross_compiling" = yes; then
6383   with_big_core=no
6384 else
6385   cat >conftest.$ac_ext <<_ACEOF
6386 #line 6386 "configure"
6387 #include "confdefs.h"
6388
6389 #include <stdlib.h>
6390 #include <string.h>
6391 int main() {
6392         unsigned long n = 6000000L;
6393         char *s = malloc(n);
6394         if (s != 0)
6395                 s[0] = s[n-1] = 0;
6396         ${cf_cv_main_return:-return}(s == 0);
6397 }
6398 _ACEOF
6399 rm -f conftest$ac_exeext
6400 if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
6401   (eval $ac_link) 2>&5
6402   ac_status=$?
6403   echo "$as_me:6403: \$? = $ac_status" >&5
6404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6405   { (eval echo "$as_me:6405: \"$ac_try\"") >&5
6406   (eval $ac_try) 2>&5
6407   ac_status=$?
6408   echo "$as_me:6408: \$? = $ac_status" >&5
6409   (exit $ac_status); }; }; then
6410   with_big_core=yes
6411 else
6412   echo "$as_me: program exited with status $ac_status" >&5
6413 echo "$as_me: failed program was:" >&5
6414 cat conftest.$ac_ext >&5
6415 with_big_core=no
6416 fi
6417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6418 fi
6419 fi;
6420 echo "$as_me:6420: result: $with_big_core" >&5
6421 echo "${ECHO_T}$with_big_core" >&6
6422 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6423 #define HAVE_BIG_CORE 1
6424 EOF
6425
6426 ### ISO C only guarantees 512-char strings, we have tables which load faster
6427 ### when constructed using "big" strings.  More than the C compiler, the awk
6428 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6429 echo "$as_me:6429: checking if big-strings option selected" >&5
6430 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6431
6432 # Check whether --enable-big-strings or --disable-big-strings was given.
6433 if test "${enable_big_strings+set}" = set; then
6434   enableval="$enable_big_strings"
6435   with_big_strings=$enableval
6436 else
6437
6438         case x$AWK in #(vi
6439         x)
6440                 eval with_big_strings=no
6441                 ;;
6442         *) #(vi
6443                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6444                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6445                         eval with_big_strings=yes
6446                 else
6447                         eval with_big_strings=no
6448                 fi
6449                 ;;
6450         esac
6451
6452 fi;
6453 echo "$as_me:6453: result: $with_big_strings" >&5
6454 echo "${ECHO_T}$with_big_strings" >&6
6455
6456 USE_BIG_STRINGS=0
6457 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6458
6459 ###     use option --enable-termcap to compile in the termcap fallback support
6460 echo "$as_me:6460: checking if you want termcap-fallback support" >&5
6461 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6462
6463 # Check whether --enable-termcap or --disable-termcap was given.
6464 if test "${enable_termcap+set}" = set; then
6465   enableval="$enable_termcap"
6466   with_termcap=$enableval
6467 else
6468   with_termcap=no
6469 fi;
6470 echo "$as_me:6470: result: $with_termcap" >&5
6471 echo "${ECHO_T}$with_termcap" >&6
6472
6473 if test "$with_termcap" != "yes" ; then
6474         if test "$use_database" = no ; then
6475                 if test -z "$with_fallback" ; then
6476                         { { echo "$as_me:6476: error: You have disabled the database w/o specifying fallbacks" >&5
6477 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6478    { (exit 1); exit 1; }; }
6479                 fi
6480         fi
6481         cat >>confdefs.h <<\EOF
6482 #define PURE_TERMINFO 1
6483 EOF
6484
6485 else
6486
6487 if test "$with_ticlib" != no ; then
6488         { { echo "$as_me:6488: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6489 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6490    { (exit 1); exit 1; }; }
6491 fi
6492
6493 cat >>confdefs.h <<\EOF
6494 #define USE_TERMCAP 1
6495 EOF
6496
6497 echo "$as_me:6497: checking for list of termcap files" >&5
6498 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6499
6500 # Check whether --with-termpath or --without-termpath was given.
6501 if test "${with_termpath+set}" = set; then
6502   withval="$with_termpath"
6503
6504 else
6505   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6506 fi;
6507 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6508 cf_dst_path=
6509 for cf_src_path in $withval
6510 do
6511
6512 if test "x$prefix" != xNONE; then
6513   cf_path_syntax="$prefix"
6514 else
6515   cf_path_syntax="$ac_default_prefix"
6516 fi
6517
6518 case ".$cf_src_path" in #(vi
6519 .\$\(*\)*|.\'*\'*) #(vi
6520   ;;
6521 ..|./*|.\\*) #(vi
6522   ;;
6523 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6524   ;;
6525 .\${*prefix}*) #(vi
6526   eval cf_src_path="$cf_src_path"
6527   case ".$cf_src_path" in #(vi
6528   .NONE/*)
6529     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6530     ;;
6531   esac
6532   ;; #(vi
6533 .no|.NONE/*)
6534   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6535   ;;
6536 *)
6537   { { echo "$as_me:6537: error: expected a pathname, not \"$cf_src_path\"" >&5
6538 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6539    { (exit 1); exit 1; }; }
6540   ;;
6541 esac
6542
6543   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6544   cf_dst_path="${cf_dst_path}${cf_src_path}"
6545 done
6546 IFS="$ac_save_ifs"
6547
6548 eval 'TERMPATH="$cf_dst_path"'
6549
6550 echo "$as_me:6550: result: $TERMPATH" >&5
6551 echo "${ECHO_T}$TERMPATH" >&6
6552 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6553 #define TERMPATH "$TERMPATH"
6554 EOF
6555
6556 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6557 echo "$as_me:6557: checking if fast termcap-loader is needed" >&5
6558 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6559
6560 # Check whether --enable-getcap or --disable-getcap was given.
6561 if test "${enable_getcap+set}" = set; then
6562   enableval="$enable_getcap"
6563   with_getcap=$enableval
6564 else
6565   with_getcap=no
6566 fi;
6567 echo "$as_me:6567: result: $with_getcap" >&5
6568 echo "${ECHO_T}$with_getcap" >&6
6569 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6570 #define USE_GETCAP 1
6571 EOF
6572
6573 echo "$as_me:6573: checking if translated termcaps will be cached in ~/.terminfo" >&5
6574 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6575
6576 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6577 if test "${enable_getcap_cache+set}" = set; then
6578   enableval="$enable_getcap_cache"
6579   with_getcap_cache=$enableval
6580 else
6581   with_getcap_cache=no
6582 fi;
6583 echo "$as_me:6583: result: $with_getcap_cache" >&5
6584 echo "${ECHO_T}$with_getcap_cache" >&6
6585 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6586 #define USE_GETCAP_CACHE 1
6587 EOF
6588
6589 fi
6590
6591 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6592 echo "$as_me:6592: checking if ~/.terminfo is wanted" >&5
6593 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6594
6595 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6596 if test "${enable_home_terminfo+set}" = set; then
6597   enableval="$enable_home_terminfo"
6598   with_home_terminfo=$enableval
6599 else
6600   with_home_terminfo=yes
6601 fi;
6602 echo "$as_me:6602: result: $with_home_terminfo" >&5
6603 echo "${ECHO_T}$with_home_terminfo" >&6
6604 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6605 #define USE_HOME_TERMINFO 1
6606 EOF
6607
6608 echo "$as_me:6608: checking if you want to use restricted environment when running as root" >&5
6609 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6610
6611 # Check whether --enable-root-environ or --disable-root-environ was given.
6612 if test "${enable_root_environ+set}" = set; then
6613   enableval="$enable_root_environ"
6614   with_root_environ=$enableval
6615 else
6616   with_root_environ=yes
6617 fi;
6618 echo "$as_me:6618: result: $with_root_environ" >&5
6619 echo "${ECHO_T}$with_root_environ" >&6
6620 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6621 #define USE_ROOT_ENVIRON 1
6622 EOF
6623
6624 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6625 ###   to reduce storage requirements for the terminfo database.
6626
6627 for ac_func in \
6628         remove \
6629         unlink
6630 do
6631 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6632 echo "$as_me:6632: checking for $ac_func" >&5
6633 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6634 if eval "test \"\${$as_ac_var+set}\" = set"; then
6635   echo $ECHO_N "(cached) $ECHO_C" >&6
6636 else
6637   cat >conftest.$ac_ext <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6640 /* System header to define __stub macros and hopefully few prototypes,
6641     which can conflict with char $ac_func (); below.  */
6642 #include <assert.h>
6643 /* Override any gcc2 internal prototype to avoid an error.  */
6644 #ifdef __cplusplus
6645 extern "C"
6646 #endif
6647 /* We use char because int might match the return type of a gcc2
6648    builtin and then its argument prototype would still apply.  */
6649 char $ac_func ();
6650 char (*f) ();
6651
6652 int
6653 main ()
6654 {
6655 /* The GNU C library defines this for functions which it implements
6656     to always fail with ENOSYS.  Some functions are actually named
6657     something starting with __ and the normal name is an alias.  */
6658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6659 choke me
6660 #else
6661 f = $ac_func;
6662 #endif
6663
6664   ;
6665   return 0;
6666 }
6667 _ACEOF
6668 rm -f conftest.$ac_objext conftest$ac_exeext
6669 if { (eval echo "$as_me:6669: \"$ac_link\"") >&5
6670   (eval $ac_link) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); } &&
6674          { ac_try='test -s conftest$ac_exeext'
6675   { (eval echo "$as_me:6675: \"$ac_try\"") >&5
6676   (eval $ac_try) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); }; }; then
6680   eval "$as_ac_var=yes"
6681 else
6682   echo "$as_me: failed program was:" >&5
6683 cat conftest.$ac_ext >&5
6684 eval "$as_ac_var=no"
6685 fi
6686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6687 fi
6688 echo "$as_me:6688: result: `eval echo '${'$as_ac_var'}'`" >&5
6689 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6690 if test `eval echo '${'$as_ac_var'}'` = yes; then
6691   cat >>confdefs.h <<EOF
6692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6693 EOF
6694
6695 fi
6696 done
6697
6698 if test "$cross_compiling" = yes ; then
6699
6700 for ac_func in \
6701                 link \
6702                 symlink
6703 do
6704 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6705 echo "$as_me:6705: checking for $ac_func" >&5
6706 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6707 if eval "test \"\${$as_ac_var+set}\" = set"; then
6708   echo $ECHO_N "(cached) $ECHO_C" >&6
6709 else
6710   cat >conftest.$ac_ext <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713 /* System header to define __stub macros and hopefully few prototypes,
6714     which can conflict with char $ac_func (); below.  */
6715 #include <assert.h>
6716 /* Override any gcc2 internal prototype to avoid an error.  */
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 /* We use char because int might match the return type of a gcc2
6721    builtin and then its argument prototype would still apply.  */
6722 char $ac_func ();
6723 char (*f) ();
6724
6725 int
6726 main ()
6727 {
6728 /* The GNU C library defines this for functions which it implements
6729     to always fail with ENOSYS.  Some functions are actually named
6730     something starting with __ and the normal name is an alias.  */
6731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6732 choke me
6733 #else
6734 f = $ac_func;
6735 #endif
6736
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -f conftest.$ac_objext conftest$ac_exeext
6742 if { (eval echo "$as_me:6742: \"$ac_link\"") >&5
6743   (eval $ac_link) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); } &&
6747          { ac_try='test -s conftest$ac_exeext'
6748   { (eval echo "$as_me:6748: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   eval "$as_ac_var=yes"
6754 else
6755   echo "$as_me: failed program was:" >&5
6756 cat conftest.$ac_ext >&5
6757 eval "$as_ac_var=no"
6758 fi
6759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6760 fi
6761 echo "$as_me:6761: result: `eval echo '${'$as_ac_var'}'`" >&5
6762 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6763 if test `eval echo '${'$as_ac_var'}'` = yes; then
6764   cat >>confdefs.h <<EOF
6765 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6766 EOF
6767
6768 fi
6769 done
6770
6771 else
6772         echo "$as_me:6772: checking if link/symlink functions work" >&5
6773 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6774 if test "${cf_cv_link_funcs+set}" = set; then
6775   echo $ECHO_N "(cached) $ECHO_C" >&6
6776 else
6777
6778                 cf_cv_link_funcs=
6779                 for cf_func in link symlink ; do
6780                         if test "$cross_compiling" = yes; then
6781
6782                         eval 'ac_cv_func_'$cf_func'=error'
6783 else
6784   cat >conftest.$ac_ext <<_ACEOF
6785 #line 6785 "configure"
6786 #include "confdefs.h"
6787
6788 #include <sys/types.h>
6789 #include <sys/stat.h>
6790 #ifdef HAVE_UNISTD_H
6791 #include <unistd.h>
6792 #endif
6793 int main()
6794 {
6795         int fail = 0;
6796         char *src = "config.log";
6797         char *dst = "conftest.chk";
6798         struct stat src_sb;
6799         struct stat dst_sb;
6800
6801         stat(src, &src_sb);
6802         fail = ($cf_func("config.log", "conftest.chk") < 0)
6803             || (stat(dst, &dst_sb) < 0)
6804             || (dst_sb.st_mtime != src_sb.st_mtime);
6805 #ifdef HAVE_UNLINK
6806         unlink(dst);
6807 #else
6808         remove(dst);
6809 #endif
6810         ${cf_cv_main_return:-return} (fail);
6811 }
6812
6813 _ACEOF
6814 rm -f conftest$ac_exeext
6815 if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
6816   (eval $ac_link) 2>&5
6817   ac_status=$?
6818   echo "$as_me:6818: \$? = $ac_status" >&5
6819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6820   { (eval echo "$as_me:6820: \"$ac_try\"") >&5
6821   (eval $ac_try) 2>&5
6822   ac_status=$?
6823   echo "$as_me:6823: \$? = $ac_status" >&5
6824   (exit $ac_status); }; }; then
6825
6826                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6827                         eval 'ac_cv_func_'$cf_func'=yes'
6828 else
6829   echo "$as_me: program exited with status $ac_status" >&5
6830 echo "$as_me: failed program was:" >&5
6831 cat conftest.$ac_ext >&5
6832
6833                         eval 'ac_cv_func_'$cf_func'=no'
6834 fi
6835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6836 fi
6837                 done
6838                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6839
6840 fi
6841 echo "$as_me:6841: result: $cf_cv_link_funcs" >&5
6842 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6843         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6844 #define HAVE_LINK 1
6845 EOF
6846
6847         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6848 #define HAVE_SYMLINK 1
6849 EOF
6850
6851 fi
6852
6853 with_links=no
6854 with_symlinks=no
6855
6856 # soft links (symbolic links) are useful for some systems where hard links do
6857 # not work, or to make it simpler to copy terminfo trees around.
6858 if test "$ac_cv_func_symlink" = yes ; then
6859     echo "$as_me:6859: checking if tic should use symbolic links" >&5
6860 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6861
6862 # Check whether --enable-symlinks or --disable-symlinks was given.
6863 if test "${enable_symlinks+set}" = set; then
6864   enableval="$enable_symlinks"
6865   with_symlinks=$enableval
6866 else
6867   with_symlinks=no
6868 fi;
6869     echo "$as_me:6869: result: $with_symlinks" >&5
6870 echo "${ECHO_T}$with_symlinks" >&6
6871 fi
6872
6873 # If we have hard links and did not choose to use soft links instead, there is
6874 # no reason to make this choice optional - use the hard links.
6875 if test "$with_symlinks" = no ; then
6876     echo "$as_me:6876: checking if tic should use hard links" >&5
6877 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6878     if test "$ac_cv_func_link" = yes ; then
6879         with_links=yes
6880     else
6881         with_links=no
6882     fi
6883     echo "$as_me:6883: result: $with_links" >&5
6884 echo "${ECHO_T}$with_links" >&6
6885 fi
6886
6887 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6888 #define USE_LINKS 1
6889 EOF
6890
6891 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6892 #define USE_SYMLINKS 1
6893 EOF
6894
6895 ###   use option --enable-broken-linker to force on use of broken-linker support
6896 echo "$as_me:6896: checking if you want broken-linker support code" >&5
6897 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6898
6899 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6900 if test "${enable_broken_linker+set}" = set; then
6901   enableval="$enable_broken_linker"
6902   with_broken_linker=$enableval
6903 else
6904   with_broken_linker=${BROKEN_LINKER:-no}
6905 fi;
6906 echo "$as_me:6906: result: $with_broken_linker" >&5
6907 echo "${ECHO_T}$with_broken_linker" >&6
6908
6909 BROKEN_LINKER=0
6910 if test "$with_broken_linker" = yes ; then
6911         cat >>confdefs.h <<\EOF
6912 #define BROKEN_LINKER 1
6913 EOF
6914
6915         BROKEN_LINKER=1
6916 elif test "$DFT_LWR_MODEL" = shared ; then
6917         case $cf_cv_system_name in #(vi
6918         cygwin*)
6919                 cat >>confdefs.h <<\EOF
6920 #define BROKEN_LINKER 1
6921 EOF
6922
6923                 BROKEN_LINKER=1
6924                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6925
6926 echo "${as_me:-configure}:6926: testing cygwin linker is broken anyway ..." 1>&5
6927
6928                 ;;
6929         esac
6930 fi
6931
6932 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6933 echo "$as_me:6933: checking if tputs should process BSD-style prefix padding" >&5
6934 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6935
6936 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6937 if test "${enable_bsdpad+set}" = set; then
6938   enableval="$enable_bsdpad"
6939   with_bsdpad=$enableval
6940 else
6941   with_bsdpad=no
6942 fi;
6943 echo "$as_me:6943: result: $with_bsdpad" >&5
6944 echo "${ECHO_T}$with_bsdpad" >&6
6945 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6946 #define BSD_TPUTS 1
6947 EOF
6948
6949 ###   use option --enable-widec to turn on use of wide-character support
6950 NCURSES_CH_T=chtype
6951 NCURSES_LIBUTF8=0
6952
6953 NEED_WCHAR_H=0
6954 NCURSES_MBSTATE_T=0
6955 NCURSES_WCHAR_T=0
6956 NCURSES_WINT_T=0
6957
6958 # Check to define _XOPEN_SOURCE "automatically"
6959
6960 cf_XOPEN_SOURCE=500
6961 cf_POSIX_C_SOURCE=199506L
6962 cf_xopen_source=
6963
6964 case $host_os in #(vi
6965 aix[456]*) #(vi
6966         cf_xopen_source="-D_ALL_SOURCE"
6967         ;;
6968 cygwin) #(vi
6969         cf_XOPEN_SOURCE=600
6970         ;;
6971 darwin[0-8].*) #(vi
6972         cf_xopen_source="-D_APPLE_C_SOURCE"
6973         ;;
6974 darwin*) #(vi
6975         cf_xopen_source="-D_DARWIN_C_SOURCE"
6976         ;;
6977 freebsd*|dragonfly*) #(vi
6978         # 5.x headers associate
6979         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6980         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6981         cf_POSIX_C_SOURCE=200112L
6982         cf_XOPEN_SOURCE=600
6983         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6984         ;;
6985 hpux11*) #(vi
6986         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6987         ;;
6988 hpux*) #(vi
6989         cf_xopen_source="-D_HPUX_SOURCE"
6990         ;;
6991 irix[56].*) #(vi
6992         cf_xopen_source="-D_SGI_SOURCE"
6993         ;;
6994 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6995
6996 echo "$as_me:6996: checking if we must define _GNU_SOURCE" >&5
6997 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6998 if test "${cf_cv_gnu_source+set}" = set; then
6999   echo $ECHO_N "(cached) $ECHO_C" >&6
7000 else
7001
7002 cat >conftest.$ac_ext <<_ACEOF
7003 #line 7003 "configure"
7004 #include "confdefs.h"
7005 #include <sys/types.h>
7006 int
7007 main ()
7008 {
7009
7010 #ifndef _XOPEN_SOURCE
7011 make an error
7012 #endif
7013   ;
7014   return 0;
7015 }
7016 _ACEOF
7017 rm -f conftest.$ac_objext
7018 if { (eval echo "$as_me:7018: \"$ac_compile\"") >&5
7019   (eval $ac_compile) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit $ac_status); } &&
7023          { ac_try='test -s conftest.$ac_objext'
7024   { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7025   (eval $ac_try) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); }; }; then
7029   cf_cv_gnu_source=no
7030 else
7031   echo "$as_me: failed program was:" >&5
7032 cat conftest.$ac_ext >&5
7033 cf_save="$CPPFLAGS"
7034          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7035          cat >conftest.$ac_ext <<_ACEOF
7036 #line 7036 "configure"
7037 #include "confdefs.h"
7038 #include <sys/types.h>
7039 int
7040 main ()
7041 {
7042
7043 #ifdef _XOPEN_SOURCE
7044 make an error
7045 #endif
7046   ;
7047   return 0;
7048 }
7049 _ACEOF
7050 rm -f conftest.$ac_objext
7051 if { (eval echo "$as_me:7051: \"$ac_compile\"") >&5
7052   (eval $ac_compile) 2>&5
7053   ac_status=$?
7054   echo "$as_me:7054: \$? = $ac_status" >&5
7055   (exit $ac_status); } &&
7056          { ac_try='test -s conftest.$ac_objext'
7057   { (eval echo "$as_me:7057: \"$ac_try\"") >&5
7058   (eval $ac_try) 2>&5
7059   ac_status=$?
7060   echo "$as_me:7060: \$? = $ac_status" >&5
7061   (exit $ac_status); }; }; then
7062   cf_cv_gnu_source=no
7063 else
7064   echo "$as_me: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066 cf_cv_gnu_source=yes
7067 fi
7068 rm -f conftest.$ac_objext conftest.$ac_ext
7069         CPPFLAGS="$cf_save"
7070
7071 fi
7072 rm -f conftest.$ac_objext conftest.$ac_ext
7073
7074 fi
7075 echo "$as_me:7075: result: $cf_cv_gnu_source" >&5
7076 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7077 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7078
7079         ;;
7080 mirbsd*) #(vi
7081         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7082         ;;
7083 netbsd*) #(vi
7084         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7085         ;;
7086 openbsd*) #(vi
7087         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7088         ;;
7089 osf[45]*) #(vi
7090         cf_xopen_source="-D_OSF_SOURCE"
7091         ;;
7092 nto-qnx*) #(vi
7093         cf_xopen_source="-D_QNX_SOURCE"
7094         ;;
7095 sco*) #(vi
7096         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7097         ;;
7098 solaris2.1[0-9]) #(vi
7099         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7100         ;;
7101 solaris2.[1-9]) #(vi
7102         cf_xopen_source="-D__EXTENSIONS__"
7103         ;;
7104 *)
7105         echo "$as_me:7105: checking if we should define _XOPEN_SOURCE" >&5
7106 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7107 if test "${cf_cv_xopen_source+set}" = set; then
7108   echo $ECHO_N "(cached) $ECHO_C" >&6
7109 else
7110
7111         cat >conftest.$ac_ext <<_ACEOF
7112 #line 7112 "configure"
7113 #include "confdefs.h"
7114 #include <sys/types.h>
7115 int
7116 main ()
7117 {
7118
7119 #ifndef _XOPEN_SOURCE
7120 make an error
7121 #endif
7122   ;
7123   return 0;
7124 }
7125 _ACEOF
7126 rm -f conftest.$ac_objext
7127 if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
7128   (eval $ac_compile) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); } &&
7132          { ac_try='test -s conftest.$ac_objext'
7133   { (eval echo "$as_me:7133: \"$ac_try\"") >&5
7134   (eval $ac_try) 2>&5
7135   ac_status=$?
7136   echo "$as_me:7136: \$? = $ac_status" >&5
7137   (exit $ac_status); }; }; then
7138   cf_cv_xopen_source=no
7139 else
7140   echo "$as_me: failed program was:" >&5
7141 cat conftest.$ac_ext >&5
7142 cf_save="$CPPFLAGS"
7143          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7144          cat >conftest.$ac_ext <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7147 #include <sys/types.h>
7148 int
7149 main ()
7150 {
7151
7152 #ifdef _XOPEN_SOURCE
7153 make an error
7154 #endif
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -f conftest.$ac_objext
7160 if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
7161   (eval $ac_compile) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -s conftest.$ac_objext'
7166   { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7167   (eval $ac_try) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); }; }; then
7171   cf_cv_xopen_source=no
7172 else
7173   echo "$as_me: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7175 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7176 fi
7177 rm -f conftest.$ac_objext conftest.$ac_ext
7178         CPPFLAGS="$cf_save"
7179
7180 fi
7181 rm -f conftest.$ac_objext conftest.$ac_ext
7182
7183 fi
7184 echo "$as_me:7184: result: $cf_cv_xopen_source" >&5
7185 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7186         if test "$cf_cv_xopen_source" != no ; then
7187
7188 CFLAGS=`echo "$CFLAGS" | \
7189         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7190                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7191
7192 CPPFLAGS=`echo "$CPPFLAGS" | \
7193         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7194                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7195
7196                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7197
7198 cf_fix_cppflags=no
7199 cf_new_cflags=
7200 cf_new_cppflags=
7201 cf_new_extra_cppflags=
7202
7203 for cf_add_cflags in $cf_temp_xopen_source
7204 do
7205 case $cf_fix_cppflags in
7206 no)
7207         case $cf_add_cflags in #(vi
7208         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7209                 case $cf_add_cflags in
7210                 -D*)
7211                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7212
7213                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7214                                 && test -z "${cf_tst_cflags}" \
7215                                 && cf_fix_cppflags=yes
7216
7217                         if test $cf_fix_cppflags = yes ; then
7218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7219                                 continue
7220                         elif test "${cf_tst_cflags}" = "\"'" ; then
7221                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7222                                 continue
7223                         fi
7224                         ;;
7225                 esac
7226                 case "$CPPFLAGS" in
7227                 *$cf_add_cflags) #(vi
7228                         ;;
7229                 *) #(vi
7230                         case $cf_add_cflags in #(vi
7231                         -D*)
7232                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7233
7234 CPPFLAGS=`echo "$CPPFLAGS" | \
7235         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7236                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7237
7238                                 ;;
7239                         esac
7240                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7241                         ;;
7242                 esac
7243                 ;;
7244         *)
7245                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7246                 ;;
7247         esac
7248         ;;
7249 yes)
7250         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7251
7252         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7253
7254         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7255                 && test -z "${cf_tst_cflags}" \
7256                 && cf_fix_cppflags=no
7257         ;;
7258 esac
7259 done
7260
7261 if test -n "$cf_new_cflags" ; then
7262
7263         CFLAGS="$CFLAGS $cf_new_cflags"
7264 fi
7265
7266 if test -n "$cf_new_cppflags" ; then
7267
7268         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7269 fi
7270
7271 if test -n "$cf_new_extra_cppflags" ; then
7272
7273         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7274 fi
7275
7276         fi
7277
7278 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7279
7280 cf_save_CFLAGS="$CFLAGS"
7281 cf_save_CPPFLAGS="$CPPFLAGS"
7282
7283 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7284         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7285                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7286
7287 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7288         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7289                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7290
7291 echo "$as_me:7291: checking if we should define _POSIX_C_SOURCE" >&5
7292 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7293 if test "${cf_cv_posix_c_source+set}" = set; then
7294   echo $ECHO_N "(cached) $ECHO_C" >&6
7295 else
7296
7297 echo "${as_me:-configure}:7297: testing if the symbol is already defined go no further ..." 1>&5
7298
7299         cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302 #include <sys/types.h>
7303 int
7304 main ()
7305 {
7306
7307 #ifndef _POSIX_C_SOURCE
7308 make an error
7309 #endif
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext
7315 if { (eval echo "$as_me:7315: \"$ac_compile\"") >&5
7316   (eval $ac_compile) 2>&5
7317   ac_status=$?
7318   echo "$as_me:7318: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest.$ac_objext'
7321   { (eval echo "$as_me:7321: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   cf_cv_posix_c_source=no
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330 cf_want_posix_source=no
7331          case .$cf_POSIX_C_SOURCE in #(vi
7332          .[12]??*) #(vi
7333                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7334                 ;;
7335          .2) #(vi
7336                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7337                 cf_want_posix_source=yes
7338                 ;;
7339          .*)
7340                 cf_want_posix_source=yes
7341                 ;;
7342          esac
7343          if test "$cf_want_posix_source" = yes ; then
7344                 cat >conftest.$ac_ext <<_ACEOF
7345 #line 7345 "configure"
7346 #include "confdefs.h"
7347 #include <sys/types.h>
7348 int
7349 main ()
7350 {
7351
7352 #ifdef _POSIX_SOURCE
7353 make an error
7354 #endif
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 rm -f conftest.$ac_objext
7360 if { (eval echo "$as_me:7360: \"$ac_compile\"") >&5
7361   (eval $ac_compile) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit $ac_status); } &&
7365          { ac_try='test -s conftest.$ac_objext'
7366   { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit $ac_status); }; }; then
7371   :
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 cat conftest.$ac_ext >&5
7375 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7376 fi
7377 rm -f conftest.$ac_objext conftest.$ac_ext
7378          fi
7379
7380 echo "${as_me:-configure}:7380: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7381
7382          CFLAGS="$cf_trim_CFLAGS"
7383          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7384
7385 echo "${as_me:-configure}:7385: testing if the second compile does not leave our definition intact error ..." 1>&5
7386
7387          cat >conftest.$ac_ext <<_ACEOF
7388 #line 7388 "configure"
7389 #include "confdefs.h"
7390 #include <sys/types.h>
7391 int
7392 main ()
7393 {
7394
7395 #ifndef _POSIX_C_SOURCE
7396 make an error
7397 #endif
7398   ;
7399   return 0;
7400 }
7401 _ACEOF
7402 rm -f conftest.$ac_objext
7403 if { (eval echo "$as_me:7403: \"$ac_compile\"") >&5
7404   (eval $ac_compile) 2>&5
7405   ac_status=$?
7406   echo "$as_me:7406: \$? = $ac_status" >&5
7407   (exit $ac_status); } &&
7408          { ac_try='test -s conftest.$ac_objext'
7409   { (eval echo "$as_me:7409: \"$ac_try\"") >&5
7410   (eval $ac_try) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit $ac_status); }; }; then
7414   :
7415 else
7416   echo "$as_me: failed program was:" >&5
7417 cat conftest.$ac_ext >&5
7418 cf_cv_posix_c_source=no
7419 fi
7420 rm -f conftest.$ac_objext conftest.$ac_ext
7421          CFLAGS="$cf_save_CFLAGS"
7422          CPPFLAGS="$cf_save_CPPFLAGS"
7423
7424 fi
7425 rm -f conftest.$ac_objext conftest.$ac_ext
7426
7427 fi
7428 echo "$as_me:7428: result: $cf_cv_posix_c_source" >&5
7429 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7430
7431 if test "$cf_cv_posix_c_source" != no ; then
7432         CFLAGS="$cf_trim_CFLAGS"
7433         CPPFLAGS="$cf_trim_CPPFLAGS"
7434
7435 cf_fix_cppflags=no
7436 cf_new_cflags=
7437 cf_new_cppflags=
7438 cf_new_extra_cppflags=
7439
7440 for cf_add_cflags in $cf_cv_posix_c_source
7441 do
7442 case $cf_fix_cppflags in
7443 no)
7444         case $cf_add_cflags in #(vi
7445         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7446                 case $cf_add_cflags in
7447                 -D*)
7448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7449
7450                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7451                                 && test -z "${cf_tst_cflags}" \
7452                                 && cf_fix_cppflags=yes
7453
7454                         if test $cf_fix_cppflags = yes ; then
7455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7456                                 continue
7457                         elif test "${cf_tst_cflags}" = "\"'" ; then
7458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7459                                 continue
7460                         fi
7461                         ;;
7462                 esac
7463                 case "$CPPFLAGS" in
7464                 *$cf_add_cflags) #(vi
7465                         ;;
7466                 *) #(vi
7467                         case $cf_add_cflags in #(vi
7468                         -D*)
7469                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7470
7471 CPPFLAGS=`echo "$CPPFLAGS" | \
7472         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7473                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7474
7475                                 ;;
7476                         esac
7477                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7478                         ;;
7479                 esac
7480                 ;;
7481         *)
7482                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7483                 ;;
7484         esac
7485         ;;
7486 yes)
7487         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7488
7489         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7490
7491         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7492                 && test -z "${cf_tst_cflags}" \
7493                 && cf_fix_cppflags=no
7494         ;;
7495 esac
7496 done
7497
7498 if test -n "$cf_new_cflags" ; then
7499
7500         CFLAGS="$CFLAGS $cf_new_cflags"
7501 fi
7502
7503 if test -n "$cf_new_cppflags" ; then
7504
7505         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7506 fi
7507
7508 if test -n "$cf_new_extra_cppflags" ; then
7509
7510         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7511 fi
7512
7513 fi
7514
7515         ;;
7516 esac
7517
7518 if test -n "$cf_xopen_source" ; then
7519
7520 cf_fix_cppflags=no
7521 cf_new_cflags=
7522 cf_new_cppflags=
7523 cf_new_extra_cppflags=
7524
7525 for cf_add_cflags in $cf_xopen_source
7526 do
7527 case $cf_fix_cppflags in
7528 no)
7529         case $cf_add_cflags in #(vi
7530         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7531                 case $cf_add_cflags in
7532                 -D*)
7533                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7534
7535                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7536                                 && test -z "${cf_tst_cflags}" \
7537                                 && cf_fix_cppflags=yes
7538
7539                         if test $cf_fix_cppflags = yes ; then
7540                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7541                                 continue
7542                         elif test "${cf_tst_cflags}" = "\"'" ; then
7543                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7544                                 continue
7545                         fi
7546                         ;;
7547                 esac
7548                 case "$CPPFLAGS" in
7549                 *$cf_add_cflags) #(vi
7550                         ;;
7551                 *) #(vi
7552                         case $cf_add_cflags in #(vi
7553                         -D*)
7554                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7555
7556 CPPFLAGS=`echo "$CPPFLAGS" | \
7557         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7558                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7559
7560                                 ;;
7561                         esac
7562                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7563                         ;;
7564                 esac
7565                 ;;
7566         *)
7567                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7568                 ;;
7569         esac
7570         ;;
7571 yes)
7572         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7573
7574         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7575
7576         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7577                 && test -z "${cf_tst_cflags}" \
7578                 && cf_fix_cppflags=no
7579         ;;
7580 esac
7581 done
7582
7583 if test -n "$cf_new_cflags" ; then
7584
7585         CFLAGS="$CFLAGS $cf_new_cflags"
7586 fi
7587
7588 if test -n "$cf_new_cppflags" ; then
7589
7590         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7591 fi
7592
7593 if test -n "$cf_new_extra_cppflags" ; then
7594
7595         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7596 fi
7597
7598 fi
7599
7600 # Work around breakage on OS X
7601
7602 echo "$as_me:7602: checking if SIGWINCH is defined" >&5
7603 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7604 if test "${cf_cv_define_sigwinch+set}" = set; then
7605   echo $ECHO_N "(cached) $ECHO_C" >&6
7606 else
7607
7608         cat >conftest.$ac_ext <<_ACEOF
7609 #line 7609 "configure"
7610 #include "confdefs.h"
7611
7612 #include <sys/types.h>
7613 #include <sys/signal.h>
7614
7615 int
7616 main ()
7617 {
7618 int x = SIGWINCH
7619   ;
7620   return 0;
7621 }
7622 _ACEOF
7623 rm -f conftest.$ac_objext
7624 if { (eval echo "$as_me:7624: \"$ac_compile\"") >&5
7625   (eval $ac_compile) 2>&5
7626   ac_status=$?
7627   echo "$as_me:7627: \$? = $ac_status" >&5
7628   (exit $ac_status); } &&
7629          { ac_try='test -s conftest.$ac_objext'
7630   { (eval echo "$as_me:7630: \"$ac_try\"") >&5
7631   (eval $ac_try) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); }; }; then
7635   cf_cv_define_sigwinch=yes
7636 else
7637   echo "$as_me: failed program was:" >&5
7638 cat conftest.$ac_ext >&5
7639 cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642
7643 #undef _XOPEN_SOURCE
7644 #undef _POSIX_SOURCE
7645 #undef _POSIX_C_SOURCE
7646 #include <sys/types.h>
7647 #include <sys/signal.h>
7648
7649 int
7650 main ()
7651 {
7652 int x = SIGWINCH
7653   ;
7654   return 0;
7655 }
7656 _ACEOF
7657 rm -f conftest.$ac_objext
7658 if { (eval echo "$as_me:7658: \"$ac_compile\"") >&5
7659   (eval $ac_compile) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } &&
7663          { ac_try='test -s conftest.$ac_objext'
7664   { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7665   (eval $ac_try) 2>&5
7666   ac_status=$?
7667   echo "$as_me:7667: \$? = $ac_status" >&5
7668   (exit $ac_status); }; }; then
7669   cf_cv_define_sigwinch=maybe
7670 else
7671   echo "$as_me: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 cf_cv_define_sigwinch=no
7674 fi
7675 rm -f conftest.$ac_objext conftest.$ac_ext
7676
7677 fi
7678 rm -f conftest.$ac_objext conftest.$ac_ext
7679
7680 fi
7681 echo "$as_me:7681: result: $cf_cv_define_sigwinch" >&5
7682 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7683
7684 if test "$cf_cv_define_sigwinch" = maybe ; then
7685 echo "$as_me:7685: checking for actual SIGWINCH definition" >&5
7686 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7687 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7688   echo $ECHO_N "(cached) $ECHO_C" >&6
7689 else
7690
7691 cf_cv_fixup_sigwinch=unknown
7692 cf_sigwinch=32
7693 while test $cf_sigwinch != 1
7694 do
7695         cat >conftest.$ac_ext <<_ACEOF
7696 #line 7696 "configure"
7697 #include "confdefs.h"
7698
7699 #undef _XOPEN_SOURCE
7700 #undef _POSIX_SOURCE
7701 #undef _POSIX_C_SOURCE
7702 #include <sys/types.h>
7703 #include <sys/signal.h>
7704
7705 int
7706 main ()
7707 {
7708
7709 #if SIGWINCH != $cf_sigwinch
7710 make an error
7711 #endif
7712 int x = SIGWINCH
7713   ;
7714   return 0;
7715 }
7716 _ACEOF
7717 rm -f conftest.$ac_objext
7718 if { (eval echo "$as_me:7718: \"$ac_compile\"") >&5
7719   (eval $ac_compile) 2>&5
7720   ac_status=$?
7721   echo "$as_me:7721: \$? = $ac_status" >&5
7722   (exit $ac_status); } &&
7723          { ac_try='test -s conftest.$ac_objext'
7724   { (eval echo "$as_me:7724: \"$ac_try\"") >&5
7725   (eval $ac_try) 2>&5
7726   ac_status=$?
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); }; }; then
7729   cf_cv_fixup_sigwinch=$cf_sigwinch
7730          break
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 fi
7735 rm -f conftest.$ac_objext conftest.$ac_ext
7736
7737 cf_sigwinch=`expr $cf_sigwinch - 1`
7738 done
7739
7740 fi
7741 echo "$as_me:7741: result: $cf_cv_fixup_sigwinch" >&5
7742 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7743
7744         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7745                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7746         fi
7747 fi
7748
7749 # Checks for CODESET support.
7750
7751   echo "$as_me:7751: checking for nl_langinfo and CODESET" >&5
7752 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7753 if test "${am_cv_langinfo_codeset+set}" = set; then
7754   echo $ECHO_N "(cached) $ECHO_C" >&6
7755 else
7756   cat >conftest.$ac_ext <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <langinfo.h>
7760 int
7761 main ()
7762 {
7763 char* cs = nl_langinfo(CODESET);
7764   ;
7765   return 0;
7766 }
7767 _ACEOF
7768 rm -f conftest.$ac_objext conftest$ac_exeext
7769 if { (eval echo "$as_me:7769: \"$ac_link\"") >&5
7770   (eval $ac_link) 2>&5
7771   ac_status=$?
7772   echo "$as_me:7772: \$? = $ac_status" >&5
7773   (exit $ac_status); } &&
7774          { ac_try='test -s conftest$ac_exeext'
7775   { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7776   (eval $ac_try) 2>&5
7777   ac_status=$?
7778   echo "$as_me:7778: \$? = $ac_status" >&5
7779   (exit $ac_status); }; }; then
7780   am_cv_langinfo_codeset=yes
7781 else
7782   echo "$as_me: failed program was:" >&5
7783 cat conftest.$ac_ext >&5
7784 am_cv_langinfo_codeset=no
7785 fi
7786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7787
7788 fi
7789 echo "$as_me:7789: result: $am_cv_langinfo_codeset" >&5
7790 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7791   if test $am_cv_langinfo_codeset = yes; then
7792
7793 cat >>confdefs.h <<\EOF
7794 #define HAVE_LANGINFO_CODESET 1
7795 EOF
7796
7797   fi
7798
7799 # use these variables to work around a defect in gcc's fixincludes.
7800 NCURSES_OK_WCHAR_T=
7801 NCURSES_OK_WINT_T=
7802
7803 echo "$as_me:7803: checking if you want wide-character code" >&5
7804 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7805
7806 # Check whether --enable-widec or --disable-widec was given.
7807 if test "${enable_widec+set}" = set; then
7808   enableval="$enable_widec"
7809   with_widec=$enableval
7810 else
7811   with_widec=no
7812 fi;
7813 echo "$as_me:7813: result: $with_widec" >&5
7814 echo "${ECHO_T}$with_widec" >&6
7815 if test "$with_widec" = yes ; then
7816         LIB_SUFFIX="w${LIB_SUFFIX}"
7817         cat >>confdefs.h <<\EOF
7818 #define USE_WIDEC_SUPPORT 1
7819 EOF
7820
7821         case "$CFLAGS $CPPFLAGS" in #(vi
7822         *-D_XOPEN_SOURCE=500) #(vi
7823                 ;;
7824         *)
7825
7826 echo "$as_me:7826: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7827 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7828 cat >conftest.$ac_ext <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831 #include <sys/types.h>
7832
7833 int
7834 main ()
7835 {
7836
7837 #ifndef _XOPEN_SOURCE_EXTENDED
7838 make an error
7839 #endif
7840   ;
7841   return 0;
7842 }
7843 _ACEOF
7844 rm -f conftest.$ac_objext
7845 if { (eval echo "$as_me:7845: \"$ac_compile\"") >&5
7846   (eval $ac_compile) 2>&5
7847   ac_status=$?
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit $ac_status); } &&
7850          { ac_try='test -s conftest.$ac_objext'
7851   { (eval echo "$as_me:7851: \"$ac_try\"") >&5
7852   (eval $ac_try) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit $ac_status); }; }; then
7856   cf_result=no
7857 else
7858   echo "$as_me: failed program was:" >&5
7859 cat conftest.$ac_ext >&5
7860 cf_result=yes
7861 fi
7862 rm -f conftest.$ac_objext conftest.$ac_ext
7863 echo "$as_me:7863: result: $cf_result" >&5
7864 echo "${ECHO_T}$cf_result" >&6
7865
7866 if test "$cf_result" = yes ; then
7867         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7868 elif test "x" != "x" ; then
7869         echo "$as_me:7869: checking checking for compatible value versus " >&5
7870 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7871         cat >conftest.$ac_ext <<_ACEOF
7872 #line 7872 "configure"
7873 #include "confdefs.h"
7874 #include <sys/types.h>
7875
7876 int
7877 main ()
7878 {
7879
7880 #if _XOPEN_SOURCE_EXTENDED- < 0
7881 make an error
7882 #endif
7883   ;
7884   return 0;
7885 }
7886 _ACEOF
7887 rm -f conftest.$ac_objext
7888 if { (eval echo "$as_me:7888: \"$ac_compile\"") >&5
7889   (eval $ac_compile) 2>&5
7890   ac_status=$?
7891   echo "$as_me:7891: \$? = $ac_status" >&5
7892   (exit $ac_status); } &&
7893          { ac_try='test -s conftest.$ac_objext'
7894   { (eval echo "$as_me:7894: \"$ac_try\"") >&5
7895   (eval $ac_try) 2>&5
7896   ac_status=$?
7897   echo "$as_me:7897: \$? = $ac_status" >&5
7898   (exit $ac_status); }; }; then
7899   cf_result=yes
7900 else
7901   echo "$as_me: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903 cf_result=no
7904 fi
7905 rm -f conftest.$ac_objext conftest.$ac_ext
7906         echo "$as_me:7906: result: $cf_result" >&5
7907 echo "${ECHO_T}$cf_result" >&6
7908         if test "$cf_result" = no ; then
7909                 # perhaps we can override it - try...
7910                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7911         fi
7912 fi
7913
7914                 ;;
7915         esac
7916
7917         # with_overwrite=no
7918         NCURSES_CH_T=cchar_t
7919
7920 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7921 do
7922 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7923 echo "$as_me:7923: checking for $ac_func" >&5
7924 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7925 if eval "test \"\${$as_ac_var+set}\" = set"; then
7926   echo $ECHO_N "(cached) $ECHO_C" >&6
7927 else
7928   cat >conftest.$ac_ext <<_ACEOF
7929 #line 7929 "configure"
7930 #include "confdefs.h"
7931 /* System header to define __stub macros and hopefully few prototypes,
7932     which can conflict with char $ac_func (); below.  */
7933 #include <assert.h>
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 #ifdef __cplusplus
7936 extern "C"
7937 #endif
7938 /* We use char because int might match the return type of a gcc2
7939    builtin and then its argument prototype would still apply.  */
7940 char $ac_func ();
7941 char (*f) ();
7942
7943 int
7944 main ()
7945 {
7946 /* The GNU C library defines this for functions which it implements
7947     to always fail with ENOSYS.  Some functions are actually named
7948     something starting with __ and the normal name is an alias.  */
7949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7950 choke me
7951 #else
7952 f = $ac_func;
7953 #endif
7954
7955   ;
7956   return 0;
7957 }
7958 _ACEOF
7959 rm -f conftest.$ac_objext conftest$ac_exeext
7960 if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
7961   (eval $ac_link) 2>&5
7962   ac_status=$?
7963   echo "$as_me:7963: \$? = $ac_status" >&5
7964   (exit $ac_status); } &&
7965          { ac_try='test -s conftest$ac_exeext'
7966   { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7967   (eval $ac_try) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit $ac_status); }; }; then
7971   eval "$as_ac_var=yes"
7972 else
7973   echo "$as_me: failed program was:" >&5
7974 cat conftest.$ac_ext >&5
7975 eval "$as_ac_var=no"
7976 fi
7977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7978 fi
7979 echo "$as_me:7979: result: `eval echo '${'$as_ac_var'}'`" >&5
7980 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7981 if test `eval echo '${'$as_ac_var'}'` = yes; then
7982   cat >>confdefs.h <<EOF
7983 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7984 EOF
7985
7986 fi
7987 done
7988
7989         if test "$ac_cv_func_putwc" != yes ; then
7990
7991 echo "$as_me:7991: checking for multibyte character support" >&5
7992 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7993 if test "${cf_cv_utf8_lib+set}" = set; then
7994   echo $ECHO_N "(cached) $ECHO_C" >&6
7995 else
7996
7997         cf_save_LIBS="$LIBS"
7998         cat >conftest.$ac_ext <<_ACEOF
7999 #line 7999 "configure"
8000 #include "confdefs.h"
8001
8002 #include <stdlib.h>
8003 int
8004 main ()
8005 {
8006 putwc(0,0);
8007   ;
8008   return 0;
8009 }
8010 _ACEOF
8011 rm -f conftest.$ac_objext conftest$ac_exeext
8012 if { (eval echo "$as_me:8012: \"$ac_link\"") >&5
8013   (eval $ac_link) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit $ac_status); } &&
8017          { ac_try='test -s conftest$ac_exeext'
8018   { (eval echo "$as_me:8018: \"$ac_try\"") >&5
8019   (eval $ac_try) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit $ac_status); }; }; then
8023   cf_cv_utf8_lib=yes
8024 else
8025   echo "$as_me: failed program was:" >&5
8026 cat conftest.$ac_ext >&5
8027
8028 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8029 # will be set on completion of the AC_TRY_LINK below.
8030 cf_cv_header_path_utf8=
8031 cf_cv_library_path_utf8=
8032
8033 echo "${as_me:-configure}:8033: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8034
8035 cf_save_LIBS="$LIBS"
8036
8037 cat >conftest.$ac_ext <<_ACEOF
8038 #line 8038 "configure"
8039 #include "confdefs.h"
8040
8041 #include <libutf8.h>
8042 int
8043 main ()
8044 {
8045 putwc(0,0);
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f conftest.$ac_objext conftest$ac_exeext
8051 if { (eval echo "$as_me:8051: \"$ac_link\"") >&5
8052   (eval $ac_link) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit $ac_status); } &&
8056          { ac_try='test -s conftest$ac_exeext'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); }; }; then
8062
8063         cf_cv_find_linkage_utf8=yes
8064         cf_cv_header_path_utf8=/usr/include
8065         cf_cv_library_path_utf8=/usr/lib
8066
8067 else
8068   echo "$as_me: failed program was:" >&5
8069 cat conftest.$ac_ext >&5
8070
8071 LIBS="-lutf8  $cf_save_LIBS"
8072
8073 cat >conftest.$ac_ext <<_ACEOF
8074 #line 8074 "configure"
8075 #include "confdefs.h"
8076
8077 #include <libutf8.h>
8078 int
8079 main ()
8080 {
8081 putwc(0,0);
8082   ;
8083   return 0;
8084 }
8085 _ACEOF
8086 rm -f conftest.$ac_objext conftest$ac_exeext
8087 if { (eval echo "$as_me:8087: \"$ac_link\"") >&5
8088   (eval $ac_link) 2>&5
8089   ac_status=$?
8090   echo "$as_me:8090: \$? = $ac_status" >&5
8091   (exit $ac_status); } &&
8092          { ac_try='test -s conftest$ac_exeext'
8093   { (eval echo "$as_me:8093: \"$ac_try\"") >&5
8094   (eval $ac_try) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); }; }; then
8098
8099         cf_cv_find_linkage_utf8=yes
8100         cf_cv_header_path_utf8=/usr/include
8101         cf_cv_library_path_utf8=/usr/lib
8102         cf_cv_library_file_utf8="-lutf8"
8103
8104 else
8105   echo "$as_me: failed program was:" >&5
8106 cat conftest.$ac_ext >&5
8107
8108         cf_cv_find_linkage_utf8=no
8109         LIBS="$cf_save_LIBS"
8110
8111     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8112
8113 echo "${as_me:-configure}:8113: testing find linkage for utf8 library ..." 1>&5
8114
8115 echo "${as_me:-configure}:8115: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8116
8117     cf_save_CPPFLAGS="$CPPFLAGS"
8118     cf_test_CPPFLAGS="$CPPFLAGS"
8119
8120 cf_search=
8121
8122 # collect the current set of include-directories from compiler flags
8123 cf_header_path_list=""
8124 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8125         for cf_header_path in $CPPFLAGS $CFLAGS
8126         do
8127                 case $cf_header_path in #(vi
8128                 -I*)
8129                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8130
8131 test "$cf_header_path" != "NONE" && \
8132 test -d "$cf_header_path" && \
8133  {
8134         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8135         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8136         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8137         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8138         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8139         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8140 }
8141
8142                         cf_header_path_list="$cf_header_path_list $cf_search"
8143                         ;;
8144                 esac
8145         done
8146 fi
8147
8148 # add the variations for the package we are looking for
8149
8150 cf_search=
8151
8152 test "/usr" != "$prefix" && \
8153 test -d "/usr" && \
8154 (test $prefix = NONE || test "/usr" != "$prefix") && {
8155         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8156         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8157         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8158         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8159         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8160         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8161 }
8162
8163 test "$prefix" != "NONE" && \
8164 test -d "$prefix" && \
8165  {
8166         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8167         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8168         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8169         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8170         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8171         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8172 }
8173
8174 test "/usr/local" != "$prefix" && \
8175 test -d "/usr/local" && \
8176 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8177         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8178         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8179         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8180         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8181         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8182         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8183 }
8184
8185 test "/opt" != "$prefix" && \
8186 test -d "/opt" && \
8187 (test $prefix = NONE || test "/opt" != "$prefix") && {
8188         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8189         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8190         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8191         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8192         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8193         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8194 }
8195
8196 test "$HOME" != "$prefix" && \
8197 test -d "$HOME" && \
8198 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8199         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8200         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8201         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8202         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8203         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8204         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8205 }
8206
8207 test "$includedir" != NONE && \
8208 test "$includedir" != "/usr/include" && \
8209 test -d "$includedir" && {
8210         test -d $includedir &&    cf_search="$cf_search $includedir"
8211         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8212 }
8213
8214 test "$oldincludedir" != NONE && \
8215 test "$oldincludedir" != "/usr/include" && \
8216 test -d "$oldincludedir" && {
8217         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8218         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8219 }
8220
8221 cf_search="$cf_search $cf_header_path_list"
8222
8223     for cf_cv_header_path_utf8 in $cf_search
8224     do
8225       if test -d $cf_cv_header_path_utf8 ; then
8226         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8227
8228 echo "${as_me:-configure}:8228: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8229
8230         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8231         cat >conftest.$ac_ext <<_ACEOF
8232 #line 8232 "configure"
8233 #include "confdefs.h"
8234
8235 #include <libutf8.h>
8236 int
8237 main ()
8238 {
8239 putwc(0,0);
8240   ;
8241   return 0;
8242 }
8243 _ACEOF
8244 rm -f conftest.$ac_objext
8245 if { (eval echo "$as_me:8245: \"$ac_compile\"") >&5
8246   (eval $ac_compile) 2>&5
8247   ac_status=$?
8248   echo "$as_me:8248: \$? = $ac_status" >&5
8249   (exit $ac_status); } &&
8250          { ac_try='test -s conftest.$ac_objext'
8251   { (eval echo "$as_me:8251: \"$ac_try\"") >&5
8252   (eval $ac_try) 2>&5
8253   ac_status=$?
8254   echo "$as_me:8254: \$? = $ac_status" >&5
8255   (exit $ac_status); }; }; then
8256
8257             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8258
8259 echo "${as_me:-configure}:8259: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8260
8261             cf_cv_find_linkage_utf8=maybe
8262             cf_test_CPPFLAGS="$CPPFLAGS"
8263             break
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267
8268             CPPFLAGS="$cf_save_CPPFLAGS"
8269
8270 fi
8271 rm -f conftest.$ac_objext conftest.$ac_ext
8272       fi
8273     done
8274
8275     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8276
8277 echo "${as_me:-configure}:8277: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8278
8279       cf_save_LIBS="$LIBS"
8280       cf_save_LDFLAGS="$LDFLAGS"
8281
8282       if test "$cf_cv_find_linkage_utf8" != yes ; then
8283
8284 cf_search=
8285 cf_library_path_list=""
8286 if test -n "${LDFLAGS}${LIBS}" ; then
8287         for cf_library_path in $LDFLAGS $LIBS
8288         do
8289                 case $cf_library_path in #(vi
8290                 -L*)
8291                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8292
8293 test "$cf_library_path" != "NONE" && \
8294 test -d "$cf_library_path" && \
8295  {
8296         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8297         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8298         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8299         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8300         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8301         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8302 }
8303
8304                         cf_library_path_list="$cf_library_path_list $cf_search"
8305                         ;;
8306                 esac
8307         done
8308 fi
8309
8310 cf_search=
8311
8312 test "/usr" != "$prefix" && \
8313 test -d "/usr" && \
8314 (test $prefix = NONE || test "/usr" != "$prefix") && {
8315         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8316         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8317         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8318         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8319         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8320         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8321 }
8322
8323 test "$prefix" != "NONE" && \
8324 test -d "$prefix" && \
8325  {
8326         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8327         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8328         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8329         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8330         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8331         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8332 }
8333
8334 test "/usr/local" != "$prefix" && \
8335 test -d "/usr/local" && \
8336 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8337         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8338         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8339         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8340         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8341         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8342         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8343 }
8344
8345 test "/opt" != "$prefix" && \
8346 test -d "/opt" && \
8347 (test $prefix = NONE || test "/opt" != "$prefix") && {
8348         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8349         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8350         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8351         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8352         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8353         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8354 }
8355
8356 test "$HOME" != "$prefix" && \
8357 test -d "$HOME" && \
8358 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8359         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8360         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8361         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8362         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8363         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8364         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8365 }
8366
8367 cf_search="$cf_library_path_list $cf_search"
8368
8369         for cf_cv_library_path_utf8 in $cf_search
8370         do
8371           if test -d $cf_cv_library_path_utf8 ; then
8372             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8373
8374 echo "${as_me:-configure}:8374: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8375
8376             CPPFLAGS="$cf_test_CPPFLAGS"
8377             LIBS="-lutf8  $cf_save_LIBS"
8378             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8379             cat >conftest.$ac_ext <<_ACEOF
8380 #line 8380 "configure"
8381 #include "confdefs.h"
8382
8383 #include <libutf8.h>
8384 int
8385 main ()
8386 {
8387 putwc(0,0);
8388   ;
8389   return 0;
8390 }
8391 _ACEOF
8392 rm -f conftest.$ac_objext conftest$ac_exeext
8393 if { (eval echo "$as_me:8393: \"$ac_link\"") >&5
8394   (eval $ac_link) 2>&5
8395   ac_status=$?
8396   echo "$as_me:8396: \$? = $ac_status" >&5
8397   (exit $ac_status); } &&
8398          { ac_try='test -s conftest$ac_exeext'
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
8405                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8406
8407 echo "${as_me:-configure}:8407: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8408
8409                 cf_cv_find_linkage_utf8=yes
8410                 cf_cv_library_file_utf8="-lutf8"
8411                 break
8412 else
8413   echo "$as_me: failed program was:" >&5
8414 cat conftest.$ac_ext >&5
8415
8416                 CPPFLAGS="$cf_save_CPPFLAGS"
8417                 LIBS="$cf_save_LIBS"
8418                 LDFLAGS="$cf_save_LDFLAGS"
8419
8420 fi
8421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8422           fi
8423         done
8424         CPPFLAGS="$cf_save_CPPFLAGS"
8425         LDFLAGS="$cf_save_LDFLAGS"
8426       fi
8427
8428     else
8429       cf_cv_find_linkage_utf8=no
8430     fi
8431
8432 fi
8433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8434
8435 fi
8436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8437
8438 LIBS="$cf_save_LIBS"
8439
8440 if test "$cf_cv_find_linkage_utf8" = yes ; then
8441 cf_cv_utf8_lib=add-on
8442 else
8443 cf_cv_utf8_lib=no
8444 fi
8445
8446 fi
8447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8448 fi
8449 echo "$as_me:8449: result: $cf_cv_utf8_lib" >&5
8450 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8451
8452 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8453 # ncurses/ncursesw:
8454 if test "$cf_cv_utf8_lib" = "add-on" ; then
8455         cat >>confdefs.h <<\EOF
8456 #define HAVE_LIBUTF8_H 1
8457 EOF
8458
8459 if test -n "$cf_cv_header_path_utf8" ; then
8460   for cf_add_incdir in $cf_cv_header_path_utf8
8461   do
8462         while test $cf_add_incdir != /usr/include
8463         do
8464           if test -d $cf_add_incdir
8465           then
8466                 cf_have_incdir=no
8467                 if test -n "$CFLAGS$CPPFLAGS" ; then
8468                   # a loop is needed to ensure we can add subdirs of existing dirs
8469                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8470                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8471                           cf_have_incdir=yes; break
8472                         fi
8473                   done
8474                 fi
8475
8476                 if test "$cf_have_incdir" = no ; then
8477                   if test "$cf_add_incdir" = /usr/local/include ; then
8478                         if test "$GCC" = yes
8479                         then
8480                           cf_save_CPPFLAGS=$CPPFLAGS
8481                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8482                           cat >conftest.$ac_ext <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8485 #include <stdio.h>
8486 int
8487 main ()
8488 {
8489 printf("Hello")
8490   ;
8491   return 0;
8492 }
8493 _ACEOF
8494 rm -f conftest.$ac_objext
8495 if { (eval echo "$as_me:8495: \"$ac_compile\"") >&5
8496   (eval $ac_compile) 2>&5
8497   ac_status=$?
8498   echo "$as_me:8498: \$? = $ac_status" >&5
8499   (exit $ac_status); } &&
8500          { ac_try='test -s conftest.$ac_objext'
8501   { (eval echo "$as_me:8501: \"$ac_try\"") >&5
8502   (eval $ac_try) 2>&5
8503   ac_status=$?
8504   echo "$as_me:8504: \$? = $ac_status" >&5
8505   (exit $ac_status); }; }; then
8506   :
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 cat conftest.$ac_ext >&5
8510 cf_have_incdir=yes
8511 fi
8512 rm -f conftest.$ac_objext conftest.$ac_ext
8513                           CPPFLAGS=$cf_save_CPPFLAGS
8514                         fi
8515                   fi
8516                 fi
8517
8518                 if test "$cf_have_incdir" = no ; then
8519                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8520
8521 echo "${as_me:-configure}:8521: testing adding $cf_add_incdir to include-path ..." 1>&5
8522
8523                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8524
8525                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8526                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8527                   cf_add_incdir="$cf_top_incdir"
8528                 else
8529                   break
8530                 fi
8531           fi
8532         done
8533   done
8534 fi
8535
8536 if test -n "$cf_cv_library_path_utf8" ; then
8537   for cf_add_libdir in $cf_cv_library_path_utf8
8538   do
8539     if test $cf_add_libdir = /usr/lib ; then
8540       :
8541     elif test -d $cf_add_libdir
8542     then
8543       cf_have_libdir=no
8544       if test -n "$LDFLAGS$LIBS" ; then
8545         # a loop is needed to ensure we can add subdirs of existing dirs
8546         for cf_test_libdir in $LDFLAGS $LIBS ; do
8547           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8548             cf_have_libdir=yes; break
8549           fi
8550         done
8551       fi
8552       if test "$cf_have_libdir" = no ; then
8553         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8554
8555 echo "${as_me:-configure}:8555: testing adding $cf_add_libdir to library-path ..." 1>&5
8556
8557         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8558       fi
8559     fi
8560   done
8561 fi
8562
8563         LIBS="$cf_cv_library_file_utf8 $LIBS"
8564 fi
8565
8566                 if test "$cf_cv_utf8_lib" != no ; then
8567                         NCURSES_LIBUTF8=1
8568                 fi
8569         fi
8570
8571 # This is needed on Tru64 5.0 to declare mbstate_t
8572 echo "$as_me:8572: checking if we must include wchar.h to declare mbstate_t" >&5
8573 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8574 if test "${cf_cv_mbstate_t+set}" = set; then
8575   echo $ECHO_N "(cached) $ECHO_C" >&6
8576 else
8577
8578 cat >conftest.$ac_ext <<_ACEOF
8579 #line 8579 "configure"
8580 #include "confdefs.h"
8581
8582 #include <stdlib.h>
8583 #include <stdarg.h>
8584 #include <stdio.h>
8585 #ifdef HAVE_LIBUTF8_H
8586 #include <libutf8.h>
8587 #endif
8588 int
8589 main ()
8590 {
8591 mbstate_t state
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 rm -f conftest.$ac_objext
8597 if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
8598   (eval $ac_compile) 2>&5
8599   ac_status=$?
8600   echo "$as_me:8600: \$? = $ac_status" >&5
8601   (exit $ac_status); } &&
8602          { ac_try='test -s conftest.$ac_objext'
8603   { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8604   (eval $ac_try) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); }; }; then
8608   cf_cv_mbstate_t=no
8609 else
8610   echo "$as_me: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8612 cat >conftest.$ac_ext <<_ACEOF
8613 #line 8613 "configure"
8614 #include "confdefs.h"
8615
8616 #include <stdlib.h>
8617 #include <stdarg.h>
8618 #include <stdio.h>
8619 #include <wchar.h>
8620 #ifdef HAVE_LIBUTF8_H
8621 #include <libutf8.h>
8622 #endif
8623 int
8624 main ()
8625 {
8626 mbstate_t value
8627   ;
8628   return 0;
8629 }
8630 _ACEOF
8631 rm -f conftest.$ac_objext
8632 if { (eval echo "$as_me:8632: \"$ac_compile\"") >&5
8633   (eval $ac_compile) 2>&5
8634   ac_status=$?
8635   echo "$as_me:8635: \$? = $ac_status" >&5
8636   (exit $ac_status); } &&
8637          { ac_try='test -s conftest.$ac_objext'
8638   { (eval echo "$as_me:8638: \"$ac_try\"") >&5
8639   (eval $ac_try) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); }; }; then
8643   cf_cv_mbstate_t=yes
8644 else
8645   echo "$as_me: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 cf_cv_mbstate_t=unknown
8648 fi
8649 rm -f conftest.$ac_objext conftest.$ac_ext
8650 fi
8651 rm -f conftest.$ac_objext conftest.$ac_ext
8652 fi
8653 echo "$as_me:8653: result: $cf_cv_mbstate_t" >&5
8654 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8655
8656 if test "$cf_cv_mbstate_t" = yes ; then
8657         cat >>confdefs.h <<\EOF
8658 #define NEED_WCHAR_H 1
8659 EOF
8660
8661         NEED_WCHAR_H=1
8662 fi
8663
8664 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8665 if test "$cf_cv_mbstate_t" = unknown ; then
8666         NCURSES_MBSTATE_T=1
8667 fi
8668
8669 # This is needed on Tru64 5.0 to declare wchar_t
8670 echo "$as_me:8670: checking if we must include wchar.h to declare wchar_t" >&5
8671 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8672 if test "${cf_cv_wchar_t+set}" = set; then
8673   echo $ECHO_N "(cached) $ECHO_C" >&6
8674 else
8675
8676 cat >conftest.$ac_ext <<_ACEOF
8677 #line 8677 "configure"
8678 #include "confdefs.h"
8679
8680 #include <stdlib.h>
8681 #include <stdarg.h>
8682 #include <stdio.h>
8683 #ifdef HAVE_LIBUTF8_H
8684 #include <libutf8.h>
8685 #endif
8686 int
8687 main ()
8688 {
8689 wchar_t state
8690   ;
8691   return 0;
8692 }
8693 _ACEOF
8694 rm -f conftest.$ac_objext
8695 if { (eval echo "$as_me:8695: \"$ac_compile\"") >&5
8696   (eval $ac_compile) 2>&5
8697   ac_status=$?
8698   echo "$as_me:8698: \$? = $ac_status" >&5
8699   (exit $ac_status); } &&
8700          { ac_try='test -s conftest.$ac_objext'
8701   { (eval echo "$as_me:8701: \"$ac_try\"") >&5
8702   (eval $ac_try) 2>&5
8703   ac_status=$?
8704   echo "$as_me:8704: \$? = $ac_status" >&5
8705   (exit $ac_status); }; }; then
8706   cf_cv_wchar_t=no
8707 else
8708   echo "$as_me: failed program was:" >&5
8709 cat conftest.$ac_ext >&5
8710 cat >conftest.$ac_ext <<_ACEOF
8711 #line 8711 "configure"
8712 #include "confdefs.h"
8713
8714 #include <stdlib.h>
8715 #include <stdarg.h>
8716 #include <stdio.h>
8717 #include <wchar.h>
8718 #ifdef HAVE_LIBUTF8_H
8719 #include <libutf8.h>
8720 #endif
8721 int
8722 main ()
8723 {
8724 wchar_t value
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext
8730 if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
8731   (eval $ac_compile) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest.$ac_objext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   cf_cv_wchar_t=yes
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 cf_cv_wchar_t=unknown
8746 fi
8747 rm -f conftest.$ac_objext conftest.$ac_ext
8748 fi
8749 rm -f conftest.$ac_objext conftest.$ac_ext
8750 fi
8751 echo "$as_me:8751: result: $cf_cv_wchar_t" >&5
8752 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8753
8754 if test "$cf_cv_wchar_t" = yes ; then
8755         cat >>confdefs.h <<\EOF
8756 #define NEED_WCHAR_H 1
8757 EOF
8758
8759         NEED_WCHAR_H=1
8760 fi
8761
8762 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8763 if test "$cf_cv_wchar_t" = unknown ; then
8764         NCURSES_WCHAR_T=1
8765 fi
8766
8767 # if we find wchar_t in either place, use substitution to provide a fallback.
8768 if test "$cf_cv_wchar_t" != unknown ; then
8769         NCURSES_OK_WCHAR_T=1
8770 fi
8771
8772 # This is needed on Tru64 5.0 to declare wint_t
8773 echo "$as_me:8773: checking if we must include wchar.h to declare wint_t" >&5
8774 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8775 if test "${cf_cv_wint_t+set}" = set; then
8776   echo $ECHO_N "(cached) $ECHO_C" >&6
8777 else
8778
8779 cat >conftest.$ac_ext <<_ACEOF
8780 #line 8780 "configure"
8781 #include "confdefs.h"
8782
8783 #include <stdlib.h>
8784 #include <stdarg.h>
8785 #include <stdio.h>
8786 #ifdef HAVE_LIBUTF8_H
8787 #include <libutf8.h>
8788 #endif
8789 int
8790 main ()
8791 {
8792 wint_t state
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 rm -f conftest.$ac_objext
8798 if { (eval echo "$as_me:8798: \"$ac_compile\"") >&5
8799   (eval $ac_compile) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); } &&
8803          { ac_try='test -s conftest.$ac_objext'
8804   { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:8807: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   cf_cv_wint_t=no
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 cat >conftest.$ac_ext <<_ACEOF
8814 #line 8814 "configure"
8815 #include "confdefs.h"
8816
8817 #include <stdlib.h>
8818 #include <stdarg.h>
8819 #include <stdio.h>
8820 #include <wchar.h>
8821 #ifdef HAVE_LIBUTF8_H
8822 #include <libutf8.h>
8823 #endif
8824 int
8825 main ()
8826 {
8827 wint_t value
8828   ;
8829   return 0;
8830 }
8831 _ACEOF
8832 rm -f conftest.$ac_objext
8833 if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
8834   (eval $ac_compile) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); } &&
8838          { ac_try='test -s conftest.$ac_objext'
8839   { (eval echo "$as_me:8839: \"$ac_try\"") >&5
8840   (eval $ac_try) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); }; }; then
8844   cf_cv_wint_t=yes
8845 else
8846   echo "$as_me: failed program was:" >&5
8847 cat conftest.$ac_ext >&5
8848 cf_cv_wint_t=unknown
8849 fi
8850 rm -f conftest.$ac_objext conftest.$ac_ext
8851 fi
8852 rm -f conftest.$ac_objext conftest.$ac_ext
8853 fi
8854 echo "$as_me:8854: result: $cf_cv_wint_t" >&5
8855 echo "${ECHO_T}$cf_cv_wint_t" >&6
8856
8857 if test "$cf_cv_wint_t" = yes ; then
8858         cat >>confdefs.h <<\EOF
8859 #define NEED_WCHAR_H 1
8860 EOF
8861
8862         NEED_WCHAR_H=1
8863 fi
8864
8865 # if we do not find wint_t in either place, use substitution to provide a fallback.
8866 if test "$cf_cv_wint_t" = unknown ; then
8867         NCURSES_WINT_T=1
8868 fi
8869
8870 # if we find wint_t in either place, use substitution to provide a fallback.
8871 if test "$cf_cv_wint_t" != unknown ; then
8872         NCURSES_OK_WINT_T=1
8873 fi
8874
8875         if test "$NCURSES_MBSTATE_T" != 0; then
8876                 cat >>confdefs.h <<\EOF
8877 #define NEED_MBSTATE_T_DEF 1
8878 EOF
8879
8880         fi
8881 fi
8882
8883 ###   use option --disable-lp64 to allow long chtype
8884 case $cf_cv_abi_version in
8885 [345]*)
8886         default_with_lp64=no
8887         ;;
8888 *)
8889         default_with_lp64=yes
8890         ;;
8891 esac
8892
8893 echo "$as_me:8893: checking whether to enable _LP64 definition in curses.h" >&5
8894 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8895
8896 # Check whether --enable-lp64 or --disable-lp64 was given.
8897 if test "${enable_lp64+set}" = set; then
8898   enableval="$enable_lp64"
8899   with_lp64=$enableval
8900 else
8901   with_lp64=$default_with_lp64
8902 fi;
8903 echo "$as_me:8903: result: $with_lp64" >&5
8904 echo "${ECHO_T}$with_lp64" >&6
8905
8906 if test "$with_lp64" = yes ; then
8907         cf_cv_enable_lp64=1
8908 else
8909         cf_cv_enable_lp64=0
8910 fi
8911
8912 # Check whether --enable-largefile or --disable-largefile was given.
8913 if test "${enable_largefile+set}" = set; then
8914   enableval="$enable_largefile"
8915
8916 fi;
8917 if test "$enable_largefile" != no; then
8918
8919   echo "$as_me:8919: checking for special C compiler options needed for large files" >&5
8920 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8921 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8922   echo $ECHO_N "(cached) $ECHO_C" >&6
8923 else
8924   ac_cv_sys_largefile_CC=no
8925      if test "$GCC" != yes; then
8926        ac_save_CC=$CC
8927        while :; do
8928          # IRIX 6.2 and later do not support large files by default,
8929          # so use the C compiler's -n32 option if that helps.
8930          cat >conftest.$ac_ext <<_ACEOF
8931 #line 8931 "configure"
8932 #include "confdefs.h"
8933 #include <sys/types.h>
8934  /* Check that off_t can represent 2**63 - 1 correctly.
8935     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8936     since some C++ compilers masquerading as C compilers
8937     incorrectly reject 9223372036854775807.  */
8938 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8939   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8940                        && LARGE_OFF_T % 2147483647 == 1)
8941                       ? 1 : -1];
8942 int
8943 main ()
8944 {
8945
8946   ;
8947   return 0;
8948 }
8949 _ACEOF
8950          rm -f conftest.$ac_objext
8951 if { (eval echo "$as_me:8951: \"$ac_compile\"") >&5
8952   (eval $ac_compile) 2>&5
8953   ac_status=$?
8954   echo "$as_me:8954: \$? = $ac_status" >&5
8955   (exit $ac_status); } &&
8956          { ac_try='test -s conftest.$ac_objext'
8957   { (eval echo "$as_me:8957: \"$ac_try\"") >&5
8958   (eval $ac_try) 2>&5
8959   ac_status=$?
8960   echo "$as_me:8960: \$? = $ac_status" >&5
8961   (exit $ac_status); }; }; then
8962   break
8963 else
8964   echo "$as_me: failed program was:" >&5
8965 cat conftest.$ac_ext >&5
8966 fi
8967 rm -f conftest.$ac_objext
8968          CC="$CC -n32"
8969          rm -f conftest.$ac_objext
8970 if { (eval echo "$as_me:8970: \"$ac_compile\"") >&5
8971   (eval $ac_compile) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); } &&
8975          { ac_try='test -s conftest.$ac_objext'
8976   { (eval echo "$as_me:8976: \"$ac_try\"") >&5
8977   (eval $ac_try) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit $ac_status); }; }; then
8981   ac_cv_sys_largefile_CC=' -n32'; break
8982 else
8983   echo "$as_me: failed program was:" >&5
8984 cat conftest.$ac_ext >&5
8985 fi
8986 rm -f conftest.$ac_objext
8987          break
8988        done
8989        CC=$ac_save_CC
8990        rm -f conftest.$ac_ext
8991     fi
8992 fi
8993 echo "$as_me:8993: result: $ac_cv_sys_largefile_CC" >&5
8994 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8995   if test "$ac_cv_sys_largefile_CC" != no; then
8996     CC=$CC$ac_cv_sys_largefile_CC
8997   fi
8998
8999   echo "$as_me:8999: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9000 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9001 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9002   echo $ECHO_N "(cached) $ECHO_C" >&6
9003 else
9004   while :; do
9005   ac_cv_sys_file_offset_bits=no
9006   cat >conftest.$ac_ext <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9009 #include <sys/types.h>
9010  /* Check that off_t can represent 2**63 - 1 correctly.
9011     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9012     since some C++ compilers masquerading as C compilers
9013     incorrectly reject 9223372036854775807.  */
9014 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9015   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9016                        && LARGE_OFF_T % 2147483647 == 1)
9017                       ? 1 : -1];
9018 int
9019 main ()
9020 {
9021
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 rm -f conftest.$ac_objext
9027 if { (eval echo "$as_me:9027: \"$ac_compile\"") >&5
9028   (eval $ac_compile) 2>&5
9029   ac_status=$?
9030   echo "$as_me:9030: \$? = $ac_status" >&5
9031   (exit $ac_status); } &&
9032          { ac_try='test -s conftest.$ac_objext'
9033   { (eval echo "$as_me:9033: \"$ac_try\"") >&5
9034   (eval $ac_try) 2>&5
9035   ac_status=$?
9036   echo "$as_me:9036: \$? = $ac_status" >&5
9037   (exit $ac_status); }; }; then
9038   break
9039 else
9040   echo "$as_me: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 fi
9043 rm -f conftest.$ac_objext conftest.$ac_ext
9044   cat >conftest.$ac_ext <<_ACEOF
9045 #line 9045 "configure"
9046 #include "confdefs.h"
9047 #define _FILE_OFFSET_BITS 64
9048 #include <sys/types.h>
9049  /* Check that off_t can represent 2**63 - 1 correctly.
9050     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9051     since some C++ compilers masquerading as C compilers
9052     incorrectly reject 9223372036854775807.  */
9053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9054   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9055                        && LARGE_OFF_T % 2147483647 == 1)
9056                       ? 1 : -1];
9057 int
9058 main ()
9059 {
9060
9061   ;
9062   return 0;
9063 }
9064 _ACEOF
9065 rm -f conftest.$ac_objext
9066 if { (eval echo "$as_me:9066: \"$ac_compile\"") >&5
9067   (eval $ac_compile) 2>&5
9068   ac_status=$?
9069   echo "$as_me:9069: \$? = $ac_status" >&5
9070   (exit $ac_status); } &&
9071          { ac_try='test -s conftest.$ac_objext'
9072   { (eval echo "$as_me:9072: \"$ac_try\"") >&5
9073   (eval $ac_try) 2>&5
9074   ac_status=$?
9075   echo "$as_me:9075: \$? = $ac_status" >&5
9076   (exit $ac_status); }; }; then
9077   ac_cv_sys_file_offset_bits=64; break
9078 else
9079   echo "$as_me: failed program was:" >&5
9080 cat conftest.$ac_ext >&5
9081 fi
9082 rm -f conftest.$ac_objext conftest.$ac_ext
9083   break
9084 done
9085 fi
9086 echo "$as_me:9086: result: $ac_cv_sys_file_offset_bits" >&5
9087 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9088 if test "$ac_cv_sys_file_offset_bits" != no; then
9089
9090 cat >>confdefs.h <<EOF
9091 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9092 EOF
9093
9094 fi
9095 rm -rf conftest*
9096   echo "$as_me:9096: checking for _LARGE_FILES value needed for large files" >&5
9097 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9098 if test "${ac_cv_sys_large_files+set}" = set; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 else
9101   while :; do
9102   ac_cv_sys_large_files=no
9103   cat >conftest.$ac_ext <<_ACEOF
9104 #line 9104 "configure"
9105 #include "confdefs.h"
9106 #include <sys/types.h>
9107  /* Check that off_t can represent 2**63 - 1 correctly.
9108     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9109     since some C++ compilers masquerading as C compilers
9110     incorrectly reject 9223372036854775807.  */
9111 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9112   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9113                        && LARGE_OFF_T % 2147483647 == 1)
9114                       ? 1 : -1];
9115 int
9116 main ()
9117 {
9118
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 rm -f conftest.$ac_objext
9124 if { (eval echo "$as_me:9124: \"$ac_compile\"") >&5
9125   (eval $ac_compile) 2>&5
9126   ac_status=$?
9127   echo "$as_me:9127: \$? = $ac_status" >&5
9128   (exit $ac_status); } &&
9129          { ac_try='test -s conftest.$ac_objext'
9130   { (eval echo "$as_me:9130: \"$ac_try\"") >&5
9131   (eval $ac_try) 2>&5
9132   ac_status=$?
9133   echo "$as_me:9133: \$? = $ac_status" >&5
9134   (exit $ac_status); }; }; then
9135   break
9136 else
9137   echo "$as_me: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 fi
9140 rm -f conftest.$ac_objext conftest.$ac_ext
9141   cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 #define _LARGE_FILES 1
9145 #include <sys/types.h>
9146  /* Check that off_t can represent 2**63 - 1 correctly.
9147     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9148     since some C++ compilers masquerading as C compilers
9149     incorrectly reject 9223372036854775807.  */
9150 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9151   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9152                        && LARGE_OFF_T % 2147483647 == 1)
9153                       ? 1 : -1];
9154 int
9155 main ()
9156 {
9157
9158   ;
9159   return 0;
9160 }
9161 _ACEOF
9162 rm -f conftest.$ac_objext
9163 if { (eval echo "$as_me:9163: \"$ac_compile\"") >&5
9164   (eval $ac_compile) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit $ac_status); } &&
9168          { ac_try='test -s conftest.$ac_objext'
9169   { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170   (eval $ac_try) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); }; }; then
9174   ac_cv_sys_large_files=1; break
9175 else
9176   echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 fi
9179 rm -f conftest.$ac_objext conftest.$ac_ext
9180   break
9181 done
9182 fi
9183 echo "$as_me:9183: result: $ac_cv_sys_large_files" >&5
9184 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9185 if test "$ac_cv_sys_large_files" != no; then
9186
9187 cat >>confdefs.h <<EOF
9188 #define _LARGE_FILES $ac_cv_sys_large_files
9189 EOF
9190
9191 fi
9192 rm -rf conftest*
9193 fi
9194
9195     if test "$enable_largefile" != no ; then
9196         echo "$as_me:9196: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9197 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9198 if test "${ac_cv_sys_largefile_source+set}" = set; then
9199   echo $ECHO_N "(cached) $ECHO_C" >&6
9200 else
9201   while :; do
9202   ac_cv_sys_largefile_source=no
9203   cat >conftest.$ac_ext <<_ACEOF
9204 #line 9204 "configure"
9205 #include "confdefs.h"
9206 #include <stdio.h>
9207 int
9208 main ()
9209 {
9210 return !fseeko;
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 rm -f conftest.$ac_objext
9216 if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
9217   (eval $ac_compile) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); } &&
9221          { ac_try='test -s conftest.$ac_objext'
9222   { (eval echo "$as_me:9222: \"$ac_try\"") >&5
9223   (eval $ac_try) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); }; }; then
9227   break
9228 else
9229   echo "$as_me: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233   cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236 #define _LARGEFILE_SOURCE 1
9237 #include <stdio.h>
9238 int
9239 main ()
9240 {
9241 return !fseeko;
9242   ;
9243   return 0;
9244 }
9245 _ACEOF
9246 rm -f conftest.$ac_objext
9247 if { (eval echo "$as_me:9247: \"$ac_compile\"") >&5
9248   (eval $ac_compile) 2>&5
9249   ac_status=$?
9250   echo "$as_me:9250: \$? = $ac_status" >&5
9251   (exit $ac_status); } &&
9252          { ac_try='test -s conftest.$ac_objext'
9253   { (eval echo "$as_me:9253: \"$ac_try\"") >&5
9254   (eval $ac_try) 2>&5
9255   ac_status=$?
9256   echo "$as_me:9256: \$? = $ac_status" >&5
9257   (exit $ac_status); }; }; then
9258   ac_cv_sys_largefile_source=1; break
9259 else
9260   echo "$as_me: failed program was:" >&5
9261 cat conftest.$ac_ext >&5
9262 fi
9263 rm -f conftest.$ac_objext conftest.$ac_ext
9264   break
9265 done
9266 fi
9267 echo "$as_me:9267: result: $ac_cv_sys_largefile_source" >&5
9268 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9269 if test "$ac_cv_sys_largefile_source" != no; then
9270
9271 cat >>confdefs.h <<EOF
9272 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9273 EOF
9274
9275 fi
9276 rm -rf conftest*
9277
9278 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9279 # in glibc 2.1.3, but that breaks too many other things.
9280 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9281 echo "$as_me:9281: checking for fseeko" >&5
9282 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9283 if test "${ac_cv_func_fseeko+set}" = set; then
9284   echo $ECHO_N "(cached) $ECHO_C" >&6
9285 else
9286   cat >conftest.$ac_ext <<_ACEOF
9287 #line 9287 "configure"
9288 #include "confdefs.h"
9289 #include <stdio.h>
9290 int
9291 main ()
9292 {
9293 return fseeko && fseeko (stdin, 0, 0);
9294   ;
9295   return 0;
9296 }
9297 _ACEOF
9298 rm -f conftest.$ac_objext conftest$ac_exeext
9299 if { (eval echo "$as_me:9299: \"$ac_link\"") >&5
9300   (eval $ac_link) 2>&5
9301   ac_status=$?
9302   echo "$as_me:9302: \$? = $ac_status" >&5
9303   (exit $ac_status); } &&
9304          { ac_try='test -s conftest$ac_exeext'
9305   { (eval echo "$as_me:9305: \"$ac_try\"") >&5
9306   (eval $ac_try) 2>&5
9307   ac_status=$?
9308   echo "$as_me:9308: \$? = $ac_status" >&5
9309   (exit $ac_status); }; }; then
9310   ac_cv_func_fseeko=yes
9311 else
9312   echo "$as_me: failed program was:" >&5
9313 cat conftest.$ac_ext >&5
9314 ac_cv_func_fseeko=no
9315 fi
9316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9317 fi
9318 echo "$as_me:9318: result: $ac_cv_func_fseeko" >&5
9319 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9320 if test $ac_cv_func_fseeko = yes; then
9321
9322 cat >>confdefs.h <<\EOF
9323 #define HAVE_FSEEKO 1
9324 EOF
9325
9326 fi
9327
9328         # Normally we would collect these definitions in the config.h,
9329         # but (like _XOPEN_SOURCE), some environments rely on having these
9330         # defined before any of the system headers are included.  Another
9331         # case comes up with C++, e.g., on AIX the compiler compiles the
9332         # header files by themselves before looking at the body files it is
9333         # told to compile.  For ncurses, those header files do not include
9334         # the config.h
9335         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9336         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9337         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9338
9339         echo "$as_me:9339: checking whether to use struct dirent64" >&5
9340 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9341 if test "${cf_cv_struct_dirent64+set}" = set; then
9342   echo $ECHO_N "(cached) $ECHO_C" >&6
9343 else
9344
9345                 cat >conftest.$ac_ext <<_ACEOF
9346 #line 9346 "configure"
9347 #include "confdefs.h"
9348
9349 #include <sys/types.h>
9350 #include <dirent.h>
9351
9352 int
9353 main ()
9354 {
9355
9356                 /* if transitional largefile support is setup, this is true */
9357                 extern struct dirent64 * readdir(DIR *);
9358                 struct dirent64 *x = readdir((DIR *)0);
9359                 struct dirent *y = readdir((DIR *)0);
9360                 int z = x - y;
9361
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_struct_dirent64=yes
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cf_cv_struct_dirent64=no
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385
9386 fi
9387 echo "$as_me:9387: result: $cf_cv_struct_dirent64" >&5
9388 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9389         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9390 #define HAVE_STRUCT_DIRENT64 1
9391 EOF
9392
9393     fi
9394
9395 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9396 echo "$as_me:9396: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9397 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9398
9399 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9400 if test "${enable_tparm_varargs+set}" = set; then
9401   enableval="$enable_tparm_varargs"
9402   with_tparm_varargs=$enableval
9403 else
9404   with_tparm_varargs=yes
9405 fi;
9406 echo "$as_me:9406: result: $with_tparm_varargs" >&5
9407 echo "${ECHO_T}$with_tparm_varargs" >&6
9408 NCURSES_TPARM_VARARGS=0
9409 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9410
9411 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9412 if test "$with_ticlib" != no ; then
9413 echo "$as_me:9413: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9414 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9415
9416 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9417 if test "${enable_tic_depends+set}" = set; then
9418   enableval="$enable_tic_depends"
9419   with_tic_depends=$enableval
9420 else
9421   with_tic_depends=yes
9422 fi;
9423 echo "$as_me:9423: result: $with_tic_depends" >&5
9424 echo "${ECHO_T}$with_tic_depends" >&6
9425 else
9426         with_tic_depends=no
9427 fi
9428
9429 ###   use option --with-bool to override bool's type
9430 echo "$as_me:9430: checking for type of bool" >&5
9431 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9432
9433 # Check whether --with-bool or --without-bool was given.
9434 if test "${with_bool+set}" = set; then
9435   withval="$with_bool"
9436   NCURSES_BOOL="$withval"
9437 else
9438   NCURSES_BOOL=auto
9439 fi;
9440 echo "$as_me:9440: result: $NCURSES_BOOL" >&5
9441 echo "${ECHO_T}$NCURSES_BOOL" >&6
9442
9443 echo "$as_me:9443: checking for alternate terminal capabilities file" >&5
9444 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9445
9446 # Check whether --with-caps or --without-caps was given.
9447 if test "${with_caps+set}" = set; then
9448   withval="$with_caps"
9449   TERMINFO_CAPS=Caps.$withval
9450 else
9451   TERMINFO_CAPS=Caps
9452 fi;
9453 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9454 echo "$as_me:9454: result: $TERMINFO_CAPS" >&5
9455 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9456
9457 ###   use option --with-chtype to override chtype's type
9458 echo "$as_me:9458: checking for type of chtype" >&5
9459 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9460
9461 # Check whether --with-chtype or --without-chtype was given.
9462 if test "${with_chtype+set}" = set; then
9463   withval="$with_chtype"
9464   NCURSES_CHTYPE="$withval"
9465 else
9466   NCURSES_CHTYPE=auto
9467 fi;
9468 echo "$as_me:9468: result: $NCURSES_CHTYPE" >&5
9469 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9470
9471 ###   use option --with-ospeed to override ospeed's type
9472 echo "$as_me:9472: checking for type of ospeed" >&5
9473 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9474
9475 # Check whether --with-ospeed or --without-ospeed was given.
9476 if test "${with_ospeed+set}" = set; then
9477   withval="$with_ospeed"
9478   NCURSES_OSPEED="$withval"
9479 else
9480   NCURSES_OSPEED=short
9481 fi;
9482 echo "$as_me:9482: result: $NCURSES_OSPEED" >&5
9483 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9484
9485 ###   use option --with-mmask-t to override mmask_t's type
9486 echo "$as_me:9486: checking for type of mmask_t" >&5
9487 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9488
9489 # Check whether --with-mmask-t or --without-mmask-t was given.
9490 if test "${with_mmask_t+set}" = set; then
9491   withval="$with_mmask_t"
9492   NCURSES_MMASK_T="$withval"
9493 else
9494   NCURSES_MMASK_T=auto
9495 fi;
9496 echo "$as_me:9496: result: $NCURSES_MMASK_T" >&5
9497 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9498
9499 ###   use option --with-ccharw-max to override CCHARW_MAX size
9500 echo "$as_me:9500: checking for size CCHARW_MAX" >&5
9501 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9502
9503 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9504 if test "${with_ccharw_max+set}" = set; then
9505   withval="$with_ccharw_max"
9506   NCURSES_CCHARW_MAX="$withval"
9507 else
9508   NCURSES_CCHARW_MAX=5
9509 fi;
9510 echo "$as_me:9510: result: $NCURSES_CCHARW_MAX" >&5
9511 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9512
9513 ### Enable compiling-in rcs id's
9514 echo "$as_me:9514: checking if RCS identifiers should be compiled-in" >&5
9515 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9516
9517 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9518 if test "${with_rcs_ids+set}" = set; then
9519   withval="$with_rcs_ids"
9520   with_rcs_ids=$withval
9521 else
9522   with_rcs_ids=no
9523 fi;
9524 echo "$as_me:9524: result: $with_rcs_ids" >&5
9525 echo "${ECHO_T}$with_rcs_ids" >&6
9526 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9527 #define USE_RCS_IDS 1
9528 EOF
9529
9530 ###############################################################################
9531
9532 echo "$as_me:9532: checking format of man-pages" >&5
9533 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9534
9535 # Check whether --with-manpage-format or --without-manpage-format was given.
9536 if test "${with_manpage_format+set}" = set; then
9537   withval="$with_manpage_format"
9538   MANPAGE_FORMAT=$withval
9539 else
9540   MANPAGE_FORMAT=unknown
9541 fi;
9542
9543 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9544 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9545
9546 cf_unknown=
9547
9548 case $MANPAGE_FORMAT in
9549 unknown)
9550   if test -z "$MANPATH" ; then
9551     MANPATH="/usr/man:/usr/share/man"
9552   fi
9553
9554   # look for the 'date' man-page (it's most likely to be installed!)
9555   MANPAGE_FORMAT=
9556   cf_preform=no
9557   cf_catonly=yes
9558   cf_example=date
9559
9560   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9561   for cf_dir in $MANPATH; do
9562     test -z "$cf_dir" && cf_dir=/usr/man
9563     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
9564     do
9565       cf_test=`echo $cf_name | sed -e 's/*//'`
9566       if test "x$cf_test" = "x$cf_name" ; then
9567
9568         case "$cf_name" in
9569         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9570         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9571         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9572         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9573         esac
9574
9575         case "$cf_name" in
9576         $cf_dir/man*)
9577           cf_catonly=no
9578           ;;
9579         $cf_dir/cat*)
9580           cf_preform=yes
9581           ;;
9582         esac
9583         break
9584       fi
9585
9586       # if we found a match in either man* or cat*, stop looking
9587       if test -n "$MANPAGE_FORMAT" ; then
9588         cf_found=no
9589         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9590         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9591         case "$cf_name" in
9592         $cf_dir/cat*)
9593           cf_found=yes
9594           ;;
9595         esac
9596         test $cf_found=yes && break
9597       fi
9598     done
9599     # only check the first directory in $MANPATH where we find manpages
9600     if test -n "$MANPAGE_FORMAT" ; then
9601        break
9602     fi
9603   done
9604   # if we did not find the example, just assume it is normal
9605   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9606   IFS="$ac_save_ifs"
9607   ;;
9608 *)
9609   for cf_option in $MANPAGE_FORMAT; do
9610      case $cf_option in #(vi
9611      gzip|compress|BSDI|normal|formatted|catonly)
9612        ;;
9613      *)
9614        cf_unknown="$cf_unknown $cf_option"
9615        ;;
9616      esac
9617   done
9618   ;;
9619 esac
9620
9621 echo "$as_me:9621: result: $MANPAGE_FORMAT" >&5
9622 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9623 if test -n "$cf_unknown" ; then
9624   { echo "$as_me:9624: WARNING: Unexpected manpage-format $cf_unknown" >&5
9625 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9626 fi
9627
9628 echo "$as_me:9628: checking for manpage renaming" >&5
9629 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9630
9631 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9632 if test "${with_manpage_renames+set}" = set; then
9633   withval="$with_manpage_renames"
9634   MANPAGE_RENAMES=$withval
9635 else
9636   MANPAGE_RENAMES=yes
9637 fi;
9638
9639 case ".$MANPAGE_RENAMES" in #(vi
9640 .no) #(vi
9641   ;;
9642 .|.yes)
9643   # Debian 'man' program?
9644   if test -f /etc/debian_version ; then
9645     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9646   else
9647     MANPAGE_RENAMES=no
9648   fi
9649   ;;
9650 esac
9651
9652 if test "$MANPAGE_RENAMES" != no ; then
9653   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9654     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9655   elif test ! -f $MANPAGE_RENAMES ; then
9656     { { echo "$as_me:9656: error: not a filename: $MANPAGE_RENAMES" >&5
9657 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9658    { (exit 1); exit 1; }; }
9659   fi
9660
9661   test ! -d man && mkdir man
9662
9663   # Construct a sed-script to perform renaming within man-pages
9664   if test -n "$MANPAGE_RENAMES" ; then
9665     test ! -d man && mkdir man
9666     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9667   fi
9668 fi
9669
9670 echo "$as_me:9670: result: $MANPAGE_RENAMES" >&5
9671 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9672
9673 echo "$as_me:9673: checking if manpage aliases will be installed" >&5
9674 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9675
9676 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9677 if test "${with_manpage_aliases+set}" = set; then
9678   withval="$with_manpage_aliases"
9679   MANPAGE_ALIASES=$withval
9680 else
9681   MANPAGE_ALIASES=yes
9682 fi;
9683
9684 echo "$as_me:9684: result: $MANPAGE_ALIASES" >&5
9685 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9686
9687 case "x$LN_S" in #(vi
9688 xln*) #(vi
9689         cf_use_symlinks=yes
9690         ;;
9691 *)
9692         cf_use_symlinks=no
9693         ;;
9694 esac
9695
9696 MANPAGE_SYMLINKS=no
9697 if test "$MANPAGE_ALIASES" = yes ; then
9698 echo "$as_me:9698: checking if manpage symlinks should be used" >&5
9699 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9700
9701 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9702 if test "${with_manpage_symlinks+set}" = set; then
9703   withval="$with_manpage_symlinks"
9704   MANPAGE_SYMLINKS=$withval
9705 else
9706   MANPAGE_SYMLINKS=$cf_use_symlinks
9707 fi;
9708
9709 if test "$$cf_use_symlinks" = no; then
9710 if test "$MANPAGE_SYMLINKS" = yes ; then
9711         { echo "$as_me:9711: WARNING: cannot make symlinks" >&5
9712 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9713         MANPAGE_SYMLINKS=no
9714 fi
9715 fi
9716
9717 echo "$as_me:9717: result: $MANPAGE_SYMLINKS" >&5
9718 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9719 fi
9720
9721 echo "$as_me:9721: checking for manpage tbl" >&5
9722 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9723
9724 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9725 if test "${with_manpage_tbl+set}" = set; then
9726   withval="$with_manpage_tbl"
9727   MANPAGE_TBL=$withval
9728 else
9729   MANPAGE_TBL=no
9730 fi;
9731
9732 echo "$as_me:9732: result: $MANPAGE_TBL" >&5
9733 echo "${ECHO_T}$MANPAGE_TBL" >&6
9734
9735   if test "$prefix" = "NONE" ; then
9736      cf_prefix="$ac_default_prefix"
9737   else
9738      cf_prefix="$prefix"
9739   fi
9740
9741   case "$MANPAGE_FORMAT" in # (vi
9742   *catonly*) # (vi
9743     cf_format=yes
9744     cf_inboth=no
9745     ;;
9746   *formatted*) # (vi
9747     cf_format=yes
9748     cf_inboth=yes
9749     ;;
9750   *)
9751     cf_format=no
9752     cf_inboth=no
9753     ;;
9754   esac
9755
9756 test ! -d man && mkdir man
9757
9758 cf_so_strip=
9759 cf_compress=
9760 case "$MANPAGE_FORMAT" in #(vi
9761 *compress*) #(vi
9762         cf_so_strip="Z"
9763         cf_compress=compress
9764   ;;
9765 *gzip*)
9766         cf_so_strip="gz"
9767         cf_compress=gzip
9768   ;;
9769 esac
9770
9771 cf_edit_man=./edit_man.sh
9772 cf_man_alias=`pwd`/man_alias.sed
9773
9774 cat >$cf_edit_man <<CF_EOF
9775 #! /bin/sh
9776 # this script is generated by the configure-script CF_MAN_PAGES macro.
9777
9778 prefix="$cf_prefix"
9779 datadir="$datadir"
9780
9781 NCURSES_MAJOR="$NCURSES_MAJOR"
9782 NCURSES_MINOR="$NCURSES_MINOR"
9783 NCURSES_PATCH="$NCURSES_PATCH"
9784
9785 NCURSES_OSPEED="$NCURSES_OSPEED"
9786 TERMINFO="$TERMINFO"
9787
9788 INSTALL="$INSTALL"
9789 INSTALL_DATA="$INSTALL_DATA"
9790
9791 transform="$program_transform_name"
9792
9793 TMP=\${TMPDIR:=/tmp}/man\$\$
9794 trap "rm -f \$TMP" 0 1 2 5 15
9795
9796 form=\$1
9797 shift || exit 1
9798
9799 verb=\$1
9800 shift || exit 1
9801
9802 mandir=\$1
9803 shift || exit 1
9804
9805 srcdir=\$1
9806 top_srcdir=\$srcdir/..
9807 shift || exit 1
9808
9809 if test "\$form" = normal ; then
9810         if test "$cf_format" = yes ; then
9811         if test "$cf_inboth" = no ; then
9812                 sh \$0 format \$verb \$mandir \$srcdir \$*
9813                 exit $?
9814         fi
9815         fi
9816         cf_subdir=\$mandir/man
9817         cf_tables=$MANPAGE_TBL
9818 else
9819         cf_subdir=\$mandir/cat
9820         cf_tables=yes
9821 fi
9822
9823 # process the list of source-files
9824 for i in \$* ; do
9825 case \$i in #(vi
9826 *.orig|*.rej) ;; #(vi
9827 *.[0-9]*)
9828         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9829         if test \$verb = installing ; then
9830         if test ! -d \$cf_subdir\${section} ; then
9831                 mkdir -p \$cf_subdir\$section
9832         fi
9833         fi
9834
9835         # replace variables in man page
9836         if test ! -f $cf_man_alias ; then
9837 cat >>$cf_man_alias <<-CF_EOF2
9838                 s,@DATADIR@,\$datadir,g
9839                 s,@TERMINFO@,\$TERMINFO,g
9840                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9841                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9842                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9843                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9844 CF_EOF
9845
9846         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9847         do
9848                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9849                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9850 cat >>$cf_edit_man <<-CF_EOF
9851                 s,@$cf_NAME@,$cf_name,g
9852 CF_EOF
9853         done
9854
9855 cat >>$cf_edit_man <<CF_EOF
9856 CF_EOF2
9857                 echo "...made $cf_man_alias"
9858         fi
9859
9860         aliases=
9861         cf_source=\`basename \$i\`
9862         inalias=\$cf_source
9863         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9864         if test ! -f \$inalias ; then
9865                 echo .. skipped \$cf_source
9866                 continue
9867         fi
9868 CF_EOF
9869
9870 if test "$MANPAGE_ALIASES" != no ; then
9871 cat >>$cf_edit_man <<CF_EOF
9872         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9873 CF_EOF
9874 fi
9875
9876 if test "$MANPAGE_RENAMES" = no ; then
9877 cat >>$cf_edit_man <<CF_EOF
9878         # perform program transformations for section 1 man pages
9879         if test \$section = 1 ; then
9880                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9881         else
9882                 cf_target=\$cf_subdir\${section}/\$cf_source
9883         fi
9884 CF_EOF
9885 else
9886 cat >>$cf_edit_man <<CF_EOF
9887         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9888         if test -z "\$cf_target" ; then
9889                 echo '? missing rename for '\$cf_source
9890                 cf_target="\$cf_source"
9891         fi
9892         cf_target="\$cf_subdir\${section}/\${cf_target}"
9893
9894 CF_EOF
9895 fi
9896
9897 cat >>$cf_edit_man <<CF_EOF
9898         sed     -f $cf_man_alias \\
9899 CF_EOF
9900
9901 if test -f $MANPAGE_RENAMES ; then
9902 cat >>$cf_edit_man <<CF_EOF
9903                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9904 CF_EOF
9905 else
9906 cat >>$cf_edit_man <<CF_EOF
9907                 < \$i >\$TMP
9908 CF_EOF
9909 fi
9910
9911 cat >>$cf_edit_man <<CF_EOF
9912 if test \$cf_tables = yes ; then
9913         tbl \$TMP >\$TMP.out
9914         mv \$TMP.out \$TMP
9915 fi
9916 CF_EOF
9917
9918 if test $with_curses_h != yes ; then
9919 cat >>$cf_edit_man <<CF_EOF
9920         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9921         mv \$TMP.out \$TMP
9922 CF_EOF
9923 fi
9924
9925 cat >>$cf_edit_man <<CF_EOF
9926         if test \$form = format ; then
9927                 nroff -man \$TMP >\$TMP.out
9928                 mv \$TMP.out \$TMP
9929         fi
9930 CF_EOF
9931
9932 if test -n "$cf_compress" ; then
9933 cat >>$cf_edit_man <<CF_EOF
9934         if test \$verb = installing ; then
9935         if ( $cf_compress -f \$TMP )
9936         then
9937                 mv \$TMP.$cf_so_strip \$TMP
9938         fi
9939         fi
9940         cf_target="\$cf_target.$cf_so_strip"
9941 CF_EOF
9942 fi
9943
9944 case "$MANPAGE_FORMAT" in #(vi
9945 *BSDI*)
9946 cat >>$cf_edit_man <<CF_EOF
9947         if test \$form = format ; then
9948                 # BSDI installs only .0 suffixes in the cat directories
9949                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9950         fi
9951 CF_EOF
9952   ;;
9953 esac
9954
9955 cat >>$cf_edit_man <<CF_EOF
9956         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9957         if test \$verb = installing ; then
9958                 echo \$verb \$cf_target
9959                 \$INSTALL_DATA \$TMP \$cf_target
9960                 test -d \$cf_subdir\${section} &&
9961                 test -n "\$aliases" && (
9962                         cd \$cf_subdir\${section} && (
9963                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9964                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9965                                 cf_target=\`basename \$cf_target\`
9966                                 for cf_alias in \$aliases
9967                                 do
9968                                         if test \$section = 1 ; then
9969                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9970                                         fi
9971
9972                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9973                                                 if test -f \$cf_alias\${suffix} ; then
9974                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9975                                                         then
9976                                                                 continue
9977                                                         fi
9978                                                 fi
9979                                                 echo .. \$verb alias \$cf_alias\${suffix}
9980 CF_EOF
9981 case "x$LN_S" in #(vi
9982 *-f) #(vi
9983 cat >>$cf_edit_man <<CF_EOF
9984                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9985 CF_EOF
9986         ;;
9987 *)
9988 cat >>$cf_edit_man <<CF_EOF
9989                                                 rm -f \$cf_alias\${suffix}
9990                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9991 CF_EOF
9992         ;;
9993 esac
9994 cat >>$cf_edit_man <<CF_EOF
9995                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9996                                                 echo ".so \$cf_source" >\$TMP
9997 CF_EOF
9998 if test -n "$cf_compress" ; then
9999 cat >>$cf_edit_man <<CF_EOF
10000                                                 if test -n "$cf_so_strip" ; then
10001                                                         $cf_compress -f \$TMP
10002                                                         mv \$TMP.$cf_so_strip \$TMP
10003                                                 fi
10004 CF_EOF
10005 fi
10006 cat >>$cf_edit_man <<CF_EOF
10007                                                 echo .. \$verb alias \$cf_alias\${suffix}
10008                                                 rm -f \$cf_alias\${suffix}
10009                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10010                                         fi
10011                                 done
10012                         )
10013                 )
10014         elif test \$verb = removing ; then
10015                 test -f \$cf_target && (
10016                         echo \$verb \$cf_target
10017                         rm -f \$cf_target
10018                 )
10019                 test -d \$cf_subdir\${section} &&
10020                 test -n "\$aliases" && (
10021                         cd \$cf_subdir\${section} && (
10022                                 for cf_alias in \$aliases
10023                                 do
10024                                         if test \$section = 1 ; then
10025                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10026                                         fi
10027
10028                                         echo .. \$verb alias \$cf_alias\${suffix}
10029                                         rm -f \$cf_alias\${suffix}
10030                                 done
10031                         )
10032                 )
10033         else
10034 #               echo ".hy 0"
10035                 cat \$TMP
10036         fi
10037         ;;
10038 esac
10039 done
10040
10041 if test $cf_inboth = yes ; then
10042 if test \$form != format ; then
10043         sh \$0 format \$verb \$mandir \$srcdir \$*
10044 fi
10045 fi
10046
10047 exit 0
10048 CF_EOF
10049 chmod 755 $cf_edit_man
10050
10051 ###############################################################################
10052
10053 ### Note that some functions (such as const) are normally disabled anyway.
10054 echo "$as_me:10054: checking if you want to build with function extensions" >&5
10055 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10056
10057 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10058 if test "${enable_ext_funcs+set}" = set; then
10059   enableval="$enable_ext_funcs"
10060   with_ext_funcs=$enableval
10061 else
10062   with_ext_funcs=yes
10063 fi;
10064 echo "$as_me:10064: result: $with_ext_funcs" >&5
10065 echo "${ECHO_T}$with_ext_funcs" >&6
10066 if test "$with_ext_funcs" = yes ; then
10067         NCURSES_EXT_FUNCS=1
10068         cat >>confdefs.h <<\EOF
10069 #define HAVE_CURSES_VERSION 1
10070 EOF
10071
10072         cat >>confdefs.h <<\EOF
10073 #define HAVE_HAS_KEY 1
10074 EOF
10075
10076         cat >>confdefs.h <<\EOF
10077 #define HAVE_RESIZETERM 1
10078 EOF
10079
10080         cat >>confdefs.h <<\EOF
10081 #define HAVE_RESIZE_TERM 1
10082 EOF
10083
10084         cat >>confdefs.h <<\EOF
10085 #define HAVE_TERM_ENTRY_H 1
10086 EOF
10087
10088         cat >>confdefs.h <<\EOF
10089 #define HAVE_USE_DEFAULT_COLORS 1
10090 EOF
10091
10092         cat >>confdefs.h <<\EOF
10093 #define HAVE_WRESIZE 1
10094 EOF
10095
10096         cat >>confdefs.h <<\EOF
10097 #define NCURSES_EXT_FUNCS 1
10098 EOF
10099
10100         GENERATED_EXT_FUNCS=generated
10101 else
10102         NCURSES_EXT_FUNCS=0
10103         GENERATED_EXT_FUNCS=
10104 fi
10105
10106 echo "$as_me:10106: checking if you want to build with experimental SCREEN extensions" >&5
10107 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10108
10109 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10110 if test "${enable_sp_funcs+set}" = set; then
10111   enableval="$enable_sp_funcs"
10112   with_sp_funcs=$enableval
10113 else
10114   with_sp_funcs=no
10115 fi;
10116 echo "$as_me:10116: result: $with_sp_funcs" >&5
10117 echo "${ECHO_T}$with_sp_funcs" >&6
10118 if test "$with_sp_funcs" = yes ; then
10119         NCURSES_SP_FUNCS=1
10120         cat >>confdefs.h <<\EOF
10121 #define NCURSES_SP_FUNCS 1
10122 EOF
10123
10124         GENERATED_SP_FUNCS=generated
10125 else
10126         NCURSES_SP_FUNCS=0
10127         GENERATED_SP_FUNCS=
10128 fi
10129
10130 echo "$as_me:10130: checking if you want to build with experimental terminal-driver" >&5
10131 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10132
10133 # Check whether --enable-term-driver or --disable-term-driver was given.
10134 if test "${enable_term_driver+set}" = set; then
10135   enableval="$enable_term_driver"
10136   with_term_driver=$enableval
10137 else
10138   with_term_driver=no
10139 fi;
10140 echo "$as_me:10140: result: $with_term_driver" >&5
10141 echo "${ECHO_T}$with_term_driver" >&6
10142 if test "$with_term_driver" = yes ; then
10143         cat >>confdefs.h <<\EOF
10144 #define USE_TERM_DRIVER 1
10145 EOF
10146
10147         if test "$with_sp_funcs" != yes ; then
10148                 { { echo "$as_me:10148: error: The term-driver option relies upon sp-funcs" >&5
10149 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10150    { (exit 1); exit 1; }; }
10151         fi
10152 fi
10153
10154 ###   use option --enable-const to turn on use of const beyond that in XSI.
10155 echo "$as_me:10155: checking for extended use of const keyword" >&5
10156 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10157
10158 # Check whether --enable-const or --disable-const was given.
10159 if test "${enable_const+set}" = set; then
10160   enableval="$enable_const"
10161   with_ext_const=$enableval
10162 else
10163   with_ext_const=no
10164 fi;
10165 echo "$as_me:10165: result: $with_ext_const" >&5
10166 echo "${ECHO_T}$with_ext_const" >&6
10167 NCURSES_CONST='/*nothing*/'
10168 if test "$with_ext_const" = yes ; then
10169         NCURSES_CONST=const
10170 fi
10171
10172 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10173 echo "$as_me:10173: checking if you want to use extended colors" >&5
10174 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10175
10176 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10177 if test "${enable_ext_colors+set}" = set; then
10178   enableval="$enable_ext_colors"
10179   with_ext_colors=$enableval
10180 else
10181   with_ext_colors=no
10182 fi;
10183 echo "$as_me:10183: result: $with_ext_colors" >&5
10184 echo "${ECHO_T}$with_ext_colors" >&6
10185 NCURSES_EXT_COLORS=0
10186 if test "$with_ext_colors" = yes ; then
10187         if test "$with_widec" != yes ; then
10188                 { { echo "$as_me:10188: error: This option applies only to wide-character library" >&5
10189 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10190    { (exit 1); exit 1; }; }
10191         else
10192                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10193
10194 if test "${with_abi_version+set}" != set; then
10195         case $cf_cv_rel_version in
10196         5.*)
10197                 cf_cv_rel_version=6.0
10198                 cf_cv_abi_version=6
10199                 { echo "$as_me:10199: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10200 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10201                 ;;
10202         esac
10203 fi
10204
10205         fi
10206         NCURSES_EXT_COLORS=1
10207         cat >>confdefs.h <<\EOF
10208 #define NCURSES_EXT_COLORS 1
10209 EOF
10210
10211 fi
10212
10213 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10214 echo "$as_me:10214: checking if you want to use extended mouse encoding" >&5
10215 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10216
10217 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10218 if test "${enable_ext_mouse+set}" = set; then
10219   enableval="$enable_ext_mouse"
10220   with_ext_mouse=$enableval
10221 else
10222   with_ext_mouse=no
10223 fi;
10224 echo "$as_me:10224: result: $with_ext_mouse" >&5
10225 echo "${ECHO_T}$with_ext_mouse" >&6
10226 NCURSES_MOUSE_VERSION=1
10227 if test "$with_ext_mouse" = yes ; then
10228         NCURSES_MOUSE_VERSION=2
10229
10230 if test "${with_abi_version+set}" != set; then
10231         case $cf_cv_rel_version in
10232         5.*)
10233                 cf_cv_rel_version=6.0
10234                 cf_cv_abi_version=6
10235                 { echo "$as_me:10235: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10236 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10237                 ;;
10238         esac
10239 fi
10240
10241 fi
10242
10243 echo "$as_me:10243: checking if you want \$NCURSES_NO_PADDING code" >&5
10244 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10245
10246 # Check whether --enable-no-padding or --disable-no-padding was given.
10247 if test "${enable_no_padding+set}" = set; then
10248   enableval="$enable_no_padding"
10249   with_no_padding=$enableval
10250 else
10251   with_no_padding=$with_ext_funcs
10252 fi;
10253 echo "$as_me:10253: result: $with_no_padding" >&5
10254 echo "${ECHO_T}$with_no_padding" >&6
10255 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10256 #define NCURSES_NO_PADDING 1
10257 EOF
10258
10259 echo "$as_me:10259: checking for ANSI C header files" >&5
10260 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10261 if test "${ac_cv_header_stdc+set}" = set; then
10262   echo $ECHO_N "(cached) $ECHO_C" >&6
10263 else
10264   cat >conftest.$ac_ext <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267 #include <stdlib.h>
10268 #include <stdarg.h>
10269 #include <string.h>
10270 #include <float.h>
10271
10272 _ACEOF
10273 if { (eval echo "$as_me:10273: \"$ac_cpp conftest.$ac_ext\"") >&5
10274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10275   ac_status=$?
10276   egrep -v '^ *\+' conftest.er1 >conftest.err
10277   rm -f conftest.er1
10278   cat conftest.err >&5
10279   echo "$as_me:10279: \$? = $ac_status" >&5
10280   (exit $ac_status); } >/dev/null; then
10281   if test -s conftest.err; then
10282     ac_cpp_err=$ac_c_preproc_warn_flag
10283   else
10284     ac_cpp_err=
10285   fi
10286 else
10287   ac_cpp_err=yes
10288 fi
10289 if test -z "$ac_cpp_err"; then
10290   ac_cv_header_stdc=yes
10291 else
10292   echo "$as_me: failed program was:" >&5
10293   cat conftest.$ac_ext >&5
10294   ac_cv_header_stdc=no
10295 fi
10296 rm -f conftest.err conftest.$ac_ext
10297
10298 if test $ac_cv_header_stdc = yes; then
10299   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10300   cat >conftest.$ac_ext <<_ACEOF
10301 #line 10301 "configure"
10302 #include "confdefs.h"
10303 #include <string.h>
10304
10305 _ACEOF
10306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10307   egrep "memchr" >/dev/null 2>&1; then
10308   :
10309 else
10310   ac_cv_header_stdc=no
10311 fi
10312 rm -rf conftest*
10313
10314 fi
10315
10316 if test $ac_cv_header_stdc = yes; then
10317   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10318   cat >conftest.$ac_ext <<_ACEOF
10319 #line 10319 "configure"
10320 #include "confdefs.h"
10321 #include <stdlib.h>
10322
10323 _ACEOF
10324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10325   egrep "free" >/dev/null 2>&1; then
10326   :
10327 else
10328   ac_cv_header_stdc=no
10329 fi
10330 rm -rf conftest*
10331
10332 fi
10333
10334 if test $ac_cv_header_stdc = yes; then
10335   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10336   if test "$cross_compiling" = yes; then
10337   :
10338 else
10339   cat >conftest.$ac_ext <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342 #include <ctype.h>
10343 #if ((' ' & 0x0FF) == 0x020)
10344 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10345 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10346 #else
10347 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10348                      || ('j' <= (c) && (c) <= 'r') \
10349                      || ('s' <= (c) && (c) <= 'z'))
10350 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10351 #endif
10352
10353 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10354 int
10355 main ()
10356 {
10357   int i;
10358   for (i = 0; i < 256; i++)
10359     if (XOR (islower (i), ISLOWER (i))
10360         || toupper (i) != TOUPPER (i))
10361       $ac_main_return(2);
10362   $ac_main_return (0);
10363 }
10364 _ACEOF
10365 rm -f conftest$ac_exeext
10366 if { (eval echo "$as_me:10366: \"$ac_link\"") >&5
10367   (eval $ac_link) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit $ac_status); }; }; then
10376   :
10377 else
10378   echo "$as_me: program exited with status $ac_status" >&5
10379 echo "$as_me: failed program was:" >&5
10380 cat conftest.$ac_ext >&5
10381 ac_cv_header_stdc=no
10382 fi
10383 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10384 fi
10385 fi
10386 fi
10387 echo "$as_me:10387: result: $ac_cv_header_stdc" >&5
10388 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10389 if test $ac_cv_header_stdc = yes; then
10390
10391 cat >>confdefs.h <<\EOF
10392 #define STDC_HEADERS 1
10393 EOF
10394
10395 fi
10396
10397 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10398
10399 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10400                   inttypes.h stdint.h unistd.h
10401 do
10402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10403 echo "$as_me:10403: checking for $ac_header" >&5
10404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10406   echo $ECHO_N "(cached) $ECHO_C" >&6
10407 else
10408   cat >conftest.$ac_ext <<_ACEOF
10409 #line 10409 "configure"
10410 #include "confdefs.h"
10411 $ac_includes_default
10412 #include <$ac_header>
10413 _ACEOF
10414 rm -f conftest.$ac_objext
10415 if { (eval echo "$as_me:10415: \"$ac_compile\"") >&5
10416   (eval $ac_compile) 2>&5
10417   ac_status=$?
10418   echo "$as_me:10418: \$? = $ac_status" >&5
10419   (exit $ac_status); } &&
10420          { ac_try='test -s conftest.$ac_objext'
10421   { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422   (eval $ac_try) 2>&5
10423   ac_status=$?
10424   echo "$as_me:10424: \$? = $ac_status" >&5
10425   (exit $ac_status); }; }; then
10426   eval "$as_ac_Header=yes"
10427 else
10428   echo "$as_me: failed program was:" >&5
10429 cat conftest.$ac_ext >&5
10430 eval "$as_ac_Header=no"
10431 fi
10432 rm -f conftest.$ac_objext conftest.$ac_ext
10433 fi
10434 echo "$as_me:10434: result: `eval echo '${'$as_ac_Header'}'`" >&5
10435 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10436 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10437   cat >>confdefs.h <<EOF
10438 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10439 EOF
10440
10441 fi
10442 done
10443
10444 echo "$as_me:10444: checking for signed char" >&5
10445 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10446 if test "${ac_cv_type_signed_char+set}" = set; then
10447   echo $ECHO_N "(cached) $ECHO_C" >&6
10448 else
10449   cat >conftest.$ac_ext <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 $ac_includes_default
10453 int
10454 main ()
10455 {
10456 if ((signed char *) 0)
10457   return 0;
10458 if (sizeof (signed char))
10459   return 0;
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 rm -f conftest.$ac_objext
10465 if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
10466   (eval $ac_compile) 2>&5
10467   ac_status=$?
10468   echo "$as_me:10468: \$? = $ac_status" >&5
10469   (exit $ac_status); } &&
10470          { ac_try='test -s conftest.$ac_objext'
10471   { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472   (eval $ac_try) 2>&5
10473   ac_status=$?
10474   echo "$as_me:10474: \$? = $ac_status" >&5
10475   (exit $ac_status); }; }; then
10476   ac_cv_type_signed_char=yes
10477 else
10478   echo "$as_me: failed program was:" >&5
10479 cat conftest.$ac_ext >&5
10480 ac_cv_type_signed_char=no
10481 fi
10482 rm -f conftest.$ac_objext conftest.$ac_ext
10483 fi
10484 echo "$as_me:10484: result: $ac_cv_type_signed_char" >&5
10485 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10486
10487 echo "$as_me:10487: checking size of signed char" >&5
10488 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10489 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10490   echo $ECHO_N "(cached) $ECHO_C" >&6
10491 else
10492   if test "$ac_cv_type_signed_char" = yes; then
10493   if test "$cross_compiling" = yes; then
10494   # Depending upon the size, compute the lo and hi bounds.
10495 cat >conftest.$ac_ext <<_ACEOF
10496 #line 10496 "configure"
10497 #include "confdefs.h"
10498 $ac_includes_default
10499 int
10500 main ()
10501 {
10502 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 rm -f conftest.$ac_objext
10508 if { (eval echo "$as_me:10508: \"$ac_compile\"") >&5
10509   (eval $ac_compile) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit $ac_status); } &&
10513          { ac_try='test -s conftest.$ac_objext'
10514   { (eval echo "$as_me:10514: \"$ac_try\"") >&5
10515   (eval $ac_try) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit $ac_status); }; }; then
10519   ac_lo=0 ac_mid=0
10520   while :; do
10521     cat >conftest.$ac_ext <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524 $ac_includes_default
10525 int
10526 main ()
10527 {
10528 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 rm -f conftest.$ac_objext
10534 if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
10535   (eval $ac_compile) 2>&5
10536   ac_status=$?
10537   echo "$as_me:10537: \$? = $ac_status" >&5
10538   (exit $ac_status); } &&
10539          { ac_try='test -s conftest.$ac_objext'
10540   { (eval echo "$as_me:10540: \"$ac_try\"") >&5
10541   (eval $ac_try) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); }; }; then
10545   ac_hi=$ac_mid; break
10546 else
10547   echo "$as_me: failed program was:" >&5
10548 cat conftest.$ac_ext >&5
10549 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10550 fi
10551 rm -f conftest.$ac_objext conftest.$ac_ext
10552   done
10553 else
10554   echo "$as_me: failed program was:" >&5
10555 cat conftest.$ac_ext >&5
10556 ac_hi=-1 ac_mid=-1
10557   while :; do
10558     cat >conftest.$ac_ext <<_ACEOF
10559 #line 10559 "configure"
10560 #include "confdefs.h"
10561 $ac_includes_default
10562 int
10563 main ()
10564 {
10565 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10566   ;
10567   return 0;
10568 }
10569 _ACEOF
10570 rm -f conftest.$ac_objext
10571 if { (eval echo "$as_me:10571: \"$ac_compile\"") >&5
10572   (eval $ac_compile) 2>&5
10573   ac_status=$?
10574   echo "$as_me:10574: \$? = $ac_status" >&5
10575   (exit $ac_status); } &&
10576          { ac_try='test -s conftest.$ac_objext'
10577   { (eval echo "$as_me:10577: \"$ac_try\"") >&5
10578   (eval $ac_try) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); }; }; then
10582   ac_lo=$ac_mid; break
10583 else
10584   echo "$as_me: failed program was:" >&5
10585 cat conftest.$ac_ext >&5
10586 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10587 fi
10588 rm -f conftest.$ac_objext conftest.$ac_ext
10589   done
10590 fi
10591 rm -f conftest.$ac_objext conftest.$ac_ext
10592 # Binary search between lo and hi bounds.
10593 while test "x$ac_lo" != "x$ac_hi"; do
10594   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10595   cat >conftest.$ac_ext <<_ACEOF
10596 #line 10596 "configure"
10597 #include "confdefs.h"
10598 $ac_includes_default
10599 int
10600 main ()
10601 {
10602 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10603   ;
10604   return 0;
10605 }
10606 _ACEOF
10607 rm -f conftest.$ac_objext
10608 if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
10609   (eval $ac_compile) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); } &&
10613          { ac_try='test -s conftest.$ac_objext'
10614   { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615   (eval $ac_try) 2>&5
10616   ac_status=$?
10617   echo "$as_me:10617: \$? = $ac_status" >&5
10618   (exit $ac_status); }; }; then
10619   ac_hi=$ac_mid
10620 else
10621   echo "$as_me: failed program was:" >&5
10622 cat conftest.$ac_ext >&5
10623 ac_lo=`expr $ac_mid + 1`
10624 fi
10625 rm -f conftest.$ac_objext conftest.$ac_ext
10626 done
10627 ac_cv_sizeof_signed_char=$ac_lo
10628 else
10629   if test "$cross_compiling" = yes; then
10630   { { echo "$as_me:10630: error: cannot run test program while cross compiling" >&5
10631 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10632    { (exit 1); exit 1; }; }
10633 else
10634   cat >conftest.$ac_ext <<_ACEOF
10635 #line 10635 "configure"
10636 #include "confdefs.h"
10637 $ac_includes_default
10638 int
10639 main ()
10640 {
10641 FILE *f = fopen ("conftest.val", "w");
10642 if (!f)
10643   $ac_main_return (1);
10644 fprintf (f, "%d", (sizeof (signed char)));
10645 fclose (f);
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f conftest$ac_exeext
10651 if { (eval echo "$as_me:10651: \"$ac_link\"") >&5
10652   (eval $ac_link) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10656   { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657   (eval $ac_try) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); }; }; then
10661   ac_cv_sizeof_signed_char=`cat conftest.val`
10662 else
10663   echo "$as_me: program exited with status $ac_status" >&5
10664 echo "$as_me: failed program was:" >&5
10665 cat conftest.$ac_ext >&5
10666 fi
10667 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10668 fi
10669 fi
10670 rm -f conftest.val
10671 else
10672   ac_cv_sizeof_signed_char=0
10673 fi
10674 fi
10675 echo "$as_me:10675: result: $ac_cv_sizeof_signed_char" >&5
10676 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10677 cat >>confdefs.h <<EOF
10678 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10679 EOF
10680
10681 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10682         NCURSES_SBOOL="signed char"
10683 else
10684         NCURSES_SBOOL="char"
10685 fi
10686 echo "$as_me:10686: checking if you want to use signed Boolean array in term.h" >&5
10687 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10688
10689 # Check whether --enable-signed-char or --disable-signed-char was given.
10690 if test "${enable_signed_char+set}" = set; then
10691   enableval="$enable_signed_char"
10692   with_signed_char=$enableval
10693 else
10694   with_signed_char=no
10695 fi;
10696 echo "$as_me:10696: result: $with_signed_char" >&5
10697 echo "${ECHO_T}$with_signed_char" >&6
10698 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10699
10700 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10701 echo "$as_me:10701: checking if you want SIGWINCH handler" >&5
10702 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10703
10704 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10705 if test "${enable_sigwinch+set}" = set; then
10706   enableval="$enable_sigwinch"
10707   with_sigwinch=$enableval
10708 else
10709   with_sigwinch=$with_ext_funcs
10710 fi;
10711 echo "$as_me:10711: result: $with_sigwinch" >&5
10712 echo "${ECHO_T}$with_sigwinch" >&6
10713 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10714 #define USE_SIGWINCH 1
10715 EOF
10716
10717 ###   use option --enable-tcap-names to allow user to define new capabilities
10718 echo "$as_me:10718: checking if you want user-definable terminal capabilities like termcap" >&5
10719 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10720
10721 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10722 if test "${enable_tcap_names+set}" = set; then
10723   enableval="$enable_tcap_names"
10724   with_tcap_names=$enableval
10725 else
10726   with_tcap_names=$with_ext_funcs
10727 fi;
10728 echo "$as_me:10728: result: $with_tcap_names" >&5
10729 echo "${ECHO_T}$with_tcap_names" >&6
10730 NCURSES_XNAMES=0
10731 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10732
10733 ###############################################################################
10734 # These options are relatively safe to experiment with.
10735
10736 echo "$as_me:10736: checking if you want all development code" >&5
10737 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10738
10739 # Check whether --with-develop or --without-develop was given.
10740 if test "${with_develop+set}" = set; then
10741   withval="$with_develop"
10742   with_develop=$withval
10743 else
10744   with_develop=no
10745 fi;
10746 echo "$as_me:10746: result: $with_develop" >&5
10747 echo "${ECHO_T}$with_develop" >&6
10748
10749 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10750 echo "$as_me:10750: checking if you want hard-tabs code" >&5
10751 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10752
10753 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10754 if test "${enable_hard_tabs+set}" = set; then
10755   enableval="$enable_hard_tabs"
10756
10757 else
10758   enable_hard_tabs=$with_develop
10759 fi;
10760 echo "$as_me:10760: result: $enable_hard_tabs" >&5
10761 echo "${ECHO_T}$enable_hard_tabs" >&6
10762 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10763 #define USE_HARD_TABS 1
10764 EOF
10765
10766 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10767 echo "$as_me:10767: checking if you want limited support for xmc" >&5
10768 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10769
10770 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10771 if test "${enable_xmc_glitch+set}" = set; then
10772   enableval="$enable_xmc_glitch"
10773
10774 else
10775   enable_xmc_glitch=$with_develop
10776 fi;
10777 echo "$as_me:10777: result: $enable_xmc_glitch" >&5
10778 echo "${ECHO_T}$enable_xmc_glitch" >&6
10779 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10780 #define USE_XMC_SUPPORT 1
10781 EOF
10782
10783 ###############################################################################
10784 # These are just experimental, probably should not be in a package:
10785
10786 echo "$as_me:10786: checking if you do not want to assume colors are white-on-black" >&5
10787 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10788
10789 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10790 if test "${enable_assumed_color+set}" = set; then
10791   enableval="$enable_assumed_color"
10792   with_assumed_color=$enableval
10793 else
10794   with_assumed_color=yes
10795 fi;
10796 echo "$as_me:10796: result: $with_assumed_color" >&5
10797 echo "${ECHO_T}$with_assumed_color" >&6
10798 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10799 #define USE_ASSUMED_COLOR 1
10800 EOF
10801
10802 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10803 echo "$as_me:10803: checking if you want hashmap scrolling-optimization code" >&5
10804 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10805
10806 # Check whether --enable-hashmap or --disable-hashmap was given.
10807 if test "${enable_hashmap+set}" = set; then
10808   enableval="$enable_hashmap"
10809   with_hashmap=$enableval
10810 else
10811   with_hashmap=yes
10812 fi;
10813 echo "$as_me:10813: result: $with_hashmap" >&5
10814 echo "${ECHO_T}$with_hashmap" >&6
10815 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10816 #define USE_HASHMAP 1
10817 EOF
10818
10819 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10820 echo "$as_me:10820: checking if you want colorfgbg code" >&5
10821 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10822
10823 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10824 if test "${enable_colorfgbg+set}" = set; then
10825   enableval="$enable_colorfgbg"
10826   with_colorfgbg=$enableval
10827 else
10828   with_colorfgbg=no
10829 fi;
10830 echo "$as_me:10830: result: $with_colorfgbg" >&5
10831 echo "${ECHO_T}$with_colorfgbg" >&6
10832 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10833 #define USE_COLORFGBG 1
10834 EOF
10835
10836 ###   use option --enable-interop to turn on use of bindings used for interop
10837 echo "$as_me:10837: checking if you want interop bindings" >&5
10838 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10839
10840 # Check whether --enable-interop or --disable-interop was given.
10841 if test "${enable_interop+set}" = set; then
10842   enableval="$enable_interop"
10843   with_exp_interop=$enableval
10844 else
10845   with_exp_interop=no
10846 fi;
10847 echo "$as_me:10847: result: $with_exp_interop" >&5
10848 echo "${ECHO_T}$with_exp_interop" >&6
10849
10850 NCURSES_INTEROP_FUNCS=0
10851 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10852
10853 # This is still experimental (20080329), but should ultimately be moved to
10854 # the script-block --with-normal, etc.
10855
10856 echo "$as_me:10856: checking if you want to link with the pthread library" >&5
10857 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10858
10859 # Check whether --with-pthread or --without-pthread was given.
10860 if test "${with_pthread+set}" = set; then
10861   withval="$with_pthread"
10862   with_pthread=$withval
10863 else
10864   with_pthread=no
10865 fi;
10866 echo "$as_me:10866: result: $with_pthread" >&5
10867 echo "${ECHO_T}$with_pthread" >&6
10868
10869 if test "$with_pthread" != no ; then
10870     echo "$as_me:10870: checking for pthread.h" >&5
10871 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10872 if test "${ac_cv_header_pthread_h+set}" = set; then
10873   echo $ECHO_N "(cached) $ECHO_C" >&6
10874 else
10875   cat >conftest.$ac_ext <<_ACEOF
10876 #line 10876 "configure"
10877 #include "confdefs.h"
10878 #include <pthread.h>
10879 _ACEOF
10880 if { (eval echo "$as_me:10880: \"$ac_cpp conftest.$ac_ext\"") >&5
10881   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10882   ac_status=$?
10883   egrep -v '^ *\+' conftest.er1 >conftest.err
10884   rm -f conftest.er1
10885   cat conftest.err >&5
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit $ac_status); } >/dev/null; then
10888   if test -s conftest.err; then
10889     ac_cpp_err=$ac_c_preproc_warn_flag
10890   else
10891     ac_cpp_err=
10892   fi
10893 else
10894   ac_cpp_err=yes
10895 fi
10896 if test -z "$ac_cpp_err"; then
10897   ac_cv_header_pthread_h=yes
10898 else
10899   echo "$as_me: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   ac_cv_header_pthread_h=no
10902 fi
10903 rm -f conftest.err conftest.$ac_ext
10904 fi
10905 echo "$as_me:10905: result: $ac_cv_header_pthread_h" >&5
10906 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10907 if test $ac_cv_header_pthread_h = yes; then
10908
10909         cat >>confdefs.h <<\EOF
10910 #define HAVE_PTHREADS_H 1
10911 EOF
10912
10913         echo "$as_me:10913: checking if we can link with the pthread library" >&5
10914 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10915         cf_save_LIBS="$LIBS"
10916         LIBS="-lpthread $LIBS"
10917         cat >conftest.$ac_ext <<_ACEOF
10918 #line 10918 "configure"
10919 #include "confdefs.h"
10920
10921 #include <pthread.h>
10922
10923 int
10924 main ()
10925 {
10926
10927         int rc = pthread_create(0,0,0,0);
10928
10929   ;
10930   return 0;
10931 }
10932 _ACEOF
10933 rm -f conftest.$ac_objext conftest$ac_exeext
10934 if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
10935   (eval $ac_link) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); } &&
10939          { ac_try='test -s conftest$ac_exeext'
10940   { (eval echo "$as_me:10940: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); }; }; then
10945   with_pthread=yes
10946 else
10947   echo "$as_me: failed program was:" >&5
10948 cat conftest.$ac_ext >&5
10949 with_pthread=no
10950 fi
10951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10952         LIBS="$cf_save_LIBS"
10953         echo "$as_me:10953: result: $with_pthread" >&5
10954 echo "${ECHO_T}$with_pthread" >&6
10955
10956         if test "$with_pthread" = yes ; then
10957             LIBS="-lpthread $LIBS"
10958             cat >>confdefs.h <<\EOF
10959 #define HAVE_LIBPTHREADS 1
10960 EOF
10961
10962         else
10963             { { echo "$as_me:10963: error: Cannot link with pthread library" >&5
10964 echo "$as_me: error: Cannot link with pthread library" >&2;}
10965    { (exit 1); exit 1; }; }
10966         fi
10967
10968 fi
10969
10970 fi
10971
10972 if test "x$with_pthread" != xno; then
10973         echo "$as_me:10973: checking for pthread_kill" >&5
10974 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
10975 if test "${ac_cv_func_pthread_kill+set}" = set; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978   cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981 /* System header to define __stub macros and hopefully few prototypes,
10982     which can conflict with char pthread_kill (); below.  */
10983 #include <assert.h>
10984 /* Override any gcc2 internal prototype to avoid an error.  */
10985 #ifdef __cplusplus
10986 extern "C"
10987 #endif
10988 /* We use char because int might match the return type of a gcc2
10989    builtin and then its argument prototype would still apply.  */
10990 char pthread_kill ();
10991 char (*f) ();
10992
10993 int
10994 main ()
10995 {
10996 /* The GNU C library defines this for functions which it implements
10997     to always fail with ENOSYS.  Some functions are actually named
10998     something starting with __ and the normal name is an alias.  */
10999 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11000 choke me
11001 #else
11002 f = pthread_kill;
11003 #endif
11004
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f conftest.$ac_objext conftest$ac_exeext
11010 if { (eval echo "$as_me:11010: \"$ac_link\"") >&5
11011   (eval $ac_link) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit $ac_status); } &&
11015          { ac_try='test -s conftest$ac_exeext'
11016   { (eval echo "$as_me:11016: \"$ac_try\"") >&5
11017   (eval $ac_try) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit $ac_status); }; }; then
11021   ac_cv_func_pthread_kill=yes
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11025 ac_cv_func_pthread_kill=no
11026 fi
11027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11028 fi
11029 echo "$as_me:11029: result: $ac_cv_func_pthread_kill" >&5
11030 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11031 if test $ac_cv_func_pthread_kill = yes; then
11032
11033                 echo "$as_me:11033: checking if you want to allow EINTR in wgetch with pthreads" >&5
11034 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11035
11036 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11037 if test "${enable_pthreads_eintr+set}" = set; then
11038   enableval="$enable_pthreads_eintr"
11039   use_pthreads_eintr=$enableval
11040 else
11041   use_pthreads_eintr=no
11042 fi;
11043                 echo "$as_me:11043: result: $use_pthreads_eintr" >&5
11044 echo "${ECHO_T}$use_pthreads_eintr" >&6
11045                 if test $use_pthreads_eintr = yes ; then
11046                         cat >>confdefs.h <<\EOF
11047 #define USE_PTHREADS_EINTR 1
11048 EOF
11049
11050                 fi
11051 fi
11052
11053         echo "$as_me:11053: checking if you want to use weak-symbols for pthreads" >&5
11054 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11055
11056 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11057 if test "${enable_weak_symbols+set}" = set; then
11058   enableval="$enable_weak_symbols"
11059   use_weak_symbols=$enableval
11060 else
11061   use_weak_symbols=no
11062 fi;
11063         echo "$as_me:11063: result: $use_weak_symbols" >&5
11064 echo "${ECHO_T}$use_weak_symbols" >&6
11065         if test "$use_weak_symbols" = yes ; then
11066
11067 echo "$as_me:11067: checking if $CC supports weak symbols" >&5
11068 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11069 if test "${cf_cv_weak_symbols+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072
11073 cat >conftest.$ac_ext <<_ACEOF
11074 #line 11074 "configure"
11075 #include "confdefs.h"
11076
11077 #include <stdio.h>
11078 int
11079 main ()
11080 {
11081
11082 #if defined(__GNUC__)
11083 #  if defined __USE_ISOC99
11084 #    define _cat_pragma(exp)    _Pragma(#exp)
11085 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11086 #  else
11087 #    define _weak_pragma(exp)
11088 #  endif
11089 #  define _declare(name)        __extension__ extern __typeof__(name) name
11090 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11091 #endif
11092
11093 weak_symbol(fopen);
11094
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 rm -f conftest.$ac_objext
11100 if { (eval echo "$as_me:11100: \"$ac_compile\"") >&5
11101   (eval $ac_compile) 2>&5
11102   ac_status=$?
11103   echo "$as_me:11103: \$? = $ac_status" >&5
11104   (exit $ac_status); } &&
11105          { ac_try='test -s conftest.$ac_objext'
11106   { (eval echo "$as_me:11106: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   cf_cv_weak_symbols=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115 cf_cv_weak_symbols=no
11116 fi
11117 rm -f conftest.$ac_objext conftest.$ac_ext
11118
11119 fi
11120 echo "$as_me:11120: result: $cf_cv_weak_symbols" >&5
11121 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11122
11123         else
11124                 cf_cv_weak_symbols=no
11125         fi
11126
11127         if test $cf_cv_weak_symbols = yes ; then
11128                 cat >>confdefs.h <<\EOF
11129 #define USE_WEAK_SYMBOLS 1
11130 EOF
11131
11132         fi
11133 fi
11134
11135 PTHREAD=
11136 if test "$with_pthread" = "yes" ; then
11137     cat >>confdefs.h <<\EOF
11138 #define USE_PTHREADS 1
11139 EOF
11140
11141     enable_reentrant=yes
11142     if test $cf_cv_weak_symbols = yes ; then
11143         PTHREAD=-lpthread
11144     fi
11145 fi
11146
11147 # Reentrant code has to be opaque; there's little advantage to making ncurses
11148 # opaque outside of that, so there is no --enable-opaque option.  We can use
11149 # this option without --with-pthreads, but this will be always set for
11150 # pthreads.
11151 echo "$as_me:11151: checking if you want experimental reentrant code" >&5
11152 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11153
11154 # Check whether --enable-reentrant or --disable-reentrant was given.
11155 if test "${enable_reentrant+set}" = set; then
11156   enableval="$enable_reentrant"
11157   with_reentrant=$enableval
11158 else
11159   with_reentrant=no
11160 fi;
11161 echo "$as_me:11161: result: $with_reentrant" >&5
11162 echo "${ECHO_T}$with_reentrant" >&6
11163 if test "$with_reentrant" = yes ; then
11164         cf_cv_enable_reentrant=1
11165         cf_cv_enable_opaque="NCURSES_INTERNALS"
11166         NCURSES_OPAQUE=1
11167         NCURSES_SIZE_T=int
11168         if test $cf_cv_weak_symbols = yes ; then
11169
11170 # remove pthread library from $LIBS
11171 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11172
11173                 TEST_LIBS="-lpthread $TEST_LIBS"
11174                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11175         else
11176                 LIB_SUFFIX="t${LIB_SUFFIX}"
11177         fi
11178         cat >>confdefs.h <<\EOF
11179 #define USE_REENTRANT 1
11180 EOF
11181
11182 if test "${with_abi_version+set}" != set; then
11183         case $cf_cv_rel_version in
11184         5.*)
11185                 cf_cv_rel_version=6.0
11186                 cf_cv_abi_version=6
11187                 { echo "$as_me:11187: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11188 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11189                 ;;
11190         esac
11191 fi
11192
11193 else
11194         cf_cv_enable_reentrant=0
11195         cf_cv_enable_opaque="NCURSES_OPAQUE"
11196         NCURSES_OPAQUE=0
11197         NCURSES_SIZE_T=short
11198 fi
11199
11200 ### Allow using a different wrap-prefix
11201 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11202         echo "$as_me:11202: checking for prefix used to wrap public variables" >&5
11203 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11204
11205 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11206 if test "${with_wrap_prefix+set}" = set; then
11207   withval="$with_wrap_prefix"
11208   NCURSES_WRAP_PREFIX=$withval
11209 else
11210   NCURSES_WRAP_PREFIX=_nc_
11211 fi;
11212         echo "$as_me:11212: result: $NCURSES_WRAP_PREFIX" >&5
11213 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11214 else
11215         NCURSES_WRAP_PREFIX=_nc_
11216 fi
11217
11218 cat >>confdefs.h <<EOF
11219 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11220 EOF
11221
11222 echo "$as_me:11222: checking if you want experimental safe-sprintf code" >&5
11223 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11224
11225 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11226 if test "${enable_safe_sprintf+set}" = set; then
11227   enableval="$enable_safe_sprintf"
11228   with_safe_sprintf=$enableval
11229 else
11230   with_safe_sprintf=no
11231 fi;
11232 echo "$as_me:11232: result: $with_safe_sprintf" >&5
11233 echo "${ECHO_T}$with_safe_sprintf" >&6
11234 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11235 #define USE_SAFE_SPRINTF 1
11236 EOF
11237
11238 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11239 # when hashmap is used scroll hints are useless
11240 if test "$with_hashmap" = no ; then
11241 echo "$as_me:11241: checking if you want to experiment without scrolling-hints code" >&5
11242 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11243
11244 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11245 if test "${enable_scroll_hints+set}" = set; then
11246   enableval="$enable_scroll_hints"
11247   with_scroll_hints=$enableval
11248 else
11249   with_scroll_hints=yes
11250 fi;
11251 echo "$as_me:11251: result: $with_scroll_hints" >&5
11252 echo "${ECHO_T}$with_scroll_hints" >&6
11253 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11254 #define USE_SCROLL_HINTS 1
11255 EOF
11256
11257 fi
11258
11259 echo "$as_me:11259: checking if you want experimental wgetch-events code" >&5
11260 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11261
11262 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11263 if test "${enable_wgetch_events+set}" = set; then
11264   enableval="$enable_wgetch_events"
11265   with_wgetch_events=$enableval
11266 else
11267   with_wgetch_events=no
11268 fi;
11269 echo "$as_me:11269: result: $with_wgetch_events" >&5
11270 echo "${ECHO_T}$with_wgetch_events" >&6
11271 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11272 #define NCURSES_WGETCH_EVENTS 1
11273 EOF
11274
11275 ###############################################################################
11276
11277 ###     use option --disable-echo to suppress full display compiling commands
11278 echo "$as_me:11278: checking if you want to display full commands during build" >&5
11279 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11280
11281 # Check whether --enable-echo or --disable-echo was given.
11282 if test "${enable_echo+set}" = set; then
11283   enableval="$enable_echo"
11284   with_echo=$enableval
11285 else
11286   with_echo=yes
11287 fi;
11288 if test "$with_echo" = yes; then
11289         ECHO_LINK=
11290 else
11291         ECHO_LINK='@ echo linking $@ ... ;'
11292         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11293         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11294 fi
11295 echo "$as_me:11295: result: $with_echo" >&5
11296 echo "${ECHO_T}$with_echo" >&6
11297
11298 ###     use option --enable-warnings to turn on all gcc warnings
11299 echo "$as_me:11299: checking if you want to see compiler warnings" >&5
11300 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11301
11302 # Check whether --enable-warnings or --disable-warnings was given.
11303 if test "${enable_warnings+set}" = set; then
11304   enableval="$enable_warnings"
11305   with_warnings=$enableval
11306 fi;
11307 echo "$as_me:11307: result: $with_warnings" >&5
11308 echo "${ECHO_T}$with_warnings" >&6
11309
11310 if test "x$with_warnings" = "xyes"; then
11311
11312         ADAFLAGS="$ADAFLAGS -gnatg"
11313
11314 INTEL_COMPILER=no
11315
11316 if test "$GCC" = yes ; then
11317         case $host_os in
11318         linux*|gnu*)
11319                 echo "$as_me:11319: checking if this is really Intel C compiler" >&5
11320 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11321                 cf_save_CFLAGS="$CFLAGS"
11322                 CFLAGS="$CFLAGS -no-gcc"
11323                 cat >conftest.$ac_ext <<_ACEOF
11324 #line 11324 "configure"
11325 #include "confdefs.h"
11326
11327 int
11328 main ()
11329 {
11330
11331 #ifdef __INTEL_COMPILER
11332 #else
11333 make an error
11334 #endif
11335
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 rm -f conftest.$ac_objext
11341 if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
11342   (eval $ac_compile) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit $ac_status); } &&
11346          { ac_try='test -s conftest.$ac_objext'
11347   { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348   (eval $ac_try) 2>&5
11349   ac_status=$?
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit $ac_status); }; }; then
11352   INTEL_COMPILER=yes
11353 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11354
11355 else
11356   echo "$as_me: failed program was:" >&5
11357 cat conftest.$ac_ext >&5
11358 fi
11359 rm -f conftest.$ac_objext conftest.$ac_ext
11360                 CFLAGS="$cf_save_CFLAGS"
11361                 echo "$as_me:11361: result: $INTEL_COMPILER" >&5
11362 echo "${ECHO_T}$INTEL_COMPILER" >&6
11363                 ;;
11364         esac
11365 fi
11366
11367 cat > conftest.$ac_ext <<EOF
11368 #line 11368 "${as_me:-configure}"
11369 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11370 EOF
11371
11372 if test "$INTEL_COMPILER" = yes
11373 then
11374 # The "-wdXXX" options suppress warnings:
11375 # remark #1419: external declaration in primary source file
11376 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11377 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11378 # remark #193: zero used for undefined preprocessing identifier
11379 # remark #593: variable "curs_sb_left_arrow" was set but never used
11380 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11381 # remark #869: parameter "tw" was never referenced
11382 # remark #981: operands are evaluated in unspecified order
11383 # warning #279: controlling expression is constant
11384
11385         { echo "$as_me:11385: checking for $CC warning options..." >&5
11386 echo "$as_me: checking for $CC warning options..." >&6;}
11387         cf_save_CFLAGS="$CFLAGS"
11388         EXTRA_CFLAGS="-Wall"
11389         for cf_opt in \
11390                 wd1419 \
11391                 wd1683 \
11392                 wd1684 \
11393                 wd193 \
11394                 wd593 \
11395                 wd279 \
11396                 wd810 \
11397                 wd869 \
11398                 wd981
11399         do
11400                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11401                 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); }; then
11406                         test -n "$verbose" && echo "$as_me:11406: result: ... -$cf_opt" >&5
11407 echo "${ECHO_T}... -$cf_opt" >&6
11408                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11409                 fi
11410         done
11411         CFLAGS="$cf_save_CFLAGS"
11412
11413 elif test "$GCC" = yes
11414 then
11415         { echo "$as_me:11415: checking for $CC warning options..." >&5
11416 echo "$as_me: checking for $CC warning options..." >&6;}
11417         cf_save_CFLAGS="$CFLAGS"
11418         EXTRA_CFLAGS=
11419         cf_warn_CONST=""
11420         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11421         for cf_opt in W Wall \
11422                 Wbad-function-cast \
11423                 Wcast-align \
11424                 Wcast-qual \
11425                 Winline \
11426                 Wmissing-declarations \
11427                 Wmissing-prototypes \
11428                 Wnested-externs \
11429                 Wpointer-arith \
11430                 Wshadow \
11431                 Wstrict-prototypes \
11432                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11433         do
11434                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11435                 if { (eval echo "$as_me:11435: \"$ac_compile\"") >&5
11436   (eval $ac_compile) 2>&5
11437   ac_status=$?
11438   echo "$as_me:11438: \$? = $ac_status" >&5
11439   (exit $ac_status); }; then
11440                         test -n "$verbose" && echo "$as_me:11440: result: ... -$cf_opt" >&5
11441 echo "${ECHO_T}... -$cf_opt" >&6
11442                         case $cf_opt in #(vi
11443                         Wcast-qual) #(vi
11444                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11445                                 ;;
11446                         Winline) #(vi
11447                                 case $GCC_VERSION in
11448                                 [34].*)
11449                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11450
11451 echo "${as_me:-configure}:11451: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11452
11453                                         continue;;
11454                                 esac
11455                                 ;;
11456                         esac
11457                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11458                 fi
11459         done
11460         CFLAGS="$cf_save_CFLAGS"
11461 fi
11462 rm -rf conftest*
11463
11464         if test "$cf_with_cxx" = yes ; then
11465
11466 INTEL_CPLUSPLUS=no
11467
11468 if test "$GCC" = yes ; then
11469         case $host_os in
11470         linux*|gnu*)
11471                 echo "$as_me:11471: checking if this is really Intel C++ compiler" >&5
11472 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11473                 cf_save_CFLAGS="$CXXFLAGS"
11474                 CXXFLAGS="$CXXFLAGS -no-gcc"
11475                 cat >conftest.$ac_ext <<_ACEOF
11476 #line 11476 "configure"
11477 #include "confdefs.h"
11478
11479 int
11480 main ()
11481 {
11482
11483 #ifdef __INTEL_COMPILER
11484 #else
11485 make an error
11486 #endif
11487
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 rm -f conftest.$ac_objext
11493 if { (eval echo "$as_me:11493: \"$ac_compile\"") >&5
11494   (eval $ac_compile) 2>&5
11495   ac_status=$?
11496   echo "$as_me:11496: \$? = $ac_status" >&5
11497   (exit $ac_status); } &&
11498          { ac_try='test -s conftest.$ac_objext'
11499   { (eval echo "$as_me:11499: \"$ac_try\"") >&5
11500   (eval $ac_try) 2>&5
11501   ac_status=$?
11502   echo "$as_me:11502: \$? = $ac_status" >&5
11503   (exit $ac_status); }; }; then
11504   INTEL_CPLUSPLUS=yes
11505 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11506
11507 else
11508   echo "$as_me: failed program was:" >&5
11509 cat conftest.$ac_ext >&5
11510 fi
11511 rm -f conftest.$ac_objext conftest.$ac_ext
11512                 CXXFLAGS="$cf_save_CFLAGS"
11513                 echo "$as_me:11513: result: $INTEL_CPLUSPLUS" >&5
11514 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11515                 ;;
11516         esac
11517 fi
11518
11519 ac_ext=cc
11520 ac_cpp='$CXXCPP $CPPFLAGS'
11521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11522 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11524 ac_main_return=return
11525
11526 cat > conftest.$ac_ext <<EOF
11527 #line 11527 "configure"
11528 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11529 EOF
11530
11531 if test "$INTEL_CPLUSPLUS" = yes
11532 then
11533 # The "-wdXXX" options suppress warnings:
11534 # remark #1419: external declaration in primary source file
11535 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11536 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11537 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11538 # remark #193: zero used for undefined preprocessing identifier
11539 # remark #593: variable "curs_sb_left_arrow" was set but never used
11540 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11541 # remark #869: parameter "tw" was never referenced
11542 # remark #981: operands are evaluated in unspecified order
11543 # warning #269: invalid format string conversion
11544
11545         { echo "$as_me:11545: checking for $CC warning options..." >&5
11546 echo "$as_me: checking for $CC warning options..." >&6;}
11547         cf_save_CXXFLAGS="$CXXFLAGS"
11548         EXTRA_CXXFLAGS="-Wall"
11549         for cf_opt in \
11550                 wd1419 \
11551                 wd1682 \
11552                 wd1683 \
11553                 wd1684 \
11554                 wd193 \
11555                 wd279 \
11556                 wd593 \
11557                 wd810 \
11558                 wd869 \
11559                 wd981
11560         do
11561                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11562                 if { (eval echo "$as_me:11562: \"$ac_compile\"") >&5
11563   (eval $ac_compile) 2>&5
11564   ac_status=$?
11565   echo "$as_me:11565: \$? = $ac_status" >&5
11566   (exit $ac_status); }; then
11567                         test -n "$verbose" && echo "$as_me:11567: result: ... -$cf_opt" >&5
11568 echo "${ECHO_T}... -$cf_opt" >&6
11569                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11570                 fi
11571         done
11572         CXXFLAGS="$cf_save_CXXFLAGS"
11573
11574 elif test "$GXX" = yes
11575 then
11576         { echo "$as_me:11576: checking for $CXX warning options..." >&5
11577 echo "$as_me: checking for $CXX warning options..." >&6;}
11578         cf_save_CXXFLAGS="$CXXFLAGS"
11579         EXTRA_CXXFLAGS="-W -Wall"
11580         cf_gxx_extra_warnings=""
11581         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11582         case "$GCC_VERSION" in
11583         [1-2].*)
11584                 ;;
11585         *)
11586                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11587                 ;;
11588         esac
11589         for cf_opt in \
11590                 Wabi \
11591                 fabi-version=0 \
11592                 Woverloaded-virtual \
11593                 Wsign-promo \
11594                 Wsynth \
11595                 Wold-style-cast \
11596                 Wcast-align \
11597                 Wcast-qual \
11598                 Wmissing-prototypes \
11599                 Wpointer-arith \
11600                 Wshadow \
11601                 Wstrict-prototypes \
11602                 Wundef $cf_gxx_extra_warnings Wno-unused
11603         do
11604                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11605                 if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit $ac_status); }; then
11610                         test -n "$verbose" && echo "$as_me:11610: result: ... -$cf_opt" >&5
11611 echo "${ECHO_T}... -$cf_opt" >&6
11612                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11613                 else
11614                         test -n "$verbose" && echo "$as_me:11614: result: ... no -$cf_opt" >&5
11615 echo "${ECHO_T}... no -$cf_opt" >&6
11616                 fi
11617         done
11618         CXXFLAGS="$cf_save_CXXFLAGS"
11619 fi
11620
11621 rm -rf conftest*
11622 ac_ext=c
11623 ac_cpp='$CPP $CPPFLAGS'
11624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11627 ac_main_return=return
11628
11629         fi
11630 fi
11631
11632 if test "$GCC" = yes
11633 then
11634 cat > conftest.i <<EOF
11635 #ifndef GCC_PRINTF
11636 #define GCC_PRINTF 0
11637 #endif
11638 #ifndef GCC_SCANF
11639 #define GCC_SCANF 0
11640 #endif
11641 #ifndef GCC_NORETURN
11642 #define GCC_NORETURN /* nothing */
11643 #endif
11644 #ifndef GCC_UNUSED
11645 #define GCC_UNUSED /* nothing */
11646 #endif
11647 EOF
11648 if test "$GCC" = yes
11649 then
11650         { echo "$as_me:11650: checking for $CC __attribute__ directives..." >&5
11651 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11652 cat > conftest.$ac_ext <<EOF
11653 #line 11653 "${as_me:-configure}"
11654 #include "confdefs.h"
11655 #include "conftest.h"
11656 #include "conftest.i"
11657 #if     GCC_PRINTF
11658 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11659 #else
11660 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11661 #endif
11662 #if     GCC_SCANF
11663 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11664 #else
11665 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11666 #endif
11667 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11668 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11669 extern void foo(void) GCC_NORETURN;
11670 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11671 EOF
11672         cf_printf_attribute=no
11673         cf_scanf_attribute=no
11674         for cf_attribute in scanf printf unused noreturn
11675         do
11676
11677 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11678
11679                 cf_directive="__attribute__(($cf_attribute))"
11680                 echo "checking for $CC $cf_directive" 1>&5
11681
11682                 case $cf_attribute in #(vi
11683                 printf) #(vi
11684                         cf_printf_attribute=yes
11685                         cat >conftest.h <<EOF
11686 #define GCC_$cf_ATTRIBUTE 1
11687 EOF
11688                         ;;
11689                 scanf) #(vi
11690                         cf_scanf_attribute=yes
11691                         cat >conftest.h <<EOF
11692 #define GCC_$cf_ATTRIBUTE 1
11693 EOF
11694                         ;;
11695                 *) #(vi
11696                         cat >conftest.h <<EOF
11697 #define GCC_$cf_ATTRIBUTE $cf_directive
11698 EOF
11699                         ;;
11700                 esac
11701
11702                 if { (eval echo "$as_me:11702: \"$ac_compile\"") >&5
11703   (eval $ac_compile) 2>&5
11704   ac_status=$?
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); }; then
11707                         test -n "$verbose" && echo "$as_me:11707: result: ... $cf_attribute" >&5
11708 echo "${ECHO_T}... $cf_attribute" >&6
11709                         cat conftest.h >>confdefs.h
11710                         case $cf_attribute in #(vi
11711                         printf) #(vi
11712                                 if test "$cf_printf_attribute" = no ; then
11713                                         cat >>confdefs.h <<EOF
11714 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11715 EOF
11716                                 else
11717                                         cat >>confdefs.h <<EOF
11718 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11719 EOF
11720                                 fi
11721                                 ;;
11722                         scanf) #(vi
11723                                 if test "$cf_scanf_attribute" = no ; then
11724                                         cat >>confdefs.h <<EOF
11725 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11726 EOF
11727                                 else
11728                                         cat >>confdefs.h <<EOF
11729 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11730 EOF
11731                                 fi
11732                                 ;;
11733                         esac
11734                 fi
11735         done
11736 else
11737         fgrep define conftest.i >>confdefs.h
11738 fi
11739 rm -rf conftest*
11740 fi
11741
11742 ###     use option --enable-assertions to turn on generation of assertion code
11743 echo "$as_me:11743: checking if you want to enable runtime assertions" >&5
11744 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11745
11746 # Check whether --enable-assertions or --disable-assertions was given.
11747 if test "${enable_assertions+set}" = set; then
11748   enableval="$enable_assertions"
11749   with_assertions=$enableval
11750 else
11751   with_assertions=no
11752 fi;
11753 echo "$as_me:11753: result: $with_assertions" >&5
11754 echo "${ECHO_T}$with_assertions" >&6
11755 if test -n "$GCC"
11756 then
11757         if test "$with_assertions" = no
11758         then
11759                 cat >>confdefs.h <<\EOF
11760 #define NDEBUG 1
11761 EOF
11762
11763                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11764         else
11765
11766         ADAFLAGS="$ADAFLAGS -gnata"
11767
11768         fi
11769 fi
11770
11771 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11772
11773 echo "$as_me:11773: checking if you want to use dmalloc for testing" >&5
11774 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11775
11776 # Check whether --with-dmalloc or --without-dmalloc was given.
11777 if test "${with_dmalloc+set}" = set; then
11778   withval="$with_dmalloc"
11779   cat >>confdefs.h <<\EOF
11780 #define USE_DMALLOC 1
11781 EOF
11782
11783         : ${with_cflags:=-g}
11784         : ${with_no_leaks:=yes}
11785          with_dmalloc=yes
11786 else
11787   with_dmalloc=
11788 fi;
11789 echo "$as_me:11789: result: ${with_dmalloc:-no}" >&5
11790 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11791
11792 case .$with_cflags in #(vi
11793 .*-g*)
11794         case .$CFLAGS in #(vi
11795         .*-g*) #(vi
11796                 ;;
11797         *)
11798
11799 cf_fix_cppflags=no
11800 cf_new_cflags=
11801 cf_new_cppflags=
11802 cf_new_extra_cppflags=
11803
11804 for cf_add_cflags in -g
11805 do
11806 case $cf_fix_cppflags in
11807 no)
11808         case $cf_add_cflags in #(vi
11809         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11810                 case $cf_add_cflags in
11811                 -D*)
11812                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11813
11814                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11815                                 && test -z "${cf_tst_cflags}" \
11816                                 && cf_fix_cppflags=yes
11817
11818                         if test $cf_fix_cppflags = yes ; then
11819                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11820                                 continue
11821                         elif test "${cf_tst_cflags}" = "\"'" ; then
11822                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11823                                 continue
11824                         fi
11825                         ;;
11826                 esac
11827                 case "$CPPFLAGS" in
11828                 *$cf_add_cflags) #(vi
11829                         ;;
11830                 *) #(vi
11831                         case $cf_add_cflags in #(vi
11832                         -D*)
11833                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11834
11835 CPPFLAGS=`echo "$CPPFLAGS" | \
11836         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11837                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11838
11839                                 ;;
11840                         esac
11841                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11842                         ;;
11843                 esac
11844                 ;;
11845         *)
11846                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11847                 ;;
11848         esac
11849         ;;
11850 yes)
11851         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11852
11853         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11854
11855         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11856                 && test -z "${cf_tst_cflags}" \
11857                 && cf_fix_cppflags=no
11858         ;;
11859 esac
11860 done
11861
11862 if test -n "$cf_new_cflags" ; then
11863
11864         CFLAGS="$CFLAGS $cf_new_cflags"
11865 fi
11866
11867 if test -n "$cf_new_cppflags" ; then
11868
11869         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11870 fi
11871
11872 if test -n "$cf_new_extra_cppflags" ; then
11873
11874         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11875 fi
11876
11877                 ;;
11878         esac
11879         ;;
11880 esac
11881
11882 if test "$with_dmalloc" = yes ; then
11883         echo "$as_me:11883: checking for dmalloc.h" >&5
11884 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11885 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11886   echo $ECHO_N "(cached) $ECHO_C" >&6
11887 else
11888   cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891 #include <dmalloc.h>
11892 _ACEOF
11893 if { (eval echo "$as_me:11893: \"$ac_cpp conftest.$ac_ext\"") >&5
11894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11895   ac_status=$?
11896   egrep -v '^ *\+' conftest.er1 >conftest.err
11897   rm -f conftest.er1
11898   cat conftest.err >&5
11899   echo "$as_me:11899: \$? = $ac_status" >&5
11900   (exit $ac_status); } >/dev/null; then
11901   if test -s conftest.err; then
11902     ac_cpp_err=$ac_c_preproc_warn_flag
11903   else
11904     ac_cpp_err=
11905   fi
11906 else
11907   ac_cpp_err=yes
11908 fi
11909 if test -z "$ac_cpp_err"; then
11910   ac_cv_header_dmalloc_h=yes
11911 else
11912   echo "$as_me: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   ac_cv_header_dmalloc_h=no
11915 fi
11916 rm -f conftest.err conftest.$ac_ext
11917 fi
11918 echo "$as_me:11918: result: $ac_cv_header_dmalloc_h" >&5
11919 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11920 if test $ac_cv_header_dmalloc_h = yes; then
11921
11922 echo "$as_me:11922: checking for dmalloc_debug in -ldmalloc" >&5
11923 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11924 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927   ac_check_lib_save_LIBS=$LIBS
11928 LIBS="-ldmalloc  $LIBS"
11929 cat >conftest.$ac_ext <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932
11933 /* Override any gcc2 internal prototype to avoid an error.  */
11934 #ifdef __cplusplus
11935 extern "C"
11936 #endif
11937 /* We use char because int might match the return type of a gcc2
11938    builtin and then its argument prototype would still apply.  */
11939 char dmalloc_debug ();
11940 int
11941 main ()
11942 {
11943 dmalloc_debug ();
11944   ;
11945   return 0;
11946 }
11947 _ACEOF
11948 rm -f conftest.$ac_objext conftest$ac_exeext
11949 if { (eval echo "$as_me:11949: \"$ac_link\"") >&5
11950   (eval $ac_link) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); } &&
11954          { ac_try='test -s conftest$ac_exeext'
11955   { (eval echo "$as_me:11955: \"$ac_try\"") >&5
11956   (eval $ac_try) 2>&5
11957   ac_status=$?
11958   echo "$as_me:11958: \$? = $ac_status" >&5
11959   (exit $ac_status); }; }; then
11960   ac_cv_lib_dmalloc_dmalloc_debug=yes
11961 else
11962   echo "$as_me: failed program was:" >&5
11963 cat conftest.$ac_ext >&5
11964 ac_cv_lib_dmalloc_dmalloc_debug=no
11965 fi
11966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11967 LIBS=$ac_check_lib_save_LIBS
11968 fi
11969 echo "$as_me:11969: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11970 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11971 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11972   cat >>confdefs.h <<EOF
11973 #define HAVE_LIBDMALLOC 1
11974 EOF
11975
11976   LIBS="-ldmalloc $LIBS"
11977
11978 fi
11979
11980 fi
11981
11982 fi
11983
11984 echo "$as_me:11984: checking if you want to use dbmalloc for testing" >&5
11985 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11986
11987 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11988 if test "${with_dbmalloc+set}" = set; then
11989   withval="$with_dbmalloc"
11990   cat >>confdefs.h <<\EOF
11991 #define USE_DBMALLOC 1
11992 EOF
11993
11994         : ${with_cflags:=-g}
11995         : ${with_no_leaks:=yes}
11996          with_dbmalloc=yes
11997 else
11998   with_dbmalloc=
11999 fi;
12000 echo "$as_me:12000: result: ${with_dbmalloc:-no}" >&5
12001 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12002
12003 case .$with_cflags in #(vi
12004 .*-g*)
12005         case .$CFLAGS in #(vi
12006         .*-g*) #(vi
12007                 ;;
12008         *)
12009
12010 cf_fix_cppflags=no
12011 cf_new_cflags=
12012 cf_new_cppflags=
12013 cf_new_extra_cppflags=
12014
12015 for cf_add_cflags in -g
12016 do
12017 case $cf_fix_cppflags in
12018 no)
12019         case $cf_add_cflags in #(vi
12020         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12021                 case $cf_add_cflags in
12022                 -D*)
12023                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12024
12025                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12026                                 && test -z "${cf_tst_cflags}" \
12027                                 && cf_fix_cppflags=yes
12028
12029                         if test $cf_fix_cppflags = yes ; then
12030                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12031                                 continue
12032                         elif test "${cf_tst_cflags}" = "\"'" ; then
12033                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12034                                 continue
12035                         fi
12036                         ;;
12037                 esac
12038                 case "$CPPFLAGS" in
12039                 *$cf_add_cflags) #(vi
12040                         ;;
12041                 *) #(vi
12042                         case $cf_add_cflags in #(vi
12043                         -D*)
12044                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12045
12046 CPPFLAGS=`echo "$CPPFLAGS" | \
12047         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12048                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12049
12050                                 ;;
12051                         esac
12052                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12053                         ;;
12054                 esac
12055                 ;;
12056         *)
12057                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12058                 ;;
12059         esac
12060         ;;
12061 yes)
12062         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12063
12064         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12065
12066         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12067                 && test -z "${cf_tst_cflags}" \
12068                 && cf_fix_cppflags=no
12069         ;;
12070 esac
12071 done
12072
12073 if test -n "$cf_new_cflags" ; then
12074
12075         CFLAGS="$CFLAGS $cf_new_cflags"
12076 fi
12077
12078 if test -n "$cf_new_cppflags" ; then
12079
12080         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12081 fi
12082
12083 if test -n "$cf_new_extra_cppflags" ; then
12084
12085         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12086 fi
12087
12088                 ;;
12089         esac
12090         ;;
12091 esac
12092
12093 if test "$with_dbmalloc" = yes ; then
12094         echo "$as_me:12094: checking for dbmalloc.h" >&5
12095 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12096 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12097   echo $ECHO_N "(cached) $ECHO_C" >&6
12098 else
12099   cat >conftest.$ac_ext <<_ACEOF
12100 #line 12100 "configure"
12101 #include "confdefs.h"
12102 #include <dbmalloc.h>
12103 _ACEOF
12104 if { (eval echo "$as_me:12104: \"$ac_cpp conftest.$ac_ext\"") >&5
12105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12106   ac_status=$?
12107   egrep -v '^ *\+' conftest.er1 >conftest.err
12108   rm -f conftest.er1
12109   cat conftest.err >&5
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit $ac_status); } >/dev/null; then
12112   if test -s conftest.err; then
12113     ac_cpp_err=$ac_c_preproc_warn_flag
12114   else
12115     ac_cpp_err=
12116   fi
12117 else
12118   ac_cpp_err=yes
12119 fi
12120 if test -z "$ac_cpp_err"; then
12121   ac_cv_header_dbmalloc_h=yes
12122 else
12123   echo "$as_me: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   ac_cv_header_dbmalloc_h=no
12126 fi
12127 rm -f conftest.err conftest.$ac_ext
12128 fi
12129 echo "$as_me:12129: result: $ac_cv_header_dbmalloc_h" >&5
12130 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12131 if test $ac_cv_header_dbmalloc_h = yes; then
12132
12133 echo "$as_me:12133: checking for debug_malloc in -ldbmalloc" >&5
12134 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12135 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12136   echo $ECHO_N "(cached) $ECHO_C" >&6
12137 else
12138   ac_check_lib_save_LIBS=$LIBS
12139 LIBS="-ldbmalloc  $LIBS"
12140 cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143
12144 /* Override any gcc2 internal prototype to avoid an error.  */
12145 #ifdef __cplusplus
12146 extern "C"
12147 #endif
12148 /* We use char because int might match the return type of a gcc2
12149    builtin and then its argument prototype would still apply.  */
12150 char debug_malloc ();
12151 int
12152 main ()
12153 {
12154 debug_malloc ();
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 rm -f conftest.$ac_objext conftest$ac_exeext
12160 if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
12161   (eval $ac_link) 2>&5
12162   ac_status=$?
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit $ac_status); } &&
12165          { ac_try='test -s conftest$ac_exeext'
12166   { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171   ac_cv_lib_dbmalloc_debug_malloc=yes
12172 else
12173   echo "$as_me: failed program was:" >&5
12174 cat conftest.$ac_ext >&5
12175 ac_cv_lib_dbmalloc_debug_malloc=no
12176 fi
12177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12178 LIBS=$ac_check_lib_save_LIBS
12179 fi
12180 echo "$as_me:12180: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12181 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12182 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12183   cat >>confdefs.h <<EOF
12184 #define HAVE_LIBDBMALLOC 1
12185 EOF
12186
12187   LIBS="-ldbmalloc $LIBS"
12188
12189 fi
12190
12191 fi
12192
12193 fi
12194
12195 echo "$as_me:12195: checking if you want to use valgrind for testing" >&5
12196 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12197
12198 # Check whether --with-valgrind or --without-valgrind was given.
12199 if test "${with_valgrind+set}" = set; then
12200   withval="$with_valgrind"
12201   cat >>confdefs.h <<\EOF
12202 #define USE_VALGRIND 1
12203 EOF
12204
12205         : ${with_cflags:=-g}
12206         : ${with_no_leaks:=yes}
12207          with_valgrind=yes
12208 else
12209   with_valgrind=
12210 fi;
12211 echo "$as_me:12211: result: ${with_valgrind:-no}" >&5
12212 echo "${ECHO_T}${with_valgrind:-no}" >&6
12213
12214 case .$with_cflags in #(vi
12215 .*-g*)
12216         case .$CFLAGS in #(vi
12217         .*-g*) #(vi
12218                 ;;
12219         *)
12220
12221 cf_fix_cppflags=no
12222 cf_new_cflags=
12223 cf_new_cppflags=
12224 cf_new_extra_cppflags=
12225
12226 for cf_add_cflags in -g
12227 do
12228 case $cf_fix_cppflags in
12229 no)
12230         case $cf_add_cflags in #(vi
12231         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12232                 case $cf_add_cflags in
12233                 -D*)
12234                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12235
12236                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12237                                 && test -z "${cf_tst_cflags}" \
12238                                 && cf_fix_cppflags=yes
12239
12240                         if test $cf_fix_cppflags = yes ; then
12241                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12242                                 continue
12243                         elif test "${cf_tst_cflags}" = "\"'" ; then
12244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12245                                 continue
12246                         fi
12247                         ;;
12248                 esac
12249                 case "$CPPFLAGS" in
12250                 *$cf_add_cflags) #(vi
12251                         ;;
12252                 *) #(vi
12253                         case $cf_add_cflags in #(vi
12254                         -D*)
12255                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12256
12257 CPPFLAGS=`echo "$CPPFLAGS" | \
12258         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12259                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12260
12261                                 ;;
12262                         esac
12263                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12264                         ;;
12265                 esac
12266                 ;;
12267         *)
12268                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12269                 ;;
12270         esac
12271         ;;
12272 yes)
12273         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12274
12275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12276
12277         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12278                 && test -z "${cf_tst_cflags}" \
12279                 && cf_fix_cppflags=no
12280         ;;
12281 esac
12282 done
12283
12284 if test -n "$cf_new_cflags" ; then
12285
12286         CFLAGS="$CFLAGS $cf_new_cflags"
12287 fi
12288
12289 if test -n "$cf_new_cppflags" ; then
12290
12291         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12292 fi
12293
12294 if test -n "$cf_new_extra_cppflags" ; then
12295
12296         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12297 fi
12298
12299                 ;;
12300         esac
12301         ;;
12302 esac
12303
12304 echo "$as_me:12304: checking if you want to perform memory-leak testing" >&5
12305 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12306
12307 # Check whether --enable-leaks or --disable-leaks was given.
12308 if test "${enable_leaks+set}" = set; then
12309   enableval="$enable_leaks"
12310   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12311 else
12312   : ${with_no_leaks:=no}
12313 fi;
12314 echo "$as_me:12314: result: $with_no_leaks" >&5
12315 echo "${ECHO_T}$with_no_leaks" >&6
12316
12317 if test "$with_no_leaks" = yes ; then
12318         cat >>confdefs.h <<\EOF
12319 #define NO_LEAKS 1
12320 EOF
12321
12322         cat >>confdefs.h <<\EOF
12323 #define YY_NO_LEAKS 1
12324 EOF
12325
12326 fi
12327
12328 cat >>confdefs.h <<\EOF
12329 #define HAVE_NC_ALLOC_H 1
12330 EOF
12331
12332 ###     use option --enable-expanded to generate certain macros as functions
12333
12334 # Check whether --enable-expanded or --disable-expanded was given.
12335 if test "${enable_expanded+set}" = set; then
12336   enableval="$enable_expanded"
12337   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12338 #define NCURSES_EXPANDED 1
12339 EOF
12340
12341 fi;
12342
12343 ###     use option --disable-macros to suppress macros in favor of functions
12344
12345 # Check whether --enable-macros or --disable-macros was given.
12346 if test "${enable_macros+set}" = set; then
12347   enableval="$enable_macros"
12348   test "$enableval" = no && cat >>confdefs.h <<\EOF
12349 #define NCURSES_NOMACROS 1
12350 EOF
12351
12352 fi;
12353
12354 # Normally we only add trace() to the debug-library.  Allow this to be
12355 # extended to all models of the ncurses library:
12356 cf_all_traces=no
12357 case "$CFLAGS $CPPFLAGS" in
12358 *-DTRACE*)
12359         cf_all_traces=yes
12360         ;;
12361 esac
12362
12363 echo "$as_me:12363: checking whether to add trace feature to all models" >&5
12364 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12365
12366 # Check whether --with-trace or --without-trace was given.
12367 if test "${with_trace+set}" = set; then
12368   withval="$with_trace"
12369   cf_with_trace=$withval
12370 else
12371   cf_with_trace=$cf_all_traces
12372 fi;
12373 echo "$as_me:12373: result: $cf_with_trace" >&5
12374 echo "${ECHO_T}$cf_with_trace" >&6
12375
12376 if test "$cf_with_trace" = yes ; then
12377         LIB_TRACING=all
12378         ADA_TRACE=TRUE
12379
12380 cf_fix_cppflags=no
12381 cf_new_cflags=
12382 cf_new_cppflags=
12383 cf_new_extra_cppflags=
12384
12385 for cf_add_cflags in -DTRACE
12386 do
12387 case $cf_fix_cppflags in
12388 no)
12389         case $cf_add_cflags in #(vi
12390         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12391                 case $cf_add_cflags in
12392                 -D*)
12393                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12394
12395                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12396                                 && test -z "${cf_tst_cflags}" \
12397                                 && cf_fix_cppflags=yes
12398
12399                         if test $cf_fix_cppflags = yes ; then
12400                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12401                                 continue
12402                         elif test "${cf_tst_cflags}" = "\"'" ; then
12403                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12404                                 continue
12405                         fi
12406                         ;;
12407                 esac
12408                 case "$CPPFLAGS" in
12409                 *$cf_add_cflags) #(vi
12410                         ;;
12411                 *) #(vi
12412                         case $cf_add_cflags in #(vi
12413                         -D*)
12414                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12415
12416 CPPFLAGS=`echo "$CPPFLAGS" | \
12417         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12418                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12419
12420                                 ;;
12421                         esac
12422                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12423                         ;;
12424                 esac
12425                 ;;
12426         *)
12427                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12428                 ;;
12429         esac
12430         ;;
12431 yes)
12432         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12433
12434         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12435
12436         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12437                 && test -z "${cf_tst_cflags}" \
12438                 && cf_fix_cppflags=no
12439         ;;
12440 esac
12441 done
12442
12443 if test -n "$cf_new_cflags" ; then
12444
12445         CFLAGS="$CFLAGS $cf_new_cflags"
12446 fi
12447
12448 if test -n "$cf_new_cppflags" ; then
12449
12450         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12451 fi
12452
12453 if test -n "$cf_new_extra_cppflags" ; then
12454
12455         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12456 fi
12457
12458 else
12459         LIB_TRACING=DEBUG
12460         ADA_TRACE=FALSE
12461 fi
12462
12463 ###     Checks for libraries.
12464 case $cf_cv_system_name in #(vi
12465 *mingw32*) #(vi
12466         ;;
12467 *)
12468 echo "$as_me:12468: checking for gettimeofday" >&5
12469 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12470 if test "${ac_cv_func_gettimeofday+set}" = set; then
12471   echo $ECHO_N "(cached) $ECHO_C" >&6
12472 else
12473   cat >conftest.$ac_ext <<_ACEOF
12474 #line 12474 "configure"
12475 #include "confdefs.h"
12476 /* System header to define __stub macros and hopefully few prototypes,
12477     which can conflict with char gettimeofday (); below.  */
12478 #include <assert.h>
12479 /* Override any gcc2 internal prototype to avoid an error.  */
12480 #ifdef __cplusplus
12481 extern "C"
12482 #endif
12483 /* We use char because int might match the return type of a gcc2
12484    builtin and then its argument prototype would still apply.  */
12485 char gettimeofday ();
12486 char (*f) ();
12487
12488 int
12489 main ()
12490 {
12491 /* The GNU C library defines this for functions which it implements
12492     to always fail with ENOSYS.  Some functions are actually named
12493     something starting with __ and the normal name is an alias.  */
12494 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12495 choke me
12496 #else
12497 f = gettimeofday;
12498 #endif
12499
12500   ;
12501   return 0;
12502 }
12503 _ACEOF
12504 rm -f conftest.$ac_objext conftest$ac_exeext
12505 if { (eval echo "$as_me:12505: \"$ac_link\"") >&5
12506   (eval $ac_link) 2>&5
12507   ac_status=$?
12508   echo "$as_me:12508: \$? = $ac_status" >&5
12509   (exit $ac_status); } &&
12510          { ac_try='test -s conftest$ac_exeext'
12511   { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512   (eval $ac_try) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; }; then
12516   ac_cv_func_gettimeofday=yes
12517 else
12518   echo "$as_me: failed program was:" >&5
12519 cat conftest.$ac_ext >&5
12520 ac_cv_func_gettimeofday=no
12521 fi
12522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12523 fi
12524 echo "$as_me:12524: result: $ac_cv_func_gettimeofday" >&5
12525 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12526 if test $ac_cv_func_gettimeofday = yes; then
12527   cat >>confdefs.h <<\EOF
12528 #define HAVE_GETTIMEOFDAY 1
12529 EOF
12530
12531 else
12532
12533 echo "$as_me:12533: checking for gettimeofday in -lbsd" >&5
12534 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12535 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12536   echo $ECHO_N "(cached) $ECHO_C" >&6
12537 else
12538   ac_check_lib_save_LIBS=$LIBS
12539 LIBS="-lbsd  $LIBS"
12540 cat >conftest.$ac_ext <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12543
12544 /* Override any gcc2 internal prototype to avoid an error.  */
12545 #ifdef __cplusplus
12546 extern "C"
12547 #endif
12548 /* We use char because int might match the return type of a gcc2
12549    builtin and then its argument prototype would still apply.  */
12550 char gettimeofday ();
12551 int
12552 main ()
12553 {
12554 gettimeofday ();
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f conftest.$ac_objext conftest$ac_exeext
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561   (eval $ac_link) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); } &&
12565          { ac_try='test -s conftest$ac_exeext'
12566   { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567   (eval $ac_try) 2>&5
12568   ac_status=$?
12569   echo "$as_me:12569: \$? = $ac_status" >&5
12570   (exit $ac_status); }; }; then
12571   ac_cv_lib_bsd_gettimeofday=yes
12572 else
12573   echo "$as_me: failed program was:" >&5
12574 cat conftest.$ac_ext >&5
12575 ac_cv_lib_bsd_gettimeofday=no
12576 fi
12577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12578 LIBS=$ac_check_lib_save_LIBS
12579 fi
12580 echo "$as_me:12580: result: $ac_cv_lib_bsd_gettimeofday" >&5
12581 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12582 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12583   cat >>confdefs.h <<\EOF
12584 #define HAVE_GETTIMEOFDAY 1
12585 EOF
12586
12587         LIBS="-lbsd $LIBS"
12588 fi
12589
12590 fi
12591         ;;
12592 esac
12593
12594 echo "$as_me:12594: checking if -lm needed for math functions" >&5
12595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12596 if test "${cf_cv_need_libm+set}" = set; then
12597   echo $ECHO_N "(cached) $ECHO_C" >&6
12598 else
12599
12600         cat >conftest.$ac_ext <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603
12604         #include <stdio.h>
12605         #include <math.h>
12606
12607 int
12608 main ()
12609 {
12610 double x = rand(); printf("result = %g\n", sin(x))
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 rm -f conftest.$ac_objext conftest$ac_exeext
12616 if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
12617   (eval $ac_link) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); } &&
12621          { ac_try='test -s conftest$ac_exeext'
12622   { (eval echo "$as_me:12622: \"$ac_try\"") >&5
12623   (eval $ac_try) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); }; }; then
12627   cf_cv_need_libm=no
12628 else
12629   echo "$as_me: failed program was:" >&5
12630 cat conftest.$ac_ext >&5
12631 cf_cv_need_libm=yes
12632 fi
12633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12634 fi
12635 echo "$as_me:12635: result: $cf_cv_need_libm" >&5
12636 echo "${ECHO_T}$cf_cv_need_libm" >&6
12637 if test "$cf_cv_need_libm" = yes
12638 then
12639 MATH_LIB=-lm
12640 fi
12641
12642 ###     Checks for header files.
12643 echo "$as_me:12643: checking for ANSI C header files" >&5
12644 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12645 if test "${ac_cv_header_stdc+set}" = set; then
12646   echo $ECHO_N "(cached) $ECHO_C" >&6
12647 else
12648   cat >conftest.$ac_ext <<_ACEOF
12649 #line 12649 "configure"
12650 #include "confdefs.h"
12651 #include <stdlib.h>
12652 #include <stdarg.h>
12653 #include <string.h>
12654 #include <float.h>
12655
12656 _ACEOF
12657 if { (eval echo "$as_me:12657: \"$ac_cpp conftest.$ac_ext\"") >&5
12658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12659   ac_status=$?
12660   egrep -v '^ *\+' conftest.er1 >conftest.err
12661   rm -f conftest.er1
12662   cat conftest.err >&5
12663   echo "$as_me:12663: \$? = $ac_status" >&5
12664   (exit $ac_status); } >/dev/null; then
12665   if test -s conftest.err; then
12666     ac_cpp_err=$ac_c_preproc_warn_flag
12667   else
12668     ac_cpp_err=
12669   fi
12670 else
12671   ac_cpp_err=yes
12672 fi
12673 if test -z "$ac_cpp_err"; then
12674   ac_cv_header_stdc=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677   cat conftest.$ac_ext >&5
12678   ac_cv_header_stdc=no
12679 fi
12680 rm -f conftest.err conftest.$ac_ext
12681
12682 if test $ac_cv_header_stdc = yes; then
12683   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12684   cat >conftest.$ac_ext <<_ACEOF
12685 #line 12685 "configure"
12686 #include "confdefs.h"
12687 #include <string.h>
12688
12689 _ACEOF
12690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12691   egrep "memchr" >/dev/null 2>&1; then
12692   :
12693 else
12694   ac_cv_header_stdc=no
12695 fi
12696 rm -rf conftest*
12697
12698 fi
12699
12700 if test $ac_cv_header_stdc = yes; then
12701   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705 #include <stdlib.h>
12706
12707 _ACEOF
12708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12709   egrep "free" >/dev/null 2>&1; then
12710   :
12711 else
12712   ac_cv_header_stdc=no
12713 fi
12714 rm -rf conftest*
12715
12716 fi
12717
12718 if test $ac_cv_header_stdc = yes; then
12719   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12720   if test "$cross_compiling" = yes; then
12721   :
12722 else
12723   cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 #include <ctype.h>
12727 #if ((' ' & 0x0FF) == 0x020)
12728 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12729 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12730 #else
12731 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12732                      || ('j' <= (c) && (c) <= 'r') \
12733                      || ('s' <= (c) && (c) <= 'z'))
12734 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12735 #endif
12736
12737 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12738 int
12739 main ()
12740 {
12741   int i;
12742   for (i = 0; i < 256; i++)
12743     if (XOR (islower (i), ISLOWER (i))
12744         || toupper (i) != TOUPPER (i))
12745       $ac_main_return(2);
12746   $ac_main_return (0);
12747 }
12748 _ACEOF
12749 rm -f conftest$ac_exeext
12750 if { (eval echo "$as_me:12750: \"$ac_link\"") >&5
12751   (eval $ac_link) 2>&5
12752   ac_status=$?
12753   echo "$as_me:12753: \$? = $ac_status" >&5
12754   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12755   { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); }; }; then
12760   :
12761 else
12762   echo "$as_me: program exited with status $ac_status" >&5
12763 echo "$as_me: failed program was:" >&5
12764 cat conftest.$ac_ext >&5
12765 ac_cv_header_stdc=no
12766 fi
12767 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12768 fi
12769 fi
12770 fi
12771 echo "$as_me:12771: result: $ac_cv_header_stdc" >&5
12772 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12773 if test $ac_cv_header_stdc = yes; then
12774
12775 cat >>confdefs.h <<\EOF
12776 #define STDC_HEADERS 1
12777 EOF
12778
12779 fi
12780
12781 ac_header_dirent=no
12782 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12783   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12784 echo "$as_me:12784: checking for $ac_hdr that defines DIR" >&5
12785 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12786 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12787   echo $ECHO_N "(cached) $ECHO_C" >&6
12788 else
12789   cat >conftest.$ac_ext <<_ACEOF
12790 #line 12790 "configure"
12791 #include "confdefs.h"
12792 #include <sys/types.h>
12793 #include <$ac_hdr>
12794
12795 int
12796 main ()
12797 {
12798 if ((DIR *) 0)
12799 return 0;
12800   ;
12801   return 0;
12802 }
12803 _ACEOF
12804 rm -f conftest.$ac_objext
12805 if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
12806   (eval $ac_compile) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit $ac_status); } &&
12810          { ac_try='test -s conftest.$ac_objext'
12811   { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812   (eval $ac_try) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); }; }; then
12816   eval "$as_ac_Header=yes"
12817 else
12818   echo "$as_me: failed program was:" >&5
12819 cat conftest.$ac_ext >&5
12820 eval "$as_ac_Header=no"
12821 fi
12822 rm -f conftest.$ac_objext conftest.$ac_ext
12823 fi
12824 echo "$as_me:12824: result: `eval echo '${'$as_ac_Header'}'`" >&5
12825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12826 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12827   cat >>confdefs.h <<EOF
12828 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12829 EOF
12830
12831 ac_header_dirent=$ac_hdr; break
12832 fi
12833
12834 done
12835 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12836 if test $ac_header_dirent = dirent.h; then
12837   echo "$as_me:12837: checking for opendir in -ldir" >&5
12838 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12839 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842   ac_check_lib_save_LIBS=$LIBS
12843 LIBS="-ldir  $LIBS"
12844 cat >conftest.$ac_ext <<_ACEOF
12845 #line 12845 "configure"
12846 #include "confdefs.h"
12847
12848 /* Override any gcc2 internal prototype to avoid an error.  */
12849 #ifdef __cplusplus
12850 extern "C"
12851 #endif
12852 /* We use char because int might match the return type of a gcc2
12853    builtin and then its argument prototype would still apply.  */
12854 char opendir ();
12855 int
12856 main ()
12857 {
12858 opendir ();
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext conftest$ac_exeext
12864 if { (eval echo "$as_me:12864: \"$ac_link\"") >&5
12865   (eval $ac_link) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -s conftest$ac_exeext'
12870   { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   ac_cv_lib_dir_opendir=yes
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 cat conftest.$ac_ext >&5
12879 ac_cv_lib_dir_opendir=no
12880 fi
12881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12882 LIBS=$ac_check_lib_save_LIBS
12883 fi
12884 echo "$as_me:12884: result: $ac_cv_lib_dir_opendir" >&5
12885 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12886 if test $ac_cv_lib_dir_opendir = yes; then
12887   LIBS="$LIBS -ldir"
12888 fi
12889
12890 else
12891   echo "$as_me:12891: checking for opendir in -lx" >&5
12892 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12893 if test "${ac_cv_lib_x_opendir+set}" = set; then
12894   echo $ECHO_N "(cached) $ECHO_C" >&6
12895 else
12896   ac_check_lib_save_LIBS=$LIBS
12897 LIBS="-lx  $LIBS"
12898 cat >conftest.$ac_ext <<_ACEOF
12899 #line 12899 "configure"
12900 #include "confdefs.h"
12901
12902 /* Override any gcc2 internal prototype to avoid an error.  */
12903 #ifdef __cplusplus
12904 extern "C"
12905 #endif
12906 /* We use char because int might match the return type of a gcc2
12907    builtin and then its argument prototype would still apply.  */
12908 char opendir ();
12909 int
12910 main ()
12911 {
12912 opendir ();
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 rm -f conftest.$ac_objext conftest$ac_exeext
12918 if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919   (eval $ac_link) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -s conftest$ac_exeext'
12924   { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   ac_cv_lib_x_opendir=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 ac_cv_lib_x_opendir=no
12934 fi
12935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12936 LIBS=$ac_check_lib_save_LIBS
12937 fi
12938 echo "$as_me:12938: result: $ac_cv_lib_x_opendir" >&5
12939 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12940 if test $ac_cv_lib_x_opendir = yes; then
12941   LIBS="$LIBS -lx"
12942 fi
12943
12944 fi
12945
12946 echo "$as_me:12946: checking whether time.h and sys/time.h may both be included" >&5
12947 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12948 if test "${ac_cv_header_time+set}" = set; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <sys/types.h>
12955 #include <sys/time.h>
12956 #include <time.h>
12957
12958 int
12959 main ()
12960 {
12961 if ((struct tm *) 0)
12962 return 0;
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext
12968 if { (eval echo "$as_me:12968: \"$ac_compile\"") >&5
12969   (eval $ac_compile) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest.$ac_objext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   ac_cv_header_time=yes
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12983 ac_cv_header_time=no
12984 fi
12985 rm -f conftest.$ac_objext conftest.$ac_ext
12986 fi
12987 echo "$as_me:12987: result: $ac_cv_header_time" >&5
12988 echo "${ECHO_T}$ac_cv_header_time" >&6
12989 if test $ac_cv_header_time = yes; then
12990
12991 cat >>confdefs.h <<\EOF
12992 #define TIME_WITH_SYS_TIME 1
12993 EOF
12994
12995 fi
12996
12997 cf_regex_func=no
12998
12999 cf_regex_libs="regex re"
13000 case $host_os in #(vi
13001 mingw*)
13002         cf_regex_libs="regex.dll $cf_regex_libs"
13003         ;;
13004 esac
13005
13006 echo "$as_me:13006: checking for regcomp" >&5
13007 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13008 if test "${ac_cv_func_regcomp+set}" = set; then
13009   echo $ECHO_N "(cached) $ECHO_C" >&6
13010 else
13011   cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014 /* System header to define __stub macros and hopefully few prototypes,
13015     which can conflict with char regcomp (); below.  */
13016 #include <assert.h>
13017 /* Override any gcc2 internal prototype to avoid an error.  */
13018 #ifdef __cplusplus
13019 extern "C"
13020 #endif
13021 /* We use char because int might match the return type of a gcc2
13022    builtin and then its argument prototype would still apply.  */
13023 char regcomp ();
13024 char (*f) ();
13025
13026 int
13027 main ()
13028 {
13029 /* The GNU C library defines this for functions which it implements
13030     to always fail with ENOSYS.  Some functions are actually named
13031     something starting with __ and the normal name is an alias.  */
13032 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13033 choke me
13034 #else
13035 f = regcomp;
13036 #endif
13037
13038   ;
13039   return 0;
13040 }
13041 _ACEOF
13042 rm -f conftest.$ac_objext conftest$ac_exeext
13043 if { (eval echo "$as_me:13043: \"$ac_link\"") >&5
13044   (eval $ac_link) 2>&5
13045   ac_status=$?
13046   echo "$as_me:13046: \$? = $ac_status" >&5
13047   (exit $ac_status); } &&
13048          { ac_try='test -s conftest$ac_exeext'
13049   { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   ac_cv_func_regcomp=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057 cat conftest.$ac_ext >&5
13058 ac_cv_func_regcomp=no
13059 fi
13060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13061 fi
13062 echo "$as_me:13062: result: $ac_cv_func_regcomp" >&5
13063 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13064 if test $ac_cv_func_regcomp = yes; then
13065   cf_regex_func=regcomp
13066 else
13067
13068         for cf_regex_lib in $cf_regex_libs
13069         do
13070                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13071 echo "$as_me:13071: checking for regcomp in -l$cf_regex_lib" >&5
13072 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13073 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   ac_check_lib_save_LIBS=$LIBS
13077 LIBS="-l$cf_regex_lib  $LIBS"
13078 cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081
13082 /* Override any gcc2 internal prototype to avoid an error.  */
13083 #ifdef __cplusplus
13084 extern "C"
13085 #endif
13086 /* We use char because int might match the return type of a gcc2
13087    builtin and then its argument prototype would still apply.  */
13088 char regcomp ();
13089 int
13090 main ()
13091 {
13092 regcomp ();
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 rm -f conftest.$ac_objext conftest$ac_exeext
13098 if { (eval echo "$as_me:13098: \"$ac_link\"") >&5
13099   (eval $ac_link) 2>&5
13100   ac_status=$?
13101   echo "$as_me:13101: \$? = $ac_status" >&5
13102   (exit $ac_status); } &&
13103          { ac_try='test -s conftest$ac_exeext'
13104   { (eval echo "$as_me:13104: \"$ac_try\"") >&5
13105   (eval $ac_try) 2>&5
13106   ac_status=$?
13107   echo "$as_me:13107: \$? = $ac_status" >&5
13108   (exit $ac_status); }; }; then
13109   eval "$as_ac_Lib=yes"
13110 else
13111   echo "$as_me: failed program was:" >&5
13112 cat conftest.$ac_ext >&5
13113 eval "$as_ac_Lib=no"
13114 fi
13115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13116 LIBS=$ac_check_lib_save_LIBS
13117 fi
13118 echo "$as_me:13118: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13119 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13120 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13121
13122                                 LIBS="-l$cf_regex_lib $LIBS"
13123                                 cf_regex_func=regcomp
13124                                 break
13125 fi
13126
13127         done
13128
13129 fi
13130
13131 if test "$cf_regex_func" = no ; then
13132         echo "$as_me:13132: checking for compile" >&5
13133 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13134 if test "${ac_cv_func_compile+set}" = set; then
13135   echo $ECHO_N "(cached) $ECHO_C" >&6
13136 else
13137   cat >conftest.$ac_ext <<_ACEOF
13138 #line 13138 "configure"
13139 #include "confdefs.h"
13140 /* System header to define __stub macros and hopefully few prototypes,
13141     which can conflict with char compile (); below.  */
13142 #include <assert.h>
13143 /* Override any gcc2 internal prototype to avoid an error.  */
13144 #ifdef __cplusplus
13145 extern "C"
13146 #endif
13147 /* We use char because int might match the return type of a gcc2
13148    builtin and then its argument prototype would still apply.  */
13149 char compile ();
13150 char (*f) ();
13151
13152 int
13153 main ()
13154 {
13155 /* The GNU C library defines this for functions which it implements
13156     to always fail with ENOSYS.  Some functions are actually named
13157     something starting with __ and the normal name is an alias.  */
13158 #if defined (__stub_compile) || defined (__stub___compile)
13159 choke me
13160 #else
13161 f = compile;
13162 #endif
13163
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext conftest$ac_exeext
13169 if { (eval echo "$as_me:13169: \"$ac_link\"") >&5
13170   (eval $ac_link) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); } &&
13174          { ac_try='test -s conftest$ac_exeext'
13175   { (eval echo "$as_me:13175: \"$ac_try\"") >&5
13176   (eval $ac_try) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit $ac_status); }; }; then
13180   ac_cv_func_compile=yes
13181 else
13182   echo "$as_me: failed program was:" >&5
13183 cat conftest.$ac_ext >&5
13184 ac_cv_func_compile=no
13185 fi
13186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13187 fi
13188 echo "$as_me:13188: result: $ac_cv_func_compile" >&5
13189 echo "${ECHO_T}$ac_cv_func_compile" >&6
13190 if test $ac_cv_func_compile = yes; then
13191   cf_regex_func=compile
13192 else
13193
13194                 echo "$as_me:13194: checking for compile in -lgen" >&5
13195 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13196 if test "${ac_cv_lib_gen_compile+set}" = set; then
13197   echo $ECHO_N "(cached) $ECHO_C" >&6
13198 else
13199   ac_check_lib_save_LIBS=$LIBS
13200 LIBS="-lgen  $LIBS"
13201 cat >conftest.$ac_ext <<_ACEOF
13202 #line 13202 "configure"
13203 #include "confdefs.h"
13204
13205 /* Override any gcc2 internal prototype to avoid an error.  */
13206 #ifdef __cplusplus
13207 extern "C"
13208 #endif
13209 /* We use char because int might match the return type of a gcc2
13210    builtin and then its argument prototype would still apply.  */
13211 char compile ();
13212 int
13213 main ()
13214 {
13215 compile ();
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f conftest.$ac_objext conftest$ac_exeext
13221 if { (eval echo "$as_me:13221: \"$ac_link\"") >&5
13222   (eval $ac_link) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit $ac_status); } &&
13226          { ac_try='test -s conftest$ac_exeext'
13227   { (eval echo "$as_me:13227: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit $ac_status); }; }; then
13232   ac_cv_lib_gen_compile=yes
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 cat conftest.$ac_ext >&5
13236 ac_cv_lib_gen_compile=no
13237 fi
13238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13239 LIBS=$ac_check_lib_save_LIBS
13240 fi
13241 echo "$as_me:13241: result: $ac_cv_lib_gen_compile" >&5
13242 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13243 if test $ac_cv_lib_gen_compile = yes; then
13244
13245                                 LIBS="-lgen $LIBS"
13246                                 cf_regex_func=compile
13247 fi
13248
13249 fi
13250
13251 fi
13252
13253 if test "$cf_regex_func" = no ; then
13254         { echo "$as_me:13254: WARNING: cannot find regular expression library" >&5
13255 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13256 fi
13257
13258 echo "$as_me:13258: checking for regular-expression headers" >&5
13259 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13260 if test "${cf_cv_regex_hdrs+set}" = set; then
13261   echo $ECHO_N "(cached) $ECHO_C" >&6
13262 else
13263
13264 cf_cv_regex_hdrs=no
13265 case $cf_regex_func in #(vi
13266 compile) #(vi
13267         for cf_regex_hdr in regexp.h regexpr.h
13268         do
13269                 cat >conftest.$ac_ext <<_ACEOF
13270 #line 13270 "configure"
13271 #include "confdefs.h"
13272 #include <$cf_regex_hdr>
13273 int
13274 main ()
13275 {
13276
13277                         char *p = compile("", "", "", 0);
13278                         int x = step("", "");
13279
13280   ;
13281   return 0;
13282 }
13283 _ACEOF
13284 rm -f conftest.$ac_objext conftest$ac_exeext
13285 if { (eval echo "$as_me:13285: \"$ac_link\"") >&5
13286   (eval $ac_link) 2>&5
13287   ac_status=$?
13288   echo "$as_me:13288: \$? = $ac_status" >&5
13289   (exit $ac_status); } &&
13290          { ac_try='test -s conftest$ac_exeext'
13291   { (eval echo "$as_me:13291: \"$ac_try\"") >&5
13292   (eval $ac_try) 2>&5
13293   ac_status=$?
13294   echo "$as_me:13294: \$? = $ac_status" >&5
13295   (exit $ac_status); }; }; then
13296
13297                         cf_cv_regex_hdrs=$cf_regex_hdr
13298                         break
13299
13300 else
13301   echo "$as_me: failed program was:" >&5
13302 cat conftest.$ac_ext >&5
13303 fi
13304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13305         done
13306         ;;
13307 *)
13308         for cf_regex_hdr in regex.h
13309         do
13310                 cat >conftest.$ac_ext <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313 #include <sys/types.h>
13314 #include <$cf_regex_hdr>
13315 int
13316 main ()
13317 {
13318
13319                         regex_t *p;
13320                         int x = regcomp(p, "", 0);
13321                         int y = regexec(p, "", 0, 0, 0);
13322                         regfree(p);
13323
13324   ;
13325   return 0;
13326 }
13327 _ACEOF
13328 rm -f conftest.$ac_objext conftest$ac_exeext
13329 if { (eval echo "$as_me:13329: \"$ac_link\"") >&5
13330   (eval $ac_link) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit $ac_status); } &&
13334          { ac_try='test -s conftest$ac_exeext'
13335   { (eval echo "$as_me:13335: \"$ac_try\"") >&5
13336   (eval $ac_try) 2>&5
13337   ac_status=$?
13338   echo "$as_me:13338: \$? = $ac_status" >&5
13339   (exit $ac_status); }; }; then
13340
13341                         cf_cv_regex_hdrs=$cf_regex_hdr
13342                         break
13343
13344 else
13345   echo "$as_me: failed program was:" >&5
13346 cat conftest.$ac_ext >&5
13347 fi
13348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13349         done
13350         ;;
13351 esac
13352
13353 fi
13354 echo "$as_me:13354: result: $cf_cv_regex_hdrs" >&5
13355 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13356
13357 case $cf_cv_regex_hdrs in #(vi
13358     no)        { echo "$as_me:13358: WARNING: no regular expression header found" >&5
13359 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13360     regex.h)   cat >>confdefs.h <<\EOF
13361 #define HAVE_REGEX_H_FUNCS 1
13362 EOF
13363  ;; #(vi
13364     regexp.h)  cat >>confdefs.h <<\EOF
13365 #define HAVE_REGEXP_H_FUNCS 1
13366 EOF
13367  ;; #(vi
13368     regexpr.h) cat >>confdefs.h <<\EOF
13369 #define HAVE_REGEXPR_H_FUNCS 1
13370 EOF
13371  ;;
13372 esac
13373
13374 for ac_header in \
13375 fcntl.h \
13376 getopt.h \
13377 limits.h \
13378 locale.h \
13379 math.h \
13380 poll.h \
13381 sys/bsdtypes.h \
13382 sys/ioctl.h \
13383 sys/param.h \
13384 sys/poll.h \
13385 sys/select.h \
13386 sys/time.h \
13387 sys/times.h \
13388 ttyent.h \
13389 unistd.h \
13390 wctype.h \
13391
13392 do
13393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13394 echo "$as_me:13394: checking for $ac_header" >&5
13395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13397   echo $ECHO_N "(cached) $ECHO_C" >&6
13398 else
13399   cat >conftest.$ac_ext <<_ACEOF
13400 #line 13400 "configure"
13401 #include "confdefs.h"
13402 #include <$ac_header>
13403 _ACEOF
13404 if { (eval echo "$as_me:13404: \"$ac_cpp conftest.$ac_ext\"") >&5
13405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13406   ac_status=$?
13407   egrep -v '^ *\+' conftest.er1 >conftest.err
13408   rm -f conftest.er1
13409   cat conftest.err >&5
13410   echo "$as_me:13410: \$? = $ac_status" >&5
13411   (exit $ac_status); } >/dev/null; then
13412   if test -s conftest.err; then
13413     ac_cpp_err=$ac_c_preproc_warn_flag
13414   else
13415     ac_cpp_err=
13416   fi
13417 else
13418   ac_cpp_err=yes
13419 fi
13420 if test -z "$ac_cpp_err"; then
13421   eval "$as_ac_Header=yes"
13422 else
13423   echo "$as_me: failed program was:" >&5
13424   cat conftest.$ac_ext >&5
13425   eval "$as_ac_Header=no"
13426 fi
13427 rm -f conftest.err conftest.$ac_ext
13428 fi
13429 echo "$as_me:13429: result: `eval echo '${'$as_ac_Header'}'`" >&5
13430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13432   cat >>confdefs.h <<EOF
13433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13434 EOF
13435
13436 fi
13437 done
13438
13439 # check for ISC (this may also define _POSIX_SOURCE)
13440 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13441 if test "$ISC" = yes ; then
13442
13443 echo "$as_me:13443: checking for main in -lcposix" >&5
13444 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13445 if test "${ac_cv_lib_cposix_main+set}" = set; then
13446   echo $ECHO_N "(cached) $ECHO_C" >&6
13447 else
13448   ac_check_lib_save_LIBS=$LIBS
13449 LIBS="-lcposix  $LIBS"
13450 cat >conftest.$ac_ext <<_ACEOF
13451 #line 13451 "configure"
13452 #include "confdefs.h"
13453
13454 int
13455 main ()
13456 {
13457 main ();
13458   ;
13459   return 0;
13460 }
13461 _ACEOF
13462 rm -f conftest.$ac_objext conftest$ac_exeext
13463 if { (eval echo "$as_me:13463: \"$ac_link\"") >&5
13464   (eval $ac_link) 2>&5
13465   ac_status=$?
13466   echo "$as_me:13466: \$? = $ac_status" >&5
13467   (exit $ac_status); } &&
13468          { ac_try='test -s conftest$ac_exeext'
13469   { (eval echo "$as_me:13469: \"$ac_try\"") >&5
13470   (eval $ac_try) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); }; }; then
13474   ac_cv_lib_cposix_main=yes
13475 else
13476   echo "$as_me: failed program was:" >&5
13477 cat conftest.$ac_ext >&5
13478 ac_cv_lib_cposix_main=no
13479 fi
13480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13481 LIBS=$ac_check_lib_save_LIBS
13482 fi
13483 echo "$as_me:13483: result: $ac_cv_lib_cposix_main" >&5
13484 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13485 if test $ac_cv_lib_cposix_main = yes; then
13486   cat >>confdefs.h <<EOF
13487 #define HAVE_LIBCPOSIX 1
13488 EOF
13489
13490   LIBS="-lcposix $LIBS"
13491
13492 fi
13493
13494         echo "$as_me:13494: checking for bzero in -linet" >&5
13495 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13496 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13497   echo $ECHO_N "(cached) $ECHO_C" >&6
13498 else
13499   ac_check_lib_save_LIBS=$LIBS
13500 LIBS="-linet  $LIBS"
13501 cat >conftest.$ac_ext <<_ACEOF
13502 #line 13502 "configure"
13503 #include "confdefs.h"
13504
13505 /* Override any gcc2 internal prototype to avoid an error.  */
13506 #ifdef __cplusplus
13507 extern "C"
13508 #endif
13509 /* We use char because int might match the return type of a gcc2
13510    builtin and then its argument prototype would still apply.  */
13511 char bzero ();
13512 int
13513 main ()
13514 {
13515 bzero ();
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext conftest$ac_exeext
13521 if { (eval echo "$as_me:13521: \"$ac_link\"") >&5
13522   (eval $ac_link) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest$ac_exeext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   ac_cv_lib_inet_bzero=yes
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 ac_cv_lib_inet_bzero=no
13537 fi
13538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13539 LIBS=$ac_check_lib_save_LIBS
13540 fi
13541 echo "$as_me:13541: result: $ac_cv_lib_inet_bzero" >&5
13542 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13543 if test $ac_cv_lib_inet_bzero = yes; then
13544   LIBS="-linet $LIBS"
13545 fi
13546 fi
13547
13548 echo "$as_me:13548: checking if sys/time.h works with sys/select.h" >&5
13549 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13550 if test "${cf_cv_sys_time_select+set}" = set; then
13551   echo $ECHO_N "(cached) $ECHO_C" >&6
13552 else
13553
13554 cat >conftest.$ac_ext <<_ACEOF
13555 #line 13555 "configure"
13556 #include "confdefs.h"
13557
13558 #include <sys/types.h>
13559 #ifdef HAVE_SYS_TIME_H
13560 #include <sys/time.h>
13561 #endif
13562 #ifdef HAVE_SYS_SELECT_H
13563 #include <sys/select.h>
13564 #endif
13565
13566 int
13567 main ()
13568 {
13569
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext
13575 if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5
13576   (eval $ac_compile) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest.$ac_objext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   cf_cv_sys_time_select=yes
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 cf_cv_sys_time_select=no
13591 fi
13592 rm -f conftest.$ac_objext conftest.$ac_ext
13593
13594 fi
13595
13596 echo "$as_me:13596: result: $cf_cv_sys_time_select" >&5
13597 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13598 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13599 #define HAVE_SYS_TIME_SELECT 1
13600 EOF
13601
13602 ###     checks for compiler characteristics
13603 ac_ext=c
13604 ac_cpp='$CPP $CPPFLAGS'
13605 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13606 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13607 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13608 ac_main_return=return
13609
13610 echo "$as_me:13610: checking for $CC option to accept ANSI C" >&5
13611 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13612 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13613   echo $ECHO_N "(cached) $ECHO_C" >&6
13614 else
13615   ac_cv_prog_cc_stdc=no
13616 ac_save_CC=$CC
13617 cat >conftest.$ac_ext <<_ACEOF
13618 #line 13618 "configure"
13619 #include "confdefs.h"
13620 #include <stdarg.h>
13621 #include <stdio.h>
13622 #include <sys/types.h>
13623 #include <sys/stat.h>
13624 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13625 struct buf { int x; };
13626 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13627 static char *e (p, i)
13628      char **p;
13629      int i;
13630 {
13631   return p[i];
13632 }
13633 static char *f (char * (*g) (char **, int), char **p, ...)
13634 {
13635   char *s;
13636   va_list v;
13637   va_start (v,p);
13638   s = g (p, va_arg (v,int));
13639   va_end (v);
13640   return s;
13641 }
13642 int test (int i, double x);
13643 struct s1 {int (*f) (int a);};
13644 struct s2 {int (*f) (double a);};
13645 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13646 int argc;
13647 char **argv;
13648 int
13649 main ()
13650 {
13651 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13652   ;
13653   return 0;
13654 }
13655 _ACEOF
13656 # Don't try gcc -ansi; that turns off useful extensions and
13657 # breaks some systems' header files.
13658 # AIX                   -qlanglvl=ansi
13659 # Ultrix and OSF/1      -std1
13660 # HP-UX 10.20 and later -Ae
13661 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13662 # SVR4                  -Xc -D__EXTENSIONS__
13663 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13664 do
13665   CC="$ac_save_CC $ac_arg"
13666   rm -f conftest.$ac_objext
13667 if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5
13668   (eval $ac_compile) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); } &&
13672          { ac_try='test -s conftest.$ac_objext'
13673   { (eval echo "$as_me:13673: \"$ac_try\"") >&5
13674   (eval $ac_try) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); }; }; then
13678   ac_cv_prog_cc_stdc=$ac_arg
13679 break
13680 else
13681   echo "$as_me: failed program was:" >&5
13682 cat conftest.$ac_ext >&5
13683 fi
13684 rm -f conftest.$ac_objext
13685 done
13686 rm -f conftest.$ac_ext conftest.$ac_objext
13687 CC=$ac_save_CC
13688
13689 fi
13690
13691 case "x$ac_cv_prog_cc_stdc" in
13692   x|xno)
13693     echo "$as_me:13693: result: none needed" >&5
13694 echo "${ECHO_T}none needed" >&6 ;;
13695   *)
13696     echo "$as_me:13696: result: $ac_cv_prog_cc_stdc" >&5
13697 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13698     CC="$CC $ac_cv_prog_cc_stdc" ;;
13699 esac
13700
13701 echo "$as_me:13701: checking for an ANSI C-conforming const" >&5
13702 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13703 if test "${ac_cv_c_const+set}" = set; then
13704   echo $ECHO_N "(cached) $ECHO_C" >&6
13705 else
13706   cat >conftest.$ac_ext <<_ACEOF
13707 #line 13707 "configure"
13708 #include "confdefs.h"
13709
13710 int
13711 main ()
13712 {
13713 /* FIXME: Include the comments suggested by Paul. */
13714 #ifndef __cplusplus
13715   /* Ultrix mips cc rejects this.  */
13716   typedef int charset[2];
13717   const charset x;
13718   /* SunOS 4.1.1 cc rejects this.  */
13719   char const *const *ccp;
13720   char **p;
13721   /* NEC SVR4.0.2 mips cc rejects this.  */
13722   struct point {int x, y;};
13723   static struct point const zero = {0,0};
13724   /* AIX XL C 1.02.0.0 rejects this.
13725      It does not let you subtract one const X* pointer from another in
13726      an arm of an if-expression whose if-part is not a constant
13727      expression */
13728   const char *g = "string";
13729   ccp = &g + (g ? g-g : 0);
13730   /* HPUX 7.0 cc rejects these. */
13731   ++ccp;
13732   p = (char**) ccp;
13733   ccp = (char const *const *) p;
13734   { /* SCO 3.2v4 cc rejects this.  */
13735     char *t;
13736     char const *s = 0 ? (char *) 0 : (char const *) 0;
13737
13738     *t++ = 0;
13739   }
13740   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13741     int x[] = {25, 17};
13742     const int *foo = &x[0];
13743     ++foo;
13744   }
13745   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13746     typedef const int *iptr;
13747     iptr p = 0;
13748     ++p;
13749   }
13750   { /* AIX XL C 1.02.0.0 rejects this saying
13751        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13752     struct s { int j; const int *ap[3]; };
13753     struct s *b; b->j = 5;
13754   }
13755   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13756     const int foo = 10;
13757   }
13758 #endif
13759
13760   ;
13761   return 0;
13762 }
13763 _ACEOF
13764 rm -f conftest.$ac_objext
13765 if { (eval echo "$as_me:13765: \"$ac_compile\"") >&5
13766   (eval $ac_compile) 2>&5
13767   ac_status=$?
13768   echo "$as_me:13768: \$? = $ac_status" >&5
13769   (exit $ac_status); } &&
13770          { ac_try='test -s conftest.$ac_objext'
13771   { (eval echo "$as_me:13771: \"$ac_try\"") >&5
13772   (eval $ac_try) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); }; }; then
13776   ac_cv_c_const=yes
13777 else
13778   echo "$as_me: failed program was:" >&5
13779 cat conftest.$ac_ext >&5
13780 ac_cv_c_const=no
13781 fi
13782 rm -f conftest.$ac_objext conftest.$ac_ext
13783 fi
13784 echo "$as_me:13784: result: $ac_cv_c_const" >&5
13785 echo "${ECHO_T}$ac_cv_c_const" >&6
13786 if test $ac_cv_c_const = no; then
13787
13788 cat >>confdefs.h <<\EOF
13789 #define const
13790 EOF
13791
13792 fi
13793
13794 echo "$as_me:13794: checking for inline" >&5
13795 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13796 if test "${ac_cv_c_inline+set}" = set; then
13797   echo $ECHO_N "(cached) $ECHO_C" >&6
13798 else
13799   ac_cv_c_inline=no
13800 for ac_kw in inline __inline__ __inline; do
13801   cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804 #ifndef __cplusplus
13805 static $ac_kw int static_foo () {return 0; }
13806 $ac_kw int foo () {return 0; }
13807 #endif
13808
13809 _ACEOF
13810 rm -f conftest.$ac_objext
13811 if { (eval echo "$as_me:13811: \"$ac_compile\"") >&5
13812   (eval $ac_compile) 2>&5
13813   ac_status=$?
13814   echo "$as_me:13814: \$? = $ac_status" >&5
13815   (exit $ac_status); } &&
13816          { ac_try='test -s conftest.$ac_objext'
13817   { (eval echo "$as_me:13817: \"$ac_try\"") >&5
13818   (eval $ac_try) 2>&5
13819   ac_status=$?
13820   echo "$as_me:13820: \$? = $ac_status" >&5
13821   (exit $ac_status); }; }; then
13822   ac_cv_c_inline=$ac_kw; break
13823 else
13824   echo "$as_me: failed program was:" >&5
13825 cat conftest.$ac_ext >&5
13826 fi
13827 rm -f conftest.$ac_objext conftest.$ac_ext
13828 done
13829
13830 fi
13831 echo "$as_me:13831: result: $ac_cv_c_inline" >&5
13832 echo "${ECHO_T}$ac_cv_c_inline" >&6
13833 case $ac_cv_c_inline in
13834   inline | yes) ;;
13835   no)
13836 cat >>confdefs.h <<\EOF
13837 #define inline
13838 EOF
13839  ;;
13840   *)  cat >>confdefs.h <<EOF
13841 #define inline $ac_cv_c_inline
13842 EOF
13843  ;;
13844 esac
13845
13846 NCURSES_INLINE=
13847 if test "$ac_cv_c_inline" != no ; then
13848   NCURSES_INLINE=inline
13849   if test "$INTEL_COMPILER" = yes
13850   then
13851     :
13852   elif test "$GCC" = yes
13853   then
13854     echo "$as_me:13854: checking if $CC supports options to tune inlining" >&5
13855 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13856 if test "${cf_cv_gcc_inline+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859
13860       cf_save_CFLAGS=$CFLAGS
13861       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13862       cat >conftest.$ac_ext <<_ACEOF
13863 #line 13863 "configure"
13864 #include "confdefs.h"
13865 inline int foo(void) { return 1; }
13866 int
13867 main ()
13868 {
13869 ${cf_cv_main_return:-return} foo()
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 rm -f conftest.$ac_objext
13875 if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5
13876   (eval $ac_compile) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); } &&
13880          { ac_try='test -s conftest.$ac_objext'
13881   { (eval echo "$as_me:13881: \"$ac_try\"") >&5
13882   (eval $ac_try) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); }; }; then
13886   cf_cv_gcc_inline=yes
13887 else
13888   echo "$as_me: failed program was:" >&5
13889 cat conftest.$ac_ext >&5
13890 cf_cv_gcc_inline=no
13891 fi
13892 rm -f conftest.$ac_objext conftest.$ac_ext
13893       CFLAGS=$cf_save_CFLAGS
13894
13895 fi
13896 echo "$as_me:13896: result: $cf_cv_gcc_inline" >&5
13897 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13898     if test "$cf_cv_gcc_inline" = yes ; then
13899
13900 cf_fix_cppflags=no
13901 cf_new_cflags=
13902 cf_new_cppflags=
13903 cf_new_extra_cppflags=
13904
13905 for cf_add_cflags in --param max-inline-insns-single=1200
13906 do
13907 case $cf_fix_cppflags in
13908 no)
13909         case $cf_add_cflags in #(vi
13910         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13911                 case $cf_add_cflags in
13912                 -D*)
13913                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13914
13915                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13916                                 && test -z "${cf_tst_cflags}" \
13917                                 && cf_fix_cppflags=yes
13918
13919                         if test $cf_fix_cppflags = yes ; then
13920                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13921                                 continue
13922                         elif test "${cf_tst_cflags}" = "\"'" ; then
13923                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13924                                 continue
13925                         fi
13926                         ;;
13927                 esac
13928                 case "$CPPFLAGS" in
13929                 *$cf_add_cflags) #(vi
13930                         ;;
13931                 *) #(vi
13932                         case $cf_add_cflags in #(vi
13933                         -D*)
13934                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13935
13936 CPPFLAGS=`echo "$CPPFLAGS" | \
13937         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13938                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13939
13940                                 ;;
13941                         esac
13942                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13943                         ;;
13944                 esac
13945                 ;;
13946         *)
13947                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13948                 ;;
13949         esac
13950         ;;
13951 yes)
13952         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13953
13954         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13955
13956         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13957                 && test -z "${cf_tst_cflags}" \
13958                 && cf_fix_cppflags=no
13959         ;;
13960 esac
13961 done
13962
13963 if test -n "$cf_new_cflags" ; then
13964
13965         CFLAGS="$CFLAGS $cf_new_cflags"
13966 fi
13967
13968 if test -n "$cf_new_cppflags" ; then
13969
13970         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13971 fi
13972
13973 if test -n "$cf_new_extra_cppflags" ; then
13974
13975         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13976 fi
13977
13978     fi
13979   fi
13980 fi
13981
13982 echo "$as_me:13982: checking for signal global datatype" >&5
13983 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13984 if test "${cf_cv_sig_atomic_t+set}" = set; then
13985   echo $ECHO_N "(cached) $ECHO_C" >&6
13986 else
13987
13988         for cf_type in \
13989                 "volatile sig_atomic_t" \
13990                 "sig_atomic_t" \
13991                 "int"
13992         do
13993         cat >conftest.$ac_ext <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13996
13997 #include <sys/types.h>
13998 #include <signal.h>
13999 #include <stdio.h>
14000
14001 extern $cf_type x;
14002 $cf_type x;
14003 static void handler(int sig)
14004 {
14005         x = 5;
14006 }
14007 int
14008 main ()
14009 {
14010 signal(SIGINT, handler);
14011                  x = 1
14012   ;
14013   return 0;
14014 }
14015 _ACEOF
14016 rm -f conftest.$ac_objext
14017 if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
14018   (eval $ac_compile) 2>&5
14019   ac_status=$?
14020   echo "$as_me:14020: \$? = $ac_status" >&5
14021   (exit $ac_status); } &&
14022          { ac_try='test -s conftest.$ac_objext'
14023   { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024   (eval $ac_try) 2>&5
14025   ac_status=$?
14026   echo "$as_me:14026: \$? = $ac_status" >&5
14027   (exit $ac_status); }; }; then
14028   cf_cv_sig_atomic_t=$cf_type
14029 else
14030   echo "$as_me: failed program was:" >&5
14031 cat conftest.$ac_ext >&5
14032 cf_cv_sig_atomic_t=no
14033 fi
14034 rm -f conftest.$ac_objext conftest.$ac_ext
14035                 test "$cf_cv_sig_atomic_t" != no && break
14036         done
14037
14038 fi
14039
14040 echo "$as_me:14040: result: $cf_cv_sig_atomic_t" >&5
14041 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14042 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14043 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14044 EOF
14045
14046 if test $NCURSES_CHTYPE = auto ; then
14047
14048 echo "$as_me:14048: checking for type of chtype" >&5
14049 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14050 if test "${cf_cv_typeof_chtype+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053
14054                 if test "$cross_compiling" = yes; then
14055   cf_cv_typeof_chtype=long
14056 else
14057   cat >conftest.$ac_ext <<_ACEOF
14058 #line 14058 "configure"
14059 #include "confdefs.h"
14060
14061 #define WANT_BITS 31
14062 #include <stdio.h>
14063 int main()
14064 {
14065         FILE *fp = fopen("cf_test.out", "w");
14066         if (fp != 0) {
14067                 char *result = "long";
14068                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14069                         int n;
14070                         unsigned int x, y;
14071                         for (n = 0; n < WANT_BITS; n++) {
14072                                 x = (1 << n);
14073                                 y = (x >> n);
14074                                 if (y != 1 || x == 0) {
14075                                         x = 0;
14076                                         break;
14077                                 }
14078                         }
14079                         /*
14080                          * If x is nonzero, an int is big enough for the bits
14081                          * that we want.
14082                          */
14083                         result = (x != 0) ? "int" : "long";
14084                 }
14085                 fputs(result, fp);
14086                 fclose(fp);
14087         }
14088         ${cf_cv_main_return:-return}(0);
14089 }
14090
14091 _ACEOF
14092 rm -f conftest$ac_exeext
14093 if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14094   (eval $ac_link) 2>&5
14095   ac_status=$?
14096   echo "$as_me:14096: \$? = $ac_status" >&5
14097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14098   { (eval echo "$as_me:14098: \"$ac_try\"") >&5
14099   (eval $ac_try) 2>&5
14100   ac_status=$?
14101   echo "$as_me:14101: \$? = $ac_status" >&5
14102   (exit $ac_status); }; }; then
14103   cf_cv_typeof_chtype=`cat cf_test.out`
14104 else
14105   echo "$as_me: program exited with status $ac_status" >&5
14106 echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 cf_cv_typeof_chtype=long
14109 fi
14110 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14111 fi
14112                 rm -f cf_test.out
14113
14114 fi
14115
14116 echo "$as_me:14116: result: $cf_cv_typeof_chtype" >&5
14117 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14118
14119 cat >>confdefs.h <<EOF
14120 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14121 EOF
14122
14123 else
14124         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14125 fi
14126 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14127
14128 echo "$as_me:14128: checking if unsigned literals are legal" >&5
14129 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14130 if test "${cf_cv_unsigned_literals+set}" = set; then
14131   echo $ECHO_N "(cached) $ECHO_C" >&6
14132 else
14133
14134         cat >conftest.$ac_ext <<_ACEOF
14135 #line 14135 "configure"
14136 #include "confdefs.h"
14137
14138 int
14139 main ()
14140 {
14141 long x = 1L + 1UL + 1U + 1
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 rm -f conftest.$ac_objext
14147 if { (eval echo "$as_me:14147: \"$ac_compile\"") >&5
14148   (eval $ac_compile) 2>&5
14149   ac_status=$?
14150   echo "$as_me:14150: \$? = $ac_status" >&5
14151   (exit $ac_status); } &&
14152          { ac_try='test -s conftest.$ac_objext'
14153   { (eval echo "$as_me:14153: \"$ac_try\"") >&5
14154   (eval $ac_try) 2>&5
14155   ac_status=$?
14156   echo "$as_me:14156: \$? = $ac_status" >&5
14157   (exit $ac_status); }; }; then
14158   cf_cv_unsigned_literals=yes
14159 else
14160   echo "$as_me: failed program was:" >&5
14161 cat conftest.$ac_ext >&5
14162 cf_cv_unsigned_literals=no
14163 fi
14164 rm -f conftest.$ac_objext conftest.$ac_ext
14165
14166 fi
14167
14168 echo "$as_me:14168: result: $cf_cv_unsigned_literals" >&5
14169 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14170
14171 cf_cv_1UL="1"
14172 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14173 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14174
14175 if test $NCURSES_MMASK_T = auto ; then
14176         cf_cv_typeof_mmask_t=long
14177 else
14178         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14179 fi
14180 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14181
14182 ###     Checks for external-data
14183
14184 echo "$as_me:14184: checking if external errno is declared" >&5
14185 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14186 if test "${cf_cv_dcl_errno+set}" = set; then
14187   echo $ECHO_N "(cached) $ECHO_C" >&6
14188 else
14189
14190     cat >conftest.$ac_ext <<_ACEOF
14191 #line 14191 "configure"
14192 #include "confdefs.h"
14193
14194 #ifdef HAVE_STDLIB_H
14195 #include <stdlib.h>
14196 #endif
14197 #include <stdio.h>
14198 #include <sys/types.h>
14199 #include <errno.h>
14200 int
14201 main ()
14202 {
14203 int x = (int) errno
14204   ;
14205   return 0;
14206 }
14207 _ACEOF
14208 rm -f conftest.$ac_objext
14209 if { (eval echo "$as_me:14209: \"$ac_compile\"") >&5
14210   (eval $ac_compile) 2>&5
14211   ac_status=$?
14212   echo "$as_me:14212: \$? = $ac_status" >&5
14213   (exit $ac_status); } &&
14214          { ac_try='test -s conftest.$ac_objext'
14215   { (eval echo "$as_me:14215: \"$ac_try\"") >&5
14216   (eval $ac_try) 2>&5
14217   ac_status=$?
14218   echo "$as_me:14218: \$? = $ac_status" >&5
14219   (exit $ac_status); }; }; then
14220   cf_cv_dcl_errno=yes
14221 else
14222   echo "$as_me: failed program was:" >&5
14223 cat conftest.$ac_ext >&5
14224 cf_cv_dcl_errno=no
14225 fi
14226 rm -f conftest.$ac_objext conftest.$ac_ext
14227
14228 fi
14229 echo "$as_me:14229: result: $cf_cv_dcl_errno" >&5
14230 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14231
14232 if test "$cf_cv_dcl_errno" = no ; then
14233
14234 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14235
14236     cat >>confdefs.h <<EOF
14237 #define $cf_result 1
14238 EOF
14239
14240 fi
14241
14242 # It's possible (for near-UNIX clones) that the data doesn't exist
14243
14244 echo "$as_me:14244: checking if external errno exists" >&5
14245 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14246 if test "${cf_cv_have_errno+set}" = set; then
14247   echo $ECHO_N "(cached) $ECHO_C" >&6
14248 else
14249
14250     cat >conftest.$ac_ext <<_ACEOF
14251 #line 14251 "configure"
14252 #include "confdefs.h"
14253
14254 #undef errno
14255 extern int errno;
14256
14257 int
14258 main ()
14259 {
14260 errno = 2
14261   ;
14262   return 0;
14263 }
14264 _ACEOF
14265 rm -f conftest.$ac_objext conftest$ac_exeext
14266 if { (eval echo "$as_me:14266: \"$ac_link\"") >&5
14267   (eval $ac_link) 2>&5
14268   ac_status=$?
14269   echo "$as_me:14269: \$? = $ac_status" >&5
14270   (exit $ac_status); } &&
14271          { ac_try='test -s conftest$ac_exeext'
14272   { (eval echo "$as_me:14272: \"$ac_try\"") >&5
14273   (eval $ac_try) 2>&5
14274   ac_status=$?
14275   echo "$as_me:14275: \$? = $ac_status" >&5
14276   (exit $ac_status); }; }; then
14277   cf_cv_have_errno=yes
14278 else
14279   echo "$as_me: failed program was:" >&5
14280 cat conftest.$ac_ext >&5
14281 cf_cv_have_errno=no
14282 fi
14283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14284
14285 fi
14286 echo "$as_me:14286: result: $cf_cv_have_errno" >&5
14287 echo "${ECHO_T}$cf_cv_have_errno" >&6
14288
14289 if test "$cf_cv_have_errno" = yes ; then
14290
14291 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14292
14293     cat >>confdefs.h <<EOF
14294 #define $cf_result 1
14295 EOF
14296
14297 fi
14298
14299 echo "$as_me:14299: checking if data-only library module links" >&5
14300 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14301 if test "${cf_cv_link_dataonly+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304
14305         rm -f conftest.a
14306         cat >conftest.$ac_ext <<EOF
14307 #line 14307 "configure"
14308 int     testdata[3] = { 123, 456, 789 };
14309 EOF
14310         if { (eval echo "$as_me:14310: \"$ac_compile\"") >&5
14311   (eval $ac_compile) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit $ac_status); } ; then
14315                 mv conftest.o data.o && \
14316                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14317         fi
14318         rm -f conftest.$ac_ext data.o
14319         cat >conftest.$ac_ext <<EOF
14320 #line 14320 "configure"
14321 int     testfunc()
14322 {
14323 #if defined(NeXT)
14324         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14325 #else
14326         extern int testdata[3];
14327         return testdata[0] == 123
14328            &&  testdata[1] == 456
14329            &&  testdata[2] == 789;
14330 #endif
14331 }
14332 EOF
14333         if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5
14334   (eval $ac_compile) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit $ac_status); }; then
14338                 mv conftest.o func.o && \
14339                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14340         fi
14341         rm -f conftest.$ac_ext func.o
14342         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14343         cf_saveLIBS="$LIBS"
14344         LIBS="conftest.a $LIBS"
14345         if test "$cross_compiling" = yes; then
14346   cf_cv_link_dataonly=unknown
14347 else
14348   cat >conftest.$ac_ext <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14351
14352         int main()
14353         {
14354                 extern int testfunc();
14355                 ${cf_cv_main_return:-return} (!testfunc());
14356         }
14357
14358 _ACEOF
14359 rm -f conftest$ac_exeext
14360 if { (eval echo "$as_me:14360: \"$ac_link\"") >&5
14361   (eval $ac_link) 2>&5
14362   ac_status=$?
14363   echo "$as_me:14363: \$? = $ac_status" >&5
14364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14365   { (eval echo "$as_me:14365: \"$ac_try\"") >&5
14366   (eval $ac_try) 2>&5
14367   ac_status=$?
14368   echo "$as_me:14368: \$? = $ac_status" >&5
14369   (exit $ac_status); }; }; then
14370   cf_cv_link_dataonly=yes
14371 else
14372   echo "$as_me: program exited with status $ac_status" >&5
14373 echo "$as_me: failed program was:" >&5
14374 cat conftest.$ac_ext >&5
14375 cf_cv_link_dataonly=no
14376 fi
14377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14378 fi
14379         LIBS="$cf_saveLIBS"
14380
14381 fi
14382
14383 echo "$as_me:14383: result: $cf_cv_link_dataonly" >&5
14384 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14385
14386 if test "$cf_cv_link_dataonly" = no ; then
14387         cat >>confdefs.h <<\EOF
14388 #define BROKEN_LINKER 1
14389 EOF
14390
14391         BROKEN_LINKER=1
14392 fi
14393
14394 ###     Checks for library functions.
14395
14396 for ac_func in \
14397 getcwd \
14398 getegid \
14399 geteuid \
14400 getttynam \
14401 issetugid \
14402 poll \
14403 remove \
14404 select \
14405 setbuf \
14406 setbuffer \
14407 setvbuf \
14408 sigaction \
14409 sigvec \
14410 strdup \
14411 strstr \
14412 tcgetpgrp \
14413 times \
14414 vsnprintf \
14415
14416 do
14417 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14418 echo "$as_me:14418: checking for $ac_func" >&5
14419 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14420 if eval "test \"\${$as_ac_var+set}\" = set"; then
14421   echo $ECHO_N "(cached) $ECHO_C" >&6
14422 else
14423   cat >conftest.$ac_ext <<_ACEOF
14424 #line 14424 "configure"
14425 #include "confdefs.h"
14426 /* System header to define __stub macros and hopefully few prototypes,
14427     which can conflict with char $ac_func (); below.  */
14428 #include <assert.h>
14429 /* Override any gcc2 internal prototype to avoid an error.  */
14430 #ifdef __cplusplus
14431 extern "C"
14432 #endif
14433 /* We use char because int might match the return type of a gcc2
14434    builtin and then its argument prototype would still apply.  */
14435 char $ac_func ();
14436 char (*f) ();
14437
14438 int
14439 main ()
14440 {
14441 /* The GNU C library defines this for functions which it implements
14442     to always fail with ENOSYS.  Some functions are actually named
14443     something starting with __ and the normal name is an alias.  */
14444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14445 choke me
14446 #else
14447 f = $ac_func;
14448 #endif
14449
14450   ;
14451   return 0;
14452 }
14453 _ACEOF
14454 rm -f conftest.$ac_objext conftest$ac_exeext
14455 if { (eval echo "$as_me:14455: \"$ac_link\"") >&5
14456   (eval $ac_link) 2>&5
14457   ac_status=$?
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); } &&
14460          { ac_try='test -s conftest$ac_exeext'
14461   { (eval echo "$as_me:14461: \"$ac_try\"") >&5
14462   (eval $ac_try) 2>&5
14463   ac_status=$?
14464   echo "$as_me:14464: \$? = $ac_status" >&5
14465   (exit $ac_status); }; }; then
14466   eval "$as_ac_var=yes"
14467 else
14468   echo "$as_me: failed program was:" >&5
14469 cat conftest.$ac_ext >&5
14470 eval "$as_ac_var=no"
14471 fi
14472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14473 fi
14474 echo "$as_me:14474: result: `eval echo '${'$as_ac_var'}'`" >&5
14475 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14476 if test `eval echo '${'$as_ac_var'}'` = yes; then
14477   cat >>confdefs.h <<EOF
14478 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14479 EOF
14480
14481 fi
14482 done
14483
14484 if test "$with_getcap" = "yes" ; then
14485
14486 echo "$as_me:14486: checking for terminal-capability database functions" >&5
14487 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14488 if test "${cf_cv_cgetent+set}" = set; then
14489   echo $ECHO_N "(cached) $ECHO_C" >&6
14490 else
14491
14492 cat >conftest.$ac_ext <<_ACEOF
14493 #line 14493 "configure"
14494 #include "confdefs.h"
14495
14496 #include <stdlib.h>
14497 int
14498 main ()
14499 {
14500
14501         char temp[128];
14502         char *buf = temp;
14503         char *db_array = temp;
14504         cgetent(&buf, /* int *, */ &db_array, "vt100");
14505         cgetcap(buf, "tc", '=');
14506         cgetmatch(buf, "tc");
14507
14508   ;
14509   return 0;
14510 }
14511 _ACEOF
14512 rm -f conftest.$ac_objext conftest$ac_exeext
14513 if { (eval echo "$as_me:14513: \"$ac_link\"") >&5
14514   (eval $ac_link) 2>&5
14515   ac_status=$?
14516   echo "$as_me:14516: \$? = $ac_status" >&5
14517   (exit $ac_status); } &&
14518          { ac_try='test -s conftest$ac_exeext'
14519   { (eval echo "$as_me:14519: \"$ac_try\"") >&5
14520   (eval $ac_try) 2>&5
14521   ac_status=$?
14522   echo "$as_me:14522: \$? = $ac_status" >&5
14523   (exit $ac_status); }; }; then
14524   cf_cv_cgetent=yes
14525 else
14526   echo "$as_me: failed program was:" >&5
14527 cat conftest.$ac_ext >&5
14528 cf_cv_cgetent=no
14529 fi
14530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14531
14532 fi
14533
14534 echo "$as_me:14534: result: $cf_cv_cgetent" >&5
14535 echo "${ECHO_T}$cf_cv_cgetent" >&6
14536 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14537 #define HAVE_BSD_CGETENT 1
14538 EOF
14539
14540 fi
14541
14542 echo "$as_me:14542: checking for isascii" >&5
14543 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14544 if test "${cf_cv_have_isascii+set}" = set; then
14545   echo $ECHO_N "(cached) $ECHO_C" >&6
14546 else
14547
14548         cat >conftest.$ac_ext <<_ACEOF
14549 #line 14549 "configure"
14550 #include "confdefs.h"
14551 #include <ctype.h>
14552 int
14553 main ()
14554 {
14555 int x = isascii(' ')
14556   ;
14557   return 0;
14558 }
14559 _ACEOF
14560 rm -f conftest.$ac_objext conftest$ac_exeext
14561 if { (eval echo "$as_me:14561: \"$ac_link\"") >&5
14562   (eval $ac_link) 2>&5
14563   ac_status=$?
14564   echo "$as_me:14564: \$? = $ac_status" >&5
14565   (exit $ac_status); } &&
14566          { ac_try='test -s conftest$ac_exeext'
14567   { (eval echo "$as_me:14567: \"$ac_try\"") >&5
14568   (eval $ac_try) 2>&5
14569   ac_status=$?
14570   echo "$as_me:14570: \$? = $ac_status" >&5
14571   (exit $ac_status); }; }; then
14572   cf_cv_have_isascii=yes
14573 else
14574   echo "$as_me: failed program was:" >&5
14575 cat conftest.$ac_ext >&5
14576 cf_cv_have_isascii=no
14577 fi
14578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14579
14580 fi
14581 echo "$as_me:14581: result: $cf_cv_have_isascii" >&5
14582 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14583 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14584 #define HAVE_ISASCII 1
14585 EOF
14586
14587 if test "$ac_cv_func_sigaction" = yes; then
14588 echo "$as_me:14588: checking whether sigaction needs _POSIX_SOURCE" >&5
14589 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14590 cat >conftest.$ac_ext <<_ACEOF
14591 #line 14591 "configure"
14592 #include "confdefs.h"
14593
14594 #include <sys/types.h>
14595 #include <signal.h>
14596 int
14597 main ()
14598 {
14599 struct sigaction act
14600   ;
14601   return 0;
14602 }
14603 _ACEOF
14604 rm -f conftest.$ac_objext
14605 if { (eval echo "$as_me:14605: \"$ac_compile\"") >&5
14606   (eval $ac_compile) 2>&5
14607   ac_status=$?
14608   echo "$as_me:14608: \$? = $ac_status" >&5
14609   (exit $ac_status); } &&
14610          { ac_try='test -s conftest.$ac_objext'
14611   { (eval echo "$as_me:14611: \"$ac_try\"") >&5
14612   (eval $ac_try) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); }; }; then
14616   sigact_bad=no
14617 else
14618   echo "$as_me: failed program was:" >&5
14619 cat conftest.$ac_ext >&5
14620
14621 cat >conftest.$ac_ext <<_ACEOF
14622 #line 14622 "configure"
14623 #include "confdefs.h"
14624
14625 #define _POSIX_SOURCE
14626 #include <sys/types.h>
14627 #include <signal.h>
14628 int
14629 main ()
14630 {
14631 struct sigaction act
14632   ;
14633   return 0;
14634 }
14635 _ACEOF
14636 rm -f conftest.$ac_objext
14637 if { (eval echo "$as_me:14637: \"$ac_compile\"") >&5
14638   (eval $ac_compile) 2>&5
14639   ac_status=$?
14640   echo "$as_me:14640: \$? = $ac_status" >&5
14641   (exit $ac_status); } &&
14642          { ac_try='test -s conftest.$ac_objext'
14643   { (eval echo "$as_me:14643: \"$ac_try\"") >&5
14644   (eval $ac_try) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit $ac_status); }; }; then
14648   sigact_bad=yes
14649          cat >>confdefs.h <<\EOF
14650 #define SVR4_ACTION 1
14651 EOF
14652
14653 else
14654   echo "$as_me: failed program was:" >&5
14655 cat conftest.$ac_ext >&5
14656 sigact_bad=unknown
14657 fi
14658 rm -f conftest.$ac_objext conftest.$ac_ext
14659 fi
14660 rm -f conftest.$ac_objext conftest.$ac_ext
14661 echo "$as_me:14661: result: $sigact_bad" >&5
14662 echo "${ECHO_T}$sigact_bad" >&6
14663 fi
14664
14665 echo "$as_me:14665: checking if nanosleep really works" >&5
14666 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14667 if test "${cf_cv_func_nanosleep+set}" = set; then
14668   echo $ECHO_N "(cached) $ECHO_C" >&6
14669 else
14670
14671 if test "$cross_compiling" = yes; then
14672   cf_cv_func_nanosleep=unknown
14673 else
14674   cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677
14678 #include <stdio.h>
14679 #include <errno.h>
14680 #include <time.h>
14681
14682 #ifdef HAVE_SYS_TIME_H
14683 #include <sys/time.h>
14684 #endif
14685
14686 int main() {
14687         struct timespec ts1, ts2;
14688         int code;
14689         ts1.tv_sec  = 0;
14690         ts1.tv_nsec = 750000000;
14691         ts2.tv_sec  = 0;
14692         ts2.tv_nsec = 0;
14693         errno = 0;
14694         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14695         ${cf_cv_main_return:-return}(code != 0);
14696 }
14697
14698 _ACEOF
14699 rm -f conftest$ac_exeext
14700 if { (eval echo "$as_me:14700: \"$ac_link\"") >&5
14701   (eval $ac_link) 2>&5
14702   ac_status=$?
14703   echo "$as_me:14703: \$? = $ac_status" >&5
14704   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14705   { (eval echo "$as_me:14705: \"$ac_try\"") >&5
14706   (eval $ac_try) 2>&5
14707   ac_status=$?
14708   echo "$as_me:14708: \$? = $ac_status" >&5
14709   (exit $ac_status); }; }; then
14710   cf_cv_func_nanosleep=yes
14711 else
14712   echo "$as_me: program exited with status $ac_status" >&5
14713 echo "$as_me: failed program was:" >&5
14714 cat conftest.$ac_ext >&5
14715 cf_cv_func_nanosleep=no
14716 fi
14717 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14718 fi
14719 fi
14720 echo "$as_me:14720: result: $cf_cv_func_nanosleep" >&5
14721 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14722
14723 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14724 #define HAVE_NANOSLEEP 1
14725 EOF
14726
14727 for ac_header in \
14728 termio.h \
14729 termios.h \
14730 unistd.h \
14731
14732 do
14733 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14734 echo "$as_me:14734: checking for $ac_header" >&5
14735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14737   echo $ECHO_N "(cached) $ECHO_C" >&6
14738 else
14739   cat >conftest.$ac_ext <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742 #include <$ac_header>
14743 _ACEOF
14744 if { (eval echo "$as_me:14744: \"$ac_cpp conftest.$ac_ext\"") >&5
14745   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14746   ac_status=$?
14747   egrep -v '^ *\+' conftest.er1 >conftest.err
14748   rm -f conftest.er1
14749   cat conftest.err >&5
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit $ac_status); } >/dev/null; then
14752   if test -s conftest.err; then
14753     ac_cpp_err=$ac_c_preproc_warn_flag
14754   else
14755     ac_cpp_err=
14756   fi
14757 else
14758   ac_cpp_err=yes
14759 fi
14760 if test -z "$ac_cpp_err"; then
14761   eval "$as_ac_Header=yes"
14762 else
14763   echo "$as_me: failed program was:" >&5
14764   cat conftest.$ac_ext >&5
14765   eval "$as_ac_Header=no"
14766 fi
14767 rm -f conftest.err conftest.$ac_ext
14768 fi
14769 echo "$as_me:14769: result: `eval echo '${'$as_ac_Header'}'`" >&5
14770 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14771 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14772   cat >>confdefs.h <<EOF
14773 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14774 EOF
14775
14776 fi
14777 done
14778
14779 if test "$ISC" = yes ; then
14780
14781 for ac_header in sys/termio.h
14782 do
14783 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14784 echo "$as_me:14784: checking for $ac_header" >&5
14785 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14786 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14787   echo $ECHO_N "(cached) $ECHO_C" >&6
14788 else
14789   cat >conftest.$ac_ext <<_ACEOF
14790 #line 14790 "configure"
14791 #include "confdefs.h"
14792 #include <$ac_header>
14793 _ACEOF
14794 if { (eval echo "$as_me:14794: \"$ac_cpp conftest.$ac_ext\"") >&5
14795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14796   ac_status=$?
14797   egrep -v '^ *\+' conftest.er1 >conftest.err
14798   rm -f conftest.er1
14799   cat conftest.err >&5
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); } >/dev/null; then
14802   if test -s conftest.err; then
14803     ac_cpp_err=$ac_c_preproc_warn_flag
14804   else
14805     ac_cpp_err=
14806   fi
14807 else
14808   ac_cpp_err=yes
14809 fi
14810 if test -z "$ac_cpp_err"; then
14811   eval "$as_ac_Header=yes"
14812 else
14813   echo "$as_me: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815   eval "$as_ac_Header=no"
14816 fi
14817 rm -f conftest.err conftest.$ac_ext
14818 fi
14819 echo "$as_me:14819: result: `eval echo '${'$as_ac_Header'}'`" >&5
14820 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14821 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14822   cat >>confdefs.h <<EOF
14823 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14824 EOF
14825
14826 fi
14827 done
14828
14829 fi
14830 if test "$ac_cv_header_termios_h" = yes ; then
14831         case "$CFLAGS $CPPFLAGS" in
14832         *-D_POSIX_SOURCE*)
14833                 termios_bad=dunno ;;
14834         *)      termios_bad=maybe ;;
14835         esac
14836         if test "$termios_bad" = maybe ; then
14837         echo "$as_me:14837: checking whether termios.h needs _POSIX_SOURCE" >&5
14838 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14839         cat >conftest.$ac_ext <<_ACEOF
14840 #line 14840 "configure"
14841 #include "confdefs.h"
14842 #include <termios.h>
14843 int
14844 main ()
14845 {
14846 struct termios foo; int x = foo.c_iflag
14847   ;
14848   return 0;
14849 }
14850 _ACEOF
14851 rm -f conftest.$ac_objext
14852 if { (eval echo "$as_me:14852: \"$ac_compile\"") >&5
14853   (eval $ac_compile) 2>&5
14854   ac_status=$?
14855   echo "$as_me:14855: \$? = $ac_status" >&5
14856   (exit $ac_status); } &&
14857          { ac_try='test -s conftest.$ac_objext'
14858   { (eval echo "$as_me:14858: \"$ac_try\"") >&5
14859   (eval $ac_try) 2>&5
14860   ac_status=$?
14861   echo "$as_me:14861: \$? = $ac_status" >&5
14862   (exit $ac_status); }; }; then
14863   termios_bad=no
14864 else
14865   echo "$as_me: failed program was:" >&5
14866 cat conftest.$ac_ext >&5
14867
14868                 cat >conftest.$ac_ext <<_ACEOF
14869 #line 14869 "configure"
14870 #include "confdefs.h"
14871
14872 #define _POSIX_SOURCE
14873 #include <termios.h>
14874 int
14875 main ()
14876 {
14877 struct termios foo; int x = foo.c_iflag
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext
14883 if { (eval echo "$as_me:14883: \"$ac_compile\"") >&5
14884   (eval $ac_compile) 2>&5
14885   ac_status=$?
14886   echo "$as_me:14886: \$? = $ac_status" >&5
14887   (exit $ac_status); } &&
14888          { ac_try='test -s conftest.$ac_objext'
14889   { (eval echo "$as_me:14889: \"$ac_try\"") >&5
14890   (eval $ac_try) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); }; }; then
14894   termios_bad=unknown
14895 else
14896   echo "$as_me: failed program was:" >&5
14897 cat conftest.$ac_ext >&5
14898 termios_bad=yes cat >>confdefs.h <<\EOF
14899 #define SVR4_TERMIO 1
14900 EOF
14901
14902 fi
14903 rm -f conftest.$ac_objext conftest.$ac_ext
14904
14905 fi
14906 rm -f conftest.$ac_objext conftest.$ac_ext
14907         echo "$as_me:14907: result: $termios_bad" >&5
14908 echo "${ECHO_T}$termios_bad" >&6
14909         fi
14910 fi
14911
14912 echo "$as_me:14912: checking for tcgetattr" >&5
14913 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14914 if test "${cf_cv_have_tcgetattr+set}" = set; then
14915   echo $ECHO_N "(cached) $ECHO_C" >&6
14916 else
14917
14918 cat >conftest.$ac_ext <<_ACEOF
14919 #line 14919 "configure"
14920 #include "confdefs.h"
14921
14922 #include <sys/types.h>
14923 #ifdef HAVE_UNISTD_H
14924 #include <unistd.h>
14925 #endif
14926 #ifdef HAVE_TERMIOS_H
14927 #include <termios.h>
14928 #define TTY struct termios
14929 #else
14930 #ifdef HAVE_TERMIO_H
14931 #include <termio.h>
14932 #define TTY struct termio
14933 #endif
14934 #endif
14935
14936 int
14937 main ()
14938 {
14939
14940 TTY foo;
14941 tcgetattr(1, &foo);
14942   ;
14943   return 0;
14944 }
14945 _ACEOF
14946 rm -f conftest.$ac_objext conftest$ac_exeext
14947 if { (eval echo "$as_me:14947: \"$ac_link\"") >&5
14948   (eval $ac_link) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); } &&
14952          { ac_try='test -s conftest$ac_exeext'
14953   { (eval echo "$as_me:14953: \"$ac_try\"") >&5
14954   (eval $ac_try) 2>&5
14955   ac_status=$?
14956   echo "$as_me:14956: \$? = $ac_status" >&5
14957   (exit $ac_status); }; }; then
14958   cf_cv_have_tcgetattr=yes
14959 else
14960   echo "$as_me: failed program was:" >&5
14961 cat conftest.$ac_ext >&5
14962 cf_cv_have_tcgetattr=no
14963 fi
14964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14965 fi
14966 echo "$as_me:14966: result: $cf_cv_have_tcgetattr" >&5
14967 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14968 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14969 #define HAVE_TCGETATTR 1
14970 EOF
14971
14972 echo "$as_me:14972: checking for vsscanf function or workaround" >&5
14973 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14974 if test "${cf_cv_func_vsscanf+set}" = set; then
14975   echo $ECHO_N "(cached) $ECHO_C" >&6
14976 else
14977
14978 cat >conftest.$ac_ext <<_ACEOF
14979 #line 14979 "configure"
14980 #include "confdefs.h"
14981
14982 #include <stdarg.h>
14983 #include <stdio.h>
14984 int
14985 main ()
14986 {
14987
14988         va_list ap;
14989         vsscanf("from", "%d", ap)
14990   ;
14991   return 0;
14992 }
14993 _ACEOF
14994 rm -f conftest.$ac_objext conftest$ac_exeext
14995 if { (eval echo "$as_me:14995: \"$ac_link\"") >&5
14996   (eval $ac_link) 2>&5
14997   ac_status=$?
14998   echo "$as_me:14998: \$? = $ac_status" >&5
14999   (exit $ac_status); } &&
15000          { ac_try='test -s conftest$ac_exeext'
15001   { (eval echo "$as_me:15001: \"$ac_try\"") >&5
15002   (eval $ac_try) 2>&5
15003   ac_status=$?
15004   echo "$as_me:15004: \$? = $ac_status" >&5
15005   (exit $ac_status); }; }; then
15006   cf_cv_func_vsscanf=vsscanf
15007 else
15008   echo "$as_me: failed program was:" >&5
15009 cat conftest.$ac_ext >&5
15010
15011 cat >conftest.$ac_ext <<_ACEOF
15012 #line 15012 "configure"
15013 #include "confdefs.h"
15014
15015 #include <stdarg.h>
15016 #include <stdio.h>
15017 int
15018 main ()
15019 {
15020
15021     FILE strbuf;
15022     char *str = "from";
15023
15024     strbuf._flag = _IOREAD;
15025     strbuf._ptr = strbuf._base = (unsigned char *) str;
15026     strbuf._cnt = strlen(str);
15027     strbuf._file = _NFILE;
15028     return (vfscanf(&strbuf, "%d", ap))
15029   ;
15030   return 0;
15031 }
15032 _ACEOF
15033 rm -f conftest.$ac_objext conftest$ac_exeext
15034 if { (eval echo "$as_me:15034: \"$ac_link\"") >&5
15035   (eval $ac_link) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); } &&
15039          { ac_try='test -s conftest$ac_exeext'
15040   { (eval echo "$as_me:15040: \"$ac_try\"") >&5
15041   (eval $ac_try) 2>&5
15042   ac_status=$?
15043   echo "$as_me:15043: \$? = $ac_status" >&5
15044   (exit $ac_status); }; }; then
15045   cf_cv_func_vsscanf=vfscanf
15046 else
15047   echo "$as_me: failed program was:" >&5
15048 cat conftest.$ac_ext >&5
15049
15050 cat >conftest.$ac_ext <<_ACEOF
15051 #line 15051 "configure"
15052 #include "confdefs.h"
15053
15054 #include <stdarg.h>
15055 #include <stdio.h>
15056 int
15057 main ()
15058 {
15059
15060     FILE strbuf;
15061     char *str = "from";
15062
15063     strbuf._flag = _IOREAD;
15064     strbuf._ptr = strbuf._base = (unsigned char *) str;
15065     strbuf._cnt = strlen(str);
15066     strbuf._file = _NFILE;
15067     return (_doscan(&strbuf, "%d", ap))
15068   ;
15069   return 0;
15070 }
15071 _ACEOF
15072 rm -f conftest.$ac_objext conftest$ac_exeext
15073 if { (eval echo "$as_me:15073: \"$ac_link\"") >&5
15074   (eval $ac_link) 2>&5
15075   ac_status=$?
15076   echo "$as_me:15076: \$? = $ac_status" >&5
15077   (exit $ac_status); } &&
15078          { ac_try='test -s conftest$ac_exeext'
15079   { (eval echo "$as_me:15079: \"$ac_try\"") >&5
15080   (eval $ac_try) 2>&5
15081   ac_status=$?
15082   echo "$as_me:15082: \$? = $ac_status" >&5
15083   (exit $ac_status); }; }; then
15084   cf_cv_func_vsscanf=_doscan
15085 else
15086   echo "$as_me: failed program was:" >&5
15087 cat conftest.$ac_ext >&5
15088
15089 cf_cv_func_vsscanf=no
15090 fi
15091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15092 fi
15093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15094 fi
15095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15096 fi
15097 echo "$as_me:15097: result: $cf_cv_func_vsscanf" >&5
15098 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15099
15100 case $cf_cv_func_vsscanf in #(vi
15101 vsscanf) cat >>confdefs.h <<\EOF
15102 #define HAVE_VSSCANF 1
15103 EOF
15104 ;; #(vi
15105 vfscanf) cat >>confdefs.h <<\EOF
15106 #define HAVE_VFSCANF 1
15107 EOF
15108 ;; #(vi
15109 _doscan) cat >>confdefs.h <<\EOF
15110 #define HAVE__DOSCAN 1
15111 EOF
15112 ;;
15113 esac
15114
15115 echo "$as_me:15115: checking for working mkstemp" >&5
15116 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15117 if test "${cf_cv_func_mkstemp+set}" = set; then
15118   echo $ECHO_N "(cached) $ECHO_C" >&6
15119 else
15120
15121 rm -rf conftest*
15122 if test "$cross_compiling" = yes; then
15123   echo "$as_me:15123: checking for mkstemp" >&5
15124 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15125 if test "${ac_cv_func_mkstemp+set}" = set; then
15126   echo $ECHO_N "(cached) $ECHO_C" >&6
15127 else
15128   cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131 /* System header to define __stub macros and hopefully few prototypes,
15132     which can conflict with char mkstemp (); below.  */
15133 #include <assert.h>
15134 /* Override any gcc2 internal prototype to avoid an error.  */
15135 #ifdef __cplusplus
15136 extern "C"
15137 #endif
15138 /* We use char because int might match the return type of a gcc2
15139    builtin and then its argument prototype would still apply.  */
15140 char mkstemp ();
15141 char (*f) ();
15142
15143 int
15144 main ()
15145 {
15146 /* The GNU C library defines this for functions which it implements
15147     to always fail with ENOSYS.  Some functions are actually named
15148     something starting with __ and the normal name is an alias.  */
15149 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15150 choke me
15151 #else
15152 f = mkstemp;
15153 #endif
15154
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext conftest$ac_exeext
15160 if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
15161   (eval $ac_link) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); } &&
15165          { ac_try='test -s conftest$ac_exeext'
15166   { (eval echo "$as_me:15166: \"$ac_try\"") >&5
15167   (eval $ac_try) 2>&5
15168   ac_status=$?
15169   echo "$as_me:15169: \$? = $ac_status" >&5
15170   (exit $ac_status); }; }; then
15171   ac_cv_func_mkstemp=yes
15172 else
15173   echo "$as_me: failed program was:" >&5
15174 cat conftest.$ac_ext >&5
15175 ac_cv_func_mkstemp=no
15176 fi
15177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15178 fi
15179 echo "$as_me:15179: result: $ac_cv_func_mkstemp" >&5
15180 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15181
15182 else
15183   cat >conftest.$ac_ext <<_ACEOF
15184 #line 15184 "configure"
15185 #include "confdefs.h"
15186
15187 #include <sys/types.h>
15188 #include <stdlib.h>
15189 #include <stdio.h>
15190 #include <string.h>
15191 #include <sys/stat.h>
15192 int main()
15193 {
15194         char *tmpl = "conftestXXXXXX";
15195         char name[2][80];
15196         int n;
15197         int result = 0;
15198         int fd;
15199         struct stat sb;
15200
15201         umask(077);
15202         for (n = 0; n < 2; ++n) {
15203                 strcpy(name[n], tmpl);
15204                 if ((fd = mkstemp(name[n])) >= 0) {
15205                         if (!strcmp(name[n], tmpl)
15206                          || stat(name[n], &sb) != 0
15207                          || (sb.st_mode & S_IFMT) != S_IFREG
15208                          || (sb.st_mode & 077) != 0) {
15209                                 result = 1;
15210                         }
15211                         close(fd);
15212                 }
15213         }
15214         if (result == 0
15215          && !strcmp(name[0], name[1]))
15216                 result = 1;
15217         ${cf_cv_main_return:-return}(result);
15218 }
15219
15220 _ACEOF
15221 rm -f conftest$ac_exeext
15222 if { (eval echo "$as_me:15222: \"$ac_link\"") >&5
15223   (eval $ac_link) 2>&5
15224   ac_status=$?
15225   echo "$as_me:15225: \$? = $ac_status" >&5
15226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15227   { (eval echo "$as_me:15227: \"$ac_try\"") >&5
15228   (eval $ac_try) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); }; }; then
15232   cf_cv_func_mkstemp=yes
15233
15234 else
15235   echo "$as_me: program exited with status $ac_status" >&5
15236 echo "$as_me: failed program was:" >&5
15237 cat conftest.$ac_ext >&5
15238 cf_cv_func_mkstemp=no
15239
15240 fi
15241 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15242 fi
15243
15244 fi
15245 echo "$as_me:15245: result: $cf_cv_func_mkstemp" >&5
15246 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15247 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15248         cat >>confdefs.h <<\EOF
15249 #define HAVE_MKSTEMP 1
15250 EOF
15251
15252 fi
15253
15254 # setup for prototype of fallback for vsscanf()
15255
15256 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15257         HAVE_VSSCANF=1
15258 else
15259         HAVE_VSSCANF=0
15260 fi
15261
15262 if test "$cross_compiling" = yes ; then
15263         { echo "$as_me:15263: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15264 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15265 else
15266         echo "$as_me:15266: checking whether setvbuf arguments are reversed" >&5
15267 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15268 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15269   echo $ECHO_N "(cached) $ECHO_C" >&6
15270 else
15271   if test "$cross_compiling" = yes; then
15272   { { echo "$as_me:15272: error: cannot run test program while cross compiling" >&5
15273 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15274    { (exit 1); exit 1; }; }
15275 else
15276   cat >conftest.$ac_ext <<_ACEOF
15277 #line 15277 "configure"
15278 #include "confdefs.h"
15279 #include <stdio.h>
15280 /* If setvbuf has the reversed format, exit 0. */
15281 int
15282 main ()
15283 {
15284   /* This call has the arguments reversed.
15285      A reversed system may check and see that the address of main
15286      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15287   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15288     $ac_main_return(1);
15289   putc('\r', stdout);
15290   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15291 }
15292 _ACEOF
15293 rm -f conftest$ac_exeext
15294 if { (eval echo "$as_me:15294: \"$ac_link\"") >&5
15295   (eval $ac_link) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15299   { (eval echo "$as_me:15299: \"$ac_try\"") >&5
15300   (eval $ac_try) 2>&5
15301   ac_status=$?
15302   echo "$as_me:15302: \$? = $ac_status" >&5
15303   (exit $ac_status); }; }; then
15304   ac_cv_func_setvbuf_reversed=yes
15305 else
15306   echo "$as_me: program exited with status $ac_status" >&5
15307 echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15309 ac_cv_func_setvbuf_reversed=no
15310 fi
15311 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15312 fi
15313 rm -f core core.* *.core
15314 fi
15315 echo "$as_me:15315: result: $ac_cv_func_setvbuf_reversed" >&5
15316 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15317 if test $ac_cv_func_setvbuf_reversed = yes; then
15318
15319 cat >>confdefs.h <<\EOF
15320 #define SETVBUF_REVERSED 1
15321 EOF
15322
15323 fi
15324
15325 fi
15326 echo "$as_me:15326: checking return type of signal handlers" >&5
15327 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15328 if test "${ac_cv_type_signal+set}" = set; then
15329   echo $ECHO_N "(cached) $ECHO_C" >&6
15330 else
15331   cat >conftest.$ac_ext <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15334 #include <sys/types.h>
15335 #include <signal.h>
15336 #ifdef signal
15337 # undef signal
15338 #endif
15339 #ifdef __cplusplus
15340 extern "C" void (*signal (int, void (*)(int)))(int);
15341 #else
15342 void (*signal ()) ();
15343 #endif
15344
15345 int
15346 main ()
15347 {
15348 int i;
15349   ;
15350   return 0;
15351 }
15352 _ACEOF
15353 rm -f conftest.$ac_objext
15354 if { (eval echo "$as_me:15354: \"$ac_compile\"") >&5
15355   (eval $ac_compile) 2>&5
15356   ac_status=$?
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit $ac_status); } &&
15359          { ac_try='test -s conftest.$ac_objext'
15360   { (eval echo "$as_me:15360: \"$ac_try\"") >&5
15361   (eval $ac_try) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); }; }; then
15365   ac_cv_type_signal=void
15366 else
15367   echo "$as_me: failed program was:" >&5
15368 cat conftest.$ac_ext >&5
15369 ac_cv_type_signal=int
15370 fi
15371 rm -f conftest.$ac_objext conftest.$ac_ext
15372 fi
15373 echo "$as_me:15373: result: $ac_cv_type_signal" >&5
15374 echo "${ECHO_T}$ac_cv_type_signal" >&6
15375
15376 cat >>confdefs.h <<EOF
15377 #define RETSIGTYPE $ac_cv_type_signal
15378 EOF
15379
15380 echo "$as_me:15380: checking for type sigaction_t" >&5
15381 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15382 if test "${cf_cv_type_sigaction+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385
15386         cat >conftest.$ac_ext <<_ACEOF
15387 #line 15387 "configure"
15388 #include "confdefs.h"
15389
15390 #include <signal.h>
15391 int
15392 main ()
15393 {
15394 sigaction_t x
15395   ;
15396   return 0;
15397 }
15398 _ACEOF
15399 rm -f conftest.$ac_objext
15400 if { (eval echo "$as_me:15400: \"$ac_compile\"") >&5
15401   (eval $ac_compile) 2>&5
15402   ac_status=$?
15403   echo "$as_me:15403: \$? = $ac_status" >&5
15404   (exit $ac_status); } &&
15405          { ac_try='test -s conftest.$ac_objext'
15406   { (eval echo "$as_me:15406: \"$ac_try\"") >&5
15407   (eval $ac_try) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); }; }; then
15411   cf_cv_type_sigaction=yes
15412 else
15413   echo "$as_me: failed program was:" >&5
15414 cat conftest.$ac_ext >&5
15415 cf_cv_type_sigaction=no
15416 fi
15417 rm -f conftest.$ac_objext conftest.$ac_ext
15418 fi
15419
15420 echo "$as_me:15420: result: $cf_cv_type_sigaction" >&5
15421 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15422 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15423 #define HAVE_TYPE_SIGACTION 1
15424 EOF
15425
15426 echo "$as_me:15426: checking declaration of size-change" >&5
15427 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15428 if test "${cf_cv_sizechange+set}" = set; then
15429   echo $ECHO_N "(cached) $ECHO_C" >&6
15430 else
15431
15432     cf_cv_sizechange=unknown
15433     cf_save_CPPFLAGS="$CPPFLAGS"
15434
15435 for cf_opts in "" "NEED_PTEM_H"
15436 do
15437
15438     CPPFLAGS="$cf_save_CPPFLAGS"
15439     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15440     cat >conftest.$ac_ext <<_ACEOF
15441 #line 15441 "configure"
15442 #include "confdefs.h"
15443 #include <sys/types.h>
15444 #ifdef HAVE_TERMIOS_H
15445 #include <termios.h>
15446 #else
15447 #ifdef HAVE_TERMIO_H
15448 #include <termio.h>
15449 #endif
15450 #endif
15451 #ifdef NEED_PTEM_H
15452 /* This is a workaround for SCO:  they neglected to define struct winsize in
15453  * termios.h -- it's only in termio.h and ptem.h
15454  */
15455 #include        <sys/stream.h>
15456 #include        <sys/ptem.h>
15457 #endif
15458 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15459 #include <sys/ioctl.h>
15460 #endif
15461
15462 int
15463 main ()
15464 {
15465
15466 #ifdef TIOCGSIZE
15467         struct ttysize win;     /* FIXME: what system is this? */
15468         int y = win.ts_lines;
15469         int x = win.ts_cols;
15470 #else
15471 #ifdef TIOCGWINSZ
15472         struct winsize win;
15473         int y = win.ws_row;
15474         int x = win.ws_col;
15475 #else
15476         no TIOCGSIZE or TIOCGWINSZ
15477 #endif /* TIOCGWINSZ */
15478 #endif /* TIOCGSIZE */
15479
15480   ;
15481   return 0;
15482 }
15483 _ACEOF
15484 rm -f conftest.$ac_objext
15485 if { (eval echo "$as_me:15485: \"$ac_compile\"") >&5
15486   (eval $ac_compile) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } &&
15490          { ac_try='test -s conftest.$ac_objext'
15491   { (eval echo "$as_me:15491: \"$ac_try\"") >&5
15492   (eval $ac_try) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); }; }; then
15496   cf_cv_sizechange=yes
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 cat conftest.$ac_ext >&5
15500 cf_cv_sizechange=no
15501 fi
15502 rm -f conftest.$ac_objext conftest.$ac_ext
15503
15504         CPPFLAGS="$cf_save_CPPFLAGS"
15505         if test "$cf_cv_sizechange" = yes ; then
15506                 echo "size-change succeeded ($cf_opts)" >&5
15507                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15508                 break
15509         fi
15510 done
15511
15512 fi
15513 echo "$as_me:15513: result: $cf_cv_sizechange" >&5
15514 echo "${ECHO_T}$cf_cv_sizechange" >&6
15515 if test "$cf_cv_sizechange" != no ; then
15516         cat >>confdefs.h <<\EOF
15517 #define HAVE_SIZECHANGE 1
15518 EOF
15519
15520         case $cf_cv_sizechange in #(vi
15521         NEED*)
15522                 cat >>confdefs.h <<EOF
15523 #define $cf_cv_sizechange  1
15524 EOF
15525
15526                 ;;
15527         esac
15528 fi
15529
15530 echo "$as_me:15530: checking for memmove" >&5
15531 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15532 if test "${ac_cv_func_memmove+set}" = set; then
15533   echo $ECHO_N "(cached) $ECHO_C" >&6
15534 else
15535   cat >conftest.$ac_ext <<_ACEOF
15536 #line 15536 "configure"
15537 #include "confdefs.h"
15538 /* System header to define __stub macros and hopefully few prototypes,
15539     which can conflict with char memmove (); below.  */
15540 #include <assert.h>
15541 /* Override any gcc2 internal prototype to avoid an error.  */
15542 #ifdef __cplusplus
15543 extern "C"
15544 #endif
15545 /* We use char because int might match the return type of a gcc2
15546    builtin and then its argument prototype would still apply.  */
15547 char memmove ();
15548 char (*f) ();
15549
15550 int
15551 main ()
15552 {
15553 /* The GNU C library defines this for functions which it implements
15554     to always fail with ENOSYS.  Some functions are actually named
15555     something starting with __ and the normal name is an alias.  */
15556 #if defined (__stub_memmove) || defined (__stub___memmove)
15557 choke me
15558 #else
15559 f = memmove;
15560 #endif
15561
15562   ;
15563   return 0;
15564 }
15565 _ACEOF
15566 rm -f conftest.$ac_objext conftest$ac_exeext
15567 if { (eval echo "$as_me:15567: \"$ac_link\"") >&5
15568   (eval $ac_link) 2>&5
15569   ac_status=$?
15570   echo "$as_me:15570: \$? = $ac_status" >&5
15571   (exit $ac_status); } &&
15572          { ac_try='test -s conftest$ac_exeext'
15573   { (eval echo "$as_me:15573: \"$ac_try\"") >&5
15574   (eval $ac_try) 2>&5
15575   ac_status=$?
15576   echo "$as_me:15576: \$? = $ac_status" >&5
15577   (exit $ac_status); }; }; then
15578   ac_cv_func_memmove=yes
15579 else
15580   echo "$as_me: failed program was:" >&5
15581 cat conftest.$ac_ext >&5
15582 ac_cv_func_memmove=no
15583 fi
15584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15585 fi
15586 echo "$as_me:15586: result: $ac_cv_func_memmove" >&5
15587 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15588 if test $ac_cv_func_memmove = yes; then
15589   :
15590 else
15591
15592 echo "$as_me:15592: checking for bcopy" >&5
15593 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15594 if test "${ac_cv_func_bcopy+set}" = set; then
15595   echo $ECHO_N "(cached) $ECHO_C" >&6
15596 else
15597   cat >conftest.$ac_ext <<_ACEOF
15598 #line 15598 "configure"
15599 #include "confdefs.h"
15600 /* System header to define __stub macros and hopefully few prototypes,
15601     which can conflict with char bcopy (); below.  */
15602 #include <assert.h>
15603 /* Override any gcc2 internal prototype to avoid an error.  */
15604 #ifdef __cplusplus
15605 extern "C"
15606 #endif
15607 /* We use char because int might match the return type of a gcc2
15608    builtin and then its argument prototype would still apply.  */
15609 char bcopy ();
15610 char (*f) ();
15611
15612 int
15613 main ()
15614 {
15615 /* The GNU C library defines this for functions which it implements
15616     to always fail with ENOSYS.  Some functions are actually named
15617     something starting with __ and the normal name is an alias.  */
15618 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15619 choke me
15620 #else
15621 f = bcopy;
15622 #endif
15623
15624   ;
15625   return 0;
15626 }
15627 _ACEOF
15628 rm -f conftest.$ac_objext conftest$ac_exeext
15629 if { (eval echo "$as_me:15629: \"$ac_link\"") >&5
15630   (eval $ac_link) 2>&5
15631   ac_status=$?
15632   echo "$as_me:15632: \$? = $ac_status" >&5
15633   (exit $ac_status); } &&
15634          { ac_try='test -s conftest$ac_exeext'
15635   { (eval echo "$as_me:15635: \"$ac_try\"") >&5
15636   (eval $ac_try) 2>&5
15637   ac_status=$?
15638   echo "$as_me:15638: \$? = $ac_status" >&5
15639   (exit $ac_status); }; }; then
15640   ac_cv_func_bcopy=yes
15641 else
15642   echo "$as_me: failed program was:" >&5
15643 cat conftest.$ac_ext >&5
15644 ac_cv_func_bcopy=no
15645 fi
15646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15647 fi
15648 echo "$as_me:15648: result: $ac_cv_func_bcopy" >&5
15649 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15650 if test $ac_cv_func_bcopy = yes; then
15651
15652         echo "$as_me:15652: checking if bcopy does overlapping moves" >&5
15653 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15654 if test "${cf_cv_good_bcopy+set}" = set; then
15655   echo $ECHO_N "(cached) $ECHO_C" >&6
15656 else
15657
15658                 if test "$cross_compiling" = yes; then
15659   cf_cv_good_bcopy=unknown
15660 else
15661   cat >conftest.$ac_ext <<_ACEOF
15662 #line 15662 "configure"
15663 #include "confdefs.h"
15664
15665 int main() {
15666         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15667         char temp[40];
15668         bcopy(data, temp, sizeof(data));
15669         bcopy(temp+10, temp, 15);
15670         bcopy(temp+5, temp+15, 10);
15671         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15672 }
15673
15674 _ACEOF
15675 rm -f conftest$ac_exeext
15676 if { (eval echo "$as_me:15676: \"$ac_link\"") >&5
15677   (eval $ac_link) 2>&5
15678   ac_status=$?
15679   echo "$as_me:15679: \$? = $ac_status" >&5
15680   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15681   { (eval echo "$as_me:15681: \"$ac_try\"") >&5
15682   (eval $ac_try) 2>&5
15683   ac_status=$?
15684   echo "$as_me:15684: \$? = $ac_status" >&5
15685   (exit $ac_status); }; }; then
15686   cf_cv_good_bcopy=yes
15687 else
15688   echo "$as_me: program exited with status $ac_status" >&5
15689 echo "$as_me: failed program was:" >&5
15690 cat conftest.$ac_ext >&5
15691 cf_cv_good_bcopy=no
15692 fi
15693 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15694 fi
15695
15696 fi
15697 echo "$as_me:15697: result: $cf_cv_good_bcopy" >&5
15698 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15699
15700 else
15701   cf_cv_good_bcopy=no
15702 fi
15703
15704         if test "$cf_cv_good_bcopy" = yes ; then
15705                 cat >>confdefs.h <<\EOF
15706 #define USE_OK_BCOPY 1
15707 EOF
15708
15709         else
15710                 cat >>confdefs.h <<\EOF
15711 #define USE_MY_MEMMOVE 1
15712 EOF
15713
15714         fi
15715
15716 fi
15717
15718 echo "$as_me:15718: checking if poll really works" >&5
15719 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15720 if test "${cf_cv_working_poll+set}" = set; then
15721   echo $ECHO_N "(cached) $ECHO_C" >&6
15722 else
15723
15724 if test "$cross_compiling" = yes; then
15725   cf_cv_working_poll=unknown
15726 else
15727   cat >conftest.$ac_ext <<_ACEOF
15728 #line 15728 "configure"
15729 #include "confdefs.h"
15730
15731 #include <stdio.h>
15732 #ifdef HAVE_POLL_H
15733 #include <poll.h>
15734 #else
15735 #include <sys/poll.h>
15736 #endif
15737 int main() {
15738         struct pollfd myfds;
15739         int ret;
15740
15741         myfds.fd = 0;
15742         myfds.events = POLLIN;
15743
15744         ret = poll(&myfds, 1, 100);
15745         ${cf_cv_main_return:-return}(ret != 0);
15746 }
15747 _ACEOF
15748 rm -f conftest$ac_exeext
15749 if { (eval echo "$as_me:15749: \"$ac_link\"") >&5
15750   (eval $ac_link) 2>&5
15751   ac_status=$?
15752   echo "$as_me:15752: \$? = $ac_status" >&5
15753   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15754   { (eval echo "$as_me:15754: \"$ac_try\"") >&5
15755   (eval $ac_try) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); }; }; then
15759   cf_cv_working_poll=yes
15760 else
15761   echo "$as_me: program exited with status $ac_status" >&5
15762 echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764 cf_cv_working_poll=no
15765 fi
15766 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15767 fi
15768 fi
15769 echo "$as_me:15769: result: $cf_cv_working_poll" >&5
15770 echo "${ECHO_T}$cf_cv_working_poll" >&6
15771 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15772 #define HAVE_WORKING_POLL 1
15773 EOF
15774
15775 echo "$as_me:15775: checking for va_copy" >&5
15776 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15777 if test "${cf_cv_have_va_copy+set}" = set; then
15778   echo $ECHO_N "(cached) $ECHO_C" >&6
15779 else
15780
15781 cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15784
15785 #include <stdarg.h>
15786
15787 int
15788 main ()
15789 {
15790
15791         static va_list dst;
15792         static va_list src;
15793         va_copy(dst, src)
15794   ;
15795   return 0;
15796 }
15797 _ACEOF
15798 rm -f conftest.$ac_objext conftest$ac_exeext
15799 if { (eval echo "$as_me:15799: \"$ac_link\"") >&5
15800   (eval $ac_link) 2>&5
15801   ac_status=$?
15802   echo "$as_me:15802: \$? = $ac_status" >&5
15803   (exit $ac_status); } &&
15804          { ac_try='test -s conftest$ac_exeext'
15805   { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806   (eval $ac_try) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; }; then
15810   cf_cv_have_va_copy=yes
15811 else
15812   echo "$as_me: failed program was:" >&5
15813 cat conftest.$ac_ext >&5
15814 cf_cv_have_va_copy=no
15815 fi
15816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15817 fi
15818 echo "$as_me:15818: result: $cf_cv_have_va_copy" >&5
15819 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15820
15821 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15822 #define HAVE_VA_COPY 1
15823 EOF
15824
15825 echo "$as_me:15825: checking for __va_copy" >&5
15826 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15827 if test "${cf_cv_have___va_copy+set}" = set; then
15828   echo $ECHO_N "(cached) $ECHO_C" >&6
15829 else
15830
15831 cat >conftest.$ac_ext <<_ACEOF
15832 #line 15832 "configure"
15833 #include "confdefs.h"
15834
15835 #include <stdarg.h>
15836
15837 int
15838 main ()
15839 {
15840
15841         static va_list dst;
15842         static va_list src;
15843         __va_copy(dst, src)
15844   ;
15845   return 0;
15846 }
15847 _ACEOF
15848 rm -f conftest.$ac_objext conftest$ac_exeext
15849 if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
15850   (eval $ac_link) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit $ac_status); } &&
15854          { ac_try='test -s conftest$ac_exeext'
15855   { (eval echo "$as_me:15855: \"$ac_try\"") >&5
15856   (eval $ac_try) 2>&5
15857   ac_status=$?
15858   echo "$as_me:15858: \$? = $ac_status" >&5
15859   (exit $ac_status); }; }; then
15860   cf_cv_have___va_copy=yes
15861 else
15862   echo "$as_me: failed program was:" >&5
15863 cat conftest.$ac_ext >&5
15864 cf_cv_have___va_copy=no
15865 fi
15866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15867 fi
15868 echo "$as_me:15868: result: $cf_cv_have___va_copy" >&5
15869 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15870
15871 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15872 #define HAVE___VA_COPY 1
15873 EOF
15874
15875 echo "$as_me:15875: checking for pid_t" >&5
15876 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15877 if test "${ac_cv_type_pid_t+set}" = set; then
15878   echo $ECHO_N "(cached) $ECHO_C" >&6
15879 else
15880   cat >conftest.$ac_ext <<_ACEOF
15881 #line 15881 "configure"
15882 #include "confdefs.h"
15883 $ac_includes_default
15884 int
15885 main ()
15886 {
15887 if ((pid_t *) 0)
15888   return 0;
15889 if (sizeof (pid_t))
15890   return 0;
15891   ;
15892   return 0;
15893 }
15894 _ACEOF
15895 rm -f conftest.$ac_objext
15896 if { (eval echo "$as_me:15896: \"$ac_compile\"") >&5
15897   (eval $ac_compile) 2>&5
15898   ac_status=$?
15899   echo "$as_me:15899: \$? = $ac_status" >&5
15900   (exit $ac_status); } &&
15901          { ac_try='test -s conftest.$ac_objext'
15902   { (eval echo "$as_me:15902: \"$ac_try\"") >&5
15903   (eval $ac_try) 2>&5
15904   ac_status=$?
15905   echo "$as_me:15905: \$? = $ac_status" >&5
15906   (exit $ac_status); }; }; then
15907   ac_cv_type_pid_t=yes
15908 else
15909   echo "$as_me: failed program was:" >&5
15910 cat conftest.$ac_ext >&5
15911 ac_cv_type_pid_t=no
15912 fi
15913 rm -f conftest.$ac_objext conftest.$ac_ext
15914 fi
15915 echo "$as_me:15915: result: $ac_cv_type_pid_t" >&5
15916 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15917 if test $ac_cv_type_pid_t = yes; then
15918   :
15919 else
15920
15921 cat >>confdefs.h <<EOF
15922 #define pid_t int
15923 EOF
15924
15925 fi
15926
15927 for ac_header in unistd.h vfork.h
15928 do
15929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15930 echo "$as_me:15930: checking for $ac_header" >&5
15931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15933   echo $ECHO_N "(cached) $ECHO_C" >&6
15934 else
15935   cat >conftest.$ac_ext <<_ACEOF
15936 #line 15936 "configure"
15937 #include "confdefs.h"
15938 #include <$ac_header>
15939 _ACEOF
15940 if { (eval echo "$as_me:15940: \"$ac_cpp conftest.$ac_ext\"") >&5
15941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15942   ac_status=$?
15943   egrep -v '^ *\+' conftest.er1 >conftest.err
15944   rm -f conftest.er1
15945   cat conftest.err >&5
15946   echo "$as_me:15946: \$? = $ac_status" >&5
15947   (exit $ac_status); } >/dev/null; then
15948   if test -s conftest.err; then
15949     ac_cpp_err=$ac_c_preproc_warn_flag
15950   else
15951     ac_cpp_err=
15952   fi
15953 else
15954   ac_cpp_err=yes
15955 fi
15956 if test -z "$ac_cpp_err"; then
15957   eval "$as_ac_Header=yes"
15958 else
15959   echo "$as_me: failed program was:" >&5
15960   cat conftest.$ac_ext >&5
15961   eval "$as_ac_Header=no"
15962 fi
15963 rm -f conftest.err conftest.$ac_ext
15964 fi
15965 echo "$as_me:15965: result: `eval echo '${'$as_ac_Header'}'`" >&5
15966 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15967 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15968   cat >>confdefs.h <<EOF
15969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15970 EOF
15971
15972 fi
15973 done
15974
15975 for ac_func in fork vfork
15976 do
15977 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15978 echo "$as_me:15978: checking for $ac_func" >&5
15979 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15980 if eval "test \"\${$as_ac_var+set}\" = set"; then
15981   echo $ECHO_N "(cached) $ECHO_C" >&6
15982 else
15983   cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986 /* System header to define __stub macros and hopefully few prototypes,
15987     which can conflict with char $ac_func (); below.  */
15988 #include <assert.h>
15989 /* Override any gcc2 internal prototype to avoid an error.  */
15990 #ifdef __cplusplus
15991 extern "C"
15992 #endif
15993 /* We use char because int might match the return type of a gcc2
15994    builtin and then its argument prototype would still apply.  */
15995 char $ac_func ();
15996 char (*f) ();
15997
15998 int
15999 main ()
16000 {
16001 /* The GNU C library defines this for functions which it implements
16002     to always fail with ENOSYS.  Some functions are actually named
16003     something starting with __ and the normal name is an alias.  */
16004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16005 choke me
16006 #else
16007 f = $ac_func;
16008 #endif
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -s conftest$ac_exeext'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); }; }; then
16026   eval "$as_ac_var=yes"
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 eval "$as_ac_var=no"
16031 fi
16032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16033 fi
16034 echo "$as_me:16034: result: `eval echo '${'$as_ac_var'}'`" >&5
16035 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16036 if test `eval echo '${'$as_ac_var'}'` = yes; then
16037   cat >>confdefs.h <<EOF
16038 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16039 EOF
16040
16041 fi
16042 done
16043
16044 ac_cv_func_fork_works=$ac_cv_func_fork
16045 if test "x$ac_cv_func_fork" = xyes; then
16046   echo "$as_me:16046: checking for working fork" >&5
16047 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16048 if test "${ac_cv_func_fork_works+set}" = set; then
16049   echo $ECHO_N "(cached) $ECHO_C" >&6
16050 else
16051   if test "$cross_compiling" = yes; then
16052   ac_cv_func_fork_works=cross
16053 else
16054   cat >conftest.$ac_ext <<_ACEOF
16055 /* By Rüdiger Kuhlmann. */
16056       #include <sys/types.h>
16057       #if HAVE_UNISTD_H
16058       # include <unistd.h>
16059       #endif
16060       /* Some systems only have a dummy stub for fork() */
16061       int main ()
16062       {
16063         if (fork() < 0)
16064           $ac_main_return (1);
16065         $ac_main_return (0);
16066       }
16067 _ACEOF
16068 rm -f conftest$ac_exeext
16069 if { (eval echo "$as_me:16069: \"$ac_link\"") >&5
16070   (eval $ac_link) 2>&5
16071   ac_status=$?
16072   echo "$as_me:16072: \$? = $ac_status" >&5
16073   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16074   { (eval echo "$as_me:16074: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   ac_cv_func_fork_works=yes
16080 else
16081   echo "$as_me: program exited with status $ac_status" >&5
16082 echo "$as_me: failed program was:" >&5
16083 cat conftest.$ac_ext >&5
16084 ac_cv_func_fork_works=no
16085 fi
16086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16087 fi
16088 fi
16089 echo "$as_me:16089: result: $ac_cv_func_fork_works" >&5
16090 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16091
16092 fi
16093 if test "x$ac_cv_func_fork_works" = xcross; then
16094   case $host in
16095     *-*-amigaos* | *-*-msdosdjgpp*)
16096       # Override, as these systems have only a dummy fork() stub
16097       ac_cv_func_fork_works=no
16098       ;;
16099     *)
16100       ac_cv_func_fork_works=yes
16101       ;;
16102   esac
16103   { echo "$as_me:16103: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16104 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16105 fi
16106 ac_cv_func_vfork_works=$ac_cv_func_vfork
16107 if test "x$ac_cv_func_vfork" = xyes; then
16108   echo "$as_me:16108: checking for working vfork" >&5
16109 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16110 if test "${ac_cv_func_vfork_works+set}" = set; then
16111   echo $ECHO_N "(cached) $ECHO_C" >&6
16112 else
16113   if test "$cross_compiling" = yes; then
16114   ac_cv_func_vfork_works=cross
16115 else
16116   cat >conftest.$ac_ext <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16119 /* Thanks to Paul Eggert for this test.  */
16120 #include <stdio.h>
16121 #include <sys/types.h>
16122 #include <sys/stat.h>
16123 #if HAVE_UNISTD_H
16124 # include <unistd.h>
16125 #endif
16126 #if HAVE_VFORK_H
16127 # include <vfork.h>
16128 #endif
16129 /* On some sparc systems, changes by the child to local and incoming
16130    argument registers are propagated back to the parent.  The compiler
16131    is told about this with #include <vfork.h>, but some compilers
16132    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16133    static variable whose address is put into a register that is
16134    clobbered by the vfork.  */
16135 static
16136 #ifdef __cplusplus
16137 sparc_address_test (int arg)
16138 # else
16139 sparc_address_test (arg) int arg;
16140 #endif
16141 {
16142   static pid_t child;
16143   if (!child) {
16144     child = vfork ();
16145     if (child < 0) {
16146       perror ("vfork");
16147       _exit(2);
16148     }
16149     if (!child) {
16150       arg = getpid();
16151       write(-1, "", 0);
16152       _exit (arg);
16153     }
16154   }
16155 }
16156
16157 int
16158 main ()
16159 {
16160   pid_t parent = getpid ();
16161   pid_t child;
16162
16163   sparc_address_test ();
16164
16165   child = vfork ();
16166
16167   if (child == 0) {
16168     /* Here is another test for sparc vfork register problems.  This
16169        test uses lots of local variables, at least as many local
16170        variables as main has allocated so far including compiler
16171        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16172        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16173        reuse the register of parent for one of the local variables,
16174        since it will think that parent can't possibly be used any more
16175        in this routine.  Assigning to the local variable will thus
16176        munge parent in the parent process.  */
16177     pid_t
16178       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16179       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16180     /* Convince the compiler that p..p7 are live; otherwise, it might
16181        use the same hardware register for all 8 local variables.  */
16182     if (p != p1 || p != p2 || p != p3 || p != p4
16183         || p != p5 || p != p6 || p != p7)
16184       _exit(1);
16185
16186     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16187        from child file descriptors.  If the child closes a descriptor
16188        before it execs or exits, this munges the parent's descriptor
16189        as well.  Test for this by closing stdout in the child.  */
16190     _exit(close(fileno(stdout)) != 0);
16191   } else {
16192     int status;
16193     struct stat st;
16194
16195     while (wait(&status) != child)
16196       ;
16197     $ac_main_return(
16198          /* Was there some problem with vforking?  */
16199          child < 0
16200
16201          /* Did the child fail?  (This shouldn't happen.)  */
16202          || status
16203
16204          /* Did the vfork/compiler bug occur?  */
16205          || parent != getpid()
16206
16207          /* Did the file descriptor bug occur?  */
16208          || fstat(fileno(stdout), &st) != 0
16209          );
16210   }
16211 }
16212 _ACEOF
16213 rm -f conftest$ac_exeext
16214 if { (eval echo "$as_me:16214: \"$ac_link\"") >&5
16215   (eval $ac_link) 2>&5
16216   ac_status=$?
16217   echo "$as_me:16217: \$? = $ac_status" >&5
16218   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16219   { (eval echo "$as_me:16219: \"$ac_try\"") >&5
16220   (eval $ac_try) 2>&5
16221   ac_status=$?
16222   echo "$as_me:16222: \$? = $ac_status" >&5
16223   (exit $ac_status); }; }; then
16224   ac_cv_func_vfork_works=yes
16225 else
16226   echo "$as_me: program exited with status $ac_status" >&5
16227 echo "$as_me: failed program was:" >&5
16228 cat conftest.$ac_ext >&5
16229 ac_cv_func_vfork_works=no
16230 fi
16231 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16232 fi
16233 fi
16234 echo "$as_me:16234: result: $ac_cv_func_vfork_works" >&5
16235 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16236
16237 fi;
16238 if test "x$ac_cv_func_fork_works" = xcross; then
16239   ac_cv_func_vfork_works=ac_cv_func_vfork
16240   { echo "$as_me:16240: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16241 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16242 fi
16243
16244 if test "x$ac_cv_func_vfork_works" = xyes; then
16245
16246 cat >>confdefs.h <<\EOF
16247 #define HAVE_WORKING_VFORK 1
16248 EOF
16249
16250 else
16251
16252 cat >>confdefs.h <<\EOF
16253 #define vfork fork
16254 EOF
16255
16256 fi
16257 if test "x$ac_cv_func_fork_works" = xyes; then
16258
16259 cat >>confdefs.h <<\EOF
16260 #define HAVE_WORKING_FORK 1
16261 EOF
16262
16263 fi
16264
16265 # special check for test/ditto.c
16266
16267 echo "$as_me:16267: checking for openpty in -lutil" >&5
16268 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16269 if test "${ac_cv_lib_util_openpty+set}" = set; then
16270   echo $ECHO_N "(cached) $ECHO_C" >&6
16271 else
16272   ac_check_lib_save_LIBS=$LIBS
16273 LIBS="-lutil  $LIBS"
16274 cat >conftest.$ac_ext <<_ACEOF
16275 #line 16275 "configure"
16276 #include "confdefs.h"
16277
16278 /* Override any gcc2 internal prototype to avoid an error.  */
16279 #ifdef __cplusplus
16280 extern "C"
16281 #endif
16282 /* We use char because int might match the return type of a gcc2
16283    builtin and then its argument prototype would still apply.  */
16284 char openpty ();
16285 int
16286 main ()
16287 {
16288 openpty ();
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 rm -f conftest.$ac_objext conftest$ac_exeext
16294 if { (eval echo "$as_me:16294: \"$ac_link\"") >&5
16295   (eval $ac_link) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); } &&
16299          { ac_try='test -s conftest$ac_exeext'
16300   { (eval echo "$as_me:16300: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); }; }; then
16305   ac_cv_lib_util_openpty=yes
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 cat conftest.$ac_ext >&5
16309 ac_cv_lib_util_openpty=no
16310 fi
16311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16312 LIBS=$ac_check_lib_save_LIBS
16313 fi
16314 echo "$as_me:16314: result: $ac_cv_lib_util_openpty" >&5
16315 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16316 if test $ac_cv_lib_util_openpty = yes; then
16317   cf_cv_lib_util=yes
16318 else
16319   cf_cv_lib_util=no
16320 fi
16321
16322 echo "$as_me:16322: checking for openpty header" >&5
16323 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16324 if test "${cf_cv_func_openpty+set}" = set; then
16325   echo $ECHO_N "(cached) $ECHO_C" >&6
16326 else
16327
16328     cf_save_LIBS="$LIBS"
16329     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16330     for cf_header in pty.h libutil.h util.h
16331     do
16332     cat >conftest.$ac_ext <<_ACEOF
16333 #line 16333 "configure"
16334 #include "confdefs.h"
16335
16336 #include <$cf_header>
16337
16338 int
16339 main ()
16340 {
16341
16342     int x = openpty((int *)0, (int *)0, (char *)0,
16343                    (struct termios *)0, (struct winsize *)0);
16344
16345   ;
16346   return 0;
16347 }
16348 _ACEOF
16349 rm -f conftest.$ac_objext conftest$ac_exeext
16350 if { (eval echo "$as_me:16350: \"$ac_link\"") >&5
16351   (eval $ac_link) 2>&5
16352   ac_status=$?
16353   echo "$as_me:16353: \$? = $ac_status" >&5
16354   (exit $ac_status); } &&
16355          { ac_try='test -s conftest$ac_exeext'
16356   { (eval echo "$as_me:16356: \"$ac_try\"") >&5
16357   (eval $ac_try) 2>&5
16358   ac_status=$?
16359   echo "$as_me:16359: \$? = $ac_status" >&5
16360   (exit $ac_status); }; }; then
16361
16362         cf_cv_func_openpty=$cf_header
16363         break
16364
16365 else
16366   echo "$as_me: failed program was:" >&5
16367 cat conftest.$ac_ext >&5
16368
16369         cf_cv_func_openpty=no
16370
16371 fi
16372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16373     done
16374     LIBS="$cf_save_LIBS"
16375
16376 fi
16377 echo "$as_me:16377: result: $cf_cv_func_openpty" >&5
16378 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16379
16380 if test "$cf_cv_func_openpty" != no ; then
16381     cat >>confdefs.h <<EOF
16382 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16383 EOF
16384
16385     cat >>confdefs.h <<\EOF
16386 #define USE_XTERM_PTY 1
16387 EOF
16388
16389     if test "$cf_cv_lib_util" = yes ; then
16390         TEST_LIBS="-lutil $TEST_LIBS"
16391     fi
16392 fi
16393
16394 if test "$with_hashed_db" != no ; then
16395         cat >>confdefs.h <<\EOF
16396 #define USE_HASHED_DB 1
16397 EOF
16398
16399 case $with_hashed_db in #(vi
16400 yes|*able*) #(vi
16401     ;;
16402 *)
16403     if test -d "$with_hashed_db" ; then
16404
16405 if test -n "$with_hashed_db/include" ; then
16406   for cf_add_incdir in $with_hashed_db/include
16407   do
16408         while test $cf_add_incdir != /usr/include
16409         do
16410           if test -d $cf_add_incdir
16411           then
16412                 cf_have_incdir=no
16413                 if test -n "$CFLAGS$CPPFLAGS" ; then
16414                   # a loop is needed to ensure we can add subdirs of existing dirs
16415                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16416                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16417                           cf_have_incdir=yes; break
16418                         fi
16419                   done
16420                 fi
16421
16422                 if test "$cf_have_incdir" = no ; then
16423                   if test "$cf_add_incdir" = /usr/local/include ; then
16424                         if test "$GCC" = yes
16425                         then
16426                           cf_save_CPPFLAGS=$CPPFLAGS
16427                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16428                           cat >conftest.$ac_ext <<_ACEOF
16429 #line 16429 "configure"
16430 #include "confdefs.h"
16431 #include <stdio.h>
16432 int
16433 main ()
16434 {
16435 printf("Hello")
16436   ;
16437   return 0;
16438 }
16439 _ACEOF
16440 rm -f conftest.$ac_objext
16441 if { (eval echo "$as_me:16441: \"$ac_compile\"") >&5
16442   (eval $ac_compile) 2>&5
16443   ac_status=$?
16444   echo "$as_me:16444: \$? = $ac_status" >&5
16445   (exit $ac_status); } &&
16446          { ac_try='test -s conftest.$ac_objext'
16447   { (eval echo "$as_me:16447: \"$ac_try\"") >&5
16448   (eval $ac_try) 2>&5
16449   ac_status=$?
16450   echo "$as_me:16450: \$? = $ac_status" >&5
16451   (exit $ac_status); }; }; then
16452   :
16453 else
16454   echo "$as_me: failed program was:" >&5
16455 cat conftest.$ac_ext >&5
16456 cf_have_incdir=yes
16457 fi
16458 rm -f conftest.$ac_objext conftest.$ac_ext
16459                           CPPFLAGS=$cf_save_CPPFLAGS
16460                         fi
16461                   fi
16462                 fi
16463
16464                 if test "$cf_have_incdir" = no ; then
16465                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16466
16467 echo "${as_me:-configure}:16467: testing adding $cf_add_incdir to include-path ..." 1>&5
16468
16469                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16470
16471                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16472                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16473                   cf_add_incdir="$cf_top_incdir"
16474                 else
16475                   break
16476                 fi
16477           fi
16478         done
16479   done
16480 fi
16481
16482 if test -n "$with_hashed_db/lib" ; then
16483   for cf_add_libdir in $with_hashed_db/lib
16484   do
16485     if test $cf_add_libdir = /usr/lib ; then
16486       :
16487     elif test -d $cf_add_libdir
16488     then
16489       cf_have_libdir=no
16490       if test -n "$LDFLAGS$LIBS" ; then
16491         # a loop is needed to ensure we can add subdirs of existing dirs
16492         for cf_test_libdir in $LDFLAGS $LIBS ; do
16493           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16494             cf_have_libdir=yes; break
16495           fi
16496         done
16497       fi
16498       if test "$cf_have_libdir" = no ; then
16499         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16500
16501 echo "${as_me:-configure}:16501: testing adding $cf_add_libdir to library-path ..." 1>&5
16502
16503         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16504       fi
16505     fi
16506   done
16507 fi
16508
16509     fi
16510 esac
16511
16512 echo "$as_me:16512: checking for db.h" >&5
16513 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16514 if test "${ac_cv_header_db_h+set}" = set; then
16515   echo $ECHO_N "(cached) $ECHO_C" >&6
16516 else
16517   cat >conftest.$ac_ext <<_ACEOF
16518 #line 16518 "configure"
16519 #include "confdefs.h"
16520 #include <db.h>
16521 _ACEOF
16522 if { (eval echo "$as_me:16522: \"$ac_cpp conftest.$ac_ext\"") >&5
16523   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16524   ac_status=$?
16525   egrep -v '^ *\+' conftest.er1 >conftest.err
16526   rm -f conftest.er1
16527   cat conftest.err >&5
16528   echo "$as_me:16528: \$? = $ac_status" >&5
16529   (exit $ac_status); } >/dev/null; then
16530   if test -s conftest.err; then
16531     ac_cpp_err=$ac_c_preproc_warn_flag
16532   else
16533     ac_cpp_err=
16534   fi
16535 else
16536   ac_cpp_err=yes
16537 fi
16538 if test -z "$ac_cpp_err"; then
16539   ac_cv_header_db_h=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542   cat conftest.$ac_ext >&5
16543   ac_cv_header_db_h=no
16544 fi
16545 rm -f conftest.err conftest.$ac_ext
16546 fi
16547 echo "$as_me:16547: result: $ac_cv_header_db_h" >&5
16548 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16549 if test $ac_cv_header_db_h = yes; then
16550
16551 echo "$as_me:16551: checking for version of db" >&5
16552 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16553 if test "${cf_cv_hashed_db_version+set}" = set; then
16554   echo $ECHO_N "(cached) $ECHO_C" >&6
16555 else
16556
16557 cf_cv_hashed_db_version=unknown
16558
16559 for cf_db_version in 1 2 3 4 5
16560 do
16561
16562 echo "${as_me:-configure}:16562: testing checking for db version $cf_db_version ..." 1>&5
16563
16564         cat >conftest.$ac_ext <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567
16568 $ac_includes_default
16569 #include <db.h>
16570
16571 #ifdef DB_VERSION_MAJOR
16572         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16573 #if $cf_db_version == DB_VERSION_MAJOR
16574         /* ok */
16575 #else
16576         make an error
16577 #endif
16578 #else
16579 #if $cf_db_version == 1
16580         /* ok: assuming this is DB 1.8.5 */
16581 #else
16582         make an error
16583 #endif
16584 #endif
16585
16586 int
16587 main ()
16588 {
16589 DBT *foo = 0
16590   ;
16591   return 0;
16592 }
16593 _ACEOF
16594 rm -f conftest.$ac_objext
16595 if { (eval echo "$as_me:16595: \"$ac_compile\"") >&5
16596   (eval $ac_compile) 2>&5
16597   ac_status=$?
16598   echo "$as_me:16598: \$? = $ac_status" >&5
16599   (exit $ac_status); } &&
16600          { ac_try='test -s conftest.$ac_objext'
16601   { (eval echo "$as_me:16601: \"$ac_try\"") >&5
16602   (eval $ac_try) 2>&5
16603   ac_status=$?
16604   echo "$as_me:16604: \$? = $ac_status" >&5
16605   (exit $ac_status); }; }; then
16606
16607         cf_cv_hashed_db_version=$cf_db_version
16608         break
16609
16610 else
16611   echo "$as_me: failed program was:" >&5
16612 cat conftest.$ac_ext >&5
16613 fi
16614 rm -f conftest.$ac_objext conftest.$ac_ext
16615 done
16616
16617 fi
16618 echo "$as_me:16618: result: $cf_cv_hashed_db_version" >&5
16619 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16620
16621 if test "$cf_cv_hashed_db_version" = unknown ; then
16622         { { echo "$as_me:16622: error: Cannot determine version of db" >&5
16623 echo "$as_me: error: Cannot determine version of db" >&2;}
16624    { (exit 1); exit 1; }; }
16625 else
16626
16627 echo "$as_me:16627: checking for db libraries" >&5
16628 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16629 if test "${cf_cv_hashed_db_libs+set}" = set; then
16630   echo $ECHO_N "(cached) $ECHO_C" >&6
16631 else
16632
16633 cf_cv_hashed_db_libs=unknown
16634 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16635 do
16636         cf_save_libs="$LIBS"
16637         if test -n "$cf_db_libs"; then
16638                 LIBS="-l$cf_db_libs $LIBS"
16639         fi
16640
16641 echo "${as_me:-configure}:16641: testing checking for library "$cf_db_libs" ..." 1>&5
16642
16643         cat >conftest.$ac_ext <<_ACEOF
16644 #line 16644 "configure"
16645 #include "confdefs.h"
16646
16647 $ac_includes_default
16648 #include <db.h>
16649
16650 int
16651 main ()
16652 {
16653
16654         char *path = "/tmp/foo";
16655 #ifdef DB_VERSION_MAJOR
16656 #if DB_VERSION_MAJOR >= 4
16657         DB *result = 0;
16658         db_create(&result, NULL, 0);
16659         result->open(result,
16660                 NULL,
16661                 path,
16662                 path,
16663                 DB_HASH,
16664                 DB_CREATE,
16665                 0644);
16666 #elif DB_VERSION_MAJOR >= 3
16667         DB *result = 0;
16668         db_create(&result, NULL, 0);
16669         result->open(result,
16670                 path,
16671                 path,
16672                 DB_HASH,
16673                 DB_CREATE,
16674                 0644);
16675 #elif DB_VERSION_MAJOR >= 2
16676         DB *result = 0;
16677         db_open(path,
16678                 DB_HASH,
16679                 DB_CREATE,
16680                 0644,
16681                 (DB_ENV *) 0,
16682                 (DB_INFO *) 0,
16683                 &result);
16684 #endif /* DB_VERSION_MAJOR */
16685 #else
16686         DB *result = dbopen(path,
16687                      2,
16688                      0644,
16689                      DB_HASH,
16690                      0);
16691 #endif
16692         ${cf_cv_main_return:-return}(result != 0)
16693
16694   ;
16695   return 0;
16696 }
16697 _ACEOF
16698 rm -f conftest.$ac_objext conftest$ac_exeext
16699 if { (eval echo "$as_me:16699: \"$ac_link\"") >&5
16700   (eval $ac_link) 2>&5
16701   ac_status=$?
16702   echo "$as_me:16702: \$? = $ac_status" >&5
16703   (exit $ac_status); } &&
16704          { ac_try='test -s conftest$ac_exeext'
16705   { (eval echo "$as_me:16705: \"$ac_try\"") >&5
16706   (eval $ac_try) 2>&5
16707   ac_status=$?
16708   echo "$as_me:16708: \$? = $ac_status" >&5
16709   (exit $ac_status); }; }; then
16710
16711         if test -n "$cf_db_libs" ; then
16712                 cf_cv_hashed_db_libs=$cf_db_libs
16713         else
16714                 cf_cv_hashed_db_libs=default
16715         fi
16716         LIBS="$cf_save_libs"
16717         break
16718
16719 else
16720   echo "$as_me: failed program was:" >&5
16721 cat conftest.$ac_ext >&5
16722 fi
16723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16724         LIBS="$cf_save_libs"
16725 done
16726
16727 fi
16728 echo "$as_me:16728: result: $cf_cv_hashed_db_libs" >&5
16729 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16730
16731         if test "$cf_cv_hashed_db_libs" = unknown ; then
16732                 { { echo "$as_me:16732: error: Cannot determine library for db" >&5
16733 echo "$as_me: error: Cannot determine library for db" >&2;}
16734    { (exit 1); exit 1; }; }
16735         elif test "$cf_cv_hashed_db_libs" != default ; then
16736                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16737         fi
16738 fi
16739
16740 else
16741
16742         { { echo "$as_me:16742: error: Cannot find db.h" >&5
16743 echo "$as_me: error: Cannot find db.h" >&2;}
16744    { (exit 1); exit 1; }; }
16745
16746 fi
16747
16748 fi
16749
16750 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16751         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16752         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16753 fi
16754
16755 # Just in case, check if the C compiler has a bool type.
16756
16757 echo "$as_me:16757: checking if we should include stdbool.h" >&5
16758 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16759
16760 if test "${cf_cv_header_stdbool_h+set}" = set; then
16761   echo $ECHO_N "(cached) $ECHO_C" >&6
16762 else
16763
16764         cat >conftest.$ac_ext <<_ACEOF
16765 #line 16765 "configure"
16766 #include "confdefs.h"
16767
16768 int
16769 main ()
16770 {
16771 bool foo = false
16772   ;
16773   return 0;
16774 }
16775 _ACEOF
16776 rm -f conftest.$ac_objext
16777 if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5
16778   (eval $ac_compile) 2>&5
16779   ac_status=$?
16780   echo "$as_me:16780: \$? = $ac_status" >&5
16781   (exit $ac_status); } &&
16782          { ac_try='test -s conftest.$ac_objext'
16783   { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784   (eval $ac_try) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); }; }; then
16788   cf_cv_header_stdbool_h=0
16789 else
16790   echo "$as_me: failed program was:" >&5
16791 cat conftest.$ac_ext >&5
16792 cat >conftest.$ac_ext <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16795
16796 #ifndef __BEOS__
16797 #include <stdbool.h>
16798 #endif
16799
16800 int
16801 main ()
16802 {
16803 bool foo = false
16804   ;
16805   return 0;
16806 }
16807 _ACEOF
16808 rm -f conftest.$ac_objext
16809 if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
16810   (eval $ac_compile) 2>&5
16811   ac_status=$?
16812   echo "$as_me:16812: \$? = $ac_status" >&5
16813   (exit $ac_status); } &&
16814          { ac_try='test -s conftest.$ac_objext'
16815   { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816   (eval $ac_try) 2>&5
16817   ac_status=$?
16818   echo "$as_me:16818: \$? = $ac_status" >&5
16819   (exit $ac_status); }; }; then
16820   cf_cv_header_stdbool_h=1
16821 else
16822   echo "$as_me: failed program was:" >&5
16823 cat conftest.$ac_ext >&5
16824 cf_cv_header_stdbool_h=0
16825 fi
16826 rm -f conftest.$ac_objext conftest.$ac_ext
16827 fi
16828 rm -f conftest.$ac_objext conftest.$ac_ext
16829 fi
16830
16831 if test "$cf_cv_header_stdbool_h" = 1
16832 then    echo "$as_me:16832: result: yes" >&5
16833 echo "${ECHO_T}yes" >&6
16834 else    echo "$as_me:16834: result: no" >&5
16835 echo "${ECHO_T}no" >&6
16836 fi
16837
16838 echo "$as_me:16838: checking for builtin bool type" >&5
16839 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16840
16841 if test "${cf_cv_cc_bool_type+set}" = set; then
16842   echo $ECHO_N "(cached) $ECHO_C" >&6
16843 else
16844
16845         cat >conftest.$ac_ext <<_ACEOF
16846 #line 16846 "configure"
16847 #include "confdefs.h"
16848
16849 #include <stdio.h>
16850 #include <sys/types.h>
16851
16852 int
16853 main ()
16854 {
16855 bool x = false
16856   ;
16857   return 0;
16858 }
16859 _ACEOF
16860 rm -f conftest.$ac_objext
16861 if { (eval echo "$as_me:16861: \"$ac_compile\"") >&5
16862   (eval $ac_compile) 2>&5
16863   ac_status=$?
16864   echo "$as_me:16864: \$? = $ac_status" >&5
16865   (exit $ac_status); } &&
16866          { ac_try='test -s conftest.$ac_objext'
16867   { (eval echo "$as_me:16867: \"$ac_try\"") >&5
16868   (eval $ac_try) 2>&5
16869   ac_status=$?
16870   echo "$as_me:16870: \$? = $ac_status" >&5
16871   (exit $ac_status); }; }; then
16872   cf_cv_cc_bool_type=1
16873 else
16874   echo "$as_me: failed program was:" >&5
16875 cat conftest.$ac_ext >&5
16876 cf_cv_cc_bool_type=0
16877 fi
16878 rm -f conftest.$ac_objext conftest.$ac_ext
16879
16880 fi
16881
16882 if test "$cf_cv_cc_bool_type" = 1
16883 then    echo "$as_me:16883: result: yes" >&5
16884 echo "${ECHO_T}yes" >&6
16885 else    echo "$as_me:16885: result: no" >&5
16886 echo "${ECHO_T}no" >&6
16887 fi
16888
16889 # Check for C++ compiler characteristics (and ensure that it's there!)
16890 if test -n "$CXX" ; then
16891         ac_ext=cc
16892 ac_cpp='$CXXCPP $CPPFLAGS'
16893 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16894 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16895 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16896 ac_main_return=return
16897
16898 if test -n "$GXX" ; then
16899 case $cf_cv_system_name in #(vi
16900 os2*) #(vi
16901         cf_stdcpp_libname=stdcpp
16902         ;;
16903 *)
16904         cf_stdcpp_libname=stdc++
16905         ;;
16906 esac
16907 echo "$as_me:16907: checking for library $cf_stdcpp_libname" >&5
16908 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16909 if test "${cf_cv_libstdcpp+set}" = set; then
16910   echo $ECHO_N "(cached) $ECHO_C" >&6
16911 else
16912
16913         cf_save="$LIBS"
16914         LIBS="-l$cf_stdcpp_libname $LIBS"
16915 cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919 #include <strstream.h>
16920 int
16921 main ()
16922 {
16923
16924 char buf[80];
16925 strstreambuf foo(buf, sizeof(buf))
16926
16927   ;
16928   return 0;
16929 }
16930 _ACEOF
16931 rm -f conftest.$ac_objext conftest$ac_exeext
16932 if { (eval echo "$as_me:16932: \"$ac_link\"") >&5
16933   (eval $ac_link) 2>&5
16934   ac_status=$?
16935   echo "$as_me:16935: \$? = $ac_status" >&5
16936   (exit $ac_status); } &&
16937          { ac_try='test -s conftest$ac_exeext'
16938   { (eval echo "$as_me:16938: \"$ac_try\"") >&5
16939   (eval $ac_try) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); }; }; then
16943   cf_cv_libstdcpp=yes
16944 else
16945   echo "$as_me: failed program was:" >&5
16946 cat conftest.$ac_ext >&5
16947 cf_cv_libstdcpp=no
16948 fi
16949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16950         LIBS="$cf_save"
16951
16952 fi
16953 echo "$as_me:16953: result: $cf_cv_libstdcpp" >&5
16954 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16955 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16956 fi
16957
16958         echo "$as_me:16958: checking whether $CXX understands -c and -o together" >&5
16959 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16960 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16961   echo $ECHO_N "(cached) $ECHO_C" >&6
16962 else
16963
16964 cat > conftest.$ac_ext <<CF_EOF
16965 #include <stdio.h>
16966 int main()
16967 {
16968         ${cf_cv_main_return:-return}(0);
16969 }
16970 CF_EOF
16971 # We do the test twice because some compilers refuse to overwrite an
16972 # existing .o file with -o, though they will create one.
16973 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16974 if { (eval echo "$as_me:16974: \"$ac_try\"") >&5
16975   (eval $ac_try) 2>&5
16976   ac_status=$?
16977   echo "$as_me:16977: \$? = $ac_status" >&5
16978   (exit $ac_status); } &&
16979   test -f conftest2.$ac_objext && { (eval echo "$as_me:16979: \"$ac_try\"") >&5
16980   (eval $ac_try) 2>&5
16981   ac_status=$?
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); };
16984 then
16985   eval cf_cv_prog_CXX_c_o=yes
16986 else
16987   eval cf_cv_prog_CXX_c_o=no
16988 fi
16989 rm -rf conftest*
16990
16991 fi
16992 if test $cf_cv_prog_CXX_c_o = yes; then
16993   echo "$as_me:16993: result: yes" >&5
16994 echo "${ECHO_T}yes" >&6
16995 else
16996   echo "$as_me:16996: result: no" >&5
16997 echo "${ECHO_T}no" >&6
16998 fi
16999
17000         case $GXX_VERSION in
17001         1*|2.0-6*)
17002                 cf_cxx_library=yes
17003                 ;;
17004         *-2.7*|2.7*)
17005
17006 cf_cxx_library=unknown
17007 case $cf_cv_system_name in #(vi
17008 os2*) #(vi
17009         cf_gpp_libname=gpp
17010         ;;
17011 *)
17012         cf_gpp_libname=g++
17013         ;;
17014 esac
17015 if test "$GXX" = yes; then
17016         echo "$as_me:17016: checking for lib$cf_gpp_libname" >&5
17017 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17018         cf_save="$LIBS"
17019         LIBS="-l$cf_gpp_libname $LIBS"
17020         cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023
17024 #include <$cf_gpp_libname/builtin.h>
17025
17026 int
17027 main ()
17028 {
17029 two_arg_error_handler_t foo2 = lib_error_handler
17030   ;
17031   return 0;
17032 }
17033 _ACEOF
17034 rm -f conftest.$ac_objext conftest$ac_exeext
17035 if { (eval echo "$as_me:17035: \"$ac_link\"") >&5
17036   (eval $ac_link) 2>&5
17037   ac_status=$?
17038   echo "$as_me:17038: \$? = $ac_status" >&5
17039   (exit $ac_status); } &&
17040          { ac_try='test -s conftest$ac_exeext'
17041   { (eval echo "$as_me:17041: \"$ac_try\"") >&5
17042   (eval $ac_try) 2>&5
17043   ac_status=$?
17044   echo "$as_me:17044: \$? = $ac_status" >&5
17045   (exit $ac_status); }; }; then
17046   cf_cxx_library=yes
17047          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17048          if test "$cf_gpp_libname" = cpp ; then
17049             cat >>confdefs.h <<\EOF
17050 #define HAVE_GPP_BUILTIN_H 1
17051 EOF
17052
17053          else
17054             cat >>confdefs.h <<\EOF
17055 #define HAVE_GXX_BUILTIN_H 1
17056 EOF
17057
17058          fi
17059 else
17060   echo "$as_me: failed program was:" >&5
17061 cat conftest.$ac_ext >&5
17062 cat >conftest.$ac_ext <<_ACEOF
17063 #line 17063 "configure"
17064 #include "confdefs.h"
17065
17066 #include <builtin.h>
17067
17068 int
17069 main ()
17070 {
17071 two_arg_error_handler_t foo2 = lib_error_handler
17072   ;
17073   return 0;
17074 }
17075 _ACEOF
17076 rm -f conftest.$ac_objext conftest$ac_exeext
17077 if { (eval echo "$as_me:17077: \"$ac_link\"") >&5
17078   (eval $ac_link) 2>&5
17079   ac_status=$?
17080   echo "$as_me:17080: \$? = $ac_status" >&5
17081   (exit $ac_status); } &&
17082          { ac_try='test -s conftest$ac_exeext'
17083   { (eval echo "$as_me:17083: \"$ac_try\"") >&5
17084   (eval $ac_try) 2>&5
17085   ac_status=$?
17086   echo "$as_me:17086: \$? = $ac_status" >&5
17087   (exit $ac_status); }; }; then
17088   cf_cxx_library=yes
17089          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17090          cat >>confdefs.h <<\EOF
17091 #define HAVE_BUILTIN_H 1
17092 EOF
17093
17094 else
17095   echo "$as_me: failed program was:" >&5
17096 cat conftest.$ac_ext >&5
17097 cf_cxx_library=no
17098 fi
17099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17100 fi
17101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17102         LIBS="$cf_save"
17103         echo "$as_me:17103: result: $cf_cxx_library" >&5
17104 echo "${ECHO_T}$cf_cxx_library" >&6
17105 fi
17106
17107                 ;;
17108         *)
17109                 cf_cxx_library=no
17110                 ;;
17111         esac
17112
17113         ac_ext=cc
17114 ac_cpp='$CXXCPP $CPPFLAGS'
17115 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17116 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17117 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17118 ac_main_return=return
17119 echo "$as_me:17119: checking how to run the C++ preprocessor" >&5
17120 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17121 if test -z "$CXXCPP"; then
17122   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17123   echo $ECHO_N "(cached) $ECHO_C" >&6
17124 else
17125       # Double quotes because CXXCPP needs to be expanded
17126     for CXXCPP in "$CXX -E" "/lib/cpp"
17127     do
17128       ac_preproc_ok=false
17129 for ac_cxx_preproc_warn_flag in '' yes
17130 do
17131   # Use a header file that comes with gcc, so configuring glibc
17132   # with a fresh cross-compiler works.
17133   # On the NeXT, cc -E runs the code through the compiler's parser,
17134   # not just through cpp. "Syntax error" is here to catch this case.
17135   cat >conftest.$ac_ext <<_ACEOF
17136 #line 17136 "configure"
17137 #include "confdefs.h"
17138 #include <assert.h>
17139                      Syntax error
17140 _ACEOF
17141 if { (eval echo "$as_me:17141: \"$ac_cpp conftest.$ac_ext\"") >&5
17142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17143   ac_status=$?
17144   egrep -v '^ *\+' conftest.er1 >conftest.err
17145   rm -f conftest.er1
17146   cat conftest.err >&5
17147   echo "$as_me:17147: \$? = $ac_status" >&5
17148   (exit $ac_status); } >/dev/null; then
17149   if test -s conftest.err; then
17150     ac_cpp_err=$ac_cxx_preproc_warn_flag
17151   else
17152     ac_cpp_err=
17153   fi
17154 else
17155   ac_cpp_err=yes
17156 fi
17157 if test -z "$ac_cpp_err"; then
17158   :
17159 else
17160   echo "$as_me: failed program was:" >&5
17161   cat conftest.$ac_ext >&5
17162   # Broken: fails on valid input.
17163 continue
17164 fi
17165 rm -f conftest.err conftest.$ac_ext
17166
17167   # OK, works on sane cases.  Now check whether non-existent headers
17168   # can be detected and how.
17169   cat >conftest.$ac_ext <<_ACEOF
17170 #line 17170 "configure"
17171 #include "confdefs.h"
17172 #include <ac_nonexistent.h>
17173 _ACEOF
17174 if { (eval echo "$as_me:17174: \"$ac_cpp conftest.$ac_ext\"") >&5
17175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17176   ac_status=$?
17177   egrep -v '^ *\+' conftest.er1 >conftest.err
17178   rm -f conftest.er1
17179   cat conftest.err >&5
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); } >/dev/null; then
17182   if test -s conftest.err; then
17183     ac_cpp_err=$ac_cxx_preproc_warn_flag
17184   else
17185     ac_cpp_err=
17186   fi
17187 else
17188   ac_cpp_err=yes
17189 fi
17190 if test -z "$ac_cpp_err"; then
17191   # Broken: success on invalid input.
17192 continue
17193 else
17194   echo "$as_me: failed program was:" >&5
17195   cat conftest.$ac_ext >&5
17196   # Passes both tests.
17197 ac_preproc_ok=:
17198 break
17199 fi
17200 rm -f conftest.err conftest.$ac_ext
17201
17202 done
17203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17204 rm -f conftest.err conftest.$ac_ext
17205 if $ac_preproc_ok; then
17206   break
17207 fi
17208
17209     done
17210     ac_cv_prog_CXXCPP=$CXXCPP
17211
17212 fi
17213   CXXCPP=$ac_cv_prog_CXXCPP
17214 else
17215   ac_cv_prog_CXXCPP=$CXXCPP
17216 fi
17217 echo "$as_me:17217: result: $CXXCPP" >&5
17218 echo "${ECHO_T}$CXXCPP" >&6
17219 ac_preproc_ok=false
17220 for ac_cxx_preproc_warn_flag in '' yes
17221 do
17222   # Use a header file that comes with gcc, so configuring glibc
17223   # with a fresh cross-compiler works.
17224   # On the NeXT, cc -E runs the code through the compiler's parser,
17225   # not just through cpp. "Syntax error" is here to catch this case.
17226   cat >conftest.$ac_ext <<_ACEOF
17227 #line 17227 "configure"
17228 #include "confdefs.h"
17229 #include <assert.h>
17230                      Syntax error
17231 _ACEOF
17232 if { (eval echo "$as_me:17232: \"$ac_cpp conftest.$ac_ext\"") >&5
17233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17234   ac_status=$?
17235   egrep -v '^ *\+' conftest.er1 >conftest.err
17236   rm -f conftest.er1
17237   cat conftest.err >&5
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); } >/dev/null; then
17240   if test -s conftest.err; then
17241     ac_cpp_err=$ac_cxx_preproc_warn_flag
17242   else
17243     ac_cpp_err=
17244   fi
17245 else
17246   ac_cpp_err=yes
17247 fi
17248 if test -z "$ac_cpp_err"; then
17249   :
17250 else
17251   echo "$as_me: failed program was:" >&5
17252   cat conftest.$ac_ext >&5
17253   # Broken: fails on valid input.
17254 continue
17255 fi
17256 rm -f conftest.err conftest.$ac_ext
17257
17258   # OK, works on sane cases.  Now check whether non-existent headers
17259   # can be detected and how.
17260   cat >conftest.$ac_ext <<_ACEOF
17261 #line 17261 "configure"
17262 #include "confdefs.h"
17263 #include <ac_nonexistent.h>
17264 _ACEOF
17265 if { (eval echo "$as_me:17265: \"$ac_cpp conftest.$ac_ext\"") >&5
17266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17267   ac_status=$?
17268   egrep -v '^ *\+' conftest.er1 >conftest.err
17269   rm -f conftest.er1
17270   cat conftest.err >&5
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); } >/dev/null; then
17273   if test -s conftest.err; then
17274     ac_cpp_err=$ac_cxx_preproc_warn_flag
17275   else
17276     ac_cpp_err=
17277   fi
17278 else
17279   ac_cpp_err=yes
17280 fi
17281 if test -z "$ac_cpp_err"; then
17282   # Broken: success on invalid input.
17283 continue
17284 else
17285   echo "$as_me: failed program was:" >&5
17286   cat conftest.$ac_ext >&5
17287   # Passes both tests.
17288 ac_preproc_ok=:
17289 break
17290 fi
17291 rm -f conftest.err conftest.$ac_ext
17292
17293 done
17294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17295 rm -f conftest.err conftest.$ac_ext
17296 if $ac_preproc_ok; then
17297   :
17298 else
17299   { { echo "$as_me:17299: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17300 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17301    { (exit 1); exit 1; }; }
17302 fi
17303
17304 ac_ext=cc
17305 ac_cpp='$CXXCPP $CPPFLAGS'
17306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17309 ac_main_return=return
17310
17311 for ac_header in iostream typeinfo
17312 do
17313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17314 echo "$as_me:17314: checking for $ac_header" >&5
17315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17317   echo $ECHO_N "(cached) $ECHO_C" >&6
17318 else
17319   cat >conftest.$ac_ext <<_ACEOF
17320 #line 17320 "configure"
17321 #include "confdefs.h"
17322 #include <$ac_header>
17323 _ACEOF
17324 if { (eval echo "$as_me:17324: \"$ac_cpp conftest.$ac_ext\"") >&5
17325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17326   ac_status=$?
17327   egrep -v '^ *\+' conftest.er1 >conftest.err
17328   rm -f conftest.er1
17329   cat conftest.err >&5
17330   echo "$as_me:17330: \$? = $ac_status" >&5
17331   (exit $ac_status); } >/dev/null; then
17332   if test -s conftest.err; then
17333     ac_cpp_err=$ac_cxx_preproc_warn_flag
17334   else
17335     ac_cpp_err=
17336   fi
17337 else
17338   ac_cpp_err=yes
17339 fi
17340 if test -z "$ac_cpp_err"; then
17341   eval "$as_ac_Header=yes"
17342 else
17343   echo "$as_me: failed program was:" >&5
17344   cat conftest.$ac_ext >&5
17345   eval "$as_ac_Header=no"
17346 fi
17347 rm -f conftest.err conftest.$ac_ext
17348 fi
17349 echo "$as_me:17349: result: `eval echo '${'$as_ac_Header'}'`" >&5
17350 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17351 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17352   cat >>confdefs.h <<EOF
17353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17354 EOF
17355
17356 fi
17357 done
17358
17359     if test x"$ac_cv_header_iostream" = xyes ; then
17360         echo "$as_me:17360: checking if iostream uses std-namespace" >&5
17361 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17362         cat >conftest.$ac_ext <<_ACEOF
17363 #line 17363 "configure"
17364 #include "confdefs.h"
17365
17366 #include <iostream>
17367 using std::endl;
17368 using std::cerr;
17369 int
17370 main ()
17371 {
17372
17373 cerr << "testing" << endl;
17374
17375   ;
17376   return 0;
17377 }
17378 _ACEOF
17379 rm -f conftest.$ac_objext
17380 if { (eval echo "$as_me:17380: \"$ac_compile\"") >&5
17381   (eval $ac_compile) 2>&5
17382   ac_status=$?
17383   echo "$as_me:17383: \$? = $ac_status" >&5
17384   (exit $ac_status); } &&
17385          { ac_try='test -s conftest.$ac_objext'
17386   { (eval echo "$as_me:17386: \"$ac_try\"") >&5
17387   (eval $ac_try) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit $ac_status); }; }; then
17391   cf_iostream_namespace=yes
17392 else
17393   echo "$as_me: failed program was:" >&5
17394 cat conftest.$ac_ext >&5
17395 cf_iostream_namespace=no
17396 fi
17397 rm -f conftest.$ac_objext conftest.$ac_ext
17398         echo "$as_me:17398: result: $cf_iostream_namespace" >&5
17399 echo "${ECHO_T}$cf_iostream_namespace" >&6
17400         if test "$cf_iostream_namespace" = yes ; then
17401             cat >>confdefs.h <<\EOF
17402 #define IOSTREAM_NAMESPACE 1
17403 EOF
17404
17405         fi
17406     fi
17407
17408 echo "$as_me:17408: checking if we should include stdbool.h" >&5
17409 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17410
17411 if test "${cf_cv_header_stdbool_h+set}" = set; then
17412   echo $ECHO_N "(cached) $ECHO_C" >&6
17413 else
17414
17415         cat >conftest.$ac_ext <<_ACEOF
17416 #line 17416 "configure"
17417 #include "confdefs.h"
17418
17419 int
17420 main ()
17421 {
17422 bool foo = false
17423   ;
17424   return 0;
17425 }
17426 _ACEOF
17427 rm -f conftest.$ac_objext
17428 if { (eval echo "$as_me:17428: \"$ac_compile\"") >&5
17429   (eval $ac_compile) 2>&5
17430   ac_status=$?
17431   echo "$as_me:17431: \$? = $ac_status" >&5
17432   (exit $ac_status); } &&
17433          { ac_try='test -s conftest.$ac_objext'
17434   { (eval echo "$as_me:17434: \"$ac_try\"") >&5
17435   (eval $ac_try) 2>&5
17436   ac_status=$?
17437   echo "$as_me:17437: \$? = $ac_status" >&5
17438   (exit $ac_status); }; }; then
17439   cf_cv_header_stdbool_h=0
17440 else
17441   echo "$as_me: failed program was:" >&5
17442 cat conftest.$ac_ext >&5
17443 cat >conftest.$ac_ext <<_ACEOF
17444 #line 17444 "configure"
17445 #include "confdefs.h"
17446
17447 #ifndef __BEOS__
17448 #include <stdbool.h>
17449 #endif
17450
17451 int
17452 main ()
17453 {
17454 bool foo = false
17455   ;
17456   return 0;
17457 }
17458 _ACEOF
17459 rm -f conftest.$ac_objext
17460 if { (eval echo "$as_me:17460: \"$ac_compile\"") >&5
17461   (eval $ac_compile) 2>&5
17462   ac_status=$?
17463   echo "$as_me:17463: \$? = $ac_status" >&5
17464   (exit $ac_status); } &&
17465          { ac_try='test -s conftest.$ac_objext'
17466   { (eval echo "$as_me:17466: \"$ac_try\"") >&5
17467   (eval $ac_try) 2>&5
17468   ac_status=$?
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit $ac_status); }; }; then
17471   cf_cv_header_stdbool_h=1
17472 else
17473   echo "$as_me: failed program was:" >&5
17474 cat conftest.$ac_ext >&5
17475 cf_cv_header_stdbool_h=0
17476 fi
17477 rm -f conftest.$ac_objext conftest.$ac_ext
17478 fi
17479 rm -f conftest.$ac_objext conftest.$ac_ext
17480 fi
17481
17482 if test "$cf_cv_header_stdbool_h" = 1
17483 then    echo "$as_me:17483: result: yes" >&5
17484 echo "${ECHO_T}yes" >&6
17485 else    echo "$as_me:17485: result: no" >&5
17486 echo "${ECHO_T}no" >&6
17487 fi
17488
17489 echo "$as_me:17489: checking for builtin bool type" >&5
17490 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17491
17492 if test "${cf_cv_builtin_bool+set}" = set; then
17493   echo $ECHO_N "(cached) $ECHO_C" >&6
17494 else
17495
17496         cat >conftest.$ac_ext <<_ACEOF
17497 #line 17497 "configure"
17498 #include "confdefs.h"
17499
17500 #include <stdio.h>
17501 #include <sys/types.h>
17502
17503 int
17504 main ()
17505 {
17506 bool x = false
17507   ;
17508   return 0;
17509 }
17510 _ACEOF
17511 rm -f conftest.$ac_objext
17512 if { (eval echo "$as_me:17512: \"$ac_compile\"") >&5
17513   (eval $ac_compile) 2>&5
17514   ac_status=$?
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); } &&
17517          { ac_try='test -s conftest.$ac_objext'
17518   { (eval echo "$as_me:17518: \"$ac_try\"") >&5
17519   (eval $ac_try) 2>&5
17520   ac_status=$?
17521   echo "$as_me:17521: \$? = $ac_status" >&5
17522   (exit $ac_status); }; }; then
17523   cf_cv_builtin_bool=1
17524 else
17525   echo "$as_me: failed program was:" >&5
17526 cat conftest.$ac_ext >&5
17527 cf_cv_builtin_bool=0
17528 fi
17529 rm -f conftest.$ac_objext conftest.$ac_ext
17530
17531 fi
17532
17533 if test "$cf_cv_builtin_bool" = 1
17534 then    echo "$as_me:17534: result: yes" >&5
17535 echo "${ECHO_T}yes" >&6
17536 else    echo "$as_me:17536: result: no" >&5
17537 echo "${ECHO_T}no" >&6
17538 fi
17539
17540 echo "$as_me:17540: checking for size of bool" >&5
17541 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17542 if test "${cf_cv_type_of_bool+set}" = set; then
17543   echo $ECHO_N "(cached) $ECHO_C" >&6
17544 else
17545
17546         rm -f cf_test.out
17547         if test "$cross_compiling" = yes; then
17548   cf_cv_type_of_bool=unknown
17549 else
17550   cat >conftest.$ac_ext <<_ACEOF
17551 #line 17551 "configure"
17552 #include "confdefs.h"
17553
17554 #include <stdlib.h>
17555 #include <stdio.h>
17556
17557 #if defined(__cplusplus)
17558
17559 #ifdef HAVE_GXX_BUILTIN_H
17560 #include <g++/builtin.h>
17561 #elif HAVE_GPP_BUILTIN_H
17562 #include <gpp/builtin.h>
17563 #elif HAVE_BUILTIN_H
17564 #include <builtin.h>
17565 #endif
17566
17567 #else
17568
17569 #if $cf_cv_header_stdbool_h
17570 #include <stdbool.h>
17571 #endif
17572
17573 #endif
17574
17575 main()
17576 {
17577         FILE *fp = fopen("cf_test.out", "w");
17578         if (fp != 0) {
17579                 bool x = true;
17580                 if ((bool)(-x) >= 0)
17581                         fputs("unsigned ", fp);
17582                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17583                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17584                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17585                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17586                 fclose(fp);
17587         }
17588         ${cf_cv_main_return:-return}(0);
17589 }
17590
17591 _ACEOF
17592 rm -f conftest$ac_exeext
17593 if { (eval echo "$as_me:17593: \"$ac_link\"") >&5
17594   (eval $ac_link) 2>&5
17595   ac_status=$?
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17598   { (eval echo "$as_me:17598: \"$ac_try\"") >&5
17599   (eval $ac_try) 2>&5
17600   ac_status=$?
17601   echo "$as_me:17601: \$? = $ac_status" >&5
17602   (exit $ac_status); }; }; then
17603   cf_cv_type_of_bool=`cat cf_test.out`
17604                  if test -z "$cf_cv_type_of_bool"; then
17605                    cf_cv_type_of_bool=unknown
17606                  fi
17607 else
17608   echo "$as_me: program exited with status $ac_status" >&5
17609 echo "$as_me: failed program was:" >&5
17610 cat conftest.$ac_ext >&5
17611 cf_cv_type_of_bool=unknown
17612 fi
17613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17614 fi
17615
17616 fi
17617
17618         rm -f cf_test.out
17619 echo "$as_me:17619: result: $cf_cv_type_of_bool" >&5
17620 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17621 if test "$cf_cv_type_of_bool" = unknown ; then
17622         case .$NCURSES_BOOL in #(vi
17623         .auto|.) NCURSES_BOOL=unsigned;;
17624         esac
17625         { echo "$as_me:17625: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17626 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17627         cf_cv_type_of_bool=$NCURSES_BOOL
17628 fi
17629
17630 echo "$as_me:17630: checking for special defines needed for etip.h" >&5
17631 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17632 cf_save_CXXFLAGS="$CXXFLAGS"
17633 cf_result="none"
17634 for cf_math in "" MATH_H
17635 do
17636 for cf_excp in "" MATH_EXCEPTION
17637 do
17638         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17639         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17640         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17641 cat >conftest.$ac_ext <<_ACEOF
17642 #line 17642 "configure"
17643 #include "confdefs.h"
17644
17645 #include <etip.h.in>
17646
17647 int
17648 main ()
17649 {
17650
17651   ;
17652   return 0;
17653 }
17654 _ACEOF
17655 rm -f conftest.$ac_objext
17656 if { (eval echo "$as_me:17656: \"$ac_compile\"") >&5
17657   (eval $ac_compile) 2>&5
17658   ac_status=$?
17659   echo "$as_me:17659: \$? = $ac_status" >&5
17660   (exit $ac_status); } &&
17661          { ac_try='test -s conftest.$ac_objext'
17662   { (eval echo "$as_me:17662: \"$ac_try\"") >&5
17663   (eval $ac_try) 2>&5
17664   ac_status=$?
17665   echo "$as_me:17665: \$? = $ac_status" >&5
17666   (exit $ac_status); }; }; then
17667
17668         test -n "$cf_math" && cat >>confdefs.h <<EOF
17669 #define ETIP_NEEDS_${cf_math} 1
17670 EOF
17671
17672         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17673 #define ETIP_NEEDS_${cf_excp} 1
17674 EOF
17675
17676         cf_result="$cf_math $cf_excp"
17677         break
17678
17679 else
17680   echo "$as_me: failed program was:" >&5
17681 cat conftest.$ac_ext >&5
17682 fi
17683 rm -f conftest.$ac_objext conftest.$ac_ext
17684 done
17685 done
17686 echo "$as_me:17686: result: $cf_result" >&5
17687 echo "${ECHO_T}$cf_result" >&6
17688 CXXFLAGS="$cf_save_CXXFLAGS"
17689
17690 if test -n "$CXX"; then
17691 echo "$as_me:17691: checking if $CXX accepts parameter initialization" >&5
17692 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17693 if test "${cf_cv_cpp_param_init+set}" = set; then
17694   echo $ECHO_N "(cached) $ECHO_C" >&6
17695 else
17696
17697         ac_ext=cc
17698 ac_cpp='$CXXCPP $CPPFLAGS'
17699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17702 ac_main_return=return
17703
17704         if test "$cross_compiling" = yes; then
17705   cf_cv_cpp_param_init=unknown
17706 else
17707   cat >conftest.$ac_ext <<_ACEOF
17708 #line 17708 "configure"
17709 #include "confdefs.h"
17710
17711 class TEST {
17712 private:
17713         int value;
17714 public:
17715         TEST(int x = 1);
17716         ~TEST();
17717 };
17718
17719 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17720 {
17721         value = x;
17722 }
17723 void main() { }
17724
17725 _ACEOF
17726 rm -f conftest$ac_exeext
17727 if { (eval echo "$as_me:17727: \"$ac_link\"") >&5
17728   (eval $ac_link) 2>&5
17729   ac_status=$?
17730   echo "$as_me:17730: \$? = $ac_status" >&5
17731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17732   { (eval echo "$as_me:17732: \"$ac_try\"") >&5
17733   (eval $ac_try) 2>&5
17734   ac_status=$?
17735   echo "$as_me:17735: \$? = $ac_status" >&5
17736   (exit $ac_status); }; }; then
17737   cf_cv_cpp_param_init=yes
17738 else
17739   echo "$as_me: program exited with status $ac_status" >&5
17740 echo "$as_me: failed program was:" >&5
17741 cat conftest.$ac_ext >&5
17742 cf_cv_cpp_param_init=no
17743 fi
17744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17745 fi
17746         ac_ext=cc
17747 ac_cpp='$CXXCPP $CPPFLAGS'
17748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17751 ac_main_return=return
17752
17753 fi
17754 echo "$as_me:17754: result: $cf_cv_cpp_param_init" >&5
17755 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17756 fi
17757 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17758 #define CPP_HAS_PARAM_INIT 1
17759 EOF
17760
17761 if test -n "$CXX"; then
17762
17763 echo "$as_me:17763: checking if $CXX accepts static_cast" >&5
17764 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17765 if test "${cf_cv_cpp_static_cast+set}" = set; then
17766   echo $ECHO_N "(cached) $ECHO_C" >&6
17767 else
17768
17769         ac_ext=cc
17770 ac_cpp='$CXXCPP $CPPFLAGS'
17771 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17772 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17773 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17774 ac_main_return=return
17775
17776         cat >conftest.$ac_ext <<_ACEOF
17777 #line 17777 "configure"
17778 #include "confdefs.h"
17779
17780 class NCursesPanel
17781 {
17782 public:
17783   NCursesPanel(int nlines,
17784                int ncols,
17785                int begin_y = 0,
17786                int begin_x = 0)
17787   {
17788   }
17789
17790   ~NCursesPanel();
17791 };
17792
17793 template<class T> class NCursesUserPanel : public NCursesPanel
17794 {
17795 public:
17796   NCursesUserPanel (int nlines,
17797                     int ncols,
17798                     int begin_y = 0,
17799                     int begin_x = 0,
17800                     const T* p_UserData = static_cast<T*>(0))
17801     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17802   {
17803   };
17804   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17805   {
17806   };
17807
17808   virtual ~NCursesUserPanel() {};
17809 };
17810
17811 int
17812 main ()
17813 {
17814
17815         const char* p_UserData = static_cast<char*>(0)
17816   ;
17817   return 0;
17818 }
17819 _ACEOF
17820 rm -f conftest.$ac_objext
17821 if { (eval echo "$as_me:17821: \"$ac_compile\"") >&5
17822   (eval $ac_compile) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit $ac_status); } &&
17826          { ac_try='test -s conftest.$ac_objext'
17827   { (eval echo "$as_me:17827: \"$ac_try\"") >&5
17828   (eval $ac_try) 2>&5
17829   ac_status=$?
17830   echo "$as_me:17830: \$? = $ac_status" >&5
17831   (exit $ac_status); }; }; then
17832   cf_cv_cpp_static_cast=yes
17833 else
17834   echo "$as_me: failed program was:" >&5
17835 cat conftest.$ac_ext >&5
17836 cf_cv_cpp_static_cast=no
17837 fi
17838 rm -f conftest.$ac_objext conftest.$ac_ext
17839
17840         ac_ext=cc
17841 ac_cpp='$CXXCPP $CPPFLAGS'
17842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17845 ac_main_return=return
17846
17847 fi
17848 echo "$as_me:17848: result: $cf_cv_cpp_static_cast" >&5
17849 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17850
17851 fi
17852
17853 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17854 #define CPP_HAS_STATIC_CAST 1
17855 EOF
17856
17857         CXX_AR='$(AR)'
17858         CXX_ARFLAGS='$(ARFLAGS)'
17859         case $cf_cv_system_name in #(vi
17860         irix*) #(vi
17861             if test "$GXX" != yes ; then
17862                 CXX_AR='$(CXX)'
17863                 CXX_ARFLAGS='-ar -o'
17864             fi
17865             ;;
17866         sco3.2v5*) #(vi
17867             CXXLDFLAGS="-u main"
17868             ;;
17869         solaris2*)
17870             if test "$GXX" != yes ; then
17871                 CXX_AR='$(CXX)'
17872                 CXX_ARFLAGS='-xar -o'
17873             fi
17874             ;;
17875         esac
17876
17877 else
17878         cf_cxx_library=no
17879         cf_cv_builtin_bool=1
17880
17881         # Just because we are not configuring against C++ right now does not
17882         # mean that a user will not want to use C++.  Some distributors disable
17883         # the C++ portion of this configuration as a shortcut (or just to avoid
17884         # compiling the demo in the c++ directory).  So we need a reasonable
17885         # default for the 'bool' type.
17886         #
17887         # Caveat: since the storage of the bool type is not standardized, it
17888         # may change.
17889
17890         if test "$NCURSES_BOOL" != auto ; then
17891                 cf_cv_type_of_bool=$NCURSES_BOOL
17892                 cf_cv_header_stdbool_h=0
17893         else
17894                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17895
17896 echo "$as_me:17896: checking for size of bool" >&5
17897 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17898 if test "${cf_cv_type_of_bool+set}" = set; then
17899   echo $ECHO_N "(cached) $ECHO_C" >&6
17900 else
17901
17902         rm -f cf_test.out
17903         if test "$cross_compiling" = yes; then
17904   cf_cv_type_of_bool=unknown
17905 else
17906   cat >conftest.$ac_ext <<_ACEOF
17907 #line 17907 "configure"
17908 #include "confdefs.h"
17909
17910 #include <stdlib.h>
17911 #include <stdio.h>
17912
17913 #if defined(__cplusplus)
17914
17915 #ifdef HAVE_GXX_BUILTIN_H
17916 #include <g++/builtin.h>
17917 #elif HAVE_GPP_BUILTIN_H
17918 #include <gpp/builtin.h>
17919 #elif HAVE_BUILTIN_H
17920 #include <builtin.h>
17921 #endif
17922
17923 #else
17924
17925 #if $cf_cv_header_stdbool_h
17926 #include <stdbool.h>
17927 #endif
17928
17929 #endif
17930
17931 main()
17932 {
17933         FILE *fp = fopen("cf_test.out", "w");
17934         if (fp != 0) {
17935                 bool x = true;
17936                 if ((bool)(-x) >= 0)
17937                         fputs("unsigned ", fp);
17938                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17939                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17940                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17941                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17942                 fclose(fp);
17943         }
17944         ${cf_cv_main_return:-return}(0);
17945 }
17946
17947 _ACEOF
17948 rm -f conftest$ac_exeext
17949 if { (eval echo "$as_me:17949: \"$ac_link\"") >&5
17950   (eval $ac_link) 2>&5
17951   ac_status=$?
17952   echo "$as_me:17952: \$? = $ac_status" >&5
17953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17954   { (eval echo "$as_me:17954: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:17957: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   cf_cv_type_of_bool=`cat cf_test.out`
17960                  if test -z "$cf_cv_type_of_bool"; then
17961                    cf_cv_type_of_bool=unknown
17962                  fi
17963 else
17964   echo "$as_me: program exited with status $ac_status" >&5
17965 echo "$as_me: failed program was:" >&5
17966 cat conftest.$ac_ext >&5
17967 cf_cv_type_of_bool=unknown
17968 fi
17969 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17970 fi
17971
17972 fi
17973
17974         rm -f cf_test.out
17975 echo "$as_me:17975: result: $cf_cv_type_of_bool" >&5
17976 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17977 if test "$cf_cv_type_of_bool" = unknown ; then
17978         case .$NCURSES_BOOL in #(vi
17979         .auto|.) NCURSES_BOOL=unsigned;;
17980         esac
17981         { echo "$as_me:17981: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17982 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17983         cf_cv_type_of_bool=$NCURSES_BOOL
17984 fi
17985
17986                 else
17987                         echo "$as_me:17987: checking for fallback type of bool" >&5
17988 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17989                         case "$host_cpu" in #(vi
17990                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17991                         *)      cf_cv_type_of_bool=int  ;;
17992                         esac
17993                         echo "$as_me:17993: result: $cf_cv_type_of_bool" >&5
17994 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17995                 fi
17996         fi
17997 fi
17998
17999 # If the C compiler did not declare bool, and we did not determine that the C++
18000 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18001 # ncurses library use the same type as C++ bool.  Note that this allows one to
18002 # specify the type of bool in a configure-script option and postpone
18003 # integration with the C++ compiler provided that the types are compatible.
18004 USE_CXX_BOOL=1
18005 if test $cf_cv_cc_bool_type = 1
18006 then
18007         # oops: C has a bool.  Unlikely, but C++ could differ.
18008         USE_CXX_BOOL=0
18009 elif test $cf_cv_builtin_bool = 0
18010 then
18011         # C++ has no bool
18012         USE_CXX_BOOL=0
18013 else
18014         # this is the normal case
18015         USE_CXX_BOOL='defined(__cplusplus)'
18016 fi
18017
18018 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18019
18020         if test "$cf_with_ada" != "no" ; then
18021                 if test "$with_libtool" != "no"; then
18022                         { echo "$as_me:18022: WARNING: libtool does not support Ada - disabling feature" >&5
18023 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18024                         cf_with_ada=no
18025                 fi
18026         fi
18027
18028         if test "$cf_with_ada" != "no" ; then
18029
18030 cf_ada_make=gnatmake
18031 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18032 set dummy $cf_ada_make; ac_word=$2
18033 echo "$as_me:18033: checking for $ac_word" >&5
18034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18035 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18036   echo $ECHO_N "(cached) $ECHO_C" >&6
18037 else
18038   if test -n "$gnat_exists"; then
18039   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18040 else
18041   ac_save_IFS=$IFS; IFS=$ac_path_separator
18042 ac_dummy="$PATH"
18043 for ac_dir in $ac_dummy; do
18044   IFS=$ac_save_IFS
18045   test -z "$ac_dir" && ac_dir=.
18046   $as_executable_p "$ac_dir/$ac_word" || continue
18047 ac_cv_prog_gnat_exists="yes"
18048 echo "$as_me:18048: found $ac_dir/$ac_word" >&5
18049 break
18050 done
18051
18052   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18053 fi
18054 fi
18055 gnat_exists=$ac_cv_prog_gnat_exists
18056 if test -n "$gnat_exists"; then
18057   echo "$as_me:18057: result: $gnat_exists" >&5
18058 echo "${ECHO_T}$gnat_exists" >&6
18059 else
18060   echo "$as_me:18060: result: no" >&5
18061 echo "${ECHO_T}no" >&6
18062 fi
18063
18064 if test "$ac_cv_prog_gnat_exists" = no; then
18065    cf_ada_make=
18066 else
18067
18068 echo "$as_me:18068: checking for gnat version" >&5
18069 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18070 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18071         grep '[0-9].[0-9][0-9]*' |\
18072     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18073 echo "$as_me:18073: result: $cf_gnat_version" >&5
18074 echo "${ECHO_T}$cf_gnat_version" >&6
18075
18076 case $cf_gnat_version in #(vi
18077 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18078         cf_cv_prog_gnat_correct=yes
18079         ;;
18080 *)
18081         { echo "$as_me:18081: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18082 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18083         cf_cv_prog_gnat_correct=no
18084         ;;
18085 esac
18086
18087    # Extract the first word of "m4", so it can be a program name with args.
18088 set dummy m4; ac_word=$2
18089 echo "$as_me:18089: checking for $ac_word" >&5
18090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18091 if test "${ac_cv_prog_M4_exists+set}" = set; then
18092   echo $ECHO_N "(cached) $ECHO_C" >&6
18093 else
18094   if test -n "$M4_exists"; then
18095   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18096 else
18097   ac_save_IFS=$IFS; IFS=$ac_path_separator
18098 ac_dummy="$PATH"
18099 for ac_dir in $ac_dummy; do
18100   IFS=$ac_save_IFS
18101   test -z "$ac_dir" && ac_dir=.
18102   $as_executable_p "$ac_dir/$ac_word" || continue
18103 ac_cv_prog_M4_exists="yes"
18104 echo "$as_me:18104: found $ac_dir/$ac_word" >&5
18105 break
18106 done
18107
18108   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18109 fi
18110 fi
18111 M4_exists=$ac_cv_prog_M4_exists
18112 if test -n "$M4_exists"; then
18113   echo "$as_me:18113: result: $M4_exists" >&5
18114 echo "${ECHO_T}$M4_exists" >&6
18115 else
18116   echo "$as_me:18116: result: no" >&5
18117 echo "${ECHO_T}no" >&6
18118 fi
18119
18120    if test "$ac_cv_prog_M4_exists" = no; then
18121       cf_cv_prog_gnat_correct=no
18122       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18123    fi
18124    if test "$cf_cv_prog_gnat_correct" = yes; then
18125       echo "$as_me:18125: checking if GNAT works" >&5
18126 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18127
18128 rm -rf conftest* *~conftest*
18129 cat >>conftest.ads <<CF_EOF
18130 procedure conftest;
18131 CF_EOF
18132 cat >>conftest.adb <<CF_EOF
18133 with Text_IO;
18134 with GNAT.OS_Lib;
18135 procedure conftest is
18136 begin
18137    Text_IO.Put ("Hello World");
18138    Text_IO.New_Line;
18139    GNAT.OS_Lib.OS_Exit (0);
18140 end conftest;
18141 CF_EOF
18142 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18143    if ( ./conftest 1>&5 2>&1 ) ; then
18144       cf_cv_prog_gnat_correct=yes
18145    else
18146       cf_cv_prog_gnat_correct=no
18147    fi
18148 else
18149    cf_cv_prog_gnat_correct=no
18150 fi
18151 rm -rf conftest* *~conftest*
18152
18153       echo "$as_me:18153: result: $cf_cv_prog_gnat_correct" >&5
18154 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18155    fi
18156 fi
18157
18158                 if test "$cf_cv_prog_gnat_correct" = yes; then
18159
18160         ADAFLAGS="$ADAFLAGS -gnatpn"
18161
18162                         # make ADAFLAGS consistent with CFLAGS
18163                         case "$CFLAGS" in
18164                         *-g*)
18165
18166         ADAFLAGS="$ADAFLAGS -g"
18167
18168                                 ;;
18169                         esac
18170                         case "$CFLAGS" in
18171                         *-O*)
18172
18173         ADAFLAGS="$ADAFLAGS -O3"
18174
18175                                 ;;
18176                         esac
18177
18178 echo "$as_me:18178: checking if GNAT supports generics" >&5
18179 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18180 case $cf_gnat_version in #(vi
18181 3.[1-9]*|[4-9].*) #(vi
18182         cf_gnat_generics=yes
18183         ;;
18184 *)
18185         cf_gnat_generics=no
18186         ;;
18187 esac
18188 echo "$as_me:18188: result: $cf_gnat_generics" >&5
18189 echo "${ECHO_T}$cf_gnat_generics" >&6
18190
18191 if test "$cf_gnat_generics" = yes
18192 then
18193         cf_compile_generics=generics
18194         cf_generic_objects="\${GENOBJS}"
18195 else
18196         cf_compile_generics=
18197         cf_generic_objects=
18198 fi
18199
18200 echo "$as_me:18200: checking if GNAT supports SIGINT" >&5
18201 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18202 if test "${cf_cv_gnat_sigint+set}" = set; then
18203   echo $ECHO_N "(cached) $ECHO_C" >&6
18204 else
18205
18206 rm -rf conftest* *~conftest*
18207 cat >>conftest.ads <<CF_EOF
18208 with Ada.Interrupts.Names;
18209
18210 package ConfTest is
18211
18212    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18213    pragma Unreserve_All_Interrupts;
18214    pragma Warnings (On);
18215
18216    protected Process is
18217       procedure Stop;
18218       function Continue return Boolean;
18219       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18220    private
18221       Done : Boolean := False;
18222    end Process;
18223
18224 end ConfTest;
18225 CF_EOF
18226 cat >>conftest.adb <<CF_EOF
18227 package body ConfTest is
18228    protected body Process is
18229       procedure Stop is
18230       begin
18231          Done := True;
18232       end Stop;
18233       function Continue return Boolean is
18234       begin
18235          return not Done;
18236       end Continue;
18237    end Process;
18238 end ConfTest;
18239 CF_EOF
18240 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18241       cf_cv_gnat_sigint=yes
18242 else
18243    cf_cv_gnat_sigint=no
18244 fi
18245 rm -rf conftest* *~conftest*
18246
18247 fi
18248 echo "$as_me:18248: result: $cf_cv_gnat_sigint" >&5
18249 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18250
18251 if test $cf_cv_gnat_sigint = yes ; then
18252         USE_GNAT_SIGINT=""
18253 else
18254         USE_GNAT_SIGINT="#"
18255 fi
18256
18257 echo "$as_me:18257: checking if GNAT pragma Unreferenced works" >&5
18258 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18259 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18260   echo $ECHO_N "(cached) $ECHO_C" >&6
18261 else
18262
18263 rm -rf conftest* *~conftest*
18264 cat >>conftest.ads <<CF_EOF
18265 procedure conftest;
18266 CF_EOF
18267 cat >>conftest.adb <<CF_EOF
18268 with Text_IO;
18269 with GNAT.OS_Lib;
18270 procedure conftest is
18271    test : Integer;
18272    pragma Unreferenced (test);
18273 begin
18274    test := 1;
18275    Text_IO.Put ("Hello World");
18276    Text_IO.New_Line;
18277    GNAT.OS_Lib.OS_Exit (0);
18278 end conftest;
18279 CF_EOF
18280 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18281       cf_cv_pragma_unreferenced=yes
18282 else
18283    cf_cv_pragma_unreferenced=no
18284 fi
18285 rm -rf conftest* *~conftest*
18286
18287 fi
18288 echo "$as_me:18288: result: $cf_cv_pragma_unreferenced" >&5
18289 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18290
18291 # if the pragma is supported, use it (needed in the Trace code).
18292 if test $cf_cv_pragma_unreferenced = yes ; then
18293         PRAGMA_UNREF=TRUE
18294 else
18295         PRAGMA_UNREF=FALSE
18296 fi
18297
18298 cf_gnat_libraries=no
18299 cf_gnat_projects=no
18300
18301 echo "$as_me:18301: checking if GNAT supports project files" >&5
18302 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18303 case $cf_gnat_version in #(vi
18304 3.[0-9]*) #(vi
18305         ;;
18306 *)
18307         case $cf_cv_system_name in #(vi
18308         cygwin*) #(vi
18309                 ;;
18310         *)
18311                 mkdir conftest.src conftest.bin conftest.lib
18312                 cd conftest.src
18313                 rm -rf conftest* *~conftest*
18314                 cat >>library.gpr <<CF_EOF
18315 project Library is
18316   Kind := External ("LIB_KIND");
18317   for Library_Name use "ConfTest";
18318   for Object_Dir use ".";
18319   for Library_ALI_Dir use External("LIBRARY_DIR");
18320   for Library_Version use External ("SONAME");
18321   for Library_Kind use Kind;
18322   for Library_Dir use External("BUILD_DIR");
18323   Source_Dir := External ("SOURCE_DIR");
18324   for Source_Dirs use (Source_Dir);
18325   package Compiler is
18326      for Default_Switches ("Ada") use
18327        ("-g",
18328         "-O2",
18329         "-gnatafno",
18330         "-gnatVa",   -- All validity checks
18331         "-gnatwa");  -- Activate all optional errors
18332   end Compiler;
18333 end Library;
18334 CF_EOF
18335                 cat >>confpackage.ads <<CF_EOF
18336 package ConfPackage is
18337    procedure conftest;
18338 end ConfPackage;
18339 CF_EOF
18340                 cat >>confpackage.adb <<CF_EOF
18341 with Text_IO;
18342 package body ConfPackage is
18343    procedure conftest is
18344    begin
18345       Text_IO.Put ("Hello World");
18346       Text_IO.New_Line;
18347    end conftest;
18348 end ConfPackage;
18349 CF_EOF
18350                 if ( $cf_ada_make $ADAFLAGS \
18351                                 -Plibrary.gpr \
18352                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18353                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18354                                 -XSOURCE_DIR=`pwd` \
18355                                 -XSONAME=libConfTest.so.1 \
18356                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18357                         cf_gnat_projects=yes
18358                 fi
18359                 cd ..
18360                 if test -f conftest.lib/confpackage.ali
18361                 then
18362                         cf_gnat_libraries=yes
18363                 fi
18364                 rm -rf conftest* *~conftest*
18365                 ;;
18366         esac
18367         ;;
18368 esac
18369 echo "$as_me:18369: result: $cf_gnat_projects" >&5
18370 echo "${ECHO_T}$cf_gnat_projects" >&6
18371
18372 if test $cf_gnat_projects = yes
18373 then
18374         echo "$as_me:18374: checking if GNAT supports libraries" >&5
18375 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18376         echo "$as_me:18376: result: $cf_gnat_libraries" >&5
18377 echo "${ECHO_T}$cf_gnat_libraries" >&6
18378 fi
18379
18380 if test "$cf_gnat_projects" = yes
18381 then
18382         USE_OLD_MAKERULES="#"
18383         USE_GNAT_PROJECTS=""
18384 else
18385         USE_OLD_MAKERULES=""
18386         USE_GNAT_PROJECTS="#"
18387 fi
18388
18389 if test "$cf_gnat_libraries" = yes
18390 then
18391         USE_GNAT_LIBRARIES=""
18392 else
18393         USE_GNAT_LIBRARIES="#"
18394 fi
18395
18396 echo "$as_me:18396: checking for ada-compiler" >&5
18397 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18398
18399 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18400 if test "${with_ada_compiler+set}" = set; then
18401   withval="$with_ada_compiler"
18402   cf_ada_compiler=$withval
18403 else
18404   cf_ada_compiler=gnatmake
18405 fi;
18406
18407 echo "$as_me:18407: result: $cf_ada_compiler" >&5
18408 echo "${ECHO_T}$cf_ada_compiler" >&6
18409
18410                         cf_ada_package=terminal_interface
18411
18412 echo "$as_me:18412: checking for ada-include" >&5
18413 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18414
18415 # Check whether --with-ada-include or --without-ada-include was given.
18416 if test "${with_ada_include+set}" = set; then
18417   withval="$with_ada_include"
18418
18419 else
18420   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18421 fi; if test -n "$prefix/share/ada/adainclude" ; then
18422
18423 if test "x$prefix" != xNONE; then
18424   cf_path_syntax="$prefix"
18425 else
18426   cf_path_syntax="$ac_default_prefix"
18427 fi
18428
18429 case ".$withval" in #(vi
18430 .\$\(*\)*|.\'*\'*) #(vi
18431   ;;
18432 ..|./*|.\\*) #(vi
18433   ;;
18434 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18435   ;;
18436 .\${*prefix}*) #(vi
18437   eval withval="$withval"
18438   case ".$withval" in #(vi
18439   .NONE/*)
18440     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18441     ;;
18442   esac
18443   ;; #(vi
18444 .no|.NONE/*)
18445   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18446   ;;
18447 *)
18448   { { echo "$as_me:18448: error: expected a pathname, not \"$withval\"" >&5
18449 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18450    { (exit 1); exit 1; }; }
18451   ;;
18452 esac
18453
18454 fi
18455 ADA_INCLUDE="$withval"
18456
18457 echo "$as_me:18457: result: $ADA_INCLUDE" >&5
18458 echo "${ECHO_T}$ADA_INCLUDE" >&6
18459
18460 echo "$as_me:18460: checking for ada-objects" >&5
18461 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18462
18463 # Check whether --with-ada-objects or --without-ada-objects was given.
18464 if test "${with_ada_objects+set}" = set; then
18465   withval="$with_ada_objects"
18466
18467 else
18468   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18469 fi; if test -n "$prefix/lib/ada/adalib" ; then
18470
18471 if test "x$prefix" != xNONE; then
18472   cf_path_syntax="$prefix"
18473 else
18474   cf_path_syntax="$ac_default_prefix"
18475 fi
18476
18477 case ".$withval" in #(vi
18478 .\$\(*\)*|.\'*\'*) #(vi
18479   ;;
18480 ..|./*|.\\*) #(vi
18481   ;;
18482 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18483   ;;
18484 .\${*prefix}*) #(vi
18485   eval withval="$withval"
18486   case ".$withval" in #(vi
18487   .NONE/*)
18488     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18489     ;;
18490   esac
18491   ;; #(vi
18492 .no|.NONE/*)
18493   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18494   ;;
18495 *)
18496   { { echo "$as_me:18496: error: expected a pathname, not \"$withval\"" >&5
18497 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18498    { (exit 1); exit 1; }; }
18499   ;;
18500 esac
18501
18502 fi
18503 ADA_OBJECTS="$withval"
18504
18505 echo "$as_me:18505: result: $ADA_OBJECTS" >&5
18506 echo "${ECHO_T}$ADA_OBJECTS" >&6
18507
18508 echo "$as_me:18508: checking if an Ada95 shared-library should be built" >&5
18509 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18510
18511 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18512 if test "${with_ada_sharedlib+set}" = set; then
18513   withval="$with_ada_sharedlib"
18514   with_ada_sharedlib=$withval
18515 else
18516   with_ada_sharedlib=no
18517 fi;
18518 echo "$as_me:18518: result: $with_ada_sharedlib" >&5
18519 echo "${ECHO_T}$with_ada_sharedlib" >&6
18520
18521 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18522 MAKE_ADA_SHAREDLIB="#"
18523
18524 if test "x$with_ada_sharedlib" != xno
18525 then
18526         MAKE_ADA_SHAREDLIB=
18527         if test "x$with_ada_sharedlib" != xyes
18528         then
18529                 ADA_SHAREDLIB="$with_ada_sharedlib"
18530         fi
18531 fi
18532
18533                 fi
18534         fi
18535 else
18536         cf_with_ada=no
18537 fi
18538
18539 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18540 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18541 ###
18542 ### ticlib modules may be a separate library, otherwise contained in termlib.
18543 ### termlib modules may be a separate library, otherwise contained in ncurses.
18544 ###
18545 ### The of "+" or " " between the tokens controls the way the script
18546 ### chooses to split module lists into libraries.
18547 ###
18548 ### (see CF_LIB_RULES).
18549 echo "$as_me:18549: checking for library subsets" >&5
18550 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18551 LIB_SUBSETS=
18552
18553 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18554         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18555         if test "$with_ticlib" != no ; then
18556                 LIB_SUBSETS="${LIB_SUBSETS} "
18557         else
18558                 LIB_SUBSETS="${LIB_SUBSETS}+"
18559         fi
18560 fi
18561
18562 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18563 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18564
18565 if test "$with_termlib" != no ; then
18566         LIB_SUBSETS="${LIB_SUBSETS} "
18567 else
18568         LIB_SUBSETS="${LIB_SUBSETS}+"
18569 fi
18570
18571 LIB_SUBSETS="${LIB_SUBSETS}base"
18572
18573 # Most term-driver calls are to tinfo, but some like init_pair are to the
18574 # base library (so it resides in base).
18575 if test "$with_term_driver" != no ; then
18576         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18577         case $cf_cv_system_name in #(vi
18578         *mingw32*) #(vi
18579                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18580                 ;;
18581         *) #(vi
18582                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18583                 ;;
18584         esac
18585 fi
18586
18587 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18588 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18589
18590 echo "$as_me:18590: result: $LIB_SUBSETS" >&5
18591 echo "${ECHO_T}$LIB_SUBSETS" >&6
18592
18593 ### Construct the list of include-directories to be generated
18594
18595 CPPFLAGS="$CPPFLAGS -I. -I../include"
18596 if test "$srcdir" != "."; then
18597         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18598 fi
18599 if test "$GCC" != yes; then
18600         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18601 elif test "$includedir" != "/usr/include"; then
18602         if test "$includedir" = '${prefix}/include' ; then
18603                 if test $prefix != /usr ; then
18604                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18605                 fi
18606         else
18607                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18608         fi
18609 fi
18610
18611 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18612 if test "$srcdir" != "."; then
18613         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18614 fi
18615 if test "$GCC" != yes; then
18616         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18617 elif test "$includedir" != "/usr/include"; then
18618         if test "$includedir" = '${prefix}/include' ; then
18619                 if test $prefix != /usr ; then
18620                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18621                 fi
18622         else
18623                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18624         fi
18625 fi
18626
18627 ### Build up pieces for makefile rules
18628 echo "$as_me:18628: checking default library suffix" >&5
18629 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18630
18631         case $DFT_LWR_MODEL in
18632         libtool) DFT_ARG_SUFFIX=''   ;;
18633         normal)  DFT_ARG_SUFFIX=''   ;;
18634         debug)   DFT_ARG_SUFFIX='_g' ;;
18635         profile) DFT_ARG_SUFFIX='_p' ;;
18636         shared)  DFT_ARG_SUFFIX=''   ;;
18637         esac
18638         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18639 echo "$as_me:18639: result: $DFT_ARG_SUFFIX" >&5
18640 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18641
18642 echo "$as_me:18642: checking default library-dependency suffix" >&5
18643 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18644
18645         case $DFT_LWR_MODEL in #(vi
18646         libtool) #(vi
18647                 DFT_LIB_SUFFIX='.la'
18648                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18649                 ;;
18650         normal) #(vi
18651                 DFT_LIB_SUFFIX='.a'
18652                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18653                 ;;
18654         debug) #(vi
18655                 DFT_LIB_SUFFIX='_g.a'
18656                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18657                 ;;
18658         profile) #(vi
18659                 DFT_LIB_SUFFIX='_p.a'
18660                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18661                 ;;
18662         shared) #(vi
18663                 case $cf_cv_system_name in
18664                 aix[56]*) #(vi
18665                         DFT_LIB_SUFFIX='.a'
18666                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18667                         ;;
18668                 cygwin*) #(vi
18669                         DFT_LIB_SUFFIX='.dll'
18670                         DFT_DEP_SUFFIX='.dll.a'
18671                         ;;
18672                 darwin*) #(vi
18673                         DFT_LIB_SUFFIX='.dylib'
18674                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18675                         ;;
18676                 hpux*) #(vi
18677                         case $target in
18678                         ia64*) #(vi
18679                                 DFT_LIB_SUFFIX='.so'
18680                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18681                                 ;;
18682                         *) #(vi
18683                                 DFT_LIB_SUFFIX='.sl'
18684                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18685                                 ;;
18686                         esac
18687                         ;;
18688                 *)      DFT_LIB_SUFFIX='.so'
18689                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18690                         ;;
18691                 esac
18692         esac
18693         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18694         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18695 echo "$as_me:18695: result: $DFT_DEP_SUFFIX" >&5
18696 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18697
18698 echo "$as_me:18698: checking default object directory" >&5
18699 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18700
18701         case $DFT_LWR_MODEL in
18702         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18703         normal)  DFT_OBJ_SUBDIR='objects' ;;
18704         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18705         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18706         shared)
18707                 case $cf_cv_system_name in #(vi
18708                 cygwin) #(vi
18709                         DFT_OBJ_SUBDIR='objects' ;;
18710                 *)
18711                         DFT_OBJ_SUBDIR='obj_s' ;;
18712                 esac
18713         esac
18714 echo "$as_me:18714: result: $DFT_OBJ_SUBDIR" >&5
18715 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18716
18717 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18718 if test "$cf_with_cxx" = yes ; then
18719 echo "$as_me:18719: checking c++ library-dependency suffix" >&5
18720 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18721 if test "$with_libtool" != "no"; then
18722         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18723 else
18724
18725         case normal in #(vi
18726         libtool) #(vi
18727                 CXX_LIB_SUFFIX='.la'
18728                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18729                 ;;
18730         normal) #(vi
18731                 CXX_LIB_SUFFIX='.a'
18732                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18733                 ;;
18734         debug) #(vi
18735                 CXX_LIB_SUFFIX='_g.a'
18736                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18737                 ;;
18738         profile) #(vi
18739                 CXX_LIB_SUFFIX='_p.a'
18740                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18741                 ;;
18742         shared) #(vi
18743                 case $cf_cv_system_name in
18744                 aix[56]*) #(vi
18745                         CXX_LIB_SUFFIX='.a'
18746                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18747                         ;;
18748                 cygwin*) #(vi
18749                         CXX_LIB_SUFFIX='.dll'
18750                         CXX_DEP_SUFFIX='.dll.a'
18751                         ;;
18752                 darwin*) #(vi
18753                         CXX_LIB_SUFFIX='.dylib'
18754                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18755                         ;;
18756                 hpux*) #(vi
18757                         case $target in
18758                         ia64*) #(vi
18759                                 CXX_LIB_SUFFIX='.so'
18760                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18761                                 ;;
18762                         *) #(vi
18763                                 CXX_LIB_SUFFIX='.sl'
18764                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18765                                 ;;
18766                         esac
18767                         ;;
18768                 *)      CXX_LIB_SUFFIX='.so'
18769                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18770                         ;;
18771                 esac
18772         esac
18773         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18774         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18775 fi
18776 echo "$as_me:18776: result: $CXX_LIB_SUFFIX" >&5
18777 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18778
18779 fi
18780
18781 # do not want -ldl in build except as needed for -lncurses dependency
18782 if test "$with_dlsym" = yes ; then
18783 if test $DFT_LWR_MODEL = shared || \
18784    test $DFT_LWR_MODEL = libtool ; then
18785
18786 # remove dl library from $LIBS
18787 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18788
18789 fi
18790 fi
18791 ### Set up low-level terminfo dependencies for makefiles.
18792
18793 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18794 # do not need libdl
18795 TICS_LIST=
18796 if test "$with_dlsym" = yes ; then
18797
18798 # remove dl library from $SHLIB_LIST
18799 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18800
18801 fi
18802
18803 if test "$with_ticlib" != no ; then
18804
18805         if test "$with_ticlib" != yes ; then
18806                 TICS_NAME=$with_ticlib
18807                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18808                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18809                 TICS_LIB_SUFFIX="${with_ticlib}"
18810         else
18811                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18812                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18813                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18814         fi
18815         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18816 else
18817         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18818 fi
18819
18820 if test "$with_termlib" != no ; then
18821
18822         if test "$with_termlib" != yes ; then
18823                 TINFO_NAME=$with_termlib
18824                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18825                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18826                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18827                 TINFO_LIB_SUFFIX="${with_termlib}"
18828         else
18829                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18830                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18831                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18832                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18833         fi
18834
18835         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18836         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18837         if test "$DFT_LWR_MODEL" = "libtool"; then
18838                 TEST_ARGS="${TEST_DEPS}"
18839                 TEST_ARG2="${TEST_DEP2}"
18840                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18841                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18842                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18843         else
18844                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18845                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18846                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18847                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18848                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18849         fi
18850 else
18851         # the next lines are needed for linking libtic over libncurses
18852         TINFO_NAME=${LIB_NAME}
18853         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18854         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18855         if test "$with_tic_depends" = yes ; then
18856                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18857         else
18858                 TICS_LIST="$SHLIB_LIST"
18859         fi
18860
18861         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18862 fi
18863
18864 if test "$DFT_LWR_MODEL" = shared ; then
18865         case $cf_cv_system_name in #(vi
18866         cygwin*)
18867                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18868                 TINFO_SUFFIX=.dll
18869                 ;;
18870         esac
18871 fi
18872
18873 if test "$with_dlsym" = yes ; then
18874
18875 # remove dl library from $TICS_LIST
18876 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18877
18878 fi
18879
18880 if test "$DFT_LWR_MODEL" = "libtool"; then
18881     OBJEXT=lo
18882 fi
18883
18884 # needed for Ada95
18885 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18886
18887 case $DFT_LWR_MODEL in
18888 normal|debug|profile)
18889
18890 if test "$GCC" = yes ; then
18891         case $cf_cv_system_name in #(
18892         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18893                 LDFLAGS_STATIC=
18894                 LDFLAGS_SHARED=
18895                 ;;
18896     *)  #( normally, except when broken
18897         LDFLAGS_STATIC=-static
18898         LDFLAGS_SHARED=-dynamic
18899         ;;
18900     esac
18901 else
18902         case $cf_cv_system_name in #(
18903         aix[456]*)      #( from ld manpage
18904                 LDFLAGS_STATIC=-bstatic
18905                 LDFLAGS_SHARED=-bdynamic
18906                 ;;
18907         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18908                 # We could also use just "archive" and "shared".
18909                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18910                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18911                 ;;
18912         irix*)          #( from ld manpage IRIX64
18913                 LDFLAGS_STATIC=-Bstatic
18914                 LDFLAGS_SHARED=-Bdynamic
18915                 ;;
18916         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18917                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18918                 LDFLAGS_STATIC=-noso
18919                 LDFLAGS_SHARED=-so_archive
18920                 ;;
18921         solaris2*)
18922                 LDFLAGS_STATIC=-Bstatic
18923                 LDFLAGS_SHARED=-Bdynamic
18924                 ;;
18925         esac
18926 fi
18927
18928 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
18929 then
18930         echo "$as_me:18930: checking if linker supports switching between static/dynamic" >&5
18931 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
18932
18933         rm -f libconftest.a
18934         cat >conftest.$ac_ext <<EOF
18935 #line 18935 "configure"
18936 #include <stdio.h>
18937 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
18938 EOF
18939         if { (eval echo "$as_me:18939: \"$ac_compile\"") >&5
18940   (eval $ac_compile) 2>&5
18941   ac_status=$?
18942   echo "$as_me:18942: \$? = $ac_status" >&5
18943   (exit $ac_status); } ; then
18944                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
18945                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
18946         fi
18947         rm -f conftest.*
18948
18949         cf_save_LIBS="$LIBS"
18950
18951         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
18952         cat >conftest.$ac_ext <<_ACEOF
18953 #line 18953 "configure"
18954 #include "confdefs.h"
18955
18956 #line 18956 "configure"
18957 #include <stdio.h>
18958 int cf_ldflags_static(FILE *fp);
18959
18960 int
18961 main ()
18962 {
18963
18964         return cf_ldflags_static(stdin);
18965
18966   ;
18967   return 0;
18968 }
18969 _ACEOF
18970 rm -f conftest.$ac_objext conftest$ac_exeext
18971 if { (eval echo "$as_me:18971: \"$ac_link\"") >&5
18972   (eval $ac_link) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit $ac_status); } &&
18976          { ac_try='test -s conftest$ac_exeext'
18977   { (eval echo "$as_me:18977: \"$ac_try\"") >&5
18978   (eval $ac_try) 2>&5
18979   ac_status=$?
18980   echo "$as_me:18980: \$? = $ac_status" >&5
18981   (exit $ac_status); }; }; then
18982   cf_ldflags_static=yes
18983 else
18984   echo "$as_me: failed program was:" >&5
18985 cat conftest.$ac_ext >&5
18986 cf_ldflags_static=no
18987 fi
18988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18989
18990         rm -f libconftest.*
18991         LIBS="$cf_save_LIBS"
18992
18993         echo "$as_me:18993: result: $cf_ldflags_static" >&5
18994 echo "${ECHO_T}$cf_ldflags_static" >&6
18995
18996         if test $cf_ldflags_static != yes
18997         then
18998                 LDFLAGS_STATIC=
18999                 LDFLAGS_SHARED=
19000         fi
19001 else
19002         LDFLAGS_STATIC=
19003         LDFLAGS_SHARED=
19004 fi
19005
19006         ;;
19007 esac
19008
19009 echo "$as_me:19009: checking where we will install curses.h" >&5
19010 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19011 test "$with_overwrite" = no && \
19012 test "x$includedir" = 'x${prefix}/include' && \
19013         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19014 echo "$as_me:19014: result: $includedir" >&5
19015 echo "${ECHO_T}$includedir" >&6
19016
19017 ### Resolve a conflict between normal and wide-curses by forcing applications
19018 ### that will need libutf8 to add it to their configure script.
19019 if test "$with_overwrite" != no ; then
19020 if test "$NCURSES_LIBUTF8" = 1 ; then
19021         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19022         { echo "$as_me:19022: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19023 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19024 fi
19025 fi
19026 WITH_OVERWRITE=$with_overwrite
19027
19028 # used to separate tack out of the tree
19029 NCURSES_TREE=
19030
19031 ### predefined stuff for the test programs
19032 cat >>confdefs.h <<\EOF
19033 #define HAVE_SLK_COLOR 1
19034 EOF
19035
19036 ### Construct the list of subdirectories for which we'll customize makefiles
19037 ### with the appropriate compile-rules.
19038
19039 echo "$as_me:19039: checking for src modules" >&5
19040 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19041
19042 # dependencies and linker-arguments for test-programs
19043 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19044 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19045 if test "$DFT_LWR_MODEL" = "libtool"; then
19046         TEST_ARGS="${TEST_DEPS}"
19047         TEST_ARG2="${TEST_DEP2}"
19048 else
19049         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19050         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19051 fi
19052
19053 cf_cv_src_modules=
19054 for cf_dir in $modules_to_build
19055 do
19056         if test -f $srcdir/$cf_dir/modules; then
19057
19058                 # We may/may not have tack in the distribution, though the
19059                 # makefile is.
19060                 if test $cf_dir = tack ; then
19061                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19062                                 continue
19063                         fi
19064                 fi
19065
19066                 if test -z "$cf_cv_src_modules"; then
19067                         cf_cv_src_modules=$cf_dir
19068                 else
19069                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19070                 fi
19071
19072                 # Make the ncurses_cfg.h file record the library interface files as
19073                 # well.  These are header files that are the same name as their
19074                 # directory.  Ncurses is the only library that does not follow
19075                 # that pattern.
19076                 if test $cf_dir = tack ; then
19077                         continue
19078                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19079
19080 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19081
19082                         cat >>confdefs.h <<EOF
19083 #define HAVE_${cf_have_include}_H 1
19084 EOF
19085
19086                         cat >>confdefs.h <<EOF
19087 #define HAVE_LIB${cf_have_include} 1
19088 EOF
19089
19090                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19091                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19092                         if test "$DFT_LWR_MODEL" = "libtool"; then
19093                                 TEST_ARGS="${TEST_DEPS}"
19094                                 TEST_ARG2="${TEST_DEP2}"
19095                         else
19096                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19097                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19098                         fi
19099                 fi
19100         fi
19101 done
19102 echo "$as_me:19102: result: $cf_cv_src_modules" >&5
19103 echo "${ECHO_T}$cf_cv_src_modules" >&6
19104
19105 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19106 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19107
19108 SRC_SUBDIRS=
19109 if test "x$cf_with_manpages" != xno ; then
19110         SRC_SUBDIRS="$SRC_SUBDIRS man"
19111 fi
19112 SRC_SUBDIRS="$SRC_SUBDIRS include"
19113 for cf_dir in $cf_cv_src_modules
19114 do
19115         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19116 done
19117 if test "x$cf_with_tests" != "xno" ; then
19118         SRC_SUBDIRS="$SRC_SUBDIRS test"
19119 fi
19120 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19121 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19122
19123 ADA_SUBDIRS=
19124 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19125         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19126         ADA_SUBDIRS="gen src"
19127         if test "x$cf_with_tests" != "xno" ; then
19128                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19129         fi
19130 fi
19131
19132 SUB_MAKEFILES=
19133 for cf_dir in $SRC_SUBDIRS
19134 do
19135         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19136 done
19137
19138 if test -n "$ADA_SUBDIRS"; then
19139         for cf_dir in $ADA_SUBDIRS
19140         do
19141                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19142         done
19143
19144 fi
19145
19146 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19147    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19148    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19149 fi
19150
19151 DIRS_TO_MAKE="lib"
19152 for cf_item in $cf_list_models
19153 do
19154
19155         case $cf_item in
19156         libtool) cf_subdir='obj_lo'  ;;
19157         normal)  cf_subdir='objects' ;;
19158         debug)   cf_subdir='obj_g' ;;
19159         profile) cf_subdir='obj_p' ;;
19160         shared)
19161                 case $cf_cv_system_name in #(vi
19162                 cygwin) #(vi
19163                         cf_subdir='objects' ;;
19164                 *)
19165                         cf_subdir='obj_s' ;;
19166                 esac
19167         esac
19168
19169         for cf_item2 in $DIRS_TO_MAKE
19170         do
19171                 test $cf_item2 = $cf_subdir && break
19172         done
19173         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19174 done
19175 for cf_dir in $DIRS_TO_MAKE
19176 do
19177         test ! -d $cf_dir && mkdir $cf_dir
19178 done
19179
19180 # symbols that differ when compiling Ada95 by itself.
19181 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19182
19183 # values to use as strings
19184 cat >>confdefs.h <<EOF
19185 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19186 EOF
19187
19188 cat >>confdefs.h <<EOF
19189 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19190 EOF
19191
19192 ### Now that we're done running tests, add the compiler-warnings, if any
19193
19194 cf_fix_cppflags=no
19195 cf_new_cflags=
19196 cf_new_cppflags=
19197 cf_new_extra_cppflags=
19198
19199 for cf_add_cflags in $EXTRA_CFLAGS
19200 do
19201 case $cf_fix_cppflags in
19202 no)
19203         case $cf_add_cflags in #(vi
19204         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19205                 case $cf_add_cflags in
19206                 -D*)
19207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19208
19209                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19210                                 && test -z "${cf_tst_cflags}" \
19211                                 && cf_fix_cppflags=yes
19212
19213                         if test $cf_fix_cppflags = yes ; then
19214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19215                                 continue
19216                         elif test "${cf_tst_cflags}" = "\"'" ; then
19217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19218                                 continue
19219                         fi
19220                         ;;
19221                 esac
19222                 case "$CPPFLAGS" in
19223                 *$cf_add_cflags) #(vi
19224                         ;;
19225                 *) #(vi
19226                         case $cf_add_cflags in #(vi
19227                         -D*)
19228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19229
19230 CPPFLAGS=`echo "$CPPFLAGS" | \
19231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19233
19234                                 ;;
19235                         esac
19236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19237                         ;;
19238                 esac
19239                 ;;
19240         *)
19241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19242                 ;;
19243         esac
19244         ;;
19245 yes)
19246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19247
19248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19249
19250         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19251                 && test -z "${cf_tst_cflags}" \
19252                 && cf_fix_cppflags=no
19253         ;;
19254 esac
19255 done
19256
19257 if test -n "$cf_new_cflags" ; then
19258
19259         CFLAGS="$CFLAGS $cf_new_cflags"
19260 fi
19261
19262 if test -n "$cf_new_cppflags" ; then
19263
19264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19265 fi
19266
19267 if test -n "$cf_new_extra_cppflags" ; then
19268
19269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19270 fi
19271
19272 ### Define substitutions for header files to avoid name-pollution
19273
19274 if test "$cf_cv_have_tcgetattr" = yes ; then
19275         HAVE_TCGETATTR=1
19276 else
19277         HAVE_TCGETATTR=0
19278 fi
19279
19280 if test "$ac_cv_header_termio_h" = yes ; then
19281         HAVE_TERMIO_H=1
19282 else
19283         HAVE_TERMIO_H=0
19284 fi
19285
19286 if test "$ac_cv_header_termios_h" = yes ; then
19287         HAVE_TERMIOS_H=1
19288 else
19289         HAVE_TERMIOS_H=0
19290 fi
19291
19292 ################################################################################
19293 test "$use_database" = yes && \
19294 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19295
19296 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19297 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19298
19299 if test x"$enable_pc_files" = xyes ; then \
19300 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19301 MAKE_PC_FILES=
19302 else
19303 MAKE_PC_FILES="#"
19304 fi
19305
19306 # Extract the first word of "tic", so it can be a program name with args.
19307 set dummy tic; ac_word=$2
19308 echo "$as_me:19308: checking for $ac_word" >&5
19309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19310 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19311   echo $ECHO_N "(cached) $ECHO_C" >&6
19312 else
19313   case $TIC_PATH in
19314   [\\/]* | ?:[\\/]*)
19315   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19316   ;;
19317   *)
19318   ac_save_IFS=$IFS; IFS=$ac_path_separator
19319 ac_dummy="$PATH:/usr/local/ncurses/bin"
19320 for ac_dir in $ac_dummy; do
19321   IFS=$ac_save_IFS
19322   test -z "$ac_dir" && ac_dir=.
19323   if $as_executable_p "$ac_dir/$ac_word"; then
19324    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19325    echo "$as_me:19325: found $ac_dir/$ac_word" >&5
19326    break
19327 fi
19328 done
19329
19330   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19331   ;;
19332 esac
19333 fi
19334 TIC_PATH=$ac_cv_path_TIC_PATH
19335
19336 if test -n "$TIC_PATH"; then
19337   echo "$as_me:19337: result: $TIC_PATH" >&5
19338 echo "${ECHO_T}$TIC_PATH" >&6
19339 else
19340   echo "$as_me:19340: result: no" >&5
19341 echo "${ECHO_T}no" >&6
19342 fi
19343
19344 if test -n "$FALLBACK_LIST"
19345 then
19346         if test "$TIC_PATH" = unknown
19347         then
19348                 { echo "$as_me:19348: WARNING: no tic program found for fallbacks" >&5
19349 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19350         fi
19351 fi
19352
19353 if test "x$cf_with_tests" != xno ; then
19354         MAKE_TESTS=
19355 else
19356         MAKE_TESTS="#"
19357 fi
19358
19359 ADAHTML_DIR=../../doc/html/ada
19360
19361 SUB_SCRIPTS=
19362 case $cf_cv_system_name in #(vi
19363 *mingw32*) #(vi
19364         SUB_SCRIPTS="mk-dlls.sh"
19365         ;;
19366 esac
19367
19368 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"
19369 ac_config_commands="$ac_config_commands default"
19370 cat >confcache <<\_ACEOF
19371 # This file is a shell script that caches the results of configure
19372 # tests run on this system so they can be shared between configure
19373 # scripts and configure runs, see configure's option --config-cache.
19374 # It is not useful on other systems.  If it contains results you don't
19375 # want to keep, you may remove or edit it.
19376 #
19377 # config.status only pays attention to the cache file if you give it
19378 # the --recheck option to rerun configure.
19379 #
19380 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19381 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19382 # following values.
19383
19384 _ACEOF
19385
19386 # The following way of writing the cache mishandles newlines in values,
19387 # but we know of no workaround that is simple, portable, and efficient.
19388 # So, don't put newlines in cache variables' values.
19389 # Ultrix sh set writes to stderr and can't be redirected directly,
19390 # and sets the high bit in the cache file unless we assign to the vars.
19391 {
19392   (set) 2>&1 |
19393     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19394     *ac_space=\ *)
19395       # `set' does not quote correctly, so add quotes (double-quote
19396       # substitution turns \\\\ into \\, and sed turns \\ into \).
19397       sed -n \
19398         "s/'/'\\\\''/g;
19399           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19400       ;;
19401     *)
19402       # `set' quotes correctly as required by POSIX, so do not add quotes.
19403       sed -n \
19404         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19405       ;;
19406     esac;
19407 } |
19408   sed '
19409      t clear
19410      : clear
19411      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19412      t end
19413      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19414      : end' >>confcache
19415 if cmp -s $cache_file confcache; then :; else
19416   if test -w $cache_file; then
19417     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19418     cat confcache >$cache_file
19419   else
19420     echo "not updating unwritable cache $cache_file"
19421   fi
19422 fi
19423 rm -f confcache
19424
19425 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19426 # Let make expand exec_prefix.
19427 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19428
19429 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19430 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19431 # trailing colons and then remove the whole line if VPATH becomes empty
19432 # (actually we leave an empty line to preserve line numbers).
19433 if test "x$srcdir" = x.; then
19434   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19435 s/:*\$(srcdir):*/:/;
19436 s/:*\${srcdir}:*/:/;
19437 s/:*@srcdir@:*/:/;
19438 s/^\([^=]*=[    ]*\):*/\1/;
19439 s/:*$//;
19440 s/^[^=]*=[      ]*$//;
19441 }'
19442 fi
19443
19444 DEFS=-DHAVE_CONFIG_H
19445
19446 : ${CONFIG_STATUS=./config.status}
19447 ac_clean_files_save=$ac_clean_files
19448 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19449 { echo "$as_me:19449: creating $CONFIG_STATUS" >&5
19450 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19451 cat >$CONFIG_STATUS <<_ACEOF
19452 #! $SHELL
19453 # Generated automatically by configure.
19454 # Run this file to recreate the current configuration.
19455 # Compiler output produced by configure, useful for debugging
19456 # configure, is in config.log if it exists.
19457
19458 debug=false
19459 SHELL=\${CONFIG_SHELL-$SHELL}
19460 ac_cs_invocation="\$0 \$@"
19461
19462 _ACEOF
19463
19464 cat >>$CONFIG_STATUS <<\_ACEOF
19465 # Be Bourne compatible
19466 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19467   emulate sh
19468   NULLCMD=:
19469 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19470   set -o posix
19471 fi
19472
19473 # Name of the executable.
19474 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19475
19476 if expr a : '\(a\)' >/dev/null 2>&1; then
19477   as_expr=expr
19478 else
19479   as_expr=false
19480 fi
19481
19482 rm -f conf$$ conf$$.exe conf$$.file
19483 echo >conf$$.file
19484 if ln -s conf$$.file conf$$ 2>/dev/null; then
19485   # We could just check for DJGPP; but this test a) works b) is more generic
19486   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19487   if test -f conf$$.exe; then
19488     # Don't use ln at all; we don't have any links
19489     as_ln_s='cp -p'
19490   else
19491     as_ln_s='ln -s'
19492   fi
19493 elif ln conf$$.file conf$$ 2>/dev/null; then
19494   as_ln_s=ln
19495 else
19496   as_ln_s='cp -p'
19497 fi
19498 rm -f conf$$ conf$$.exe conf$$.file
19499
19500 as_executable_p="test -f"
19501
19502 # Support unset when possible.
19503 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19504   as_unset=unset
19505 else
19506   as_unset=false
19507 fi
19508
19509 # NLS nuisances.
19510 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19511 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19512 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19513 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19514 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19515 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19516 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19517 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19518
19519 # IFS
19520 # We need space, tab and new line, in precisely that order.
19521 as_nl='
19522 '
19523 IFS="   $as_nl"
19524
19525 # CDPATH.
19526 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19527
19528 exec 6>&1
19529
19530 _ACEOF
19531
19532 # Files that config.status was made for.
19533 if test -n "$ac_config_files"; then
19534   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19535 fi
19536
19537 if test -n "$ac_config_headers"; then
19538   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19539 fi
19540
19541 if test -n "$ac_config_links"; then
19542   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19543 fi
19544
19545 if test -n "$ac_config_commands"; then
19546   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19547 fi
19548
19549 cat >>$CONFIG_STATUS <<\EOF
19550
19551 ac_cs_usage="\
19552 \`$as_me' instantiates files from templates according to the
19553 current configuration.
19554
19555 Usage: $0 [OPTIONS] [FILE]...
19556
19557   -h, --help       print this help, then exit
19558   -V, --version    print version number, then exit
19559   -d, --debug      don't remove temporary files
19560       --recheck    update $as_me by reconfiguring in the same conditions
19561   --file=FILE[:TEMPLATE]
19562                    instantiate the configuration file FILE
19563   --header=FILE[:TEMPLATE]
19564                    instantiate the configuration header FILE
19565
19566 Configuration files:
19567 $config_files
19568
19569 Configuration headers:
19570 $config_headers
19571
19572 Configuration commands:
19573 $config_commands
19574
19575 Report bugs to <dickey@invisible-island.net>."
19576 EOF
19577
19578 cat >>$CONFIG_STATUS <<EOF
19579 ac_cs_version="\\
19580 config.status
19581 configured by $0, generated by GNU Autoconf 2.52.20101002,
19582   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19583
19584 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19585 Free Software Foundation, Inc.
19586 This config.status script is free software; the Free Software Foundation
19587 gives unlimited permission to copy, distribute and modify it."
19588 srcdir=$srcdir
19589 INSTALL="$INSTALL"
19590 EOF
19591
19592 cat >>$CONFIG_STATUS <<\EOF
19593 # If no file are specified by the user, then we need to provide default
19594 # value.  By we need to know if files were specified by the user.
19595 ac_need_defaults=:
19596 while test $# != 0
19597 do
19598   case $1 in
19599   --*=*)
19600     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19601     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19602     shift
19603     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19604     shift
19605     ;;
19606   -*);;
19607   *) # This is not an option, so the user has probably given explicit
19608      # arguments.
19609      ac_need_defaults=false;;
19610   esac
19611
19612   case $1 in
19613   # Handling of the options.
19614 EOF
19615 cat >>$CONFIG_STATUS <<EOF
19616   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19617     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19618     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19619 EOF
19620 cat >>$CONFIG_STATUS <<\EOF
19621   --version | --vers* | -V )
19622     echo "$ac_cs_version"; exit 0 ;;
19623   --he | --h)
19624     # Conflict between --help and --header
19625     { { echo "$as_me:19625: error: ambiguous option: $1
19626 Try \`$0 --help' for more information." >&5
19627 echo "$as_me: error: ambiguous option: $1
19628 Try \`$0 --help' for more information." >&2;}
19629    { (exit 1); exit 1; }; };;
19630   --help | --hel | -h )
19631     echo "$ac_cs_usage"; exit 0 ;;
19632   --debug | --d* | -d )
19633     debug=: ;;
19634   --file | --fil | --fi | --f )
19635     shift
19636     CONFIG_FILES="$CONFIG_FILES $1"
19637     ac_need_defaults=false;;
19638   --header | --heade | --head | --hea )
19639     shift
19640     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19641     ac_need_defaults=false;;
19642
19643   # This is an error.
19644   -*) { { echo "$as_me:19644: error: unrecognized option: $1
19645 Try \`$0 --help' for more information." >&5
19646 echo "$as_me: error: unrecognized option: $1
19647 Try \`$0 --help' for more information." >&2;}
19648    { (exit 1); exit 1; }; } ;;
19649
19650   *) ac_config_targets="$ac_config_targets $1" ;;
19651
19652   esac
19653   shift
19654 done
19655
19656 exec 5>>config.log
19657 cat >&5 << _ACEOF
19658
19659 ## ----------------------- ##
19660 ## Running config.status.  ##
19661 ## ----------------------- ##
19662
19663 This file was extended by $as_me 2.52.20101002, executed with
19664   CONFIG_FILES    = $CONFIG_FILES
19665   CONFIG_HEADERS  = $CONFIG_HEADERS
19666   CONFIG_LINKS    = $CONFIG_LINKS
19667   CONFIG_COMMANDS = $CONFIG_COMMANDS
19668   > $ac_cs_invocation
19669 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19670
19671 _ACEOF
19672 EOF
19673
19674 cat >>$CONFIG_STATUS <<EOF
19675 #
19676 # INIT-COMMANDS section.
19677 #
19678
19679 ### Special initialization commands, used to pass information from the
19680 ### configuration-run into config.status
19681
19682 AWK="$AWK"
19683 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19684 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19685 ECHO_LINK="$ECHO_LINK"
19686 LDCONFIG="$LDCONFIG"
19687 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19688 LIB_NAME="$LIB_NAME"
19689 LIB_SUBSETS="$LIB_SUBSETS"
19690 LIB_SUFFIX="$LIB_SUFFIX"
19691 LIB_TRACING="$LIB_TRACING"
19692 LN_S="$LN_S"
19693 MAKE_TERMINFO="$MAKE_TERMINFO"
19694 NCURSES_MAJOR="$NCURSES_MAJOR"
19695 NCURSES_MINOR="$NCURSES_MINOR"
19696 NCURSES_OSPEED="$NCURSES_OSPEED"
19697 NCURSES_PATCH="$NCURSES_PATCH"
19698 SRC_SUBDIRS="$SRC_SUBDIRS"
19699 TERMINFO="$TERMINFO"
19700 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19701 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19702 TICS_NAME="$TICS_NAME"
19703 TIC_PATH="$TIC_PATH"
19704 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19705 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19706 TINFO_NAME="$TINFO_NAME"
19707 TINFO_SUFFIX="$TINFO_SUFFIX"
19708 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19709 WITH_CURSES_H="$with_curses_h"
19710 WITH_ECHO="$with_echo"
19711 WITH_OVERWRITE="$with_overwrite"
19712 cf_LIST_MODELS="$cf_list_models"
19713 cf_cv_abi_version="$cf_cv_abi_version"
19714 cf_cv_do_relink="$cf_cv_do_relink"
19715 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19716 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19717 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19718 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19719 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19720 cf_cv_rel_version="$cf_cv_rel_version"
19721 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19722 cf_cv_shared_soname='$cf_cv_shared_soname'
19723 cf_cv_shlib_version="$cf_cv_shlib_version"
19724 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19725 cf_cv_system_name="$cf_cv_system_name"
19726 cf_with_ada="$cf_with_ada"
19727 cf_with_cxx_binding="$cf_with_cxx_binding"
19728 cf_with_manpages="$cf_with_manpages"
19729 cf_with_tests="$cf_with_tests"
19730 host="$host"
19731 target="$target"
19732
19733 EOF
19734
19735 cat >>$CONFIG_STATUS <<\EOF
19736 for ac_config_target in $ac_config_targets
19737 do
19738   case "$ac_config_target" in
19739   # Handling of arguments.
19740   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19741   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19742   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19743   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19744   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19745   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19746   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19747   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19748   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19749   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19750   *) { { echo "$as_me:19750: error: invalid argument: $ac_config_target" >&5
19751 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19752    { (exit 1); exit 1; }; };;
19753   esac
19754 done
19755
19756 # If the user did not use the arguments to specify the items to instantiate,
19757 # then the envvar interface is used.  Set only those that are not.
19758 # We use the long form for the default assignment because of an extremely
19759 # bizarre bug on SunOS 4.1.3.
19760 if $ac_need_defaults; then
19761   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19762   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19763   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19764 fi
19765
19766 # Create a temporary directory, and hook for its removal unless debugging.
19767 $debug ||
19768 {
19769   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19770   trap '{ (exit 1); exit 1; }' 1 2 13 15
19771 }
19772
19773 # Create a (secure) tmp directory for tmp files.
19774 : ${TMPDIR=/tmp}
19775 {
19776   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19777   test -n "$tmp" && test -d "$tmp"
19778 }  ||
19779 {
19780   tmp=$TMPDIR/cs$$-$RANDOM
19781   (umask 077 && mkdir $tmp)
19782 } ||
19783 {
19784    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19785    { (exit 1); exit 1; }
19786 }
19787
19788 EOF
19789
19790 cat >>$CONFIG_STATUS <<EOF
19791
19792 #
19793 # CONFIG_FILES section.
19794 #
19795
19796 # No need to generate the scripts if there are no CONFIG_FILES.
19797 # This happens for instance when ./config.status config.h
19798 if test -n "\$CONFIG_FILES"; then
19799   # Protect against being on the right side of a sed subst in config.status.
19800   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19801    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19802 s,@SHELL@,$SHELL,;t t
19803 s,@exec_prefix@,$exec_prefix,;t t
19804 s,@prefix@,$prefix,;t t
19805 s,@program_transform_name@,$program_transform_name,;t t
19806 s,@bindir@,$bindir,;t t
19807 s,@sbindir@,$sbindir,;t t
19808 s,@libexecdir@,$libexecdir,;t t
19809 s,@datadir@,$datadir,;t t
19810 s,@sysconfdir@,$sysconfdir,;t t
19811 s,@sharedstatedir@,$sharedstatedir,;t t
19812 s,@localstatedir@,$localstatedir,;t t
19813 s,@libdir@,$libdir,;t t
19814 s,@includedir@,$includedir,;t t
19815 s,@oldincludedir@,$oldincludedir,;t t
19816 s,@infodir@,$infodir,;t t
19817 s,@mandir@,$mandir,;t t
19818 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19819 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19820 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19821 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19822 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19823 s,@build_alias@,$build_alias,;t t
19824 s,@host_alias@,$host_alias,;t t
19825 s,@target_alias@,$target_alias,;t t
19826 s,@ECHO_C@,$ECHO_C,;t t
19827 s,@ECHO_N@,$ECHO_N,;t t
19828 s,@ECHO_T@,$ECHO_T,;t t
19829 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19830 s,@DEFS@,$DEFS,;t t
19831 s,@LIBS@,$LIBS,;t t
19832 s,@top_builddir@,$top_builddir,;t t
19833 s,@EGREP@,$EGREP,;t t
19834 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19835 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19836 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19837 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19838 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19839 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19840 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19841 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19842 s,@build@,$build,;t t
19843 s,@build_cpu@,$build_cpu,;t t
19844 s,@build_vendor@,$build_vendor,;t t
19845 s,@build_os@,$build_os,;t t
19846 s,@host@,$host,;t t
19847 s,@host_cpu@,$host_cpu,;t t
19848 s,@host_vendor@,$host_vendor,;t t
19849 s,@host_os@,$host_os,;t t
19850 s,@target@,$target,;t t
19851 s,@target_cpu@,$target_cpu,;t t
19852 s,@target_vendor@,$target_vendor,;t t
19853 s,@target_os@,$target_os,;t t
19854 s,@CC@,$CC,;t t
19855 s,@CFLAGS@,$CFLAGS,;t t
19856 s,@LDFLAGS@,$LDFLAGS,;t t
19857 s,@CPPFLAGS@,$CPPFLAGS,;t t
19858 s,@ac_ct_CC@,$ac_ct_CC,;t t
19859 s,@EXEEXT@,$EXEEXT,;t t
19860 s,@OBJEXT@,$OBJEXT,;t t
19861 s,@CPP@,$CPP,;t t
19862 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19863 s,@PROG_EXT@,$PROG_EXT,;t t
19864 s,@LDCONFIG@,$LDCONFIG,;t t
19865 s,@CXX@,$CXX,;t t
19866 s,@CXXFLAGS@,$CXXFLAGS,;t t
19867 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19868 s,@AWK@,$AWK,;t t
19869 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19870 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19871 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19872 s,@LINT@,$LINT,;t t
19873 s,@LINT_OPTS@,$LINT_OPTS,;t t
19874 s,@LN_S@,$LN_S,;t t
19875 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19876 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19877 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19878 s,@SET_MAKE@,$SET_MAKE,;t t
19879 s,@CTAGS@,$CTAGS,;t t
19880 s,@ETAGS@,$ETAGS,;t t
19881 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19882 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19883 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19884 s,@RANLIB@,$RANLIB,;t t
19885 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19886 s,@LD@,$LD,;t t
19887 s,@ac_ct_LD@,$ac_ct_LD,;t t
19888 s,@AR@,$AR,;t t
19889 s,@ac_ct_AR@,$ac_ct_AR,;t t
19890 s,@ARFLAGS@,$ARFLAGS,;t t
19891 s,@DESTDIR@,$DESTDIR,;t t
19892 s,@BUILD_CC@,$BUILD_CC,;t t
19893 s,@BUILD_CPP@,$BUILD_CPP,;t t
19894 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19895 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19896 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19897 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19898 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19899 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19900 s,@cf_list_models@,$cf_list_models,;t t
19901 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19902 s,@LIBTOOL@,$LIBTOOL,;t t
19903 s,@LT_UNDEF@,$LT_UNDEF,;t t
19904 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19905 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19906 s,@LIB_CREATE@,$LIB_CREATE,;t t
19907 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19908 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19909 s,@LIB_PREP@,$LIB_PREP,;t t
19910 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19911 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19912 s,@LIB_LINK@,$LIB_LINK,;t t
19913 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19914 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19915 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19916 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19917 s,@TICS_NAME@,$TICS_NAME,;t t
19918 s,@TINFO_NAME@,$TINFO_NAME,;t t
19919 s,@LIB_NAME@,$LIB_NAME,;t t
19920 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19921 s,@CC_G_OPT@,$CC_G_OPT,;t t
19922 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19923 s,@LD_MODEL@,$LD_MODEL,;t t
19924 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19925 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19926 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19927 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19928 s,@LINK_PROGS@,$LINK_PROGS,;t t
19929 s,@LINK_TESTS@,$LINK_TESTS,;t t
19930 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19931 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19932 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19933 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19934 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19935 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19936 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19937 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19938 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19939 s,@TERMINFO@,$TERMINFO,;t t
19940 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19941 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19942 s,@TERMPATH@,$TERMPATH,;t t
19943 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19944 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19945 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19946 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19947 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19948 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19949 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19950 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19951 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19952 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19953 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19954 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19955 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19956 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19957 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19958 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19959 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19960 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19961 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19962 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19963 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19964 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19965 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19966 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19967 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19968 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19969 s,@PTHREAD@,$PTHREAD,;t t
19970 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19971 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19972 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19973 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19974 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19975 s,@ECHO_LINK@,$ECHO_LINK,;t t
19976 s,@ADAFLAGS@,$ADAFLAGS,;t t
19977 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19978 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19979 s,@ADA_TRACE@,$ADA_TRACE,;t t
19980 s,@MATH_LIB@,$MATH_LIB,;t t
19981 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19982 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19983 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19984 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19985 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19986 s,@TEST_LIBS@,$TEST_LIBS,;t t
19987 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19988 s,@CXXCPP@,$CXXCPP,;t t
19989 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19990 s,@CXX_AR@,$CXX_AR,;t t
19991 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19992 s,@CXXLIBS@,$CXXLIBS,;t t
19993 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19994 s,@gnat_exists@,$gnat_exists,;t t
19995 s,@M4_exists@,$M4_exists,;t t
19996 s,@cf_ada_make@,$cf_ada_make,;t t
19997 s,@cf_compile_generics@,$cf_compile_generics,;t t
19998 s,@cf_generic_objects@,$cf_generic_objects,;t t
19999 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20000 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20001 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20002 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20003 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20004 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20005 s,@cf_ada_package@,$cf_ada_package,;t t
20006 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20007 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20008 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20009 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20010 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20011 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20012 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20013 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20014 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20015 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20016 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20017 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20018 s,@TICS_ARGS@,$TICS_ARGS,;t t
20019 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20020 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20021 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20022 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20023 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20024 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20025 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20026 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20027 s,@TICS_LIST@,$TICS_LIST,;t t
20028 s,@TINFO_LIST@,$TINFO_LIST,;t t
20029 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20030 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20031 s,@TEST_ARGS@,$TEST_ARGS,;t t
20032 s,@TEST_DEPS@,$TEST_DEPS,;t t
20033 s,@TEST_ARG2@,$TEST_ARG2,;t t
20034 s,@TEST_DEP2@,$TEST_DEP2,;t t
20035 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20036 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20037 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20038 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20039 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20040 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20041 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20042 s,@cross_compiling@,$cross_compiling,;t t
20043 s,@TIC_PATH@,$TIC_PATH,;t t
20044 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20045 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20046 CEOF
20047
20048 EOF
20049
20050   cat >>$CONFIG_STATUS <<\EOF
20051   # Split the substitutions into bite-sized pieces for seds with
20052   # small command number limits, like on Digital OSF/1 and HP-UX.
20053   ac_max_sed_lines=48
20054   ac_sed_frag=1 # Number of current file.
20055   ac_beg=1 # First line for current file.
20056   ac_end=$ac_max_sed_lines # Line after last line for current file.
20057   ac_more_lines=:
20058   ac_sed_cmds=
20059   while $ac_more_lines; do
20060     if test $ac_beg -gt 1; then
20061       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20062     else
20063       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20064     fi
20065     if test ! -s $tmp/subs.frag; then
20066       ac_more_lines=false
20067     else
20068       # The purpose of the label and of the branching condition is to
20069       # speed up the sed processing (if there are no `@' at all, there
20070       # is no need to browse any of the substitutions).
20071       # These are the two extra sed commands mentioned above.
20072       (echo ':t
20073   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20074       if test -z "$ac_sed_cmds"; then
20075         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20076       else
20077         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20078       fi
20079       ac_sed_frag=`expr $ac_sed_frag + 1`
20080       ac_beg=$ac_end
20081       ac_end=`expr $ac_end + $ac_max_sed_lines`
20082     fi
20083   done
20084   if test -z "$ac_sed_cmds"; then
20085     ac_sed_cmds=cat
20086   fi
20087 fi # test -n "$CONFIG_FILES"
20088
20089 EOF
20090 cat >>$CONFIG_STATUS <<\EOF
20091 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20092   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20093   case $ac_file in
20094   - | *:- | *:-:* ) # input from stdin
20095         cat >$tmp/stdin
20096         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20097         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20098   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20099         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20100   * )   ac_file_in=$ac_file.in ;;
20101   esac
20102
20103   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20104   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20105          X"$ac_file" : 'X\(//\)[^/]' \| \
20106          X"$ac_file" : 'X\(//\)$' \| \
20107          X"$ac_file" : 'X\(/\)' \| \
20108          .     : '\(.\)' 2>/dev/null ||
20109 echo X"$ac_file" |
20110     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20111           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20112           /^X\(\/\/\)$/{ s//\1/; q; }
20113           /^X\(\/\).*/{ s//\1/; q; }
20114           s/.*/./; q'`
20115   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20116     { case "$ac_dir" in
20117   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20118   *)                      as_incr_dir=.;;
20119 esac
20120 as_dummy="$ac_dir"
20121 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20122   case $as_mkdir_dir in
20123     # Skip DOS drivespec
20124     ?:) as_incr_dir=$as_mkdir_dir ;;
20125     *)
20126       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20127       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20128     ;;
20129   esac
20130 done; }
20131
20132     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20133     # A "../" for each directory in $ac_dir_suffix.
20134     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20135   else
20136     ac_dir_suffix= ac_dots=
20137   fi
20138
20139   case $srcdir in
20140   .)  ac_srcdir=.
20141       if test -z "$ac_dots"; then
20142          ac_top_srcdir=.
20143       else
20144          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20145       fi ;;
20146   [\\/]* | ?:[\\/]* )
20147       ac_srcdir=$srcdir$ac_dir_suffix;
20148       ac_top_srcdir=$srcdir ;;
20149   *) # Relative path.
20150     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20151     ac_top_srcdir=$ac_dots$srcdir ;;
20152   esac
20153
20154   case $INSTALL in
20155   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20156   *) ac_INSTALL=$ac_dots$INSTALL ;;
20157   esac
20158
20159   if test x"$ac_file" != x-; then
20160     { echo "$as_me:20160: creating $ac_file" >&5
20161 echo "$as_me: creating $ac_file" >&6;}
20162     rm -f "$ac_file"
20163   fi
20164   # Let's still pretend it is `configure' which instantiates (i.e., don't
20165   # use $as_me), people would be surprised to read:
20166   #    /* config.h.  Generated automatically by config.status.  */
20167   configure_input="Generated automatically from `echo $ac_file_in |
20168                                                  sed 's,.*/,,'` by configure."
20169
20170   # First look for the input files in the build tree, otherwise in the
20171   # src tree.
20172   ac_file_inputs=`IFS=:
20173     for f in $ac_file_in; do
20174       case $f in
20175       -) echo $tmp/stdin ;;
20176       [\\/$]*)
20177          # Absolute (can't be DOS-style, as IFS=:)
20178          test -f "$f" || { { echo "$as_me:20178: error: cannot find input file: $f" >&5
20179 echo "$as_me: error: cannot find input file: $f" >&2;}
20180    { (exit 1); exit 1; }; }
20181          echo $f;;
20182       *) # Relative
20183          if test -f "$f"; then
20184            # Build tree
20185            echo $f
20186          elif test -f "$srcdir/$f"; then
20187            # Source tree
20188            echo $srcdir/$f
20189          else
20190            # /dev/null tree
20191            { { echo "$as_me:20191: error: cannot find input file: $f" >&5
20192 echo "$as_me: error: cannot find input file: $f" >&2;}
20193    { (exit 1); exit 1; }; }
20194          fi;;
20195       esac
20196     done` || { (exit 1); exit 1; }
20197 EOF
20198 cat >>$CONFIG_STATUS <<EOF
20199   sed "$ac_vpsub
20200 $extrasub
20201 EOF
20202 cat >>$CONFIG_STATUS <<\EOF
20203 :t
20204 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20205 s,@configure_input@,$configure_input,;t t
20206 s,@srcdir@,$ac_srcdir,;t t
20207 s,@top_srcdir@,$ac_top_srcdir,;t t
20208 s,@INSTALL@,$ac_INSTALL,;t t
20209 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20210   rm -f $tmp/stdin
20211   if test x"$ac_file" != x-; then
20212     mv $tmp/out $ac_file
20213   else
20214     cat $tmp/out
20215     rm -f $tmp/out
20216   fi
20217
20218 done
20219 EOF
20220 cat >>$CONFIG_STATUS <<\EOF
20221
20222 #
20223 # CONFIG_HEADER section.
20224 #
20225
20226 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20227 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20228 #
20229 # ac_d sets the value in "#define NAME VALUE" lines.
20230 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20231 ac_dB='[        ].*$,\1#\2'
20232 ac_dC=' '
20233 ac_dD=',;t'
20234 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20235 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20236 ac_iB='\([      ]\),\1#\2define\3'
20237 ac_iC=' '
20238 ac_iD='\4,;t'
20239 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20240 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20241 ac_uB='$,\1#\2define\3'
20242 ac_uC=' '
20243 ac_uD=',;t'
20244
20245 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20246   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20247   case $ac_file in
20248   - | *:- | *:-:* ) # input from stdin
20249         cat >$tmp/stdin
20250         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20251         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20252   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20253         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20254   * )   ac_file_in=$ac_file.in ;;
20255   esac
20256
20257   test x"$ac_file" != x- && { echo "$as_me:20257: creating $ac_file" >&5
20258 echo "$as_me: creating $ac_file" >&6;}
20259
20260   # First look for the input files in the build tree, otherwise in the
20261   # src tree.
20262   ac_file_inputs=`IFS=:
20263     for f in $ac_file_in; do
20264       case $f in
20265       -) echo $tmp/stdin ;;
20266       [\\/$]*)
20267          # Absolute (can't be DOS-style, as IFS=:)
20268          test -f "$f" || { { echo "$as_me:20268: error: cannot find input file: $f" >&5
20269 echo "$as_me: error: cannot find input file: $f" >&2;}
20270    { (exit 1); exit 1; }; }
20271          echo $f;;
20272       *) # Relative
20273          if test -f "$f"; then
20274            # Build tree
20275            echo $f
20276          elif test -f "$srcdir/$f"; then
20277            # Source tree
20278            echo $srcdir/$f
20279          else
20280            # /dev/null tree
20281            { { echo "$as_me:20281: error: cannot find input file: $f" >&5
20282 echo "$as_me: error: cannot find input file: $f" >&2;}
20283    { (exit 1); exit 1; }; }
20284          fi;;
20285       esac
20286     done` || { (exit 1); exit 1; }
20287   # Remove the trailing spaces.
20288   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20289
20290 EOF
20291
20292 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20293 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20294 # be either 'cat' or 'sort'.
20295 cat confdefs.h | uniq >conftest.vals
20296
20297 # Break up conftest.vals because some shells have a limit on
20298 # the size of here documents, and old seds have small limits too.
20299
20300 rm -f conftest.tail
20301 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20302 while grep . conftest.vals >/dev/null
20303 do
20304   # Write chunks of a limited-size here document to conftest.frag.
20305   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20306   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20307   echo 'CEOF' >> $CONFIG_STATUS
20308   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20309   rm -f conftest.vals
20310   mv conftest.tail conftest.vals
20311 done
20312 rm -f conftest.vals
20313
20314 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20315 # marker @DEFS@.
20316 echo '  cat >> conftest.edit <<CEOF
20317 /@DEFS@/r conftest.frag
20318 /@DEFS@/d
20319 CEOF
20320 sed -f conftest.edit $tmp/in > $tmp/out
20321 rm -f $tmp/in
20322 mv $tmp/out $tmp/in
20323 rm -f conftest.edit conftest.frag
20324 ' >> $CONFIG_STATUS
20325
20326 cat >>$CONFIG_STATUS <<\EOF
20327   # Let's still pretend it is `configure' which instantiates (i.e., don't
20328   # use $as_me), people would be surprised to read:
20329   #    /* config.h.  Generated automatically by config.status.  */
20330   if test x"$ac_file" = x-; then
20331     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20332   else
20333     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20334   fi
20335   cat $tmp/in >>$tmp/config.h
20336   rm -f $tmp/in
20337   if test x"$ac_file" != x-; then
20338     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20339       { echo "$as_me:20339: $ac_file is unchanged" >&5
20340 echo "$as_me: $ac_file is unchanged" >&6;}
20341     else
20342       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20343          X"$ac_file" : 'X\(//\)[^/]' \| \
20344          X"$ac_file" : 'X\(//\)$' \| \
20345          X"$ac_file" : 'X\(/\)' \| \
20346          .     : '\(.\)' 2>/dev/null ||
20347 echo X"$ac_file" |
20348     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20349           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20350           /^X\(\/\/\)$/{ s//\1/; q; }
20351           /^X\(\/\).*/{ s//\1/; q; }
20352           s/.*/./; q'`
20353       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20354         { case "$ac_dir" in
20355   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20356   *)                      as_incr_dir=.;;
20357 esac
20358 as_dummy="$ac_dir"
20359 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20360   case $as_mkdir_dir in
20361     # Skip DOS drivespec
20362     ?:) as_incr_dir=$as_mkdir_dir ;;
20363     *)
20364       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20365       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20366     ;;
20367   esac
20368 done; }
20369
20370       fi
20371       rm -f $ac_file
20372       mv $tmp/config.h $ac_file
20373     fi
20374   else
20375     cat $tmp/config.h
20376     rm -f $tmp/config.h
20377   fi
20378 done
20379 EOF
20380 cat >>$CONFIG_STATUS <<\EOF
20381 #
20382 # CONFIG_COMMANDS section.
20383 #
20384 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20385   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20386   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20387
20388   case $ac_dest in
20389     default )
20390 if test "x$cf_with_tests" != xno ; then
20391
20392 for cf_dir in test
20393 do
20394         if test ! -d $srcdir/$cf_dir; then
20395                 continue
20396         elif test -f $srcdir/$cf_dir/programs; then
20397                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20398         fi
20399 done
20400
20401 fi
20402
20403         case $cf_cv_system_name in #(vi
20404         OS/2*|os2*) #(vi
20405         LIB_PREFIX=''
20406         ;;
20407         *)      LIB_PREFIX='lib'
20408         ;;
20409         esac
20410 cf_prefix=$LIB_PREFIX
20411
20412 if test $cf_cv_shlib_version = cygdll ; then
20413         TINFO_NAME=$TINFO_ARG_SUFFIX
20414         TINFO_SUFFIX=.dll
20415 fi
20416
20417 if test -n "$TINFO_SUFFIX" ; then
20418         case $TINFO_SUFFIX in
20419         tw*)
20420                 TINFO_NAME="${TINFO_NAME}tw"
20421                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20422                 ;;
20423         t*)
20424                 TINFO_NAME="${TINFO_NAME}t"
20425                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20426                 ;;
20427         w*)
20428                 TINFO_NAME="${TINFO_NAME}w"
20429                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20430                 ;;
20431         esac
20432 fi
20433
20434 for cf_dir in $SRC_SUBDIRS
20435 do
20436         if test ! -d $srcdir/$cf_dir ; then
20437                 continue
20438         elif test -f $srcdir/$cf_dir/modules; then
20439
20440                 SHARED_LIB=
20441                 LIBS_TO_MAKE=
20442                 for cf_item in $cf_LIST_MODELS
20443                 do
20444
20445         case $cf_item in #(vi
20446         libtool) #(vi
20447                 cf_suffix='.la'
20448                 cf_depsuf=$cf_suffix
20449                 ;;
20450         normal) #(vi
20451                 cf_suffix='.a'
20452                 cf_depsuf=$cf_suffix
20453                 ;;
20454         debug) #(vi
20455                 cf_suffix='_g.a'
20456                 cf_depsuf=$cf_suffix
20457                 ;;
20458         profile) #(vi
20459                 cf_suffix='_p.a'
20460                 cf_depsuf=$cf_suffix
20461                 ;;
20462         shared) #(vi
20463                 case $cf_cv_system_name in
20464                 aix[56]*) #(vi
20465                         cf_suffix='.a'
20466                         cf_depsuf=$cf_suffix
20467                         ;;
20468                 cygwin*) #(vi
20469                         cf_suffix='.dll'
20470                         cf_depsuf='.dll.a'
20471                         ;;
20472                 darwin*) #(vi
20473                         cf_suffix='.dylib'
20474                         cf_depsuf=$cf_suffix
20475                         ;;
20476                 hpux*) #(vi
20477                         case $target in
20478                         ia64*) #(vi
20479                                 cf_suffix='.so'
20480                                 cf_depsuf=$cf_suffix
20481                                 ;;
20482                         *) #(vi
20483                                 cf_suffix='.sl'
20484                                 cf_depsuf=$cf_suffix
20485                                 ;;
20486                         esac
20487                         ;;
20488                 *)      cf_suffix='.so'
20489                         cf_depsuf=$cf_suffix
20490                         ;;
20491                 esac
20492         esac
20493         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20494         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20495
20496                         if test $cf_item = shared ; then
20497                         if test "$cf_cv_do_symlinks" = yes ; then
20498                                 case "$cf_cv_shlib_version" in #(vi
20499                                 rel) #(vi
20500                                         case "$cf_cv_system_name" in #(vi
20501                                         darwin*)
20502                                         case .${LIB_SUFFIX} in
20503                                         .tw*)
20504                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20505                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20506                                                 ;;
20507                                         .t*)
20508                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20509                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20510                                                 ;;
20511                                         .w*)
20512                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20513                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20514                                                 ;;
20515                                         *)
20516                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20517                                                 ;;
20518                                         esac
20519                                         ;; #(vi
20520                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20521                                         esac
20522                                         ;;
20523                                 abi)
20524                                         case "$cf_cv_system_name" in #(vi
20525                                         darwin*)
20526                                         case .${LIB_SUFFIX} in
20527                                         .tw*)
20528                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20529                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20530                                                 ;;
20531                                         .t*)
20532                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20533                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20534                                                 ;;
20535                                         .w*)
20536                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20537                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20538                                                 ;;
20539                                         *)
20540                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20541                                                 ;;
20542                                         esac
20543                                         ;; #(vi
20544                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20545                                         esac
20546                                         ;;
20547                                 esac
20548                         fi
20549                         # cygwin needs import library, and has unique naming convention
20550                         # use autodetected ${cf_prefix} for import lib and static lib, but
20551                         # use 'cyg' prefix for shared lib.
20552                         if test $cf_cv_shlib_version = cygdll ; then
20553                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20554                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20555                                 continue
20556                         fi
20557                         fi
20558                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20559                 done
20560
20561                 if test $cf_dir = ncurses ; then
20562                         cf_subsets="$LIB_SUBSETS"
20563                         cf_r_parts="$cf_subsets"
20564                         cf_liblist="$LIBS_TO_MAKE"
20565
20566                         while test -n "$cf_r_parts"
20567                         do
20568                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20569                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20570                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20571                                         cf_item=
20572                                         case $cf_l_parts in #(vi
20573                                         *termlib*) #(vi
20574                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20575                                                 ;;
20576                                         *ticlib*)
20577                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20578                                                 ;;
20579                                         *)
20580                                                 break
20581                                                 ;;
20582                                         esac
20583                                         if test -n "$cf_item"; then
20584                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20585                                         fi
20586                                 else
20587                                         break
20588                                 fi
20589                         done
20590                 else
20591                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20592                 fi
20593
20594                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20595                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20596                         $cf_dir/Makefile >$cf_dir/Makefile.out
20597                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20598
20599                 $AWK -f $srcdir/mk-0th.awk \
20600                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20601                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20602
20603                 for cf_subset in $cf_subsets
20604                 do
20605                         cf_subdirs=
20606                         for cf_item in $cf_LIST_MODELS
20607                         do
20608                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20609
20610 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20611
20612         case $cf_item in #(vi
20613         libtool) #(vi
20614                 cf_suffix='.la'
20615                 cf_depsuf=$cf_suffix
20616                 ;;
20617         normal) #(vi
20618                 cf_suffix='.a'
20619                 cf_depsuf=$cf_suffix
20620                 ;;
20621         debug) #(vi
20622                 cf_suffix='_g.a'
20623                 cf_depsuf=$cf_suffix
20624                 ;;
20625         profile) #(vi
20626                 cf_suffix='_p.a'
20627                 cf_depsuf=$cf_suffix
20628                 ;;
20629         shared) #(vi
20630                 case $cf_cv_system_name in
20631                 aix[56]*) #(vi
20632                         cf_suffix='.a'
20633                         cf_depsuf=$cf_suffix
20634                         ;;
20635                 cygwin*) #(vi
20636                         cf_suffix='.dll'
20637                         cf_depsuf='.dll.a'
20638                         ;;
20639                 darwin*) #(vi
20640                         cf_suffix='.dylib'
20641                         cf_depsuf=$cf_suffix
20642                         ;;
20643                 hpux*) #(vi
20644                         case $target in
20645                         ia64*) #(vi
20646                                 cf_suffix='.so'
20647                                 cf_depsuf=$cf_suffix
20648                                 ;;
20649                         *) #(vi
20650                                 cf_suffix='.sl'
20651                                 cf_depsuf=$cf_suffix
20652                                 ;;
20653                         esac
20654                         ;;
20655                 *)      cf_suffix='.so'
20656                         cf_depsuf=$cf_suffix
20657                         ;;
20658                 esac
20659         esac
20660         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20661         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20662
20663         case $cf_item in
20664         libtool) cf_subdir='obj_lo'  ;;
20665         normal)  cf_subdir='objects' ;;
20666         debug)   cf_subdir='obj_g' ;;
20667         profile) cf_subdir='obj_p' ;;
20668         shared)
20669                 case $cf_cv_system_name in #(vi
20670                 cygwin) #(vi
20671                         cf_subdir='objects' ;;
20672                 *)
20673                         cf_subdir='obj_s' ;;
20674                 esac
20675         esac
20676
20677                         # Test for case where we build libtinfo with a different name.
20678                         cf_libname=$cf_dir
20679                         if test $cf_dir = ncurses ; then
20680                                 case $cf_subset in
20681                                 *base*)
20682                                         cf_libname=${cf_libname}$LIB_SUFFIX
20683                                         ;;
20684                                 *termlib*)
20685                                         cf_libname=$TINFO_LIB_SUFFIX
20686                                         ;;
20687                                 ticlib*)
20688                                         cf_libname=$TICS_LIB_SUFFIX
20689                                         ;;
20690                                 esac
20691                         else
20692                                 cf_libname=${cf_libname}$LIB_SUFFIX
20693                         fi
20694                         if test -n "${DFT_ARG_SUFFIX}" ; then
20695                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20696                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20697                         fi
20698
20699                         # These dependencies really are for development, not
20700                         # builds, but they are useful in porting, too.
20701                         cf_depend="../include/ncurses_cfg.h"
20702                         if test "$srcdir" = "."; then
20703                                 cf_reldir="."
20704                         else
20705                                 cf_reldir="\${srcdir}"
20706                         fi
20707
20708                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20709                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20710                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20711                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20712                         fi
20713
20714                         cf_dir_suffix=
20715                         old_cf_suffix="$cf_suffix"
20716                         if test "$cf_cv_shlib_version_infix" = yes ; then
20717                         if test -n "$LIB_SUFFIX" ; then
20718                                 case $LIB_SUFFIX in
20719                                 tw*)
20720                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20721                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20722                                         cf_dir_suffix=tw
20723                                         ;;
20724                                 t*)
20725                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20726                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20727                                         cf_dir_suffix=t
20728                                         ;;
20729                                 w*)
20730                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20731                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20732                                         cf_dir_suffix=w
20733                                         ;;
20734                                 esac
20735                         fi
20736                         fi
20737
20738                         $AWK -f $srcdir/mk-1st.awk \
20739                                 name=${cf_libname}${cf_dir_suffix} \
20740                                 traces=$LIB_TRACING \
20741                                 MODEL=$cf_ITEM \
20742                                 model=$cf_subdir \
20743                                 prefix=$cf_prefix \
20744                                 suffix=$cf_suffix \
20745                                 subset=$cf_subset \
20746                                 SymLink="$LN_S" \
20747                                 TermlibRoot=$TINFO_NAME \
20748                                 TermlibSuffix=$TINFO_SUFFIX \
20749                                 ShlibVer=$cf_cv_shlib_version \
20750                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20751                                 ReLink=${cf_cv_do_relink:-no} \
20752                                 DoLinks=$cf_cv_do_symlinks \
20753                                 rmSoLocs=$cf_cv_rm_so_locs \
20754                                 ldconfig="$LDCONFIG" \
20755                                 overwrite=$WITH_OVERWRITE \
20756                                 depend="$cf_depend" \
20757                                 host="$host" \
20758                                 libtool_version="$LIBTOOL_VERSION" \
20759                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20760
20761                         cf_suffix="$old_cf_suffix"
20762
20763                         for cf_subdir2 in $cf_subdirs lib
20764                         do
20765                                 test $cf_subdir = $cf_subdir2 && break
20766                         done
20767                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20768                         $AWK -f $srcdir/mk-2nd.awk \
20769                                 name=$cf_dir \
20770                                 traces=$LIB_TRACING \
20771                                 MODEL=$cf_ITEM \
20772                                 model=$cf_subdir \
20773                                 subset=$cf_subset \
20774                                 srcdir=$srcdir \
20775                                 echo=$WITH_ECHO \
20776                                 crenames=$cf_cv_prog_CC_c_o \
20777                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20778                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20779                         cf_subdirs="$cf_subdirs $cf_subdir"
20780                         done
20781                 done
20782         fi
20783
20784         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20785 done
20786
20787 for cf_dir in $SRC_SUBDIRS
20788 do
20789         if test ! -d $srcdir/$cf_dir ; then
20790                 continue
20791         fi
20792
20793         if test -f $cf_dir/Makefile ; then
20794                 case "$cf_dir" in
20795                 Ada95) #(vi
20796                         echo 'libs \' >> Makefile
20797                         echo 'install.libs \' >> Makefile
20798                         echo 'uninstall.libs ::' >> Makefile
20799                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20800                         ;;
20801                 esac
20802         fi
20803
20804         if test -f $srcdir/$cf_dir/modules; then
20805                 echo >> Makefile
20806                 if test -f $srcdir/$cf_dir/headers; then
20807 cat >> Makefile <<CF_EOF
20808 install.includes \\
20809 uninstall.includes \\
20810 CF_EOF
20811                 fi
20812 if test "$cf_dir" != "c++" ; then
20813 echo 'lint \' >> Makefile
20814 fi
20815 cat >> Makefile <<CF_EOF
20816 libs \\
20817 lintlib \\
20818 install.libs \\
20819 uninstall.libs \\
20820 install.$cf_dir \\
20821 uninstall.$cf_dir ::
20822         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20823 CF_EOF
20824         elif test -f $srcdir/$cf_dir/headers; then
20825 cat >> Makefile <<CF_EOF
20826
20827 libs \\
20828 install.libs \\
20829 uninstall.libs \\
20830 install.includes \\
20831 uninstall.includes ::
20832         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20833 CF_EOF
20834 fi
20835 done
20836
20837 cat >> Makefile <<CF_EOF
20838
20839 install.libs uninstall.libs \\
20840 install.data uninstall.data ::
20841 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20842 CF_EOF
20843
20844 if test "x$cf_with_manpages" = xyes; then
20845 cat >> Makefile <<CF_EOF
20846
20847 install.man \\
20848 uninstall.man ::
20849         cd man && \${MAKE} \${CF_MFLAGS} \$@
20850 CF_EOF
20851 fi
20852
20853 cat >> Makefile <<CF_EOF
20854
20855 distclean ::
20856         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20857         rm -f headers.sh headers.sed mk_shared_lib.sh
20858         rm -f edit_man.* man_alias.*
20859         rm -rf \${DIRS_TO_MAKE}
20860 CF_EOF
20861
20862 # Special case: tack's manpage lives in its own directory.
20863 if test "x$cf_with_manpages" = xyes; then
20864 if test -d tack ; then
20865 if test -f $srcdir/$tack.h; then
20866 cat >> Makefile <<CF_EOF
20867
20868 install.man \\
20869 uninstall.man ::
20870         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20871 CF_EOF
20872 fi
20873 fi
20874 fi
20875
20876 rm -f headers.sed headers.sh
20877
20878 echo creating headers.sh
20879 cat >headers.sh <<CF_EOF
20880 #! /bin/sh
20881 # This shell script is generated by the 'configure' script.  It is invoked in a
20882 # subdirectory of the build tree.  It generates a sed-script in the parent
20883 # directory that is used to adjust includes for header files that reside in a
20884 # subdirectory of /usr/include, etc.
20885 PRG=""
20886 while test \$# != 3
20887 do
20888 PRG="\$PRG \$1"; shift
20889 done
20890 DST=\$1
20891 REF=\$2
20892 SRC=\$3
20893 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
20894 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
20895 echo installing \$SRC in \$DST
20896 CF_EOF
20897
20898 if test $WITH_CURSES_H = yes; then
20899         cat >>headers.sh <<CF_EOF
20900 case \$DST in
20901 /*/include/*)
20902         END=\`basename \$DST\`
20903         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20904         do
20905                 NAME=\`basename \$i\`
20906                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20907         done
20908         ;;
20909 *)
20910         echo "" >> \$TMPSED
20911         ;;
20912 esac
20913 CF_EOF
20914
20915 else
20916         cat >>headers.sh <<CF_EOF
20917 case \$DST in
20918 /*/include/*)
20919         END=\`basename \$DST\`
20920         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20921         do
20922                 NAME=\`basename \$i\`
20923                 if test "\$NAME" = "curses.h"
20924                 then
20925                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20926                         NAME=ncurses.h
20927                 fi
20928                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20929         done
20930         ;;
20931 *)
20932         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20933         ;;
20934 esac
20935 CF_EOF
20936 fi
20937 cat >>headers.sh <<CF_EOF
20938 rm -f \$TMPSRC
20939 sed -f \$TMPSED \$SRC > \$TMPSRC
20940 NAME=\`basename \$SRC\`
20941 CF_EOF
20942 if test $WITH_CURSES_H != yes; then
20943         cat >>headers.sh <<CF_EOF
20944 test "\$NAME" = "curses.h" && NAME=ncurses.h
20945 CF_EOF
20946 fi
20947 cat >>headers.sh <<CF_EOF
20948 # Just in case someone gzip'd manpages, remove the conflicting copy.
20949 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20950
20951 eval \$PRG \$TMPSRC \$DST/\$NAME
20952 rm -f \$TMPSRC \$TMPSED
20953 CF_EOF
20954
20955 chmod 0755 headers.sh
20956
20957 for cf_dir in $SRC_SUBDIRS
20958 do
20959         if test ! -d $srcdir/$cf_dir ; then
20960                 continue
20961         fi
20962
20963         if test -f $srcdir/$cf_dir/headers; then
20964                 $AWK -f $srcdir/mk-hdr.awk \
20965                         subset="$LIB_SUBSETS" \
20966                         compat="$WITH_CURSES_H" \
20967                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20968         fi
20969
20970         if test -f $srcdir/$cf_dir/modules; then
20971                 if test "$cf_dir" != "c++" ; then
20972                         cat >>$cf_dir/Makefile <<"CF_EOF"
20973 depend : ${AUTO_SRC}
20974         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20975
20976 # DO NOT DELETE THIS LINE -- make depend depends on it.
20977 CF_EOF
20978                 fi
20979         fi
20980 done
20981
20982 if test "x$cf_with_ada" != xno ; then
20983 if test -z "$USE_OLD_MAKERULES" ; then
20984         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20985 fi
20986 fi
20987  ;;
20988   esac
20989 done
20990 EOF
20991
20992 cat >>$CONFIG_STATUS <<\EOF
20993
20994 { (exit 0); exit 0; }
20995 EOF
20996 chmod +x $CONFIG_STATUS
20997 ac_clean_files=$ac_clean_files_save
20998
20999 # configure is writing to config.log, and then calls config.status.
21000 # config.status does its own redirection, appending to config.log.
21001 # Unfortunately, on DOS this fails, as config.log is still kept open
21002 # by configure, so config.status won't be able to write to it; its
21003 # output is simply discarded.  So we exec the FD to /dev/null,
21004 # effectively closing config.log, so it can be properly (re)opened and
21005 # appended to by config.status.  When coming back to configure, we
21006 # need to make the FD available again.
21007 if test "$no_create" != yes; then
21008   ac_cs_success=:
21009   exec 5>/dev/null
21010   $SHELL $CONFIG_STATUS || ac_cs_success=false
21011   exec 5>>config.log
21012   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21013   # would make configure fail if this is the last instruction.
21014   $ac_cs_success || { (exit 1); exit 1; }
21015 fi
21016 ${MAKE:-make} preinstall