]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
60b4c6f1a34ffdf800603562d708f25d84535c1a
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.522 .
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_ASSUME_DEFAULT_COLORS 1
10070 EOF
10071
10072         cat >>confdefs.h <<\EOF
10073 #define HAVE_CURSES_VERSION 1
10074 EOF
10075
10076         cat >>confdefs.h <<\EOF
10077 #define HAVE_HAS_KEY 1
10078 EOF
10079
10080         cat >>confdefs.h <<\EOF
10081 #define HAVE_RESIZETERM 1
10082 EOF
10083
10084         cat >>confdefs.h <<\EOF
10085 #define HAVE_RESIZE_TERM 1
10086 EOF
10087
10088         cat >>confdefs.h <<\EOF
10089 #define HAVE_TERM_ENTRY_H 1
10090 EOF
10091
10092         cat >>confdefs.h <<\EOF
10093 #define HAVE_USE_DEFAULT_COLORS 1
10094 EOF
10095
10096         cat >>confdefs.h <<\EOF
10097 #define HAVE_USE_SCREEN 1
10098 EOF
10099
10100         cat >>confdefs.h <<\EOF
10101 #define HAVE_USE_WINDOW 1
10102 EOF
10103
10104         cat >>confdefs.h <<\EOF
10105 #define HAVE_WRESIZE 1
10106 EOF
10107
10108         cat >>confdefs.h <<\EOF
10109 #define NCURSES_EXT_FUNCS 1
10110 EOF
10111
10112         GENERATED_EXT_FUNCS=generated
10113 else
10114         NCURSES_EXT_FUNCS=0
10115         GENERATED_EXT_FUNCS=
10116 fi
10117
10118 echo "$as_me:10118: checking if you want to build with experimental SCREEN extensions" >&5
10119 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10120
10121 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10122 if test "${enable_sp_funcs+set}" = set; then
10123   enableval="$enable_sp_funcs"
10124   with_sp_funcs=$enableval
10125 else
10126   with_sp_funcs=no
10127 fi;
10128 echo "$as_me:10128: result: $with_sp_funcs" >&5
10129 echo "${ECHO_T}$with_sp_funcs" >&6
10130 if test "$with_sp_funcs" = yes ; then
10131         NCURSES_SP_FUNCS=1
10132         cat >>confdefs.h <<\EOF
10133 #define NCURSES_SP_FUNCS 1
10134 EOF
10135
10136         GENERATED_SP_FUNCS=generated
10137 else
10138         NCURSES_SP_FUNCS=0
10139         GENERATED_SP_FUNCS=
10140 fi
10141
10142 echo "$as_me:10142: checking if you want to build with experimental terminal-driver" >&5
10143 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10144
10145 # Check whether --enable-term-driver or --disable-term-driver was given.
10146 if test "${enable_term_driver+set}" = set; then
10147   enableval="$enable_term_driver"
10148   with_term_driver=$enableval
10149 else
10150   with_term_driver=no
10151 fi;
10152 echo "$as_me:10152: result: $with_term_driver" >&5
10153 echo "${ECHO_T}$with_term_driver" >&6
10154 if test "$with_term_driver" = yes ; then
10155         cat >>confdefs.h <<\EOF
10156 #define USE_TERM_DRIVER 1
10157 EOF
10158
10159         if test "$with_sp_funcs" != yes ; then
10160                 { { echo "$as_me:10160: error: The term-driver option relies upon sp-funcs" >&5
10161 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10162    { (exit 1); exit 1; }; }
10163         fi
10164 fi
10165
10166 ###   use option --enable-const to turn on use of const beyond that in XSI.
10167 echo "$as_me:10167: checking for extended use of const keyword" >&5
10168 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10169
10170 # Check whether --enable-const or --disable-const was given.
10171 if test "${enable_const+set}" = set; then
10172   enableval="$enable_const"
10173   with_ext_const=$enableval
10174 else
10175   with_ext_const=no
10176 fi;
10177 echo "$as_me:10177: result: $with_ext_const" >&5
10178 echo "${ECHO_T}$with_ext_const" >&6
10179 NCURSES_CONST='/*nothing*/'
10180 if test "$with_ext_const" = yes ; then
10181         NCURSES_CONST=const
10182 fi
10183
10184 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10185 echo "$as_me:10185: checking if you want to use extended colors" >&5
10186 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10187
10188 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10189 if test "${enable_ext_colors+set}" = set; then
10190   enableval="$enable_ext_colors"
10191   with_ext_colors=$enableval
10192 else
10193   with_ext_colors=no
10194 fi;
10195 echo "$as_me:10195: result: $with_ext_colors" >&5
10196 echo "${ECHO_T}$with_ext_colors" >&6
10197 NCURSES_EXT_COLORS=0
10198 if test "$with_ext_colors" = yes ; then
10199         if test "$with_widec" != yes ; then
10200                 { { echo "$as_me:10200: error: This option applies only to wide-character library" >&5
10201 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10202    { (exit 1); exit 1; }; }
10203         else
10204                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10205
10206 if test "${with_abi_version+set}" != set; then
10207         case $cf_cv_rel_version in
10208         5.*)
10209                 cf_cv_rel_version=6.0
10210                 cf_cv_abi_version=6
10211                 { echo "$as_me:10211: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10212 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10213                 ;;
10214         esac
10215 fi
10216
10217         fi
10218         NCURSES_EXT_COLORS=1
10219         cat >>confdefs.h <<\EOF
10220 #define NCURSES_EXT_COLORS 1
10221 EOF
10222
10223 fi
10224
10225 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10226 echo "$as_me:10226: checking if you want to use extended mouse encoding" >&5
10227 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10228
10229 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10230 if test "${enable_ext_mouse+set}" = set; then
10231   enableval="$enable_ext_mouse"
10232   with_ext_mouse=$enableval
10233 else
10234   with_ext_mouse=no
10235 fi;
10236 echo "$as_me:10236: result: $with_ext_mouse" >&5
10237 echo "${ECHO_T}$with_ext_mouse" >&6
10238 NCURSES_MOUSE_VERSION=1
10239 if test "$with_ext_mouse" = yes ; then
10240         NCURSES_MOUSE_VERSION=2
10241
10242 if test "${with_abi_version+set}" != set; then
10243         case $cf_cv_rel_version in
10244         5.*)
10245                 cf_cv_rel_version=6.0
10246                 cf_cv_abi_version=6
10247                 { echo "$as_me:10247: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10248 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10249                 ;;
10250         esac
10251 fi
10252
10253 fi
10254
10255 echo "$as_me:10255: checking if you want \$NCURSES_NO_PADDING code" >&5
10256 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10257
10258 # Check whether --enable-no-padding or --disable-no-padding was given.
10259 if test "${enable_no_padding+set}" = set; then
10260   enableval="$enable_no_padding"
10261   with_no_padding=$enableval
10262 else
10263   with_no_padding=$with_ext_funcs
10264 fi;
10265 echo "$as_me:10265: result: $with_no_padding" >&5
10266 echo "${ECHO_T}$with_no_padding" >&6
10267 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10268 #define NCURSES_NO_PADDING 1
10269 EOF
10270
10271 echo "$as_me:10271: checking for ANSI C header files" >&5
10272 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10273 if test "${ac_cv_header_stdc+set}" = set; then
10274   echo $ECHO_N "(cached) $ECHO_C" >&6
10275 else
10276   cat >conftest.$ac_ext <<_ACEOF
10277 #line 10277 "configure"
10278 #include "confdefs.h"
10279 #include <stdlib.h>
10280 #include <stdarg.h>
10281 #include <string.h>
10282 #include <float.h>
10283
10284 _ACEOF
10285 if { (eval echo "$as_me:10285: \"$ac_cpp conftest.$ac_ext\"") >&5
10286   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10287   ac_status=$?
10288   egrep -v '^ *\+' conftest.er1 >conftest.err
10289   rm -f conftest.er1
10290   cat conftest.err >&5
10291   echo "$as_me:10291: \$? = $ac_status" >&5
10292   (exit $ac_status); } >/dev/null; then
10293   if test -s conftest.err; then
10294     ac_cpp_err=$ac_c_preproc_warn_flag
10295   else
10296     ac_cpp_err=
10297   fi
10298 else
10299   ac_cpp_err=yes
10300 fi
10301 if test -z "$ac_cpp_err"; then
10302   ac_cv_header_stdc=yes
10303 else
10304   echo "$as_me: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306   ac_cv_header_stdc=no
10307 fi
10308 rm -f conftest.err conftest.$ac_ext
10309
10310 if test $ac_cv_header_stdc = yes; then
10311   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10312   cat >conftest.$ac_ext <<_ACEOF
10313 #line 10313 "configure"
10314 #include "confdefs.h"
10315 #include <string.h>
10316
10317 _ACEOF
10318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10319   egrep "memchr" >/dev/null 2>&1; then
10320   :
10321 else
10322   ac_cv_header_stdc=no
10323 fi
10324 rm -rf conftest*
10325
10326 fi
10327
10328 if test $ac_cv_header_stdc = yes; then
10329   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10330   cat >conftest.$ac_ext <<_ACEOF
10331 #line 10331 "configure"
10332 #include "confdefs.h"
10333 #include <stdlib.h>
10334
10335 _ACEOF
10336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10337   egrep "free" >/dev/null 2>&1; then
10338   :
10339 else
10340   ac_cv_header_stdc=no
10341 fi
10342 rm -rf conftest*
10343
10344 fi
10345
10346 if test $ac_cv_header_stdc = yes; then
10347   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10348   if test "$cross_compiling" = yes; then
10349   :
10350 else
10351   cat >conftest.$ac_ext <<_ACEOF
10352 #line 10352 "configure"
10353 #include "confdefs.h"
10354 #include <ctype.h>
10355 #if ((' ' & 0x0FF) == 0x020)
10356 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10357 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10358 #else
10359 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10360                      || ('j' <= (c) && (c) <= 'r') \
10361                      || ('s' <= (c) && (c) <= 'z'))
10362 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10363 #endif
10364
10365 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10366 int
10367 main ()
10368 {
10369   int i;
10370   for (i = 0; i < 256; i++)
10371     if (XOR (islower (i), ISLOWER (i))
10372         || toupper (i) != TOUPPER (i))
10373       $ac_main_return(2);
10374   $ac_main_return (0);
10375 }
10376 _ACEOF
10377 rm -f conftest$ac_exeext
10378 if { (eval echo "$as_me:10378: \"$ac_link\"") >&5
10379   (eval $ac_link) 2>&5
10380   ac_status=$?
10381   echo "$as_me:10381: \$? = $ac_status" >&5
10382   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10383   { (eval echo "$as_me:10383: \"$ac_try\"") >&5
10384   (eval $ac_try) 2>&5
10385   ac_status=$?
10386   echo "$as_me:10386: \$? = $ac_status" >&5
10387   (exit $ac_status); }; }; then
10388   :
10389 else
10390   echo "$as_me: program exited with status $ac_status" >&5
10391 echo "$as_me: failed program was:" >&5
10392 cat conftest.$ac_ext >&5
10393 ac_cv_header_stdc=no
10394 fi
10395 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10396 fi
10397 fi
10398 fi
10399 echo "$as_me:10399: result: $ac_cv_header_stdc" >&5
10400 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10401 if test $ac_cv_header_stdc = yes; then
10402
10403 cat >>confdefs.h <<\EOF
10404 #define STDC_HEADERS 1
10405 EOF
10406
10407 fi
10408
10409 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10410
10411 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10412                   inttypes.h stdint.h unistd.h
10413 do
10414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10415 echo "$as_me:10415: checking for $ac_header" >&5
10416 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10418   echo $ECHO_N "(cached) $ECHO_C" >&6
10419 else
10420   cat >conftest.$ac_ext <<_ACEOF
10421 #line 10421 "configure"
10422 #include "confdefs.h"
10423 $ac_includes_default
10424 #include <$ac_header>
10425 _ACEOF
10426 rm -f conftest.$ac_objext
10427 if { (eval echo "$as_me:10427: \"$ac_compile\"") >&5
10428   (eval $ac_compile) 2>&5
10429   ac_status=$?
10430   echo "$as_me:10430: \$? = $ac_status" >&5
10431   (exit $ac_status); } &&
10432          { ac_try='test -s conftest.$ac_objext'
10433   { (eval echo "$as_me:10433: \"$ac_try\"") >&5
10434   (eval $ac_try) 2>&5
10435   ac_status=$?
10436   echo "$as_me:10436: \$? = $ac_status" >&5
10437   (exit $ac_status); }; }; then
10438   eval "$as_ac_Header=yes"
10439 else
10440   echo "$as_me: failed program was:" >&5
10441 cat conftest.$ac_ext >&5
10442 eval "$as_ac_Header=no"
10443 fi
10444 rm -f conftest.$ac_objext conftest.$ac_ext
10445 fi
10446 echo "$as_me:10446: result: `eval echo '${'$as_ac_Header'}'`" >&5
10447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10448 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10449   cat >>confdefs.h <<EOF
10450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10451 EOF
10452
10453 fi
10454 done
10455
10456 echo "$as_me:10456: checking for signed char" >&5
10457 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10458 if test "${ac_cv_type_signed_char+set}" = set; then
10459   echo $ECHO_N "(cached) $ECHO_C" >&6
10460 else
10461   cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 $ac_includes_default
10465 int
10466 main ()
10467 {
10468 if ((signed char *) 0)
10469   return 0;
10470 if (sizeof (signed char))
10471   return 0;
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest.$ac_objext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   ac_cv_type_signed_char=yes
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_cv_type_signed_char=no
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 fi
10496 echo "$as_me:10496: result: $ac_cv_type_signed_char" >&5
10497 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10498
10499 echo "$as_me:10499: checking size of signed char" >&5
10500 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10501 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10502   echo $ECHO_N "(cached) $ECHO_C" >&6
10503 else
10504   if test "$ac_cv_type_signed_char" = yes; then
10505   if test "$cross_compiling" = yes; then
10506   # Depending upon the size, compute the lo and hi bounds.
10507 cat >conftest.$ac_ext <<_ACEOF
10508 #line 10508 "configure"
10509 #include "confdefs.h"
10510 $ac_includes_default
10511 int
10512 main ()
10513 {
10514 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10515   ;
10516   return 0;
10517 }
10518 _ACEOF
10519 rm -f conftest.$ac_objext
10520 if { (eval echo "$as_me:10520: \"$ac_compile\"") >&5
10521   (eval $ac_compile) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit $ac_status); } &&
10525          { ac_try='test -s conftest.$ac_objext'
10526   { (eval echo "$as_me:10526: \"$ac_try\"") >&5
10527   (eval $ac_try) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit $ac_status); }; }; then
10531   ac_lo=0 ac_mid=0
10532   while :; do
10533     cat >conftest.$ac_ext <<_ACEOF
10534 #line 10534 "configure"
10535 #include "confdefs.h"
10536 $ac_includes_default
10537 int
10538 main ()
10539 {
10540 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10541   ;
10542   return 0;
10543 }
10544 _ACEOF
10545 rm -f conftest.$ac_objext
10546 if { (eval echo "$as_me:10546: \"$ac_compile\"") >&5
10547   (eval $ac_compile) 2>&5
10548   ac_status=$?
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); } &&
10551          { ac_try='test -s conftest.$ac_objext'
10552   { (eval echo "$as_me:10552: \"$ac_try\"") >&5
10553   (eval $ac_try) 2>&5
10554   ac_status=$?
10555   echo "$as_me:10555: \$? = $ac_status" >&5
10556   (exit $ac_status); }; }; then
10557   ac_hi=$ac_mid; break
10558 else
10559   echo "$as_me: failed program was:" >&5
10560 cat conftest.$ac_ext >&5
10561 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10562 fi
10563 rm -f conftest.$ac_objext conftest.$ac_ext
10564   done
10565 else
10566   echo "$as_me: failed program was:" >&5
10567 cat conftest.$ac_ext >&5
10568 ac_hi=-1 ac_mid=-1
10569   while :; do
10570     cat >conftest.$ac_ext <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573 $ac_includes_default
10574 int
10575 main ()
10576 {
10577 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10578   ;
10579   return 0;
10580 }
10581 _ACEOF
10582 rm -f conftest.$ac_objext
10583 if { (eval echo "$as_me:10583: \"$ac_compile\"") >&5
10584   (eval $ac_compile) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); } &&
10588          { ac_try='test -s conftest.$ac_objext'
10589   { (eval echo "$as_me:10589: \"$ac_try\"") >&5
10590   (eval $ac_try) 2>&5
10591   ac_status=$?
10592   echo "$as_me:10592: \$? = $ac_status" >&5
10593   (exit $ac_status); }; }; then
10594   ac_lo=$ac_mid; break
10595 else
10596   echo "$as_me: failed program was:" >&5
10597 cat conftest.$ac_ext >&5
10598 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10599 fi
10600 rm -f conftest.$ac_objext conftest.$ac_ext
10601   done
10602 fi
10603 rm -f conftest.$ac_objext conftest.$ac_ext
10604 # Binary search between lo and hi bounds.
10605 while test "x$ac_lo" != "x$ac_hi"; do
10606   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10607   cat >conftest.$ac_ext <<_ACEOF
10608 #line 10608 "configure"
10609 #include "confdefs.h"
10610 $ac_includes_default
10611 int
10612 main ()
10613 {
10614 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10615   ;
10616   return 0;
10617 }
10618 _ACEOF
10619 rm -f conftest.$ac_objext
10620 if { (eval echo "$as_me:10620: \"$ac_compile\"") >&5
10621   (eval $ac_compile) 2>&5
10622   ac_status=$?
10623   echo "$as_me:10623: \$? = $ac_status" >&5
10624   (exit $ac_status); } &&
10625          { ac_try='test -s conftest.$ac_objext'
10626   { (eval echo "$as_me:10626: \"$ac_try\"") >&5
10627   (eval $ac_try) 2>&5
10628   ac_status=$?
10629   echo "$as_me:10629: \$? = $ac_status" >&5
10630   (exit $ac_status); }; }; then
10631   ac_hi=$ac_mid
10632 else
10633   echo "$as_me: failed program was:" >&5
10634 cat conftest.$ac_ext >&5
10635 ac_lo=`expr $ac_mid + 1`
10636 fi
10637 rm -f conftest.$ac_objext conftest.$ac_ext
10638 done
10639 ac_cv_sizeof_signed_char=$ac_lo
10640 else
10641   if test "$cross_compiling" = yes; then
10642   { { echo "$as_me:10642: error: cannot run test program while cross compiling" >&5
10643 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10644    { (exit 1); exit 1; }; }
10645 else
10646   cat >conftest.$ac_ext <<_ACEOF
10647 #line 10647 "configure"
10648 #include "confdefs.h"
10649 $ac_includes_default
10650 int
10651 main ()
10652 {
10653 FILE *f = fopen ("conftest.val", "w");
10654 if (!f)
10655   $ac_main_return (1);
10656 fprintf (f, "%d", (sizeof (signed char)));
10657 fclose (f);
10658   ;
10659   return 0;
10660 }
10661 _ACEOF
10662 rm -f conftest$ac_exeext
10663 if { (eval echo "$as_me:10663: \"$ac_link\"") >&5
10664   (eval $ac_link) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10668   { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669   (eval $ac_try) 2>&5
10670   ac_status=$?
10671   echo "$as_me:10671: \$? = $ac_status" >&5
10672   (exit $ac_status); }; }; then
10673   ac_cv_sizeof_signed_char=`cat conftest.val`
10674 else
10675   echo "$as_me: program exited with status $ac_status" >&5
10676 echo "$as_me: failed program was:" >&5
10677 cat conftest.$ac_ext >&5
10678 fi
10679 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10680 fi
10681 fi
10682 rm -f conftest.val
10683 else
10684   ac_cv_sizeof_signed_char=0
10685 fi
10686 fi
10687 echo "$as_me:10687: result: $ac_cv_sizeof_signed_char" >&5
10688 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10689 cat >>confdefs.h <<EOF
10690 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10691 EOF
10692
10693 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10694         NCURSES_SBOOL="signed char"
10695 else
10696         NCURSES_SBOOL="char"
10697 fi
10698 echo "$as_me:10698: checking if you want to use signed Boolean array in term.h" >&5
10699 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10700
10701 # Check whether --enable-signed-char or --disable-signed-char was given.
10702 if test "${enable_signed_char+set}" = set; then
10703   enableval="$enable_signed_char"
10704   with_signed_char=$enableval
10705 else
10706   with_signed_char=no
10707 fi;
10708 echo "$as_me:10708: result: $with_signed_char" >&5
10709 echo "${ECHO_T}$with_signed_char" >&6
10710 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10711
10712 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10713 echo "$as_me:10713: checking if you want SIGWINCH handler" >&5
10714 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10715
10716 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10717 if test "${enable_sigwinch+set}" = set; then
10718   enableval="$enable_sigwinch"
10719   with_sigwinch=$enableval
10720 else
10721   with_sigwinch=$with_ext_funcs
10722 fi;
10723 echo "$as_me:10723: result: $with_sigwinch" >&5
10724 echo "${ECHO_T}$with_sigwinch" >&6
10725 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10726 #define USE_SIGWINCH 1
10727 EOF
10728
10729 ###   use option --enable-tcap-names to allow user to define new capabilities
10730 echo "$as_me:10730: checking if you want user-definable terminal capabilities like termcap" >&5
10731 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10732
10733 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10734 if test "${enable_tcap_names+set}" = set; then
10735   enableval="$enable_tcap_names"
10736   with_tcap_names=$enableval
10737 else
10738   with_tcap_names=$with_ext_funcs
10739 fi;
10740 echo "$as_me:10740: result: $with_tcap_names" >&5
10741 echo "${ECHO_T}$with_tcap_names" >&6
10742 NCURSES_XNAMES=0
10743 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10744
10745 ###############################################################################
10746 # These options are relatively safe to experiment with.
10747
10748 echo "$as_me:10748: checking if you want all development code" >&5
10749 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10750
10751 # Check whether --with-develop or --without-develop was given.
10752 if test "${with_develop+set}" = set; then
10753   withval="$with_develop"
10754   with_develop=$withval
10755 else
10756   with_develop=no
10757 fi;
10758 echo "$as_me:10758: result: $with_develop" >&5
10759 echo "${ECHO_T}$with_develop" >&6
10760
10761 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10762 echo "$as_me:10762: checking if you want hard-tabs code" >&5
10763 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10764
10765 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10766 if test "${enable_hard_tabs+set}" = set; then
10767   enableval="$enable_hard_tabs"
10768
10769 else
10770   enable_hard_tabs=$with_develop
10771 fi;
10772 echo "$as_me:10772: result: $enable_hard_tabs" >&5
10773 echo "${ECHO_T}$enable_hard_tabs" >&6
10774 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10775 #define USE_HARD_TABS 1
10776 EOF
10777
10778 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10779 echo "$as_me:10779: checking if you want limited support for xmc" >&5
10780 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10781
10782 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10783 if test "${enable_xmc_glitch+set}" = set; then
10784   enableval="$enable_xmc_glitch"
10785
10786 else
10787   enable_xmc_glitch=$with_develop
10788 fi;
10789 echo "$as_me:10789: result: $enable_xmc_glitch" >&5
10790 echo "${ECHO_T}$enable_xmc_glitch" >&6
10791 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10792 #define USE_XMC_SUPPORT 1
10793 EOF
10794
10795 ###############################################################################
10796 # These are just experimental, probably should not be in a package:
10797
10798 echo "$as_me:10798: checking if you do not want to assume colors are white-on-black" >&5
10799 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10800
10801 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10802 if test "${enable_assumed_color+set}" = set; then
10803   enableval="$enable_assumed_color"
10804   with_assumed_color=$enableval
10805 else
10806   with_assumed_color=yes
10807 fi;
10808 echo "$as_me:10808: result: $with_assumed_color" >&5
10809 echo "${ECHO_T}$with_assumed_color" >&6
10810 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10811 #define USE_ASSUMED_COLOR 1
10812 EOF
10813
10814 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10815 echo "$as_me:10815: checking if you want hashmap scrolling-optimization code" >&5
10816 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10817
10818 # Check whether --enable-hashmap or --disable-hashmap was given.
10819 if test "${enable_hashmap+set}" = set; then
10820   enableval="$enable_hashmap"
10821   with_hashmap=$enableval
10822 else
10823   with_hashmap=yes
10824 fi;
10825 echo "$as_me:10825: result: $with_hashmap" >&5
10826 echo "${ECHO_T}$with_hashmap" >&6
10827 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10828 #define USE_HASHMAP 1
10829 EOF
10830
10831 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10832 echo "$as_me:10832: checking if you want colorfgbg code" >&5
10833 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10834
10835 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10836 if test "${enable_colorfgbg+set}" = set; then
10837   enableval="$enable_colorfgbg"
10838   with_colorfgbg=$enableval
10839 else
10840   with_colorfgbg=no
10841 fi;
10842 echo "$as_me:10842: result: $with_colorfgbg" >&5
10843 echo "${ECHO_T}$with_colorfgbg" >&6
10844 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10845 #define USE_COLORFGBG 1
10846 EOF
10847
10848 ###   use option --enable-interop to turn on use of bindings used for interop
10849 echo "$as_me:10849: checking if you want interop bindings" >&5
10850 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10851
10852 # Check whether --enable-interop or --disable-interop was given.
10853 if test "${enable_interop+set}" = set; then
10854   enableval="$enable_interop"
10855   with_exp_interop=$enableval
10856 else
10857   with_exp_interop=no
10858 fi;
10859 echo "$as_me:10859: result: $with_exp_interop" >&5
10860 echo "${ECHO_T}$with_exp_interop" >&6
10861
10862 NCURSES_INTEROP_FUNCS=0
10863 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10864
10865 # This is still experimental (20080329), but should ultimately be moved to
10866 # the script-block --with-normal, etc.
10867
10868 echo "$as_me:10868: checking if you want to link with the pthread library" >&5
10869 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10870
10871 # Check whether --with-pthread or --without-pthread was given.
10872 if test "${with_pthread+set}" = set; then
10873   withval="$with_pthread"
10874   with_pthread=$withval
10875 else
10876   with_pthread=no
10877 fi;
10878 echo "$as_me:10878: result: $with_pthread" >&5
10879 echo "${ECHO_T}$with_pthread" >&6
10880
10881 if test "$with_pthread" != no ; then
10882     echo "$as_me:10882: checking for pthread.h" >&5
10883 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10884 if test "${ac_cv_header_pthread_h+set}" = set; then
10885   echo $ECHO_N "(cached) $ECHO_C" >&6
10886 else
10887   cat >conftest.$ac_ext <<_ACEOF
10888 #line 10888 "configure"
10889 #include "confdefs.h"
10890 #include <pthread.h>
10891 _ACEOF
10892 if { (eval echo "$as_me:10892: \"$ac_cpp conftest.$ac_ext\"") >&5
10893   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10894   ac_status=$?
10895   egrep -v '^ *\+' conftest.er1 >conftest.err
10896   rm -f conftest.er1
10897   cat conftest.err >&5
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit $ac_status); } >/dev/null; then
10900   if test -s conftest.err; then
10901     ac_cpp_err=$ac_c_preproc_warn_flag
10902   else
10903     ac_cpp_err=
10904   fi
10905 else
10906   ac_cpp_err=yes
10907 fi
10908 if test -z "$ac_cpp_err"; then
10909   ac_cv_header_pthread_h=yes
10910 else
10911   echo "$as_me: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   ac_cv_header_pthread_h=no
10914 fi
10915 rm -f conftest.err conftest.$ac_ext
10916 fi
10917 echo "$as_me:10917: result: $ac_cv_header_pthread_h" >&5
10918 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10919 if test $ac_cv_header_pthread_h = yes; then
10920
10921         cat >>confdefs.h <<\EOF
10922 #define HAVE_PTHREADS_H 1
10923 EOF
10924
10925         echo "$as_me:10925: checking if we can link with the pthread library" >&5
10926 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10927         cf_save_LIBS="$LIBS"
10928         LIBS="-lpthread $LIBS"
10929         cat >conftest.$ac_ext <<_ACEOF
10930 #line 10930 "configure"
10931 #include "confdefs.h"
10932
10933 #include <pthread.h>
10934
10935 int
10936 main ()
10937 {
10938
10939         int rc = pthread_create(0,0,0,0);
10940
10941   ;
10942   return 0;
10943 }
10944 _ACEOF
10945 rm -f conftest.$ac_objext conftest$ac_exeext
10946 if { (eval echo "$as_me:10946: \"$ac_link\"") >&5
10947   (eval $ac_link) 2>&5
10948   ac_status=$?
10949   echo "$as_me:10949: \$? = $ac_status" >&5
10950   (exit $ac_status); } &&
10951          { ac_try='test -s conftest$ac_exeext'
10952   { (eval echo "$as_me:10952: \"$ac_try\"") >&5
10953   (eval $ac_try) 2>&5
10954   ac_status=$?
10955   echo "$as_me:10955: \$? = $ac_status" >&5
10956   (exit $ac_status); }; }; then
10957   with_pthread=yes
10958 else
10959   echo "$as_me: failed program was:" >&5
10960 cat conftest.$ac_ext >&5
10961 with_pthread=no
10962 fi
10963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10964         LIBS="$cf_save_LIBS"
10965         echo "$as_me:10965: result: $with_pthread" >&5
10966 echo "${ECHO_T}$with_pthread" >&6
10967
10968         if test "$with_pthread" = yes ; then
10969             LIBS="-lpthread $LIBS"
10970             cat >>confdefs.h <<\EOF
10971 #define HAVE_LIBPTHREADS 1
10972 EOF
10973
10974         else
10975             { { echo "$as_me:10975: error: Cannot link with pthread library" >&5
10976 echo "$as_me: error: Cannot link with pthread library" >&2;}
10977    { (exit 1); exit 1; }; }
10978         fi
10979
10980 fi
10981
10982 fi
10983
10984 if test "x$with_pthread" != xno; then
10985         echo "$as_me:10985: checking for pthread_kill" >&5
10986 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
10987 if test "${ac_cv_func_pthread_kill+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   cat >conftest.$ac_ext <<_ACEOF
10991 #line 10991 "configure"
10992 #include "confdefs.h"
10993 /* System header to define __stub macros and hopefully few prototypes,
10994     which can conflict with char pthread_kill (); below.  */
10995 #include <assert.h>
10996 /* Override any gcc2 internal prototype to avoid an error.  */
10997 #ifdef __cplusplus
10998 extern "C"
10999 #endif
11000 /* We use char because int might match the return type of a gcc2
11001    builtin and then its argument prototype would still apply.  */
11002 char pthread_kill ();
11003 char (*f) ();
11004
11005 int
11006 main ()
11007 {
11008 /* The GNU C library defines this for functions which it implements
11009     to always fail with ENOSYS.  Some functions are actually named
11010     something starting with __ and the normal name is an alias.  */
11011 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11012 choke me
11013 #else
11014 f = pthread_kill;
11015 #endif
11016
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f conftest.$ac_objext conftest$ac_exeext
11022 if { (eval echo "$as_me:11022: \"$ac_link\"") >&5
11023   (eval $ac_link) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); } &&
11027          { ac_try='test -s conftest$ac_exeext'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit $ac_status); }; }; then
11033   ac_cv_func_pthread_kill=yes
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat conftest.$ac_ext >&5
11037 ac_cv_func_pthread_kill=no
11038 fi
11039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11040 fi
11041 echo "$as_me:11041: result: $ac_cv_func_pthread_kill" >&5
11042 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11043 if test $ac_cv_func_pthread_kill = yes; then
11044
11045                 echo "$as_me:11045: checking if you want to allow EINTR in wgetch with pthreads" >&5
11046 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11047
11048 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11049 if test "${enable_pthreads_eintr+set}" = set; then
11050   enableval="$enable_pthreads_eintr"
11051   use_pthreads_eintr=$enableval
11052 else
11053   use_pthreads_eintr=no
11054 fi;
11055                 echo "$as_me:11055: result: $use_pthreads_eintr" >&5
11056 echo "${ECHO_T}$use_pthreads_eintr" >&6
11057                 if test $use_pthreads_eintr = yes ; then
11058                         cat >>confdefs.h <<\EOF
11059 #define USE_PTHREADS_EINTR 1
11060 EOF
11061
11062                 fi
11063 fi
11064
11065         echo "$as_me:11065: checking if you want to use weak-symbols for pthreads" >&5
11066 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11067
11068 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11069 if test "${enable_weak_symbols+set}" = set; then
11070   enableval="$enable_weak_symbols"
11071   use_weak_symbols=$enableval
11072 else
11073   use_weak_symbols=no
11074 fi;
11075         echo "$as_me:11075: result: $use_weak_symbols" >&5
11076 echo "${ECHO_T}$use_weak_symbols" >&6
11077         if test "$use_weak_symbols" = yes ; then
11078
11079 echo "$as_me:11079: checking if $CC supports weak symbols" >&5
11080 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11081 if test "${cf_cv_weak_symbols+set}" = set; then
11082   echo $ECHO_N "(cached) $ECHO_C" >&6
11083 else
11084
11085 cat >conftest.$ac_ext <<_ACEOF
11086 #line 11086 "configure"
11087 #include "confdefs.h"
11088
11089 #include <stdio.h>
11090 int
11091 main ()
11092 {
11093
11094 #if defined(__GNUC__)
11095 #  if defined __USE_ISOC99
11096 #    define _cat_pragma(exp)    _Pragma(#exp)
11097 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11098 #  else
11099 #    define _weak_pragma(exp)
11100 #  endif
11101 #  define _declare(name)        __extension__ extern __typeof__(name) name
11102 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11103 #endif
11104
11105 weak_symbol(fopen);
11106
11107   ;
11108   return 0;
11109 }
11110 _ACEOF
11111 rm -f conftest.$ac_objext
11112 if { (eval echo "$as_me:11112: \"$ac_compile\"") >&5
11113   (eval $ac_compile) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); } &&
11117          { ac_try='test -s conftest.$ac_objext'
11118   { (eval echo "$as_me:11118: \"$ac_try\"") >&5
11119   (eval $ac_try) 2>&5
11120   ac_status=$?
11121   echo "$as_me:11121: \$? = $ac_status" >&5
11122   (exit $ac_status); }; }; then
11123   cf_cv_weak_symbols=yes
11124 else
11125   echo "$as_me: failed program was:" >&5
11126 cat conftest.$ac_ext >&5
11127 cf_cv_weak_symbols=no
11128 fi
11129 rm -f conftest.$ac_objext conftest.$ac_ext
11130
11131 fi
11132 echo "$as_me:11132: result: $cf_cv_weak_symbols" >&5
11133 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11134
11135         else
11136                 cf_cv_weak_symbols=no
11137         fi
11138
11139         if test $cf_cv_weak_symbols = yes ; then
11140                 cat >>confdefs.h <<\EOF
11141 #define USE_WEAK_SYMBOLS 1
11142 EOF
11143
11144         fi
11145 fi
11146
11147 PTHREAD=
11148 if test "$with_pthread" = "yes" ; then
11149     cat >>confdefs.h <<\EOF
11150 #define USE_PTHREADS 1
11151 EOF
11152
11153     enable_reentrant=yes
11154     if test $cf_cv_weak_symbols = yes ; then
11155         PTHREAD=-lpthread
11156     fi
11157 fi
11158
11159 # Reentrant code has to be opaque; there's little advantage to making ncurses
11160 # opaque outside of that, so there is no --enable-opaque option.  We can use
11161 # this option without --with-pthreads, but this will be always set for
11162 # pthreads.
11163 echo "$as_me:11163: checking if you want experimental reentrant code" >&5
11164 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11165
11166 # Check whether --enable-reentrant or --disable-reentrant was given.
11167 if test "${enable_reentrant+set}" = set; then
11168   enableval="$enable_reentrant"
11169   with_reentrant=$enableval
11170 else
11171   with_reentrant=no
11172 fi;
11173 echo "$as_me:11173: result: $with_reentrant" >&5
11174 echo "${ECHO_T}$with_reentrant" >&6
11175 if test "$with_reentrant" = yes ; then
11176         cf_cv_enable_reentrant=1
11177         cf_cv_enable_opaque="NCURSES_INTERNALS"
11178         NCURSES_OPAQUE=1
11179         NCURSES_SIZE_T=int
11180         if test $cf_cv_weak_symbols = yes ; then
11181
11182 # remove pthread library from $LIBS
11183 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11184
11185                 TEST_LIBS="-lpthread $TEST_LIBS"
11186                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11187         else
11188                 LIB_SUFFIX="t${LIB_SUFFIX}"
11189         fi
11190         cat >>confdefs.h <<\EOF
11191 #define USE_REENTRANT 1
11192 EOF
11193
11194 if test "${with_abi_version+set}" != set; then
11195         case $cf_cv_rel_version in
11196         5.*)
11197                 cf_cv_rel_version=6.0
11198                 cf_cv_abi_version=6
11199                 { echo "$as_me:11199: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11200 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11201                 ;;
11202         esac
11203 fi
11204
11205 else
11206         cf_cv_enable_reentrant=0
11207         cf_cv_enable_opaque="NCURSES_OPAQUE"
11208         NCURSES_OPAQUE=0
11209         NCURSES_SIZE_T=short
11210 fi
11211
11212 ### Allow using a different wrap-prefix
11213 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11214         echo "$as_me:11214: checking for prefix used to wrap public variables" >&5
11215 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11216
11217 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11218 if test "${with_wrap_prefix+set}" = set; then
11219   withval="$with_wrap_prefix"
11220   NCURSES_WRAP_PREFIX=$withval
11221 else
11222   NCURSES_WRAP_PREFIX=_nc_
11223 fi;
11224         echo "$as_me:11224: result: $NCURSES_WRAP_PREFIX" >&5
11225 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11226 else
11227         NCURSES_WRAP_PREFIX=_nc_
11228 fi
11229
11230 cat >>confdefs.h <<EOF
11231 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11232 EOF
11233
11234 echo "$as_me:11234: checking if you want experimental safe-sprintf code" >&5
11235 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11236
11237 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11238 if test "${enable_safe_sprintf+set}" = set; then
11239   enableval="$enable_safe_sprintf"
11240   with_safe_sprintf=$enableval
11241 else
11242   with_safe_sprintf=no
11243 fi;
11244 echo "$as_me:11244: result: $with_safe_sprintf" >&5
11245 echo "${ECHO_T}$with_safe_sprintf" >&6
11246 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11247 #define USE_SAFE_SPRINTF 1
11248 EOF
11249
11250 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11251 # when hashmap is used scroll hints are useless
11252 if test "$with_hashmap" = no ; then
11253 echo "$as_me:11253: checking if you want to experiment without scrolling-hints code" >&5
11254 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11255
11256 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11257 if test "${enable_scroll_hints+set}" = set; then
11258   enableval="$enable_scroll_hints"
11259   with_scroll_hints=$enableval
11260 else
11261   with_scroll_hints=yes
11262 fi;
11263 echo "$as_me:11263: result: $with_scroll_hints" >&5
11264 echo "${ECHO_T}$with_scroll_hints" >&6
11265 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11266 #define USE_SCROLL_HINTS 1
11267 EOF
11268
11269 fi
11270
11271 echo "$as_me:11271: checking if you want experimental wgetch-events code" >&5
11272 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11273
11274 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11275 if test "${enable_wgetch_events+set}" = set; then
11276   enableval="$enable_wgetch_events"
11277   with_wgetch_events=$enableval
11278 else
11279   with_wgetch_events=no
11280 fi;
11281 echo "$as_me:11281: result: $with_wgetch_events" >&5
11282 echo "${ECHO_T}$with_wgetch_events" >&6
11283 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11284 #define NCURSES_WGETCH_EVENTS 1
11285 EOF
11286
11287 ###############################################################################
11288
11289 ###     use option --disable-echo to suppress full display compiling commands
11290 echo "$as_me:11290: checking if you want to display full commands during build" >&5
11291 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11292
11293 # Check whether --enable-echo or --disable-echo was given.
11294 if test "${enable_echo+set}" = set; then
11295   enableval="$enable_echo"
11296   with_echo=$enableval
11297 else
11298   with_echo=yes
11299 fi;
11300 if test "$with_echo" = yes; then
11301         ECHO_LINK=
11302 else
11303         ECHO_LINK='@ echo linking $@ ... ;'
11304         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11305         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11306 fi
11307 echo "$as_me:11307: result: $with_echo" >&5
11308 echo "${ECHO_T}$with_echo" >&6
11309
11310 ###     use option --enable-warnings to turn on all gcc warnings
11311 echo "$as_me:11311: checking if you want to see compiler warnings" >&5
11312 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11313
11314 # Check whether --enable-warnings or --disable-warnings was given.
11315 if test "${enable_warnings+set}" = set; then
11316   enableval="$enable_warnings"
11317   with_warnings=$enableval
11318 fi;
11319 echo "$as_me:11319: result: $with_warnings" >&5
11320 echo "${ECHO_T}$with_warnings" >&6
11321
11322 if test "x$with_warnings" = "xyes"; then
11323
11324         ADAFLAGS="$ADAFLAGS -gnatg"
11325
11326 INTEL_COMPILER=no
11327
11328 if test "$GCC" = yes ; then
11329         case $host_os in
11330         linux*|gnu*)
11331                 echo "$as_me:11331: checking if this is really Intel C compiler" >&5
11332 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11333                 cf_save_CFLAGS="$CFLAGS"
11334                 CFLAGS="$CFLAGS -no-gcc"
11335                 cat >conftest.$ac_ext <<_ACEOF
11336 #line 11336 "configure"
11337 #include "confdefs.h"
11338
11339 int
11340 main ()
11341 {
11342
11343 #ifdef __INTEL_COMPILER
11344 #else
11345 make an error
11346 #endif
11347
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   INTEL_COMPILER=yes
11365 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11366
11367 else
11368   echo "$as_me: failed program was:" >&5
11369 cat conftest.$ac_ext >&5
11370 fi
11371 rm -f conftest.$ac_objext conftest.$ac_ext
11372                 CFLAGS="$cf_save_CFLAGS"
11373                 echo "$as_me:11373: result: $INTEL_COMPILER" >&5
11374 echo "${ECHO_T}$INTEL_COMPILER" >&6
11375                 ;;
11376         esac
11377 fi
11378
11379 cat > conftest.$ac_ext <<EOF
11380 #line 11380 "${as_me:-configure}"
11381 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11382 EOF
11383
11384 if test "$INTEL_COMPILER" = yes
11385 then
11386 # The "-wdXXX" options suppress warnings:
11387 # remark #1419: external declaration in primary source file
11388 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11389 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11390 # remark #193: zero used for undefined preprocessing identifier
11391 # remark #593: variable "curs_sb_left_arrow" was set but never used
11392 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11393 # remark #869: parameter "tw" was never referenced
11394 # remark #981: operands are evaluated in unspecified order
11395 # warning #279: controlling expression is constant
11396
11397         { echo "$as_me:11397: checking for $CC warning options..." >&5
11398 echo "$as_me: checking for $CC warning options..." >&6;}
11399         cf_save_CFLAGS="$CFLAGS"
11400         EXTRA_CFLAGS="-Wall"
11401         for cf_opt in \
11402                 wd1419 \
11403                 wd1683 \
11404                 wd1684 \
11405                 wd193 \
11406                 wd593 \
11407                 wd279 \
11408                 wd810 \
11409                 wd869 \
11410                 wd981
11411         do
11412                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11413                 if { (eval echo "$as_me:11413: \"$ac_compile\"") >&5
11414   (eval $ac_compile) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; then
11418                         test -n "$verbose" && echo "$as_me:11418: result: ... -$cf_opt" >&5
11419 echo "${ECHO_T}... -$cf_opt" >&6
11420                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11421                 fi
11422         done
11423         CFLAGS="$cf_save_CFLAGS"
11424
11425 elif test "$GCC" = yes
11426 then
11427         { echo "$as_me:11427: checking for $CC warning options..." >&5
11428 echo "$as_me: checking for $CC warning options..." >&6;}
11429         cf_save_CFLAGS="$CFLAGS"
11430         EXTRA_CFLAGS=
11431         cf_warn_CONST=""
11432         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11433         for cf_opt in W Wall \
11434                 Wbad-function-cast \
11435                 Wcast-align \
11436                 Wcast-qual \
11437                 Winline \
11438                 Wmissing-declarations \
11439                 Wmissing-prototypes \
11440                 Wnested-externs \
11441                 Wpointer-arith \
11442                 Wshadow \
11443                 Wstrict-prototypes \
11444                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11445         do
11446                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11447                 if { (eval echo "$as_me:11447: \"$ac_compile\"") >&5
11448   (eval $ac_compile) 2>&5
11449   ac_status=$?
11450   echo "$as_me:11450: \$? = $ac_status" >&5
11451   (exit $ac_status); }; then
11452                         test -n "$verbose" && echo "$as_me:11452: result: ... -$cf_opt" >&5
11453 echo "${ECHO_T}... -$cf_opt" >&6
11454                         case $cf_opt in #(vi
11455                         Wcast-qual) #(vi
11456                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11457                                 ;;
11458                         Winline) #(vi
11459                                 case $GCC_VERSION in
11460                                 [34].*)
11461                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11462
11463 echo "${as_me:-configure}:11463: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11464
11465                                         continue;;
11466                                 esac
11467                                 ;;
11468                         esac
11469                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11470                 fi
11471         done
11472         CFLAGS="$cf_save_CFLAGS"
11473 fi
11474 rm -rf conftest*
11475
11476         if test "$cf_with_cxx" = yes ; then
11477
11478 INTEL_CPLUSPLUS=no
11479
11480 if test "$GCC" = yes ; then
11481         case $host_os in
11482         linux*|gnu*)
11483                 echo "$as_me:11483: checking if this is really Intel C++ compiler" >&5
11484 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11485                 cf_save_CFLAGS="$CXXFLAGS"
11486                 CXXFLAGS="$CXXFLAGS -no-gcc"
11487                 cat >conftest.$ac_ext <<_ACEOF
11488 #line 11488 "configure"
11489 #include "confdefs.h"
11490
11491 int
11492 main ()
11493 {
11494
11495 #ifdef __INTEL_COMPILER
11496 #else
11497 make an error
11498 #endif
11499
11500   ;
11501   return 0;
11502 }
11503 _ACEOF
11504 rm -f conftest.$ac_objext
11505 if { (eval echo "$as_me:11505: \"$ac_compile\"") >&5
11506   (eval $ac_compile) 2>&5
11507   ac_status=$?
11508   echo "$as_me:11508: \$? = $ac_status" >&5
11509   (exit $ac_status); } &&
11510          { ac_try='test -s conftest.$ac_objext'
11511   { (eval echo "$as_me:11511: \"$ac_try\"") >&5
11512   (eval $ac_try) 2>&5
11513   ac_status=$?
11514   echo "$as_me:11514: \$? = $ac_status" >&5
11515   (exit $ac_status); }; }; then
11516   INTEL_CPLUSPLUS=yes
11517 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11518
11519 else
11520   echo "$as_me: failed program was:" >&5
11521 cat conftest.$ac_ext >&5
11522 fi
11523 rm -f conftest.$ac_objext conftest.$ac_ext
11524                 CXXFLAGS="$cf_save_CFLAGS"
11525                 echo "$as_me:11525: result: $INTEL_CPLUSPLUS" >&5
11526 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11527                 ;;
11528         esac
11529 fi
11530
11531 ac_ext=cc
11532 ac_cpp='$CXXCPP $CPPFLAGS'
11533 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11534 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11535 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11536 ac_main_return=return
11537
11538 cat > conftest.$ac_ext <<EOF
11539 #line 11539 "configure"
11540 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11541 EOF
11542
11543 if test "$INTEL_CPLUSPLUS" = yes
11544 then
11545 # The "-wdXXX" options suppress warnings:
11546 # remark #1419: external declaration in primary source file
11547 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11548 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11549 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11550 # remark #193: zero used for undefined preprocessing identifier
11551 # remark #593: variable "curs_sb_left_arrow" was set but never used
11552 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11553 # remark #869: parameter "tw" was never referenced
11554 # remark #981: operands are evaluated in unspecified order
11555 # warning #269: invalid format string conversion
11556
11557         { echo "$as_me:11557: checking for $CC warning options..." >&5
11558 echo "$as_me: checking for $CC warning options..." >&6;}
11559         cf_save_CXXFLAGS="$CXXFLAGS"
11560         EXTRA_CXXFLAGS="-Wall"
11561         for cf_opt in \
11562                 wd1419 \
11563                 wd1682 \
11564                 wd1683 \
11565                 wd1684 \
11566                 wd193 \
11567                 wd279 \
11568                 wd593 \
11569                 wd810 \
11570                 wd869 \
11571                 wd981
11572         do
11573                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11574                 if { (eval echo "$as_me:11574: \"$ac_compile\"") >&5
11575   (eval $ac_compile) 2>&5
11576   ac_status=$?
11577   echo "$as_me:11577: \$? = $ac_status" >&5
11578   (exit $ac_status); }; then
11579                         test -n "$verbose" && echo "$as_me:11579: result: ... -$cf_opt" >&5
11580 echo "${ECHO_T}... -$cf_opt" >&6
11581                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11582                 fi
11583         done
11584         CXXFLAGS="$cf_save_CXXFLAGS"
11585
11586 elif test "$GXX" = yes
11587 then
11588         { echo "$as_me:11588: checking for $CXX warning options..." >&5
11589 echo "$as_me: checking for $CXX warning options..." >&6;}
11590         cf_save_CXXFLAGS="$CXXFLAGS"
11591         EXTRA_CXXFLAGS="-W -Wall"
11592         cf_gxx_extra_warnings=""
11593         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11594         case "$GCC_VERSION" in
11595         [1-2].*)
11596                 ;;
11597         *)
11598                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11599                 ;;
11600         esac
11601         for cf_opt in \
11602                 Wabi \
11603                 fabi-version=0 \
11604                 Woverloaded-virtual \
11605                 Wsign-promo \
11606                 Wsynth \
11607                 Wold-style-cast \
11608                 Wcast-align \
11609                 Wcast-qual \
11610                 Wmissing-prototypes \
11611                 Wpointer-arith \
11612                 Wshadow \
11613                 Wstrict-prototypes \
11614                 Wundef $cf_gxx_extra_warnings Wno-unused
11615         do
11616                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11617                 if { (eval echo "$as_me:11617: \"$ac_compile\"") >&5
11618   (eval $ac_compile) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); }; then
11622                         test -n "$verbose" && echo "$as_me:11622: result: ... -$cf_opt" >&5
11623 echo "${ECHO_T}... -$cf_opt" >&6
11624                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11625                 else
11626                         test -n "$verbose" && echo "$as_me:11626: result: ... no -$cf_opt" >&5
11627 echo "${ECHO_T}... no -$cf_opt" >&6
11628                 fi
11629         done
11630         CXXFLAGS="$cf_save_CXXFLAGS"
11631 fi
11632
11633 rm -rf conftest*
11634 ac_ext=c
11635 ac_cpp='$CPP $CPPFLAGS'
11636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11639 ac_main_return=return
11640
11641         fi
11642 fi
11643
11644 if test "$GCC" = yes
11645 then
11646 cat > conftest.i <<EOF
11647 #ifndef GCC_PRINTF
11648 #define GCC_PRINTF 0
11649 #endif
11650 #ifndef GCC_SCANF
11651 #define GCC_SCANF 0
11652 #endif
11653 #ifndef GCC_NORETURN
11654 #define GCC_NORETURN /* nothing */
11655 #endif
11656 #ifndef GCC_UNUSED
11657 #define GCC_UNUSED /* nothing */
11658 #endif
11659 EOF
11660 if test "$GCC" = yes
11661 then
11662         { echo "$as_me:11662: checking for $CC __attribute__ directives..." >&5
11663 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11664 cat > conftest.$ac_ext <<EOF
11665 #line 11665 "${as_me:-configure}"
11666 #include "confdefs.h"
11667 #include "conftest.h"
11668 #include "conftest.i"
11669 #if     GCC_PRINTF
11670 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11671 #else
11672 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11673 #endif
11674 #if     GCC_SCANF
11675 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11676 #else
11677 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11678 #endif
11679 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11680 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11681 extern void foo(void) GCC_NORETURN;
11682 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11683 EOF
11684         cf_printf_attribute=no
11685         cf_scanf_attribute=no
11686         for cf_attribute in scanf printf unused noreturn
11687         do
11688
11689 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11690
11691                 cf_directive="__attribute__(($cf_attribute))"
11692                 echo "checking for $CC $cf_directive" 1>&5
11693
11694                 case $cf_attribute in #(vi
11695                 printf) #(vi
11696                         cf_printf_attribute=yes
11697                         cat >conftest.h <<EOF
11698 #define GCC_$cf_ATTRIBUTE 1
11699 EOF
11700                         ;;
11701                 scanf) #(vi
11702                         cf_scanf_attribute=yes
11703                         cat >conftest.h <<EOF
11704 #define GCC_$cf_ATTRIBUTE 1
11705 EOF
11706                         ;;
11707                 *) #(vi
11708                         cat >conftest.h <<EOF
11709 #define GCC_$cf_ATTRIBUTE $cf_directive
11710 EOF
11711                         ;;
11712                 esac
11713
11714                 if { (eval echo "$as_me:11714: \"$ac_compile\"") >&5
11715   (eval $ac_compile) 2>&5
11716   ac_status=$?
11717   echo "$as_me:11717: \$? = $ac_status" >&5
11718   (exit $ac_status); }; then
11719                         test -n "$verbose" && echo "$as_me:11719: result: ... $cf_attribute" >&5
11720 echo "${ECHO_T}... $cf_attribute" >&6
11721                         cat conftest.h >>confdefs.h
11722                         case $cf_attribute in #(vi
11723                         printf) #(vi
11724                                 if test "$cf_printf_attribute" = no ; then
11725                                         cat >>confdefs.h <<EOF
11726 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11727 EOF
11728                                 else
11729                                         cat >>confdefs.h <<EOF
11730 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11731 EOF
11732                                 fi
11733                                 ;;
11734                         scanf) #(vi
11735                                 if test "$cf_scanf_attribute" = no ; then
11736                                         cat >>confdefs.h <<EOF
11737 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11738 EOF
11739                                 else
11740                                         cat >>confdefs.h <<EOF
11741 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11742 EOF
11743                                 fi
11744                                 ;;
11745                         esac
11746                 fi
11747         done
11748 else
11749         fgrep define conftest.i >>confdefs.h
11750 fi
11751 rm -rf conftest*
11752 fi
11753
11754 ###     use option --enable-assertions to turn on generation of assertion code
11755 echo "$as_me:11755: checking if you want to enable runtime assertions" >&5
11756 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11757
11758 # Check whether --enable-assertions or --disable-assertions was given.
11759 if test "${enable_assertions+set}" = set; then
11760   enableval="$enable_assertions"
11761   with_assertions=$enableval
11762 else
11763   with_assertions=no
11764 fi;
11765 echo "$as_me:11765: result: $with_assertions" >&5
11766 echo "${ECHO_T}$with_assertions" >&6
11767 if test -n "$GCC"
11768 then
11769         if test "$with_assertions" = no
11770         then
11771                 cat >>confdefs.h <<\EOF
11772 #define NDEBUG 1
11773 EOF
11774
11775                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11776         else
11777
11778         ADAFLAGS="$ADAFLAGS -gnata"
11779
11780         fi
11781 fi
11782
11783 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11784
11785 echo "$as_me:11785: checking if you want to use dmalloc for testing" >&5
11786 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11787
11788 # Check whether --with-dmalloc or --without-dmalloc was given.
11789 if test "${with_dmalloc+set}" = set; then
11790   withval="$with_dmalloc"
11791   cat >>confdefs.h <<\EOF
11792 #define USE_DMALLOC 1
11793 EOF
11794
11795         : ${with_cflags:=-g}
11796         : ${with_no_leaks:=yes}
11797          with_dmalloc=yes
11798 else
11799   with_dmalloc=
11800 fi;
11801 echo "$as_me:11801: result: ${with_dmalloc:-no}" >&5
11802 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11803
11804 case .$with_cflags in #(vi
11805 .*-g*)
11806         case .$CFLAGS in #(vi
11807         .*-g*) #(vi
11808                 ;;
11809         *)
11810
11811 cf_fix_cppflags=no
11812 cf_new_cflags=
11813 cf_new_cppflags=
11814 cf_new_extra_cppflags=
11815
11816 for cf_add_cflags in -g
11817 do
11818 case $cf_fix_cppflags in
11819 no)
11820         case $cf_add_cflags in #(vi
11821         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11822                 case $cf_add_cflags in
11823                 -D*)
11824                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11825
11826                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11827                                 && test -z "${cf_tst_cflags}" \
11828                                 && cf_fix_cppflags=yes
11829
11830                         if test $cf_fix_cppflags = yes ; then
11831                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11832                                 continue
11833                         elif test "${cf_tst_cflags}" = "\"'" ; then
11834                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11835                                 continue
11836                         fi
11837                         ;;
11838                 esac
11839                 case "$CPPFLAGS" in
11840                 *$cf_add_cflags) #(vi
11841                         ;;
11842                 *) #(vi
11843                         case $cf_add_cflags in #(vi
11844                         -D*)
11845                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11846
11847 CPPFLAGS=`echo "$CPPFLAGS" | \
11848         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11849                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11850
11851                                 ;;
11852                         esac
11853                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11854                         ;;
11855                 esac
11856                 ;;
11857         *)
11858                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11859                 ;;
11860         esac
11861         ;;
11862 yes)
11863         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11864
11865         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11866
11867         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11868                 && test -z "${cf_tst_cflags}" \
11869                 && cf_fix_cppflags=no
11870         ;;
11871 esac
11872 done
11873
11874 if test -n "$cf_new_cflags" ; then
11875
11876         CFLAGS="$CFLAGS $cf_new_cflags"
11877 fi
11878
11879 if test -n "$cf_new_cppflags" ; then
11880
11881         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11882 fi
11883
11884 if test -n "$cf_new_extra_cppflags" ; then
11885
11886         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11887 fi
11888
11889                 ;;
11890         esac
11891         ;;
11892 esac
11893
11894 if test "$with_dmalloc" = yes ; then
11895         echo "$as_me:11895: checking for dmalloc.h" >&5
11896 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11897 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11898   echo $ECHO_N "(cached) $ECHO_C" >&6
11899 else
11900   cat >conftest.$ac_ext <<_ACEOF
11901 #line 11901 "configure"
11902 #include "confdefs.h"
11903 #include <dmalloc.h>
11904 _ACEOF
11905 if { (eval echo "$as_me:11905: \"$ac_cpp conftest.$ac_ext\"") >&5
11906   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11907   ac_status=$?
11908   egrep -v '^ *\+' conftest.er1 >conftest.err
11909   rm -f conftest.er1
11910   cat conftest.err >&5
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } >/dev/null; then
11913   if test -s conftest.err; then
11914     ac_cpp_err=$ac_c_preproc_warn_flag
11915   else
11916     ac_cpp_err=
11917   fi
11918 else
11919   ac_cpp_err=yes
11920 fi
11921 if test -z "$ac_cpp_err"; then
11922   ac_cv_header_dmalloc_h=yes
11923 else
11924   echo "$as_me: failed program was:" >&5
11925   cat conftest.$ac_ext >&5
11926   ac_cv_header_dmalloc_h=no
11927 fi
11928 rm -f conftest.err conftest.$ac_ext
11929 fi
11930 echo "$as_me:11930: result: $ac_cv_header_dmalloc_h" >&5
11931 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11932 if test $ac_cv_header_dmalloc_h = yes; then
11933
11934 echo "$as_me:11934: checking for dmalloc_debug in -ldmalloc" >&5
11935 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11936 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11937   echo $ECHO_N "(cached) $ECHO_C" >&6
11938 else
11939   ac_check_lib_save_LIBS=$LIBS
11940 LIBS="-ldmalloc  $LIBS"
11941 cat >conftest.$ac_ext <<_ACEOF
11942 #line 11942 "configure"
11943 #include "confdefs.h"
11944
11945 /* Override any gcc2 internal prototype to avoid an error.  */
11946 #ifdef __cplusplus
11947 extern "C"
11948 #endif
11949 /* We use char because int might match the return type of a gcc2
11950    builtin and then its argument prototype would still apply.  */
11951 char dmalloc_debug ();
11952 int
11953 main ()
11954 {
11955 dmalloc_debug ();
11956   ;
11957   return 0;
11958 }
11959 _ACEOF
11960 rm -f conftest.$ac_objext conftest$ac_exeext
11961 if { (eval echo "$as_me:11961: \"$ac_link\"") >&5
11962   (eval $ac_link) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); } &&
11966          { ac_try='test -s conftest$ac_exeext'
11967   { (eval echo "$as_me:11967: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:11970: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   ac_cv_lib_dmalloc_dmalloc_debug=yes
11973 else
11974   echo "$as_me: failed program was:" >&5
11975 cat conftest.$ac_ext >&5
11976 ac_cv_lib_dmalloc_dmalloc_debug=no
11977 fi
11978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11979 LIBS=$ac_check_lib_save_LIBS
11980 fi
11981 echo "$as_me:11981: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11982 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11983 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11984   cat >>confdefs.h <<EOF
11985 #define HAVE_LIBDMALLOC 1
11986 EOF
11987
11988   LIBS="-ldmalloc $LIBS"
11989
11990 fi
11991
11992 fi
11993
11994 fi
11995
11996 echo "$as_me:11996: checking if you want to use dbmalloc for testing" >&5
11997 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11998
11999 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12000 if test "${with_dbmalloc+set}" = set; then
12001   withval="$with_dbmalloc"
12002   cat >>confdefs.h <<\EOF
12003 #define USE_DBMALLOC 1
12004 EOF
12005
12006         : ${with_cflags:=-g}
12007         : ${with_no_leaks:=yes}
12008          with_dbmalloc=yes
12009 else
12010   with_dbmalloc=
12011 fi;
12012 echo "$as_me:12012: result: ${with_dbmalloc:-no}" >&5
12013 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12014
12015 case .$with_cflags in #(vi
12016 .*-g*)
12017         case .$CFLAGS in #(vi
12018         .*-g*) #(vi
12019                 ;;
12020         *)
12021
12022 cf_fix_cppflags=no
12023 cf_new_cflags=
12024 cf_new_cppflags=
12025 cf_new_extra_cppflags=
12026
12027 for cf_add_cflags in -g
12028 do
12029 case $cf_fix_cppflags in
12030 no)
12031         case $cf_add_cflags in #(vi
12032         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12033                 case $cf_add_cflags in
12034                 -D*)
12035                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12036
12037                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12038                                 && test -z "${cf_tst_cflags}" \
12039                                 && cf_fix_cppflags=yes
12040
12041                         if test $cf_fix_cppflags = yes ; then
12042                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12043                                 continue
12044                         elif test "${cf_tst_cflags}" = "\"'" ; then
12045                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12046                                 continue
12047                         fi
12048                         ;;
12049                 esac
12050                 case "$CPPFLAGS" in
12051                 *$cf_add_cflags) #(vi
12052                         ;;
12053                 *) #(vi
12054                         case $cf_add_cflags in #(vi
12055                         -D*)
12056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12057
12058 CPPFLAGS=`echo "$CPPFLAGS" | \
12059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12061
12062                                 ;;
12063                         esac
12064                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12065                         ;;
12066                 esac
12067                 ;;
12068         *)
12069                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12070                 ;;
12071         esac
12072         ;;
12073 yes)
12074         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12075
12076         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12077
12078         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12079                 && test -z "${cf_tst_cflags}" \
12080                 && cf_fix_cppflags=no
12081         ;;
12082 esac
12083 done
12084
12085 if test -n "$cf_new_cflags" ; then
12086
12087         CFLAGS="$CFLAGS $cf_new_cflags"
12088 fi
12089
12090 if test -n "$cf_new_cppflags" ; then
12091
12092         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12093 fi
12094
12095 if test -n "$cf_new_extra_cppflags" ; then
12096
12097         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12098 fi
12099
12100                 ;;
12101         esac
12102         ;;
12103 esac
12104
12105 if test "$with_dbmalloc" = yes ; then
12106         echo "$as_me:12106: checking for dbmalloc.h" >&5
12107 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12108 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111   cat >conftest.$ac_ext <<_ACEOF
12112 #line 12112 "configure"
12113 #include "confdefs.h"
12114 #include <dbmalloc.h>
12115 _ACEOF
12116 if { (eval echo "$as_me:12116: \"$ac_cpp conftest.$ac_ext\"") >&5
12117   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12118   ac_status=$?
12119   egrep -v '^ *\+' conftest.er1 >conftest.err
12120   rm -f conftest.er1
12121   cat conftest.err >&5
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); } >/dev/null; then
12124   if test -s conftest.err; then
12125     ac_cpp_err=$ac_c_preproc_warn_flag
12126   else
12127     ac_cpp_err=
12128   fi
12129 else
12130   ac_cpp_err=yes
12131 fi
12132 if test -z "$ac_cpp_err"; then
12133   ac_cv_header_dbmalloc_h=yes
12134 else
12135   echo "$as_me: failed program was:" >&5
12136   cat conftest.$ac_ext >&5
12137   ac_cv_header_dbmalloc_h=no
12138 fi
12139 rm -f conftest.err conftest.$ac_ext
12140 fi
12141 echo "$as_me:12141: result: $ac_cv_header_dbmalloc_h" >&5
12142 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12143 if test $ac_cv_header_dbmalloc_h = yes; then
12144
12145 echo "$as_me:12145: checking for debug_malloc in -ldbmalloc" >&5
12146 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12147 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12148   echo $ECHO_N "(cached) $ECHO_C" >&6
12149 else
12150   ac_check_lib_save_LIBS=$LIBS
12151 LIBS="-ldbmalloc  $LIBS"
12152 cat >conftest.$ac_ext <<_ACEOF
12153 #line 12153 "configure"
12154 #include "confdefs.h"
12155
12156 /* Override any gcc2 internal prototype to avoid an error.  */
12157 #ifdef __cplusplus
12158 extern "C"
12159 #endif
12160 /* We use char because int might match the return type of a gcc2
12161    builtin and then its argument prototype would still apply.  */
12162 char debug_malloc ();
12163 int
12164 main ()
12165 {
12166 debug_malloc ();
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f conftest.$ac_objext conftest$ac_exeext
12172 if { (eval echo "$as_me:12172: \"$ac_link\"") >&5
12173   (eval $ac_link) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); } &&
12177          { ac_try='test -s conftest$ac_exeext'
12178   { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); }; }; then
12183   ac_cv_lib_dbmalloc_debug_malloc=yes
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 cat conftest.$ac_ext >&5
12187 ac_cv_lib_dbmalloc_debug_malloc=no
12188 fi
12189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12190 LIBS=$ac_check_lib_save_LIBS
12191 fi
12192 echo "$as_me:12192: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12193 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12194 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12195   cat >>confdefs.h <<EOF
12196 #define HAVE_LIBDBMALLOC 1
12197 EOF
12198
12199   LIBS="-ldbmalloc $LIBS"
12200
12201 fi
12202
12203 fi
12204
12205 fi
12206
12207 echo "$as_me:12207: checking if you want to use valgrind for testing" >&5
12208 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12209
12210 # Check whether --with-valgrind or --without-valgrind was given.
12211 if test "${with_valgrind+set}" = set; then
12212   withval="$with_valgrind"
12213   cat >>confdefs.h <<\EOF
12214 #define USE_VALGRIND 1
12215 EOF
12216
12217         : ${with_cflags:=-g}
12218         : ${with_no_leaks:=yes}
12219          with_valgrind=yes
12220 else
12221   with_valgrind=
12222 fi;
12223 echo "$as_me:12223: result: ${with_valgrind:-no}" >&5
12224 echo "${ECHO_T}${with_valgrind:-no}" >&6
12225
12226 case .$with_cflags in #(vi
12227 .*-g*)
12228         case .$CFLAGS in #(vi
12229         .*-g*) #(vi
12230                 ;;
12231         *)
12232
12233 cf_fix_cppflags=no
12234 cf_new_cflags=
12235 cf_new_cppflags=
12236 cf_new_extra_cppflags=
12237
12238 for cf_add_cflags in -g
12239 do
12240 case $cf_fix_cppflags in
12241 no)
12242         case $cf_add_cflags in #(vi
12243         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12244                 case $cf_add_cflags in
12245                 -D*)
12246                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12247
12248                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12249                                 && test -z "${cf_tst_cflags}" \
12250                                 && cf_fix_cppflags=yes
12251
12252                         if test $cf_fix_cppflags = yes ; then
12253                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12254                                 continue
12255                         elif test "${cf_tst_cflags}" = "\"'" ; then
12256                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12257                                 continue
12258                         fi
12259                         ;;
12260                 esac
12261                 case "$CPPFLAGS" in
12262                 *$cf_add_cflags) #(vi
12263                         ;;
12264                 *) #(vi
12265                         case $cf_add_cflags in #(vi
12266                         -D*)
12267                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12268
12269 CPPFLAGS=`echo "$CPPFLAGS" | \
12270         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12271                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12272
12273                                 ;;
12274                         esac
12275                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12276                         ;;
12277                 esac
12278                 ;;
12279         *)
12280                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12281                 ;;
12282         esac
12283         ;;
12284 yes)
12285         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12286
12287         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12288
12289         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12290                 && test -z "${cf_tst_cflags}" \
12291                 && cf_fix_cppflags=no
12292         ;;
12293 esac
12294 done
12295
12296 if test -n "$cf_new_cflags" ; then
12297
12298         CFLAGS="$CFLAGS $cf_new_cflags"
12299 fi
12300
12301 if test -n "$cf_new_cppflags" ; then
12302
12303         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12304 fi
12305
12306 if test -n "$cf_new_extra_cppflags" ; then
12307
12308         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12309 fi
12310
12311                 ;;
12312         esac
12313         ;;
12314 esac
12315
12316 echo "$as_me:12316: checking if you want to perform memory-leak testing" >&5
12317 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12318
12319 # Check whether --enable-leaks or --disable-leaks was given.
12320 if test "${enable_leaks+set}" = set; then
12321   enableval="$enable_leaks"
12322   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12323 else
12324   : ${with_no_leaks:=no}
12325 fi;
12326 echo "$as_me:12326: result: $with_no_leaks" >&5
12327 echo "${ECHO_T}$with_no_leaks" >&6
12328
12329 if test "$with_no_leaks" = yes ; then
12330         cat >>confdefs.h <<\EOF
12331 #define NO_LEAKS 1
12332 EOF
12333
12334         cat >>confdefs.h <<\EOF
12335 #define YY_NO_LEAKS 1
12336 EOF
12337
12338 fi
12339
12340 cat >>confdefs.h <<\EOF
12341 #define HAVE_NC_ALLOC_H 1
12342 EOF
12343
12344 ###     use option --enable-expanded to generate certain macros as functions
12345
12346 # Check whether --enable-expanded or --disable-expanded was given.
12347 if test "${enable_expanded+set}" = set; then
12348   enableval="$enable_expanded"
12349   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12350 #define NCURSES_EXPANDED 1
12351 EOF
12352
12353 fi;
12354
12355 ###     use option --disable-macros to suppress macros in favor of functions
12356
12357 # Check whether --enable-macros or --disable-macros was given.
12358 if test "${enable_macros+set}" = set; then
12359   enableval="$enable_macros"
12360   test "$enableval" = no && cat >>confdefs.h <<\EOF
12361 #define NCURSES_NOMACROS 1
12362 EOF
12363
12364 fi;
12365
12366 # Normally we only add trace() to the debug-library.  Allow this to be
12367 # extended to all models of the ncurses library:
12368 cf_all_traces=no
12369 case "$CFLAGS $CPPFLAGS" in
12370 *-DTRACE*)
12371         cf_all_traces=yes
12372         ;;
12373 esac
12374
12375 echo "$as_me:12375: checking whether to add trace feature to all models" >&5
12376 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12377
12378 # Check whether --with-trace or --without-trace was given.
12379 if test "${with_trace+set}" = set; then
12380   withval="$with_trace"
12381   cf_with_trace=$withval
12382 else
12383   cf_with_trace=$cf_all_traces
12384 fi;
12385 echo "$as_me:12385: result: $cf_with_trace" >&5
12386 echo "${ECHO_T}$cf_with_trace" >&6
12387
12388 if test "$cf_with_trace" = yes ; then
12389         LIB_TRACING=all
12390         ADA_TRACE=TRUE
12391
12392 cf_fix_cppflags=no
12393 cf_new_cflags=
12394 cf_new_cppflags=
12395 cf_new_extra_cppflags=
12396
12397 for cf_add_cflags in -DTRACE
12398 do
12399 case $cf_fix_cppflags in
12400 no)
12401         case $cf_add_cflags in #(vi
12402         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12403                 case $cf_add_cflags in
12404                 -D*)
12405                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12406
12407                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12408                                 && test -z "${cf_tst_cflags}" \
12409                                 && cf_fix_cppflags=yes
12410
12411                         if test $cf_fix_cppflags = yes ; then
12412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12413                                 continue
12414                         elif test "${cf_tst_cflags}" = "\"'" ; then
12415                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12416                                 continue
12417                         fi
12418                         ;;
12419                 esac
12420                 case "$CPPFLAGS" in
12421                 *$cf_add_cflags) #(vi
12422                         ;;
12423                 *) #(vi
12424                         case $cf_add_cflags in #(vi
12425                         -D*)
12426                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12427
12428 CPPFLAGS=`echo "$CPPFLAGS" | \
12429         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12430                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12431
12432                                 ;;
12433                         esac
12434                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12435                         ;;
12436                 esac
12437                 ;;
12438         *)
12439                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12440                 ;;
12441         esac
12442         ;;
12443 yes)
12444         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12445
12446         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12447
12448         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12449                 && test -z "${cf_tst_cflags}" \
12450                 && cf_fix_cppflags=no
12451         ;;
12452 esac
12453 done
12454
12455 if test -n "$cf_new_cflags" ; then
12456
12457         CFLAGS="$CFLAGS $cf_new_cflags"
12458 fi
12459
12460 if test -n "$cf_new_cppflags" ; then
12461
12462         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12463 fi
12464
12465 if test -n "$cf_new_extra_cppflags" ; then
12466
12467         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12468 fi
12469
12470 else
12471         LIB_TRACING=DEBUG
12472         ADA_TRACE=FALSE
12473 fi
12474
12475 ###     Checks for libraries.
12476 case $cf_cv_system_name in #(vi
12477 *mingw32*) #(vi
12478         ;;
12479 *)
12480 echo "$as_me:12480: checking for gettimeofday" >&5
12481 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12482 if test "${ac_cv_func_gettimeofday+set}" = set; then
12483   echo $ECHO_N "(cached) $ECHO_C" >&6
12484 else
12485   cat >conftest.$ac_ext <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488 /* System header to define __stub macros and hopefully few prototypes,
12489     which can conflict with char gettimeofday (); below.  */
12490 #include <assert.h>
12491 /* Override any gcc2 internal prototype to avoid an error.  */
12492 #ifdef __cplusplus
12493 extern "C"
12494 #endif
12495 /* We use char because int might match the return type of a gcc2
12496    builtin and then its argument prototype would still apply.  */
12497 char gettimeofday ();
12498 char (*f) ();
12499
12500 int
12501 main ()
12502 {
12503 /* The GNU C library defines this for functions which it implements
12504     to always fail with ENOSYS.  Some functions are actually named
12505     something starting with __ and the normal name is an alias.  */
12506 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12507 choke me
12508 #else
12509 f = gettimeofday;
12510 #endif
12511
12512   ;
12513   return 0;
12514 }
12515 _ACEOF
12516 rm -f conftest.$ac_objext conftest$ac_exeext
12517 if { (eval echo "$as_me:12517: \"$ac_link\"") >&5
12518   (eval $ac_link) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); } &&
12522          { ac_try='test -s conftest$ac_exeext'
12523   { (eval echo "$as_me:12523: \"$ac_try\"") >&5
12524   (eval $ac_try) 2>&5
12525   ac_status=$?
12526   echo "$as_me:12526: \$? = $ac_status" >&5
12527   (exit $ac_status); }; }; then
12528   ac_cv_func_gettimeofday=yes
12529 else
12530   echo "$as_me: failed program was:" >&5
12531 cat conftest.$ac_ext >&5
12532 ac_cv_func_gettimeofday=no
12533 fi
12534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12535 fi
12536 echo "$as_me:12536: result: $ac_cv_func_gettimeofday" >&5
12537 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12538 if test $ac_cv_func_gettimeofday = yes; then
12539   cat >>confdefs.h <<\EOF
12540 #define HAVE_GETTIMEOFDAY 1
12541 EOF
12542
12543 else
12544
12545 echo "$as_me:12545: checking for gettimeofday in -lbsd" >&5
12546 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12547 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12548   echo $ECHO_N "(cached) $ECHO_C" >&6
12549 else
12550   ac_check_lib_save_LIBS=$LIBS
12551 LIBS="-lbsd  $LIBS"
12552 cat >conftest.$ac_ext <<_ACEOF
12553 #line 12553 "configure"
12554 #include "confdefs.h"
12555
12556 /* Override any gcc2 internal prototype to avoid an error.  */
12557 #ifdef __cplusplus
12558 extern "C"
12559 #endif
12560 /* We use char because int might match the return type of a gcc2
12561    builtin and then its argument prototype would still apply.  */
12562 char gettimeofday ();
12563 int
12564 main ()
12565 {
12566 gettimeofday ();
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 rm -f conftest.$ac_objext conftest$ac_exeext
12572 if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
12573   (eval $ac_link) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest$ac_exeext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   ac_cv_lib_bsd_gettimeofday=yes
12584 else
12585   echo "$as_me: failed program was:" >&5
12586 cat conftest.$ac_ext >&5
12587 ac_cv_lib_bsd_gettimeofday=no
12588 fi
12589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12590 LIBS=$ac_check_lib_save_LIBS
12591 fi
12592 echo "$as_me:12592: result: $ac_cv_lib_bsd_gettimeofday" >&5
12593 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12594 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12595   cat >>confdefs.h <<\EOF
12596 #define HAVE_GETTIMEOFDAY 1
12597 EOF
12598
12599         LIBS="-lbsd $LIBS"
12600 fi
12601
12602 fi
12603         ;;
12604 esac
12605
12606 echo "$as_me:12606: checking if -lm needed for math functions" >&5
12607 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12608 if test "${cf_cv_need_libm+set}" = set; then
12609   echo $ECHO_N "(cached) $ECHO_C" >&6
12610 else
12611
12612         cat >conftest.$ac_ext <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615
12616         #include <stdio.h>
12617         #include <math.h>
12618
12619 int
12620 main ()
12621 {
12622 double x = rand(); printf("result = %g\n", sin(x))
12623   ;
12624   return 0;
12625 }
12626 _ACEOF
12627 rm -f conftest.$ac_objext conftest$ac_exeext
12628 if { (eval echo "$as_me:12628: \"$ac_link\"") >&5
12629   (eval $ac_link) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); } &&
12633          { ac_try='test -s conftest$ac_exeext'
12634   { (eval echo "$as_me:12634: \"$ac_try\"") >&5
12635   (eval $ac_try) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); }; }; then
12639   cf_cv_need_libm=no
12640 else
12641   echo "$as_me: failed program was:" >&5
12642 cat conftest.$ac_ext >&5
12643 cf_cv_need_libm=yes
12644 fi
12645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12646 fi
12647 echo "$as_me:12647: result: $cf_cv_need_libm" >&5
12648 echo "${ECHO_T}$cf_cv_need_libm" >&6
12649 if test "$cf_cv_need_libm" = yes
12650 then
12651 MATH_LIB=-lm
12652 fi
12653
12654 ###     Checks for header files.
12655 echo "$as_me:12655: checking for ANSI C header files" >&5
12656 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12657 if test "${ac_cv_header_stdc+set}" = set; then
12658   echo $ECHO_N "(cached) $ECHO_C" >&6
12659 else
12660   cat >conftest.$ac_ext <<_ACEOF
12661 #line 12661 "configure"
12662 #include "confdefs.h"
12663 #include <stdlib.h>
12664 #include <stdarg.h>
12665 #include <string.h>
12666 #include <float.h>
12667
12668 _ACEOF
12669 if { (eval echo "$as_me:12669: \"$ac_cpp conftest.$ac_ext\"") >&5
12670   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12671   ac_status=$?
12672   egrep -v '^ *\+' conftest.er1 >conftest.err
12673   rm -f conftest.er1
12674   cat conftest.err >&5
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit $ac_status); } >/dev/null; then
12677   if test -s conftest.err; then
12678     ac_cpp_err=$ac_c_preproc_warn_flag
12679   else
12680     ac_cpp_err=
12681   fi
12682 else
12683   ac_cpp_err=yes
12684 fi
12685 if test -z "$ac_cpp_err"; then
12686   ac_cv_header_stdc=yes
12687 else
12688   echo "$as_me: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   ac_cv_header_stdc=no
12691 fi
12692 rm -f conftest.err conftest.$ac_ext
12693
12694 if test $ac_cv_header_stdc = yes; then
12695   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12696   cat >conftest.$ac_ext <<_ACEOF
12697 #line 12697 "configure"
12698 #include "confdefs.h"
12699 #include <string.h>
12700
12701 _ACEOF
12702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12703   egrep "memchr" >/dev/null 2>&1; then
12704   :
12705 else
12706   ac_cv_header_stdc=no
12707 fi
12708 rm -rf conftest*
12709
12710 fi
12711
12712 if test $ac_cv_header_stdc = yes; then
12713   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12714   cat >conftest.$ac_ext <<_ACEOF
12715 #line 12715 "configure"
12716 #include "confdefs.h"
12717 #include <stdlib.h>
12718
12719 _ACEOF
12720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12721   egrep "free" >/dev/null 2>&1; then
12722   :
12723 else
12724   ac_cv_header_stdc=no
12725 fi
12726 rm -rf conftest*
12727
12728 fi
12729
12730 if test $ac_cv_header_stdc = yes; then
12731   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12732   if test "$cross_compiling" = yes; then
12733   :
12734 else
12735   cat >conftest.$ac_ext <<_ACEOF
12736 #line 12736 "configure"
12737 #include "confdefs.h"
12738 #include <ctype.h>
12739 #if ((' ' & 0x0FF) == 0x020)
12740 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12741 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12742 #else
12743 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12744                      || ('j' <= (c) && (c) <= 'r') \
12745                      || ('s' <= (c) && (c) <= 'z'))
12746 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12747 #endif
12748
12749 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12750 int
12751 main ()
12752 {
12753   int i;
12754   for (i = 0; i < 256; i++)
12755     if (XOR (islower (i), ISLOWER (i))
12756         || toupper (i) != TOUPPER (i))
12757       $ac_main_return(2);
12758   $ac_main_return (0);
12759 }
12760 _ACEOF
12761 rm -f conftest$ac_exeext
12762 if { (eval echo "$as_me:12762: \"$ac_link\"") >&5
12763   (eval $ac_link) 2>&5
12764   ac_status=$?
12765   echo "$as_me:12765: \$? = $ac_status" >&5
12766   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12767   { (eval echo "$as_me:12767: \"$ac_try\"") >&5
12768   (eval $ac_try) 2>&5
12769   ac_status=$?
12770   echo "$as_me:12770: \$? = $ac_status" >&5
12771   (exit $ac_status); }; }; then
12772   :
12773 else
12774   echo "$as_me: program exited with status $ac_status" >&5
12775 echo "$as_me: failed program was:" >&5
12776 cat conftest.$ac_ext >&5
12777 ac_cv_header_stdc=no
12778 fi
12779 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12780 fi
12781 fi
12782 fi
12783 echo "$as_me:12783: result: $ac_cv_header_stdc" >&5
12784 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12785 if test $ac_cv_header_stdc = yes; then
12786
12787 cat >>confdefs.h <<\EOF
12788 #define STDC_HEADERS 1
12789 EOF
12790
12791 fi
12792
12793 ac_header_dirent=no
12794 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12795   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12796 echo "$as_me:12796: checking for $ac_hdr that defines DIR" >&5
12797 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12798 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12799   echo $ECHO_N "(cached) $ECHO_C" >&6
12800 else
12801   cat >conftest.$ac_ext <<_ACEOF
12802 #line 12802 "configure"
12803 #include "confdefs.h"
12804 #include <sys/types.h>
12805 #include <$ac_hdr>
12806
12807 int
12808 main ()
12809 {
12810 if ((DIR *) 0)
12811 return 0;
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext
12817 if { (eval echo "$as_me:12817: \"$ac_compile\"") >&5
12818   (eval $ac_compile) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -s conftest.$ac_objext'
12823   { (eval echo "$as_me:12823: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   eval "$as_ac_Header=yes"
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 eval "$as_ac_Header=no"
12833 fi
12834 rm -f conftest.$ac_objext conftest.$ac_ext
12835 fi
12836 echo "$as_me:12836: result: `eval echo '${'$as_ac_Header'}'`" >&5
12837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12838 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12839   cat >>confdefs.h <<EOF
12840 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12841 EOF
12842
12843 ac_header_dirent=$ac_hdr; break
12844 fi
12845
12846 done
12847 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12848 if test $ac_header_dirent = dirent.h; then
12849   echo "$as_me:12849: checking for opendir in -ldir" >&5
12850 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12851 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12852   echo $ECHO_N "(cached) $ECHO_C" >&6
12853 else
12854   ac_check_lib_save_LIBS=$LIBS
12855 LIBS="-ldir  $LIBS"
12856 cat >conftest.$ac_ext <<_ACEOF
12857 #line 12857 "configure"
12858 #include "confdefs.h"
12859
12860 /* Override any gcc2 internal prototype to avoid an error.  */
12861 #ifdef __cplusplus
12862 extern "C"
12863 #endif
12864 /* We use char because int might match the return type of a gcc2
12865    builtin and then its argument prototype would still apply.  */
12866 char opendir ();
12867 int
12868 main ()
12869 {
12870 opendir ();
12871   ;
12872   return 0;
12873 }
12874 _ACEOF
12875 rm -f conftest.$ac_objext conftest$ac_exeext
12876 if { (eval echo "$as_me:12876: \"$ac_link\"") >&5
12877   (eval $ac_link) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit $ac_status); } &&
12881          { ac_try='test -s conftest$ac_exeext'
12882   { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); }; }; then
12887   ac_cv_lib_dir_opendir=yes
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 cat conftest.$ac_ext >&5
12891 ac_cv_lib_dir_opendir=no
12892 fi
12893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12894 LIBS=$ac_check_lib_save_LIBS
12895 fi
12896 echo "$as_me:12896: result: $ac_cv_lib_dir_opendir" >&5
12897 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12898 if test $ac_cv_lib_dir_opendir = yes; then
12899   LIBS="$LIBS -ldir"
12900 fi
12901
12902 else
12903   echo "$as_me:12903: checking for opendir in -lx" >&5
12904 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12905 if test "${ac_cv_lib_x_opendir+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   ac_check_lib_save_LIBS=$LIBS
12909 LIBS="-lx  $LIBS"
12910 cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913
12914 /* Override any gcc2 internal prototype to avoid an error.  */
12915 #ifdef __cplusplus
12916 extern "C"
12917 #endif
12918 /* We use char because int might match the return type of a gcc2
12919    builtin and then its argument prototype would still apply.  */
12920 char opendir ();
12921 int
12922 main ()
12923 {
12924 opendir ();
12925   ;
12926   return 0;
12927 }
12928 _ACEOF
12929 rm -f conftest.$ac_objext conftest$ac_exeext
12930 if { (eval echo "$as_me:12930: \"$ac_link\"") >&5
12931   (eval $ac_link) 2>&5
12932   ac_status=$?
12933   echo "$as_me:12933: \$? = $ac_status" >&5
12934   (exit $ac_status); } &&
12935          { ac_try='test -s conftest$ac_exeext'
12936   { (eval echo "$as_me:12936: \"$ac_try\"") >&5
12937   (eval $ac_try) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit $ac_status); }; }; then
12941   ac_cv_lib_x_opendir=yes
12942 else
12943   echo "$as_me: failed program was:" >&5
12944 cat conftest.$ac_ext >&5
12945 ac_cv_lib_x_opendir=no
12946 fi
12947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12948 LIBS=$ac_check_lib_save_LIBS
12949 fi
12950 echo "$as_me:12950: result: $ac_cv_lib_x_opendir" >&5
12951 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12952 if test $ac_cv_lib_x_opendir = yes; then
12953   LIBS="$LIBS -lx"
12954 fi
12955
12956 fi
12957
12958 echo "$as_me:12958: checking whether time.h and sys/time.h may both be included" >&5
12959 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12960 if test "${ac_cv_header_time+set}" = set; then
12961   echo $ECHO_N "(cached) $ECHO_C" >&6
12962 else
12963   cat >conftest.$ac_ext <<_ACEOF
12964 #line 12964 "configure"
12965 #include "confdefs.h"
12966 #include <sys/types.h>
12967 #include <sys/time.h>
12968 #include <time.h>
12969
12970 int
12971 main ()
12972 {
12973 if ((struct tm *) 0)
12974 return 0;
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 rm -f conftest.$ac_objext
12980 if { (eval echo "$as_me:12980: \"$ac_compile\"") >&5
12981   (eval $ac_compile) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); } &&
12985          { ac_try='test -s conftest.$ac_objext'
12986   { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987   (eval $ac_try) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit $ac_status); }; }; then
12991   ac_cv_header_time=yes
12992 else
12993   echo "$as_me: failed program was:" >&5
12994 cat conftest.$ac_ext >&5
12995 ac_cv_header_time=no
12996 fi
12997 rm -f conftest.$ac_objext conftest.$ac_ext
12998 fi
12999 echo "$as_me:12999: result: $ac_cv_header_time" >&5
13000 echo "${ECHO_T}$ac_cv_header_time" >&6
13001 if test $ac_cv_header_time = yes; then
13002
13003 cat >>confdefs.h <<\EOF
13004 #define TIME_WITH_SYS_TIME 1
13005 EOF
13006
13007 fi
13008
13009 cf_regex_func=no
13010
13011 cf_regex_libs="regex re"
13012 case $host_os in #(vi
13013 mingw*)
13014         cf_regex_libs="regex.dll $cf_regex_libs"
13015         ;;
13016 esac
13017
13018 echo "$as_me:13018: checking for regcomp" >&5
13019 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13020 if test "${ac_cv_func_regcomp+set}" = set; then
13021   echo $ECHO_N "(cached) $ECHO_C" >&6
13022 else
13023   cat >conftest.$ac_ext <<_ACEOF
13024 #line 13024 "configure"
13025 #include "confdefs.h"
13026 /* System header to define __stub macros and hopefully few prototypes,
13027     which can conflict with char regcomp (); below.  */
13028 #include <assert.h>
13029 /* Override any gcc2 internal prototype to avoid an error.  */
13030 #ifdef __cplusplus
13031 extern "C"
13032 #endif
13033 /* We use char because int might match the return type of a gcc2
13034    builtin and then its argument prototype would still apply.  */
13035 char regcomp ();
13036 char (*f) ();
13037
13038 int
13039 main ()
13040 {
13041 /* The GNU C library defines this for functions which it implements
13042     to always fail with ENOSYS.  Some functions are actually named
13043     something starting with __ and the normal name is an alias.  */
13044 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13045 choke me
13046 #else
13047 f = regcomp;
13048 #endif
13049
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f conftest.$ac_objext conftest$ac_exeext
13055 if { (eval echo "$as_me:13055: \"$ac_link\"") >&5
13056   (eval $ac_link) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); } &&
13060          { ac_try='test -s conftest$ac_exeext'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   ac_cv_func_regcomp=yes
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 cat conftest.$ac_ext >&5
13070 ac_cv_func_regcomp=no
13071 fi
13072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13073 fi
13074 echo "$as_me:13074: result: $ac_cv_func_regcomp" >&5
13075 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13076 if test $ac_cv_func_regcomp = yes; then
13077   cf_regex_func=regcomp
13078 else
13079
13080         for cf_regex_lib in $cf_regex_libs
13081         do
13082                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13083 echo "$as_me:13083: checking for regcomp in -l$cf_regex_lib" >&5
13084 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13085 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13086   echo $ECHO_N "(cached) $ECHO_C" >&6
13087 else
13088   ac_check_lib_save_LIBS=$LIBS
13089 LIBS="-l$cf_regex_lib  $LIBS"
13090 cat >conftest.$ac_ext <<_ACEOF
13091 #line 13091 "configure"
13092 #include "confdefs.h"
13093
13094 /* Override any gcc2 internal prototype to avoid an error.  */
13095 #ifdef __cplusplus
13096 extern "C"
13097 #endif
13098 /* We use char because int might match the return type of a gcc2
13099    builtin and then its argument prototype would still apply.  */
13100 char regcomp ();
13101 int
13102 main ()
13103 {
13104 regcomp ();
13105   ;
13106   return 0;
13107 }
13108 _ACEOF
13109 rm -f conftest.$ac_objext conftest$ac_exeext
13110 if { (eval echo "$as_me:13110: \"$ac_link\"") >&5
13111   (eval $ac_link) 2>&5
13112   ac_status=$?
13113   echo "$as_me:13113: \$? = $ac_status" >&5
13114   (exit $ac_status); } &&
13115          { ac_try='test -s conftest$ac_exeext'
13116   { (eval echo "$as_me:13116: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:13119: \$? = $ac_status" >&5
13120   (exit $ac_status); }; }; then
13121   eval "$as_ac_Lib=yes"
13122 else
13123   echo "$as_me: failed program was:" >&5
13124 cat conftest.$ac_ext >&5
13125 eval "$as_ac_Lib=no"
13126 fi
13127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13128 LIBS=$ac_check_lib_save_LIBS
13129 fi
13130 echo "$as_me:13130: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13131 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13132 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13133
13134                                 LIBS="-l$cf_regex_lib $LIBS"
13135                                 cf_regex_func=regcomp
13136                                 break
13137 fi
13138
13139         done
13140
13141 fi
13142
13143 if test "$cf_regex_func" = no ; then
13144         echo "$as_me:13144: checking for compile" >&5
13145 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13146 if test "${ac_cv_func_compile+set}" = set; then
13147   echo $ECHO_N "(cached) $ECHO_C" >&6
13148 else
13149   cat >conftest.$ac_ext <<_ACEOF
13150 #line 13150 "configure"
13151 #include "confdefs.h"
13152 /* System header to define __stub macros and hopefully few prototypes,
13153     which can conflict with char compile (); below.  */
13154 #include <assert.h>
13155 /* Override any gcc2 internal prototype to avoid an error.  */
13156 #ifdef __cplusplus
13157 extern "C"
13158 #endif
13159 /* We use char because int might match the return type of a gcc2
13160    builtin and then its argument prototype would still apply.  */
13161 char compile ();
13162 char (*f) ();
13163
13164 int
13165 main ()
13166 {
13167 /* The GNU C library defines this for functions which it implements
13168     to always fail with ENOSYS.  Some functions are actually named
13169     something starting with __ and the normal name is an alias.  */
13170 #if defined (__stub_compile) || defined (__stub___compile)
13171 choke me
13172 #else
13173 f = compile;
13174 #endif
13175
13176   ;
13177   return 0;
13178 }
13179 _ACEOF
13180 rm -f conftest.$ac_objext conftest$ac_exeext
13181 if { (eval echo "$as_me:13181: \"$ac_link\"") >&5
13182   (eval $ac_link) 2>&5
13183   ac_status=$?
13184   echo "$as_me:13184: \$? = $ac_status" >&5
13185   (exit $ac_status); } &&
13186          { ac_try='test -s conftest$ac_exeext'
13187   { (eval echo "$as_me:13187: \"$ac_try\"") >&5
13188   (eval $ac_try) 2>&5
13189   ac_status=$?
13190   echo "$as_me:13190: \$? = $ac_status" >&5
13191   (exit $ac_status); }; }; then
13192   ac_cv_func_compile=yes
13193 else
13194   echo "$as_me: failed program was:" >&5
13195 cat conftest.$ac_ext >&5
13196 ac_cv_func_compile=no
13197 fi
13198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13199 fi
13200 echo "$as_me:13200: result: $ac_cv_func_compile" >&5
13201 echo "${ECHO_T}$ac_cv_func_compile" >&6
13202 if test $ac_cv_func_compile = yes; then
13203   cf_regex_func=compile
13204 else
13205
13206                 echo "$as_me:13206: checking for compile in -lgen" >&5
13207 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13208 if test "${ac_cv_lib_gen_compile+set}" = set; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211   ac_check_lib_save_LIBS=$LIBS
13212 LIBS="-lgen  $LIBS"
13213 cat >conftest.$ac_ext <<_ACEOF
13214 #line 13214 "configure"
13215 #include "confdefs.h"
13216
13217 /* Override any gcc2 internal prototype to avoid an error.  */
13218 #ifdef __cplusplus
13219 extern "C"
13220 #endif
13221 /* We use char because int might match the return type of a gcc2
13222    builtin and then its argument prototype would still apply.  */
13223 char compile ();
13224 int
13225 main ()
13226 {
13227 compile ();
13228   ;
13229   return 0;
13230 }
13231 _ACEOF
13232 rm -f conftest.$ac_objext conftest$ac_exeext
13233 if { (eval echo "$as_me:13233: \"$ac_link\"") >&5
13234   (eval $ac_link) 2>&5
13235   ac_status=$?
13236   echo "$as_me:13236: \$? = $ac_status" >&5
13237   (exit $ac_status); } &&
13238          { ac_try='test -s conftest$ac_exeext'
13239   { (eval echo "$as_me:13239: \"$ac_try\"") >&5
13240   (eval $ac_try) 2>&5
13241   ac_status=$?
13242   echo "$as_me:13242: \$? = $ac_status" >&5
13243   (exit $ac_status); }; }; then
13244   ac_cv_lib_gen_compile=yes
13245 else
13246   echo "$as_me: failed program was:" >&5
13247 cat conftest.$ac_ext >&5
13248 ac_cv_lib_gen_compile=no
13249 fi
13250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13251 LIBS=$ac_check_lib_save_LIBS
13252 fi
13253 echo "$as_me:13253: result: $ac_cv_lib_gen_compile" >&5
13254 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13255 if test $ac_cv_lib_gen_compile = yes; then
13256
13257                                 LIBS="-lgen $LIBS"
13258                                 cf_regex_func=compile
13259 fi
13260
13261 fi
13262
13263 fi
13264
13265 if test "$cf_regex_func" = no ; then
13266         { echo "$as_me:13266: WARNING: cannot find regular expression library" >&5
13267 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13268 fi
13269
13270 echo "$as_me:13270: checking for regular-expression headers" >&5
13271 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13272 if test "${cf_cv_regex_hdrs+set}" = set; then
13273   echo $ECHO_N "(cached) $ECHO_C" >&6
13274 else
13275
13276 cf_cv_regex_hdrs=no
13277 case $cf_regex_func in #(vi
13278 compile) #(vi
13279         for cf_regex_hdr in regexp.h regexpr.h
13280         do
13281                 cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284 #include <$cf_regex_hdr>
13285 int
13286 main ()
13287 {
13288
13289                         char *p = compile("", "", "", 0);
13290                         int x = step("", "");
13291
13292   ;
13293   return 0;
13294 }
13295 _ACEOF
13296 rm -f conftest.$ac_objext conftest$ac_exeext
13297 if { (eval echo "$as_me:13297: \"$ac_link\"") >&5
13298   (eval $ac_link) 2>&5
13299   ac_status=$?
13300   echo "$as_me:13300: \$? = $ac_status" >&5
13301   (exit $ac_status); } &&
13302          { ac_try='test -s conftest$ac_exeext'
13303   { (eval echo "$as_me:13303: \"$ac_try\"") >&5
13304   (eval $ac_try) 2>&5
13305   ac_status=$?
13306   echo "$as_me:13306: \$? = $ac_status" >&5
13307   (exit $ac_status); }; }; then
13308
13309                         cf_cv_regex_hdrs=$cf_regex_hdr
13310                         break
13311
13312 else
13313   echo "$as_me: failed program was:" >&5
13314 cat conftest.$ac_ext >&5
13315 fi
13316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13317         done
13318         ;;
13319 *)
13320         for cf_regex_hdr in regex.h
13321         do
13322                 cat >conftest.$ac_ext <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325 #include <sys/types.h>
13326 #include <$cf_regex_hdr>
13327 int
13328 main ()
13329 {
13330
13331                         regex_t *p;
13332                         int x = regcomp(p, "", 0);
13333                         int y = regexec(p, "", 0, 0, 0);
13334                         regfree(p);
13335
13336   ;
13337   return 0;
13338 }
13339 _ACEOF
13340 rm -f conftest.$ac_objext conftest$ac_exeext
13341 if { (eval echo "$as_me:13341: \"$ac_link\"") >&5
13342   (eval $ac_link) 2>&5
13343   ac_status=$?
13344   echo "$as_me:13344: \$? = $ac_status" >&5
13345   (exit $ac_status); } &&
13346          { ac_try='test -s conftest$ac_exeext'
13347   { (eval echo "$as_me:13347: \"$ac_try\"") >&5
13348   (eval $ac_try) 2>&5
13349   ac_status=$?
13350   echo "$as_me:13350: \$? = $ac_status" >&5
13351   (exit $ac_status); }; }; then
13352
13353                         cf_cv_regex_hdrs=$cf_regex_hdr
13354                         break
13355
13356 else
13357   echo "$as_me: failed program was:" >&5
13358 cat conftest.$ac_ext >&5
13359 fi
13360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13361         done
13362         ;;
13363 esac
13364
13365 fi
13366 echo "$as_me:13366: result: $cf_cv_regex_hdrs" >&5
13367 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13368
13369 case $cf_cv_regex_hdrs in #(vi
13370     no)        { echo "$as_me:13370: WARNING: no regular expression header found" >&5
13371 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13372     regex.h)   cat >>confdefs.h <<\EOF
13373 #define HAVE_REGEX_H_FUNCS 1
13374 EOF
13375  ;; #(vi
13376     regexp.h)  cat >>confdefs.h <<\EOF
13377 #define HAVE_REGEXP_H_FUNCS 1
13378 EOF
13379  ;; #(vi
13380     regexpr.h) cat >>confdefs.h <<\EOF
13381 #define HAVE_REGEXPR_H_FUNCS 1
13382 EOF
13383  ;;
13384 esac
13385
13386 for ac_header in \
13387 fcntl.h \
13388 getopt.h \
13389 limits.h \
13390 locale.h \
13391 math.h \
13392 poll.h \
13393 sys/bsdtypes.h \
13394 sys/ioctl.h \
13395 sys/param.h \
13396 sys/poll.h \
13397 sys/select.h \
13398 sys/time.h \
13399 sys/times.h \
13400 ttyent.h \
13401 unistd.h \
13402 wctype.h \
13403
13404 do
13405 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13406 echo "$as_me:13406: checking for $ac_header" >&5
13407 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13408 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13409   echo $ECHO_N "(cached) $ECHO_C" >&6
13410 else
13411   cat >conftest.$ac_ext <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13414 #include <$ac_header>
13415 _ACEOF
13416 if { (eval echo "$as_me:13416: \"$ac_cpp conftest.$ac_ext\"") >&5
13417   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13418   ac_status=$?
13419   egrep -v '^ *\+' conftest.er1 >conftest.err
13420   rm -f conftest.er1
13421   cat conftest.err >&5
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); } >/dev/null; then
13424   if test -s conftest.err; then
13425     ac_cpp_err=$ac_c_preproc_warn_flag
13426   else
13427     ac_cpp_err=
13428   fi
13429 else
13430   ac_cpp_err=yes
13431 fi
13432 if test -z "$ac_cpp_err"; then
13433   eval "$as_ac_Header=yes"
13434 else
13435   echo "$as_me: failed program was:" >&5
13436   cat conftest.$ac_ext >&5
13437   eval "$as_ac_Header=no"
13438 fi
13439 rm -f conftest.err conftest.$ac_ext
13440 fi
13441 echo "$as_me:13441: result: `eval echo '${'$as_ac_Header'}'`" >&5
13442 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13443 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13444   cat >>confdefs.h <<EOF
13445 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13446 EOF
13447
13448 fi
13449 done
13450
13451 for ac_header in unistd.h getopt.h
13452 do
13453 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13454 echo "$as_me:13454: checking for $ac_header" >&5
13455 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13456 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   cat >conftest.$ac_ext <<_ACEOF
13460 #line 13460 "configure"
13461 #include "confdefs.h"
13462 #include <$ac_header>
13463 _ACEOF
13464 if { (eval echo "$as_me:13464: \"$ac_cpp conftest.$ac_ext\"") >&5
13465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13466   ac_status=$?
13467   egrep -v '^ *\+' conftest.er1 >conftest.err
13468   rm -f conftest.er1
13469   cat conftest.err >&5
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); } >/dev/null; then
13472   if test -s conftest.err; then
13473     ac_cpp_err=$ac_c_preproc_warn_flag
13474   else
13475     ac_cpp_err=
13476   fi
13477 else
13478   ac_cpp_err=yes
13479 fi
13480 if test -z "$ac_cpp_err"; then
13481   eval "$as_ac_Header=yes"
13482 else
13483   echo "$as_me: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   eval "$as_ac_Header=no"
13486 fi
13487 rm -f conftest.err conftest.$ac_ext
13488 fi
13489 echo "$as_me:13489: result: `eval echo '${'$as_ac_Header'}'`" >&5
13490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13492   cat >>confdefs.h <<EOF
13493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13494 EOF
13495
13496 fi
13497 done
13498
13499 echo "$as_me:13499: checking for header declaring getopt variables" >&5
13500 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13501 if test "${cf_cv_getopt_header+set}" = set; then
13502   echo $ECHO_N "(cached) $ECHO_C" >&6
13503 else
13504
13505 cf_cv_getopt_header=none
13506 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13507 do
13508 cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511
13512 #include <$cf_header>
13513 int
13514 main ()
13515 {
13516 int x = optind; char *y = optarg
13517   ;
13518   return 0;
13519 }
13520 _ACEOF
13521 rm -f conftest.$ac_objext
13522 if { (eval echo "$as_me:13522: \"$ac_compile\"") >&5
13523   (eval $ac_compile) 2>&5
13524   ac_status=$?
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit $ac_status); } &&
13527          { ac_try='test -s conftest.$ac_objext'
13528   { (eval echo "$as_me:13528: \"$ac_try\"") >&5
13529   (eval $ac_try) 2>&5
13530   ac_status=$?
13531   echo "$as_me:13531: \$? = $ac_status" >&5
13532   (exit $ac_status); }; }; then
13533   cf_cv_getopt_header=$cf_header
13534  break
13535 else
13536   echo "$as_me: failed program was:" >&5
13537 cat conftest.$ac_ext >&5
13538 fi
13539 rm -f conftest.$ac_objext conftest.$ac_ext
13540 done
13541
13542 fi
13543 echo "$as_me:13543: result: $cf_cv_getopt_header" >&5
13544 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13545 if test $cf_cv_getopt_header != none ; then
13546         cat >>confdefs.h <<\EOF
13547 #define HAVE_GETOPT_HEADER 1
13548 EOF
13549
13550 fi
13551
13552 # check for ISC (this may also define _POSIX_SOURCE)
13553 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13554 if test "$ISC" = yes ; then
13555
13556 echo "$as_me:13556: checking for main in -lcposix" >&5
13557 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13558 if test "${ac_cv_lib_cposix_main+set}" = set; then
13559   echo $ECHO_N "(cached) $ECHO_C" >&6
13560 else
13561   ac_check_lib_save_LIBS=$LIBS
13562 LIBS="-lcposix  $LIBS"
13563 cat >conftest.$ac_ext <<_ACEOF
13564 #line 13564 "configure"
13565 #include "confdefs.h"
13566
13567 int
13568 main ()
13569 {
13570 main ();
13571   ;
13572   return 0;
13573 }
13574 _ACEOF
13575 rm -f conftest.$ac_objext conftest$ac_exeext
13576 if { (eval echo "$as_me:13576: \"$ac_link\"") >&5
13577   (eval $ac_link) 2>&5
13578   ac_status=$?
13579   echo "$as_me:13579: \$? = $ac_status" >&5
13580   (exit $ac_status); } &&
13581          { ac_try='test -s conftest$ac_exeext'
13582   { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583   (eval $ac_try) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); }; }; then
13587   ac_cv_lib_cposix_main=yes
13588 else
13589   echo "$as_me: failed program was:" >&5
13590 cat conftest.$ac_ext >&5
13591 ac_cv_lib_cposix_main=no
13592 fi
13593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13594 LIBS=$ac_check_lib_save_LIBS
13595 fi
13596 echo "$as_me:13596: result: $ac_cv_lib_cposix_main" >&5
13597 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13598 if test $ac_cv_lib_cposix_main = yes; then
13599   cat >>confdefs.h <<EOF
13600 #define HAVE_LIBCPOSIX 1
13601 EOF
13602
13603   LIBS="-lcposix $LIBS"
13604
13605 fi
13606
13607         echo "$as_me:13607: checking for bzero in -linet" >&5
13608 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13609 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13610   echo $ECHO_N "(cached) $ECHO_C" >&6
13611 else
13612   ac_check_lib_save_LIBS=$LIBS
13613 LIBS="-linet  $LIBS"
13614 cat >conftest.$ac_ext <<_ACEOF
13615 #line 13615 "configure"
13616 #include "confdefs.h"
13617
13618 /* Override any gcc2 internal prototype to avoid an error.  */
13619 #ifdef __cplusplus
13620 extern "C"
13621 #endif
13622 /* We use char because int might match the return type of a gcc2
13623    builtin and then its argument prototype would still apply.  */
13624 char bzero ();
13625 int
13626 main ()
13627 {
13628 bzero ();
13629   ;
13630   return 0;
13631 }
13632 _ACEOF
13633 rm -f conftest.$ac_objext conftest$ac_exeext
13634 if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
13635   (eval $ac_link) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -s conftest$ac_exeext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   ac_cv_lib_inet_bzero=yes
13646 else
13647   echo "$as_me: failed program was:" >&5
13648 cat conftest.$ac_ext >&5
13649 ac_cv_lib_inet_bzero=no
13650 fi
13651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13652 LIBS=$ac_check_lib_save_LIBS
13653 fi
13654 echo "$as_me:13654: result: $ac_cv_lib_inet_bzero" >&5
13655 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13656 if test $ac_cv_lib_inet_bzero = yes; then
13657   LIBS="-linet $LIBS"
13658 fi
13659 fi
13660
13661 echo "$as_me:13661: checking if sys/time.h works with sys/select.h" >&5
13662 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13663 if test "${cf_cv_sys_time_select+set}" = set; then
13664   echo $ECHO_N "(cached) $ECHO_C" >&6
13665 else
13666
13667 cat >conftest.$ac_ext <<_ACEOF
13668 #line 13668 "configure"
13669 #include "confdefs.h"
13670
13671 #include <sys/types.h>
13672 #ifdef HAVE_SYS_TIME_H
13673 #include <sys/time.h>
13674 #endif
13675 #ifdef HAVE_SYS_SELECT_H
13676 #include <sys/select.h>
13677 #endif
13678
13679 int
13680 main ()
13681 {
13682
13683   ;
13684   return 0;
13685 }
13686 _ACEOF
13687 rm -f conftest.$ac_objext
13688 if { (eval echo "$as_me:13688: \"$ac_compile\"") >&5
13689   (eval $ac_compile) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit $ac_status); } &&
13693          { ac_try='test -s conftest.$ac_objext'
13694   { (eval echo "$as_me:13694: \"$ac_try\"") >&5
13695   (eval $ac_try) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit $ac_status); }; }; then
13699   cf_cv_sys_time_select=yes
13700 else
13701   echo "$as_me: failed program was:" >&5
13702 cat conftest.$ac_ext >&5
13703 cf_cv_sys_time_select=no
13704 fi
13705 rm -f conftest.$ac_objext conftest.$ac_ext
13706
13707 fi
13708
13709 echo "$as_me:13709: result: $cf_cv_sys_time_select" >&5
13710 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13711 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13712 #define HAVE_SYS_TIME_SELECT 1
13713 EOF
13714
13715 ###     checks for compiler characteristics
13716 ac_ext=c
13717 ac_cpp='$CPP $CPPFLAGS'
13718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13721 ac_main_return=return
13722
13723 echo "$as_me:13723: checking for $CC option to accept ANSI C" >&5
13724 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13725 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13726   echo $ECHO_N "(cached) $ECHO_C" >&6
13727 else
13728   ac_cv_prog_cc_stdc=no
13729 ac_save_CC=$CC
13730 cat >conftest.$ac_ext <<_ACEOF
13731 #line 13731 "configure"
13732 #include "confdefs.h"
13733 #include <stdarg.h>
13734 #include <stdio.h>
13735 #include <sys/types.h>
13736 #include <sys/stat.h>
13737 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13738 struct buf { int x; };
13739 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13740 static char *e (p, i)
13741      char **p;
13742      int i;
13743 {
13744   return p[i];
13745 }
13746 static char *f (char * (*g) (char **, int), char **p, ...)
13747 {
13748   char *s;
13749   va_list v;
13750   va_start (v,p);
13751   s = g (p, va_arg (v,int));
13752   va_end (v);
13753   return s;
13754 }
13755 int test (int i, double x);
13756 struct s1 {int (*f) (int a);};
13757 struct s2 {int (*f) (double a);};
13758 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13759 int argc;
13760 char **argv;
13761 int
13762 main ()
13763 {
13764 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13765   ;
13766   return 0;
13767 }
13768 _ACEOF
13769 # Don't try gcc -ansi; that turns off useful extensions and
13770 # breaks some systems' header files.
13771 # AIX                   -qlanglvl=ansi
13772 # Ultrix and OSF/1      -std1
13773 # HP-UX 10.20 and later -Ae
13774 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13775 # SVR4                  -Xc -D__EXTENSIONS__
13776 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13777 do
13778   CC="$ac_save_CC $ac_arg"
13779   rm -f conftest.$ac_objext
13780 if { (eval echo "$as_me:13780: \"$ac_compile\"") >&5
13781   (eval $ac_compile) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -s conftest.$ac_objext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   ac_cv_prog_cc_stdc=$ac_arg
13792 break
13793 else
13794   echo "$as_me: failed program was:" >&5
13795 cat conftest.$ac_ext >&5
13796 fi
13797 rm -f conftest.$ac_objext
13798 done
13799 rm -f conftest.$ac_ext conftest.$ac_objext
13800 CC=$ac_save_CC
13801
13802 fi
13803
13804 case "x$ac_cv_prog_cc_stdc" in
13805   x|xno)
13806     echo "$as_me:13806: result: none needed" >&5
13807 echo "${ECHO_T}none needed" >&6 ;;
13808   *)
13809     echo "$as_me:13809: result: $ac_cv_prog_cc_stdc" >&5
13810 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13811     CC="$CC $ac_cv_prog_cc_stdc" ;;
13812 esac
13813
13814 echo "$as_me:13814: checking for an ANSI C-conforming const" >&5
13815 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13816 if test "${ac_cv_c_const+set}" = set; then
13817   echo $ECHO_N "(cached) $ECHO_C" >&6
13818 else
13819   cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13822
13823 int
13824 main ()
13825 {
13826 /* FIXME: Include the comments suggested by Paul. */
13827 #ifndef __cplusplus
13828   /* Ultrix mips cc rejects this.  */
13829   typedef int charset[2];
13830   const charset x;
13831   /* SunOS 4.1.1 cc rejects this.  */
13832   char const *const *ccp;
13833   char **p;
13834   /* NEC SVR4.0.2 mips cc rejects this.  */
13835   struct point {int x, y;};
13836   static struct point const zero = {0,0};
13837   /* AIX XL C 1.02.0.0 rejects this.
13838      It does not let you subtract one const X* pointer from another in
13839      an arm of an if-expression whose if-part is not a constant
13840      expression */
13841   const char *g = "string";
13842   ccp = &g + (g ? g-g : 0);
13843   /* HPUX 7.0 cc rejects these. */
13844   ++ccp;
13845   p = (char**) ccp;
13846   ccp = (char const *const *) p;
13847   { /* SCO 3.2v4 cc rejects this.  */
13848     char *t;
13849     char const *s = 0 ? (char *) 0 : (char const *) 0;
13850
13851     *t++ = 0;
13852   }
13853   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13854     int x[] = {25, 17};
13855     const int *foo = &x[0];
13856     ++foo;
13857   }
13858   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13859     typedef const int *iptr;
13860     iptr p = 0;
13861     ++p;
13862   }
13863   { /* AIX XL C 1.02.0.0 rejects this saying
13864        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13865     struct s { int j; const int *ap[3]; };
13866     struct s *b; b->j = 5;
13867   }
13868   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13869     const int foo = 10;
13870   }
13871 #endif
13872
13873   ;
13874   return 0;
13875 }
13876 _ACEOF
13877 rm -f conftest.$ac_objext
13878 if { (eval echo "$as_me:13878: \"$ac_compile\"") >&5
13879   (eval $ac_compile) 2>&5
13880   ac_status=$?
13881   echo "$as_me:13881: \$? = $ac_status" >&5
13882   (exit $ac_status); } &&
13883          { ac_try='test -s conftest.$ac_objext'
13884   { (eval echo "$as_me:13884: \"$ac_try\"") >&5
13885   (eval $ac_try) 2>&5
13886   ac_status=$?
13887   echo "$as_me:13887: \$? = $ac_status" >&5
13888   (exit $ac_status); }; }; then
13889   ac_cv_c_const=yes
13890 else
13891   echo "$as_me: failed program was:" >&5
13892 cat conftest.$ac_ext >&5
13893 ac_cv_c_const=no
13894 fi
13895 rm -f conftest.$ac_objext conftest.$ac_ext
13896 fi
13897 echo "$as_me:13897: result: $ac_cv_c_const" >&5
13898 echo "${ECHO_T}$ac_cv_c_const" >&6
13899 if test $ac_cv_c_const = no; then
13900
13901 cat >>confdefs.h <<\EOF
13902 #define const
13903 EOF
13904
13905 fi
13906
13907 echo "$as_me:13907: checking for inline" >&5
13908 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13909 if test "${ac_cv_c_inline+set}" = set; then
13910   echo $ECHO_N "(cached) $ECHO_C" >&6
13911 else
13912   ac_cv_c_inline=no
13913 for ac_kw in inline __inline__ __inline; do
13914   cat >conftest.$ac_ext <<_ACEOF
13915 #line 13915 "configure"
13916 #include "confdefs.h"
13917 #ifndef __cplusplus
13918 static $ac_kw int static_foo () {return 0; }
13919 $ac_kw int foo () {return 0; }
13920 #endif
13921
13922 _ACEOF
13923 rm -f conftest.$ac_objext
13924 if { (eval echo "$as_me:13924: \"$ac_compile\"") >&5
13925   (eval $ac_compile) 2>&5
13926   ac_status=$?
13927   echo "$as_me:13927: \$? = $ac_status" >&5
13928   (exit $ac_status); } &&
13929          { ac_try='test -s conftest.$ac_objext'
13930   { (eval echo "$as_me:13930: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   ac_cv_c_inline=$ac_kw; break
13936 else
13937   echo "$as_me: failed program was:" >&5
13938 cat conftest.$ac_ext >&5
13939 fi
13940 rm -f conftest.$ac_objext conftest.$ac_ext
13941 done
13942
13943 fi
13944 echo "$as_me:13944: result: $ac_cv_c_inline" >&5
13945 echo "${ECHO_T}$ac_cv_c_inline" >&6
13946 case $ac_cv_c_inline in
13947   inline | yes) ;;
13948   no)
13949 cat >>confdefs.h <<\EOF
13950 #define inline
13951 EOF
13952  ;;
13953   *)  cat >>confdefs.h <<EOF
13954 #define inline $ac_cv_c_inline
13955 EOF
13956  ;;
13957 esac
13958
13959 NCURSES_INLINE=
13960 if test "$ac_cv_c_inline" != no ; then
13961   NCURSES_INLINE=inline
13962   if test "$INTEL_COMPILER" = yes
13963   then
13964     :
13965   elif test "$GCC" = yes
13966   then
13967     echo "$as_me:13967: checking if $CC supports options to tune inlining" >&5
13968 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13969 if test "${cf_cv_gcc_inline+set}" = set; then
13970   echo $ECHO_N "(cached) $ECHO_C" >&6
13971 else
13972
13973       cf_save_CFLAGS=$CFLAGS
13974       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13975       cat >conftest.$ac_ext <<_ACEOF
13976 #line 13976 "configure"
13977 #include "confdefs.h"
13978 inline int foo(void) { return 1; }
13979 int
13980 main ()
13981 {
13982 ${cf_cv_main_return:-return} foo()
13983   ;
13984   return 0;
13985 }
13986 _ACEOF
13987 rm -f conftest.$ac_objext
13988 if { (eval echo "$as_me:13988: \"$ac_compile\"") >&5
13989   (eval $ac_compile) 2>&5
13990   ac_status=$?
13991   echo "$as_me:13991: \$? = $ac_status" >&5
13992   (exit $ac_status); } &&
13993          { ac_try='test -s conftest.$ac_objext'
13994   { (eval echo "$as_me:13994: \"$ac_try\"") >&5
13995   (eval $ac_try) 2>&5
13996   ac_status=$?
13997   echo "$as_me:13997: \$? = $ac_status" >&5
13998   (exit $ac_status); }; }; then
13999   cf_cv_gcc_inline=yes
14000 else
14001   echo "$as_me: failed program was:" >&5
14002 cat conftest.$ac_ext >&5
14003 cf_cv_gcc_inline=no
14004 fi
14005 rm -f conftest.$ac_objext conftest.$ac_ext
14006       CFLAGS=$cf_save_CFLAGS
14007
14008 fi
14009 echo "$as_me:14009: result: $cf_cv_gcc_inline" >&5
14010 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14011     if test "$cf_cv_gcc_inline" = yes ; then
14012
14013 cf_fix_cppflags=no
14014 cf_new_cflags=
14015 cf_new_cppflags=
14016 cf_new_extra_cppflags=
14017
14018 for cf_add_cflags in --param max-inline-insns-single=1200
14019 do
14020 case $cf_fix_cppflags in
14021 no)
14022         case $cf_add_cflags in #(vi
14023         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14024                 case $cf_add_cflags in
14025                 -D*)
14026                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14027
14028                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14029                                 && test -z "${cf_tst_cflags}" \
14030                                 && cf_fix_cppflags=yes
14031
14032                         if test $cf_fix_cppflags = yes ; then
14033                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14034                                 continue
14035                         elif test "${cf_tst_cflags}" = "\"'" ; then
14036                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14037                                 continue
14038                         fi
14039                         ;;
14040                 esac
14041                 case "$CPPFLAGS" in
14042                 *$cf_add_cflags) #(vi
14043                         ;;
14044                 *) #(vi
14045                         case $cf_add_cflags in #(vi
14046                         -D*)
14047                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14048
14049 CPPFLAGS=`echo "$CPPFLAGS" | \
14050         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14051                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14052
14053                                 ;;
14054                         esac
14055                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14056                         ;;
14057                 esac
14058                 ;;
14059         *)
14060                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14061                 ;;
14062         esac
14063         ;;
14064 yes)
14065         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14066
14067         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14068
14069         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14070                 && test -z "${cf_tst_cflags}" \
14071                 && cf_fix_cppflags=no
14072         ;;
14073 esac
14074 done
14075
14076 if test -n "$cf_new_cflags" ; then
14077
14078         CFLAGS="$CFLAGS $cf_new_cflags"
14079 fi
14080
14081 if test -n "$cf_new_cppflags" ; then
14082
14083         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14084 fi
14085
14086 if test -n "$cf_new_extra_cppflags" ; then
14087
14088         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14089 fi
14090
14091     fi
14092   fi
14093 fi
14094
14095 echo "$as_me:14095: checking for signal global datatype" >&5
14096 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14097 if test "${cf_cv_sig_atomic_t+set}" = set; then
14098   echo $ECHO_N "(cached) $ECHO_C" >&6
14099 else
14100
14101         for cf_type in \
14102                 "volatile sig_atomic_t" \
14103                 "sig_atomic_t" \
14104                 "int"
14105         do
14106         cat >conftest.$ac_ext <<_ACEOF
14107 #line 14107 "configure"
14108 #include "confdefs.h"
14109
14110 #include <sys/types.h>
14111 #include <signal.h>
14112 #include <stdio.h>
14113
14114 extern $cf_type x;
14115 $cf_type x;
14116 static void handler(int sig)
14117 {
14118         x = 5;
14119 }
14120 int
14121 main ()
14122 {
14123 signal(SIGINT, handler);
14124                  x = 1
14125   ;
14126   return 0;
14127 }
14128 _ACEOF
14129 rm -f conftest.$ac_objext
14130 if { (eval echo "$as_me:14130: \"$ac_compile\"") >&5
14131   (eval $ac_compile) 2>&5
14132   ac_status=$?
14133   echo "$as_me:14133: \$? = $ac_status" >&5
14134   (exit $ac_status); } &&
14135          { ac_try='test -s conftest.$ac_objext'
14136   { (eval echo "$as_me:14136: \"$ac_try\"") >&5
14137   (eval $ac_try) 2>&5
14138   ac_status=$?
14139   echo "$as_me:14139: \$? = $ac_status" >&5
14140   (exit $ac_status); }; }; then
14141   cf_cv_sig_atomic_t=$cf_type
14142 else
14143   echo "$as_me: failed program was:" >&5
14144 cat conftest.$ac_ext >&5
14145 cf_cv_sig_atomic_t=no
14146 fi
14147 rm -f conftest.$ac_objext conftest.$ac_ext
14148                 test "$cf_cv_sig_atomic_t" != no && break
14149         done
14150
14151 fi
14152
14153 echo "$as_me:14153: result: $cf_cv_sig_atomic_t" >&5
14154 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14155 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14156 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14157 EOF
14158
14159 if test $NCURSES_CHTYPE = auto ; then
14160
14161 echo "$as_me:14161: checking for type of chtype" >&5
14162 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14163 if test "${cf_cv_typeof_chtype+set}" = set; then
14164   echo $ECHO_N "(cached) $ECHO_C" >&6
14165 else
14166
14167                 if test "$cross_compiling" = yes; then
14168   cf_cv_typeof_chtype=long
14169 else
14170   cat >conftest.$ac_ext <<_ACEOF
14171 #line 14171 "configure"
14172 #include "confdefs.h"
14173
14174 #define WANT_BITS 31
14175 #include <stdio.h>
14176 int main()
14177 {
14178         FILE *fp = fopen("cf_test.out", "w");
14179         if (fp != 0) {
14180                 char *result = "long";
14181                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14182                         int n;
14183                         unsigned int x, y;
14184                         for (n = 0; n < WANT_BITS; n++) {
14185                                 x = (1 << n);
14186                                 y = (x >> n);
14187                                 if (y != 1 || x == 0) {
14188                                         x = 0;
14189                                         break;
14190                                 }
14191                         }
14192                         /*
14193                          * If x is nonzero, an int is big enough for the bits
14194                          * that we want.
14195                          */
14196                         result = (x != 0) ? "int" : "long";
14197                 }
14198                 fputs(result, fp);
14199                 fclose(fp);
14200         }
14201         ${cf_cv_main_return:-return}(0);
14202 }
14203
14204 _ACEOF
14205 rm -f conftest$ac_exeext
14206 if { (eval echo "$as_me:14206: \"$ac_link\"") >&5
14207   (eval $ac_link) 2>&5
14208   ac_status=$?
14209   echo "$as_me:14209: \$? = $ac_status" >&5
14210   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14211   { (eval echo "$as_me:14211: \"$ac_try\"") >&5
14212   (eval $ac_try) 2>&5
14213   ac_status=$?
14214   echo "$as_me:14214: \$? = $ac_status" >&5
14215   (exit $ac_status); }; }; then
14216   cf_cv_typeof_chtype=`cat cf_test.out`
14217 else
14218   echo "$as_me: program exited with status $ac_status" >&5
14219 echo "$as_me: failed program was:" >&5
14220 cat conftest.$ac_ext >&5
14221 cf_cv_typeof_chtype=long
14222 fi
14223 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14224 fi
14225                 rm -f cf_test.out
14226
14227 fi
14228
14229 echo "$as_me:14229: result: $cf_cv_typeof_chtype" >&5
14230 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14231
14232 cat >>confdefs.h <<EOF
14233 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14234 EOF
14235
14236 else
14237         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14238 fi
14239 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14240
14241 echo "$as_me:14241: checking if unsigned literals are legal" >&5
14242 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14243 if test "${cf_cv_unsigned_literals+set}" = set; then
14244   echo $ECHO_N "(cached) $ECHO_C" >&6
14245 else
14246
14247         cat >conftest.$ac_ext <<_ACEOF
14248 #line 14248 "configure"
14249 #include "confdefs.h"
14250
14251 int
14252 main ()
14253 {
14254 long x = 1L + 1UL + 1U + 1
14255   ;
14256   return 0;
14257 }
14258 _ACEOF
14259 rm -f conftest.$ac_objext
14260 if { (eval echo "$as_me:14260: \"$ac_compile\"") >&5
14261   (eval $ac_compile) 2>&5
14262   ac_status=$?
14263   echo "$as_me:14263: \$? = $ac_status" >&5
14264   (exit $ac_status); } &&
14265          { ac_try='test -s conftest.$ac_objext'
14266   { (eval echo "$as_me:14266: \"$ac_try\"") >&5
14267   (eval $ac_try) 2>&5
14268   ac_status=$?
14269   echo "$as_me:14269: \$? = $ac_status" >&5
14270   (exit $ac_status); }; }; then
14271   cf_cv_unsigned_literals=yes
14272 else
14273   echo "$as_me: failed program was:" >&5
14274 cat conftest.$ac_ext >&5
14275 cf_cv_unsigned_literals=no
14276 fi
14277 rm -f conftest.$ac_objext conftest.$ac_ext
14278
14279 fi
14280
14281 echo "$as_me:14281: result: $cf_cv_unsigned_literals" >&5
14282 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14283
14284 cf_cv_1UL="1"
14285 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14286 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14287
14288 if test $NCURSES_MMASK_T = auto ; then
14289         cf_cv_typeof_mmask_t=long
14290 else
14291         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14292 fi
14293 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14294
14295 ###     Checks for external-data
14296
14297 echo "$as_me:14297: checking if external errno is declared" >&5
14298 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14299 if test "${cf_cv_dcl_errno+set}" = set; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302
14303     cat >conftest.$ac_ext <<_ACEOF
14304 #line 14304 "configure"
14305 #include "confdefs.h"
14306
14307 #ifdef HAVE_STDLIB_H
14308 #include <stdlib.h>
14309 #endif
14310 #include <stdio.h>
14311 #include <sys/types.h>
14312 #include <errno.h>
14313 int
14314 main ()
14315 {
14316 int x = (int) errno
14317   ;
14318   return 0;
14319 }
14320 _ACEOF
14321 rm -f conftest.$ac_objext
14322 if { (eval echo "$as_me:14322: \"$ac_compile\"") >&5
14323   (eval $ac_compile) 2>&5
14324   ac_status=$?
14325   echo "$as_me:14325: \$? = $ac_status" >&5
14326   (exit $ac_status); } &&
14327          { ac_try='test -s conftest.$ac_objext'
14328   { (eval echo "$as_me:14328: \"$ac_try\"") >&5
14329   (eval $ac_try) 2>&5
14330   ac_status=$?
14331   echo "$as_me:14331: \$? = $ac_status" >&5
14332   (exit $ac_status); }; }; then
14333   cf_cv_dcl_errno=yes
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat conftest.$ac_ext >&5
14337 cf_cv_dcl_errno=no
14338 fi
14339 rm -f conftest.$ac_objext conftest.$ac_ext
14340
14341 fi
14342 echo "$as_me:14342: result: $cf_cv_dcl_errno" >&5
14343 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14344
14345 if test "$cf_cv_dcl_errno" = no ; then
14346
14347 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14348
14349     cat >>confdefs.h <<EOF
14350 #define $cf_result 1
14351 EOF
14352
14353 fi
14354
14355 # It's possible (for near-UNIX clones) that the data doesn't exist
14356
14357 echo "$as_me:14357: checking if external errno exists" >&5
14358 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14359 if test "${cf_cv_have_errno+set}" = set; then
14360   echo $ECHO_N "(cached) $ECHO_C" >&6
14361 else
14362
14363     cat >conftest.$ac_ext <<_ACEOF
14364 #line 14364 "configure"
14365 #include "confdefs.h"
14366
14367 #undef errno
14368 extern int errno;
14369
14370 int
14371 main ()
14372 {
14373 errno = 2
14374   ;
14375   return 0;
14376 }
14377 _ACEOF
14378 rm -f conftest.$ac_objext conftest$ac_exeext
14379 if { (eval echo "$as_me:14379: \"$ac_link\"") >&5
14380   (eval $ac_link) 2>&5
14381   ac_status=$?
14382   echo "$as_me:14382: \$? = $ac_status" >&5
14383   (exit $ac_status); } &&
14384          { ac_try='test -s conftest$ac_exeext'
14385   { (eval echo "$as_me:14385: \"$ac_try\"") >&5
14386   (eval $ac_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit $ac_status); }; }; then
14390   cf_cv_have_errno=yes
14391 else
14392   echo "$as_me: failed program was:" >&5
14393 cat conftest.$ac_ext >&5
14394 cf_cv_have_errno=no
14395 fi
14396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14397
14398 fi
14399 echo "$as_me:14399: result: $cf_cv_have_errno" >&5
14400 echo "${ECHO_T}$cf_cv_have_errno" >&6
14401
14402 if test "$cf_cv_have_errno" = yes ; then
14403
14404 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14405
14406     cat >>confdefs.h <<EOF
14407 #define $cf_result 1
14408 EOF
14409
14410 fi
14411
14412 echo "$as_me:14412: checking if data-only library module links" >&5
14413 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14414 if test "${cf_cv_link_dataonly+set}" = set; then
14415   echo $ECHO_N "(cached) $ECHO_C" >&6
14416 else
14417
14418         rm -f conftest.a
14419         cat >conftest.$ac_ext <<EOF
14420 #line 14420 "configure"
14421 int     testdata[3] = { 123, 456, 789 };
14422 EOF
14423         if { (eval echo "$as_me:14423: \"$ac_compile\"") >&5
14424   (eval $ac_compile) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit $ac_status); } ; then
14428                 mv conftest.o data.o && \
14429                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14430         fi
14431         rm -f conftest.$ac_ext data.o
14432         cat >conftest.$ac_ext <<EOF
14433 #line 14433 "configure"
14434 int     testfunc()
14435 {
14436 #if defined(NeXT)
14437         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14438 #else
14439         extern int testdata[3];
14440         return testdata[0] == 123
14441            &&  testdata[1] == 456
14442            &&  testdata[2] == 789;
14443 #endif
14444 }
14445 EOF
14446         if { (eval echo "$as_me:14446: \"$ac_compile\"") >&5
14447   (eval $ac_compile) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); }; then
14451                 mv conftest.o func.o && \
14452                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14453         fi
14454         rm -f conftest.$ac_ext func.o
14455         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14456         cf_saveLIBS="$LIBS"
14457         LIBS="conftest.a $LIBS"
14458         if test "$cross_compiling" = yes; then
14459   cf_cv_link_dataonly=unknown
14460 else
14461   cat >conftest.$ac_ext <<_ACEOF
14462 #line 14462 "configure"
14463 #include "confdefs.h"
14464
14465         int main()
14466         {
14467                 extern int testfunc();
14468                 ${cf_cv_main_return:-return} (!testfunc());
14469         }
14470
14471 _ACEOF
14472 rm -f conftest$ac_exeext
14473 if { (eval echo "$as_me:14473: \"$ac_link\"") >&5
14474   (eval $ac_link) 2>&5
14475   ac_status=$?
14476   echo "$as_me:14476: \$? = $ac_status" >&5
14477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14478   { (eval echo "$as_me:14478: \"$ac_try\"") >&5
14479   (eval $ac_try) 2>&5
14480   ac_status=$?
14481   echo "$as_me:14481: \$? = $ac_status" >&5
14482   (exit $ac_status); }; }; then
14483   cf_cv_link_dataonly=yes
14484 else
14485   echo "$as_me: program exited with status $ac_status" >&5
14486 echo "$as_me: failed program was:" >&5
14487 cat conftest.$ac_ext >&5
14488 cf_cv_link_dataonly=no
14489 fi
14490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14491 fi
14492         LIBS="$cf_saveLIBS"
14493
14494 fi
14495
14496 echo "$as_me:14496: result: $cf_cv_link_dataonly" >&5
14497 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14498
14499 if test "$cf_cv_link_dataonly" = no ; then
14500         cat >>confdefs.h <<\EOF
14501 #define BROKEN_LINKER 1
14502 EOF
14503
14504         BROKEN_LINKER=1
14505 fi
14506
14507 ###     Checks for library functions.
14508
14509 for ac_func in \
14510 getcwd \
14511 getegid \
14512 geteuid \
14513 getttynam \
14514 issetugid \
14515 poll \
14516 remove \
14517 select \
14518 setbuf \
14519 setbuffer \
14520 setvbuf \
14521 sigaction \
14522 sigvec \
14523 strdup \
14524 strstr \
14525 tcgetpgrp \
14526 times \
14527 vsnprintf \
14528
14529 do
14530 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14531 echo "$as_me:14531: checking for $ac_func" >&5
14532 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14533 if eval "test \"\${$as_ac_var+set}\" = set"; then
14534   echo $ECHO_N "(cached) $ECHO_C" >&6
14535 else
14536   cat >conftest.$ac_ext <<_ACEOF
14537 #line 14537 "configure"
14538 #include "confdefs.h"
14539 /* System header to define __stub macros and hopefully few prototypes,
14540     which can conflict with char $ac_func (); below.  */
14541 #include <assert.h>
14542 /* Override any gcc2 internal prototype to avoid an error.  */
14543 #ifdef __cplusplus
14544 extern "C"
14545 #endif
14546 /* We use char because int might match the return type of a gcc2
14547    builtin and then its argument prototype would still apply.  */
14548 char $ac_func ();
14549 char (*f) ();
14550
14551 int
14552 main ()
14553 {
14554 /* The GNU C library defines this for functions which it implements
14555     to always fail with ENOSYS.  Some functions are actually named
14556     something starting with __ and the normal name is an alias.  */
14557 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14558 choke me
14559 #else
14560 f = $ac_func;
14561 #endif
14562
14563   ;
14564   return 0;
14565 }
14566 _ACEOF
14567 rm -f conftest.$ac_objext conftest$ac_exeext
14568 if { (eval echo "$as_me:14568: \"$ac_link\"") >&5
14569   (eval $ac_link) 2>&5
14570   ac_status=$?
14571   echo "$as_me:14571: \$? = $ac_status" >&5
14572   (exit $ac_status); } &&
14573          { ac_try='test -s conftest$ac_exeext'
14574   { (eval echo "$as_me:14574: \"$ac_try\"") >&5
14575   (eval $ac_try) 2>&5
14576   ac_status=$?
14577   echo "$as_me:14577: \$? = $ac_status" >&5
14578   (exit $ac_status); }; }; then
14579   eval "$as_ac_var=yes"
14580 else
14581   echo "$as_me: failed program was:" >&5
14582 cat conftest.$ac_ext >&5
14583 eval "$as_ac_var=no"
14584 fi
14585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14586 fi
14587 echo "$as_me:14587: result: `eval echo '${'$as_ac_var'}'`" >&5
14588 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14589 if test `eval echo '${'$as_ac_var'}'` = yes; then
14590   cat >>confdefs.h <<EOF
14591 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14592 EOF
14593
14594 fi
14595 done
14596
14597 if test "$with_getcap" = "yes" ; then
14598
14599 echo "$as_me:14599: checking for terminal-capability database functions" >&5
14600 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14601 if test "${cf_cv_cgetent+set}" = set; then
14602   echo $ECHO_N "(cached) $ECHO_C" >&6
14603 else
14604
14605 cat >conftest.$ac_ext <<_ACEOF
14606 #line 14606 "configure"
14607 #include "confdefs.h"
14608
14609 #include <stdlib.h>
14610 int
14611 main ()
14612 {
14613
14614         char temp[128];
14615         char *buf = temp;
14616         char *db_array = temp;
14617         cgetent(&buf, /* int *, */ &db_array, "vt100");
14618         cgetcap(buf, "tc", '=');
14619         cgetmatch(buf, "tc");
14620
14621   ;
14622   return 0;
14623 }
14624 _ACEOF
14625 rm -f conftest.$ac_objext conftest$ac_exeext
14626 if { (eval echo "$as_me:14626: \"$ac_link\"") >&5
14627   (eval $ac_link) 2>&5
14628   ac_status=$?
14629   echo "$as_me:14629: \$? = $ac_status" >&5
14630   (exit $ac_status); } &&
14631          { ac_try='test -s conftest$ac_exeext'
14632   { (eval echo "$as_me:14632: \"$ac_try\"") >&5
14633   (eval $ac_try) 2>&5
14634   ac_status=$?
14635   echo "$as_me:14635: \$? = $ac_status" >&5
14636   (exit $ac_status); }; }; then
14637   cf_cv_cgetent=yes
14638 else
14639   echo "$as_me: failed program was:" >&5
14640 cat conftest.$ac_ext >&5
14641 cf_cv_cgetent=no
14642 fi
14643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14644
14645 fi
14646
14647 echo "$as_me:14647: result: $cf_cv_cgetent" >&5
14648 echo "${ECHO_T}$cf_cv_cgetent" >&6
14649 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14650 #define HAVE_BSD_CGETENT 1
14651 EOF
14652
14653 fi
14654
14655 echo "$as_me:14655: checking for isascii" >&5
14656 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14657 if test "${cf_cv_have_isascii+set}" = set; then
14658   echo $ECHO_N "(cached) $ECHO_C" >&6
14659 else
14660
14661         cat >conftest.$ac_ext <<_ACEOF
14662 #line 14662 "configure"
14663 #include "confdefs.h"
14664 #include <ctype.h>
14665 int
14666 main ()
14667 {
14668 int x = isascii(' ')
14669   ;
14670   return 0;
14671 }
14672 _ACEOF
14673 rm -f conftest.$ac_objext conftest$ac_exeext
14674 if { (eval echo "$as_me:14674: \"$ac_link\"") >&5
14675   (eval $ac_link) 2>&5
14676   ac_status=$?
14677   echo "$as_me:14677: \$? = $ac_status" >&5
14678   (exit $ac_status); } &&
14679          { ac_try='test -s conftest$ac_exeext'
14680   { (eval echo "$as_me:14680: \"$ac_try\"") >&5
14681   (eval $ac_try) 2>&5
14682   ac_status=$?
14683   echo "$as_me:14683: \$? = $ac_status" >&5
14684   (exit $ac_status); }; }; then
14685   cf_cv_have_isascii=yes
14686 else
14687   echo "$as_me: failed program was:" >&5
14688 cat conftest.$ac_ext >&5
14689 cf_cv_have_isascii=no
14690 fi
14691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14692
14693 fi
14694 echo "$as_me:14694: result: $cf_cv_have_isascii" >&5
14695 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14696 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14697 #define HAVE_ISASCII 1
14698 EOF
14699
14700 if test "$ac_cv_func_sigaction" = yes; then
14701 echo "$as_me:14701: checking whether sigaction needs _POSIX_SOURCE" >&5
14702 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14703 cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706
14707 #include <sys/types.h>
14708 #include <signal.h>
14709 int
14710 main ()
14711 {
14712 struct sigaction act
14713   ;
14714   return 0;
14715 }
14716 _ACEOF
14717 rm -f conftest.$ac_objext
14718 if { (eval echo "$as_me:14718: \"$ac_compile\"") >&5
14719   (eval $ac_compile) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit $ac_status); } &&
14723          { ac_try='test -s conftest.$ac_objext'
14724   { (eval echo "$as_me:14724: \"$ac_try\"") >&5
14725   (eval $ac_try) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit $ac_status); }; }; then
14729   sigact_bad=no
14730 else
14731   echo "$as_me: failed program was:" >&5
14732 cat conftest.$ac_ext >&5
14733
14734 cat >conftest.$ac_ext <<_ACEOF
14735 #line 14735 "configure"
14736 #include "confdefs.h"
14737
14738 #define _POSIX_SOURCE
14739 #include <sys/types.h>
14740 #include <signal.h>
14741 int
14742 main ()
14743 {
14744 struct sigaction act
14745   ;
14746   return 0;
14747 }
14748 _ACEOF
14749 rm -f conftest.$ac_objext
14750 if { (eval echo "$as_me:14750: \"$ac_compile\"") >&5
14751   (eval $ac_compile) 2>&5
14752   ac_status=$?
14753   echo "$as_me:14753: \$? = $ac_status" >&5
14754   (exit $ac_status); } &&
14755          { ac_try='test -s conftest.$ac_objext'
14756   { (eval echo "$as_me:14756: \"$ac_try\"") >&5
14757   (eval $ac_try) 2>&5
14758   ac_status=$?
14759   echo "$as_me:14759: \$? = $ac_status" >&5
14760   (exit $ac_status); }; }; then
14761   sigact_bad=yes
14762          cat >>confdefs.h <<\EOF
14763 #define _POSIX_SOURCE 1
14764 EOF
14765
14766 else
14767   echo "$as_me: failed program was:" >&5
14768 cat conftest.$ac_ext >&5
14769 sigact_bad=unknown
14770 fi
14771 rm -f conftest.$ac_objext conftest.$ac_ext
14772 fi
14773 rm -f conftest.$ac_objext conftest.$ac_ext
14774 echo "$as_me:14774: result: $sigact_bad" >&5
14775 echo "${ECHO_T}$sigact_bad" >&6
14776 fi
14777
14778 echo "$as_me:14778: checking if nanosleep really works" >&5
14779 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14780 if test "${cf_cv_func_nanosleep+set}" = set; then
14781   echo $ECHO_N "(cached) $ECHO_C" >&6
14782 else
14783
14784 if test "$cross_compiling" = yes; then
14785   cf_cv_func_nanosleep=unknown
14786 else
14787   cat >conftest.$ac_ext <<_ACEOF
14788 #line 14788 "configure"
14789 #include "confdefs.h"
14790
14791 #include <stdio.h>
14792 #include <errno.h>
14793 #include <time.h>
14794
14795 #ifdef HAVE_SYS_TIME_H
14796 #include <sys/time.h>
14797 #endif
14798
14799 int main() {
14800         struct timespec ts1, ts2;
14801         int code;
14802         ts1.tv_sec  = 0;
14803         ts1.tv_nsec = 750000000;
14804         ts2.tv_sec  = 0;
14805         ts2.tv_nsec = 0;
14806         errno = 0;
14807         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14808         ${cf_cv_main_return:-return}(code != 0);
14809 }
14810
14811 _ACEOF
14812 rm -f conftest$ac_exeext
14813 if { (eval echo "$as_me:14813: \"$ac_link\"") >&5
14814   (eval $ac_link) 2>&5
14815   ac_status=$?
14816   echo "$as_me:14816: \$? = $ac_status" >&5
14817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14818   { (eval echo "$as_me:14818: \"$ac_try\"") >&5
14819   (eval $ac_try) 2>&5
14820   ac_status=$?
14821   echo "$as_me:14821: \$? = $ac_status" >&5
14822   (exit $ac_status); }; }; then
14823   cf_cv_func_nanosleep=yes
14824 else
14825   echo "$as_me: program exited with status $ac_status" >&5
14826 echo "$as_me: failed program was:" >&5
14827 cat conftest.$ac_ext >&5
14828 cf_cv_func_nanosleep=no
14829 fi
14830 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14831 fi
14832 fi
14833 echo "$as_me:14833: result: $cf_cv_func_nanosleep" >&5
14834 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14835
14836 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14837 #define HAVE_NANOSLEEP 1
14838 EOF
14839
14840 for ac_header in \
14841 termio.h \
14842 termios.h \
14843 unistd.h \
14844
14845 do
14846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14847 echo "$as_me:14847: checking for $ac_header" >&5
14848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14850   echo $ECHO_N "(cached) $ECHO_C" >&6
14851 else
14852   cat >conftest.$ac_ext <<_ACEOF
14853 #line 14853 "configure"
14854 #include "confdefs.h"
14855 #include <$ac_header>
14856 _ACEOF
14857 if { (eval echo "$as_me:14857: \"$ac_cpp conftest.$ac_ext\"") >&5
14858   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14859   ac_status=$?
14860   egrep -v '^ *\+' conftest.er1 >conftest.err
14861   rm -f conftest.er1
14862   cat conftest.err >&5
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); } >/dev/null; then
14865   if test -s conftest.err; then
14866     ac_cpp_err=$ac_c_preproc_warn_flag
14867   else
14868     ac_cpp_err=
14869   fi
14870 else
14871   ac_cpp_err=yes
14872 fi
14873 if test -z "$ac_cpp_err"; then
14874   eval "$as_ac_Header=yes"
14875 else
14876   echo "$as_me: failed program was:" >&5
14877   cat conftest.$ac_ext >&5
14878   eval "$as_ac_Header=no"
14879 fi
14880 rm -f conftest.err conftest.$ac_ext
14881 fi
14882 echo "$as_me:14882: result: `eval echo '${'$as_ac_Header'}'`" >&5
14883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14884 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14885   cat >>confdefs.h <<EOF
14886 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14887 EOF
14888
14889 fi
14890 done
14891
14892 if test "$ISC" = yes ; then
14893
14894 for ac_header in sys/termio.h
14895 do
14896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14897 echo "$as_me:14897: checking for $ac_header" >&5
14898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14900   echo $ECHO_N "(cached) $ECHO_C" >&6
14901 else
14902   cat >conftest.$ac_ext <<_ACEOF
14903 #line 14903 "configure"
14904 #include "confdefs.h"
14905 #include <$ac_header>
14906 _ACEOF
14907 if { (eval echo "$as_me:14907: \"$ac_cpp conftest.$ac_ext\"") >&5
14908   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14909   ac_status=$?
14910   egrep -v '^ *\+' conftest.er1 >conftest.err
14911   rm -f conftest.er1
14912   cat conftest.err >&5
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); } >/dev/null; then
14915   if test -s conftest.err; then
14916     ac_cpp_err=$ac_c_preproc_warn_flag
14917   else
14918     ac_cpp_err=
14919   fi
14920 else
14921   ac_cpp_err=yes
14922 fi
14923 if test -z "$ac_cpp_err"; then
14924   eval "$as_ac_Header=yes"
14925 else
14926   echo "$as_me: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   eval "$as_ac_Header=no"
14929 fi
14930 rm -f conftest.err conftest.$ac_ext
14931 fi
14932 echo "$as_me:14932: result: `eval echo '${'$as_ac_Header'}'`" >&5
14933 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14934 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14935   cat >>confdefs.h <<EOF
14936 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14937 EOF
14938
14939 fi
14940 done
14941
14942 fi
14943 if test "$ac_cv_header_termios_h" = yes ; then
14944         case "$CFLAGS $CPPFLAGS" in
14945         *-D_POSIX_SOURCE*)
14946                 termios_bad=dunno ;;
14947         *)      termios_bad=maybe ;;
14948         esac
14949         if test "$termios_bad" = maybe ; then
14950         echo "$as_me:14950: checking whether termios.h needs _POSIX_SOURCE" >&5
14951 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14952         cat >conftest.$ac_ext <<_ACEOF
14953 #line 14953 "configure"
14954 #include "confdefs.h"
14955 #include <termios.h>
14956 int
14957 main ()
14958 {
14959 struct termios foo; int x = foo.c_iflag
14960   ;
14961   return 0;
14962 }
14963 _ACEOF
14964 rm -f conftest.$ac_objext
14965 if { (eval echo "$as_me:14965: \"$ac_compile\"") >&5
14966   (eval $ac_compile) 2>&5
14967   ac_status=$?
14968   echo "$as_me:14968: \$? = $ac_status" >&5
14969   (exit $ac_status); } &&
14970          { ac_try='test -s conftest.$ac_objext'
14971   { (eval echo "$as_me:14971: \"$ac_try\"") >&5
14972   (eval $ac_try) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); }; }; then
14976   termios_bad=no
14977 else
14978   echo "$as_me: failed program was:" >&5
14979 cat conftest.$ac_ext >&5
14980
14981                 cat >conftest.$ac_ext <<_ACEOF
14982 #line 14982 "configure"
14983 #include "confdefs.h"
14984
14985 #define _POSIX_SOURCE
14986 #include <termios.h>
14987 int
14988 main ()
14989 {
14990 struct termios foo; int x = foo.c_iflag
14991   ;
14992   return 0;
14993 }
14994 _ACEOF
14995 rm -f conftest.$ac_objext
14996 if { (eval echo "$as_me:14996: \"$ac_compile\"") >&5
14997   (eval $ac_compile) 2>&5
14998   ac_status=$?
14999   echo "$as_me:14999: \$? = $ac_status" >&5
15000   (exit $ac_status); } &&
15001          { ac_try='test -s conftest.$ac_objext'
15002   { (eval echo "$as_me:15002: \"$ac_try\"") >&5
15003   (eval $ac_try) 2>&5
15004   ac_status=$?
15005   echo "$as_me:15005: \$? = $ac_status" >&5
15006   (exit $ac_status); }; }; then
15007   termios_bad=unknown
15008 else
15009   echo "$as_me: failed program was:" >&5
15010 cat conftest.$ac_ext >&5
15011 termios_bad=yes cat >>confdefs.h <<\EOF
15012 #define _POSIX_SOURCE 1
15013 EOF
15014
15015 fi
15016 rm -f conftest.$ac_objext conftest.$ac_ext
15017
15018 fi
15019 rm -f conftest.$ac_objext conftest.$ac_ext
15020         echo "$as_me:15020: result: $termios_bad" >&5
15021 echo "${ECHO_T}$termios_bad" >&6
15022         fi
15023 fi
15024
15025 echo "$as_me:15025: checking for tcgetattr" >&5
15026 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15027 if test "${cf_cv_have_tcgetattr+set}" = set; then
15028   echo $ECHO_N "(cached) $ECHO_C" >&6
15029 else
15030
15031 cat >conftest.$ac_ext <<_ACEOF
15032 #line 15032 "configure"
15033 #include "confdefs.h"
15034
15035 #include <sys/types.h>
15036 #ifdef HAVE_UNISTD_H
15037 #include <unistd.h>
15038 #endif
15039 #ifdef HAVE_TERMIOS_H
15040 #include <termios.h>
15041 #define TTY struct termios
15042 #else
15043 #ifdef HAVE_TERMIO_H
15044 #include <termio.h>
15045 #define TTY struct termio
15046 #endif
15047 #endif
15048
15049 int
15050 main ()
15051 {
15052
15053 TTY foo;
15054 tcgetattr(1, &foo);
15055   ;
15056   return 0;
15057 }
15058 _ACEOF
15059 rm -f conftest.$ac_objext conftest$ac_exeext
15060 if { (eval echo "$as_me:15060: \"$ac_link\"") >&5
15061   (eval $ac_link) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit $ac_status); } &&
15065          { ac_try='test -s conftest$ac_exeext'
15066   { (eval echo "$as_me:15066: \"$ac_try\"") >&5
15067   (eval $ac_try) 2>&5
15068   ac_status=$?
15069   echo "$as_me:15069: \$? = $ac_status" >&5
15070   (exit $ac_status); }; }; then
15071   cf_cv_have_tcgetattr=yes
15072 else
15073   echo "$as_me: failed program was:" >&5
15074 cat conftest.$ac_ext >&5
15075 cf_cv_have_tcgetattr=no
15076 fi
15077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15078 fi
15079 echo "$as_me:15079: result: $cf_cv_have_tcgetattr" >&5
15080 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15081 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15082 #define HAVE_TCGETATTR 1
15083 EOF
15084
15085 echo "$as_me:15085: checking for vsscanf function or workaround" >&5
15086 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15087 if test "${cf_cv_func_vsscanf+set}" = set; then
15088   echo $ECHO_N "(cached) $ECHO_C" >&6
15089 else
15090
15091 cat >conftest.$ac_ext <<_ACEOF
15092 #line 15092 "configure"
15093 #include "confdefs.h"
15094
15095 #include <stdarg.h>
15096 #include <stdio.h>
15097 int
15098 main ()
15099 {
15100
15101         va_list ap;
15102         vsscanf("from", "%d", ap)
15103   ;
15104   return 0;
15105 }
15106 _ACEOF
15107 rm -f conftest.$ac_objext conftest$ac_exeext
15108 if { (eval echo "$as_me:15108: \"$ac_link\"") >&5
15109   (eval $ac_link) 2>&5
15110   ac_status=$?
15111   echo "$as_me:15111: \$? = $ac_status" >&5
15112   (exit $ac_status); } &&
15113          { ac_try='test -s conftest$ac_exeext'
15114   { (eval echo "$as_me:15114: \"$ac_try\"") >&5
15115   (eval $ac_try) 2>&5
15116   ac_status=$?
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); }; }; then
15119   cf_cv_func_vsscanf=vsscanf
15120 else
15121   echo "$as_me: failed program was:" >&5
15122 cat conftest.$ac_ext >&5
15123
15124 cat >conftest.$ac_ext <<_ACEOF
15125 #line 15125 "configure"
15126 #include "confdefs.h"
15127
15128 #include <stdarg.h>
15129 #include <stdio.h>
15130 int
15131 main ()
15132 {
15133
15134     FILE strbuf;
15135     char *str = "from";
15136
15137     strbuf._flag = _IOREAD;
15138     strbuf._ptr = strbuf._base = (unsigned char *) str;
15139     strbuf._cnt = strlen(str);
15140     strbuf._file = _NFILE;
15141     return (vfscanf(&strbuf, "%d", ap))
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 rm -f conftest.$ac_objext conftest$ac_exeext
15147 if { (eval echo "$as_me:15147: \"$ac_link\"") >&5
15148   (eval $ac_link) 2>&5
15149   ac_status=$?
15150   echo "$as_me:15150: \$? = $ac_status" >&5
15151   (exit $ac_status); } &&
15152          { ac_try='test -s conftest$ac_exeext'
15153   { (eval echo "$as_me:15153: \"$ac_try\"") >&5
15154   (eval $ac_try) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); }; }; then
15158   cf_cv_func_vsscanf=vfscanf
15159 else
15160   echo "$as_me: failed program was:" >&5
15161 cat conftest.$ac_ext >&5
15162
15163 cat >conftest.$ac_ext <<_ACEOF
15164 #line 15164 "configure"
15165 #include "confdefs.h"
15166
15167 #include <stdarg.h>
15168 #include <stdio.h>
15169 int
15170 main ()
15171 {
15172
15173     FILE strbuf;
15174     char *str = "from";
15175
15176     strbuf._flag = _IOREAD;
15177     strbuf._ptr = strbuf._base = (unsigned char *) str;
15178     strbuf._cnt = strlen(str);
15179     strbuf._file = _NFILE;
15180     return (_doscan(&strbuf, "%d", ap))
15181   ;
15182   return 0;
15183 }
15184 _ACEOF
15185 rm -f conftest.$ac_objext conftest$ac_exeext
15186 if { (eval echo "$as_me:15186: \"$ac_link\"") >&5
15187   (eval $ac_link) 2>&5
15188   ac_status=$?
15189   echo "$as_me:15189: \$? = $ac_status" >&5
15190   (exit $ac_status); } &&
15191          { ac_try='test -s conftest$ac_exeext'
15192   { (eval echo "$as_me:15192: \"$ac_try\"") >&5
15193   (eval $ac_try) 2>&5
15194   ac_status=$?
15195   echo "$as_me:15195: \$? = $ac_status" >&5
15196   (exit $ac_status); }; }; then
15197   cf_cv_func_vsscanf=_doscan
15198 else
15199   echo "$as_me: failed program was:" >&5
15200 cat conftest.$ac_ext >&5
15201
15202 cf_cv_func_vsscanf=no
15203 fi
15204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15205 fi
15206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15207 fi
15208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15209 fi
15210 echo "$as_me:15210: result: $cf_cv_func_vsscanf" >&5
15211 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15212
15213 case $cf_cv_func_vsscanf in #(vi
15214 vsscanf) cat >>confdefs.h <<\EOF
15215 #define HAVE_VSSCANF 1
15216 EOF
15217 ;; #(vi
15218 vfscanf) cat >>confdefs.h <<\EOF
15219 #define HAVE_VFSCANF 1
15220 EOF
15221 ;; #(vi
15222 _doscan) cat >>confdefs.h <<\EOF
15223 #define HAVE__DOSCAN 1
15224 EOF
15225 ;;
15226 esac
15227
15228 echo "$as_me:15228: checking for working mkstemp" >&5
15229 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15230 if test "${cf_cv_func_mkstemp+set}" = set; then
15231   echo $ECHO_N "(cached) $ECHO_C" >&6
15232 else
15233
15234 rm -rf conftest*
15235 if test "$cross_compiling" = yes; then
15236   echo "$as_me:15236: checking for mkstemp" >&5
15237 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15238 if test "${ac_cv_func_mkstemp+set}" = set; then
15239   echo $ECHO_N "(cached) $ECHO_C" >&6
15240 else
15241   cat >conftest.$ac_ext <<_ACEOF
15242 #line 15242 "configure"
15243 #include "confdefs.h"
15244 /* System header to define __stub macros and hopefully few prototypes,
15245     which can conflict with char mkstemp (); below.  */
15246 #include <assert.h>
15247 /* Override any gcc2 internal prototype to avoid an error.  */
15248 #ifdef __cplusplus
15249 extern "C"
15250 #endif
15251 /* We use char because int might match the return type of a gcc2
15252    builtin and then its argument prototype would still apply.  */
15253 char mkstemp ();
15254 char (*f) ();
15255
15256 int
15257 main ()
15258 {
15259 /* The GNU C library defines this for functions which it implements
15260     to always fail with ENOSYS.  Some functions are actually named
15261     something starting with __ and the normal name is an alias.  */
15262 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15263 choke me
15264 #else
15265 f = mkstemp;
15266 #endif
15267
15268   ;
15269   return 0;
15270 }
15271 _ACEOF
15272 rm -f conftest.$ac_objext conftest$ac_exeext
15273 if { (eval echo "$as_me:15273: \"$ac_link\"") >&5
15274   (eval $ac_link) 2>&5
15275   ac_status=$?
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); } &&
15278          { ac_try='test -s conftest$ac_exeext'
15279   { (eval echo "$as_me:15279: \"$ac_try\"") >&5
15280   (eval $ac_try) 2>&5
15281   ac_status=$?
15282   echo "$as_me:15282: \$? = $ac_status" >&5
15283   (exit $ac_status); }; }; then
15284   ac_cv_func_mkstemp=yes
15285 else
15286   echo "$as_me: failed program was:" >&5
15287 cat conftest.$ac_ext >&5
15288 ac_cv_func_mkstemp=no
15289 fi
15290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15291 fi
15292 echo "$as_me:15292: result: $ac_cv_func_mkstemp" >&5
15293 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15294
15295 else
15296   cat >conftest.$ac_ext <<_ACEOF
15297 #line 15297 "configure"
15298 #include "confdefs.h"
15299
15300 #include <sys/types.h>
15301 #include <stdlib.h>
15302 #include <stdio.h>
15303 #include <string.h>
15304 #include <sys/stat.h>
15305 int main()
15306 {
15307         char *tmpl = "conftestXXXXXX";
15308         char name[2][80];
15309         int n;
15310         int result = 0;
15311         int fd;
15312         struct stat sb;
15313
15314         umask(077);
15315         for (n = 0; n < 2; ++n) {
15316                 strcpy(name[n], tmpl);
15317                 if ((fd = mkstemp(name[n])) >= 0) {
15318                         if (!strcmp(name[n], tmpl)
15319                          || stat(name[n], &sb) != 0
15320                          || (sb.st_mode & S_IFMT) != S_IFREG
15321                          || (sb.st_mode & 077) != 0) {
15322                                 result = 1;
15323                         }
15324                         close(fd);
15325                 }
15326         }
15327         if (result == 0
15328          && !strcmp(name[0], name[1]))
15329                 result = 1;
15330         ${cf_cv_main_return:-return}(result);
15331 }
15332
15333 _ACEOF
15334 rm -f conftest$ac_exeext
15335 if { (eval echo "$as_me:15335: \"$ac_link\"") >&5
15336   (eval $ac_link) 2>&5
15337   ac_status=$?
15338   echo "$as_me:15338: \$? = $ac_status" >&5
15339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15340   { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341   (eval $ac_try) 2>&5
15342   ac_status=$?
15343   echo "$as_me:15343: \$? = $ac_status" >&5
15344   (exit $ac_status); }; }; then
15345   cf_cv_func_mkstemp=yes
15346
15347 else
15348   echo "$as_me: program exited with status $ac_status" >&5
15349 echo "$as_me: failed program was:" >&5
15350 cat conftest.$ac_ext >&5
15351 cf_cv_func_mkstemp=no
15352
15353 fi
15354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15355 fi
15356
15357 fi
15358 echo "$as_me:15358: result: $cf_cv_func_mkstemp" >&5
15359 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15360 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15361         cat >>confdefs.h <<\EOF
15362 #define HAVE_MKSTEMP 1
15363 EOF
15364
15365 fi
15366
15367 # setup for prototype of fallback for vsscanf()
15368
15369 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15370         HAVE_VSSCANF=1
15371 else
15372         HAVE_VSSCANF=0
15373 fi
15374
15375 if test "$cross_compiling" = yes ; then
15376         { echo "$as_me:15376: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15377 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15378 else
15379         echo "$as_me:15379: checking whether setvbuf arguments are reversed" >&5
15380 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15381 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384   if test "$cross_compiling" = yes; then
15385   { { echo "$as_me:15385: error: cannot run test program while cross compiling" >&5
15386 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15387    { (exit 1); exit 1; }; }
15388 else
15389   cat >conftest.$ac_ext <<_ACEOF
15390 #line 15390 "configure"
15391 #include "confdefs.h"
15392 #include <stdio.h>
15393 /* If setvbuf has the reversed format, exit 0. */
15394 int
15395 main ()
15396 {
15397   /* This call has the arguments reversed.
15398      A reversed system may check and see that the address of main
15399      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15400   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15401     $ac_main_return(1);
15402   putc('\r', stdout);
15403   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15404 }
15405 _ACEOF
15406 rm -f conftest$ac_exeext
15407 if { (eval echo "$as_me:15407: \"$ac_link\"") >&5
15408   (eval $ac_link) 2>&5
15409   ac_status=$?
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15412   { (eval echo "$as_me:15412: \"$ac_try\"") >&5
15413   (eval $ac_try) 2>&5
15414   ac_status=$?
15415   echo "$as_me:15415: \$? = $ac_status" >&5
15416   (exit $ac_status); }; }; then
15417   ac_cv_func_setvbuf_reversed=yes
15418 else
15419   echo "$as_me: program exited with status $ac_status" >&5
15420 echo "$as_me: failed program was:" >&5
15421 cat conftest.$ac_ext >&5
15422 ac_cv_func_setvbuf_reversed=no
15423 fi
15424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15425 fi
15426 rm -f core core.* *.core
15427 fi
15428 echo "$as_me:15428: result: $ac_cv_func_setvbuf_reversed" >&5
15429 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15430 if test $ac_cv_func_setvbuf_reversed = yes; then
15431
15432 cat >>confdefs.h <<\EOF
15433 #define SETVBUF_REVERSED 1
15434 EOF
15435
15436 fi
15437
15438 fi
15439 echo "$as_me:15439: checking return type of signal handlers" >&5
15440 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15441 if test "${ac_cv_type_signal+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   cat >conftest.$ac_ext <<_ACEOF
15445 #line 15445 "configure"
15446 #include "confdefs.h"
15447 #include <sys/types.h>
15448 #include <signal.h>
15449 #ifdef signal
15450 # undef signal
15451 #endif
15452 #ifdef __cplusplus
15453 extern "C" void (*signal (int, void (*)(int)))(int);
15454 #else
15455 void (*signal ()) ();
15456 #endif
15457
15458 int
15459 main ()
15460 {
15461 int i;
15462   ;
15463   return 0;
15464 }
15465 _ACEOF
15466 rm -f conftest.$ac_objext
15467 if { (eval echo "$as_me:15467: \"$ac_compile\"") >&5
15468   (eval $ac_compile) 2>&5
15469   ac_status=$?
15470   echo "$as_me:15470: \$? = $ac_status" >&5
15471   (exit $ac_status); } &&
15472          { ac_try='test -s conftest.$ac_objext'
15473   { (eval echo "$as_me:15473: \"$ac_try\"") >&5
15474   (eval $ac_try) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit $ac_status); }; }; then
15478   ac_cv_type_signal=void
15479 else
15480   echo "$as_me: failed program was:" >&5
15481 cat conftest.$ac_ext >&5
15482 ac_cv_type_signal=int
15483 fi
15484 rm -f conftest.$ac_objext conftest.$ac_ext
15485 fi
15486 echo "$as_me:15486: result: $ac_cv_type_signal" >&5
15487 echo "${ECHO_T}$ac_cv_type_signal" >&6
15488
15489 cat >>confdefs.h <<EOF
15490 #define RETSIGTYPE $ac_cv_type_signal
15491 EOF
15492
15493 echo "$as_me:15493: checking for type sigaction_t" >&5
15494 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15495 if test "${cf_cv_type_sigaction+set}" = set; then
15496   echo $ECHO_N "(cached) $ECHO_C" >&6
15497 else
15498
15499         cat >conftest.$ac_ext <<_ACEOF
15500 #line 15500 "configure"
15501 #include "confdefs.h"
15502
15503 #include <signal.h>
15504 int
15505 main ()
15506 {
15507 sigaction_t x
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 rm -f conftest.$ac_objext
15513 if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514   (eval $ac_compile) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -s conftest.$ac_objext'
15519   { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524   cf_cv_type_sigaction=yes
15525 else
15526   echo "$as_me: failed program was:" >&5
15527 cat conftest.$ac_ext >&5
15528 cf_cv_type_sigaction=no
15529 fi
15530 rm -f conftest.$ac_objext conftest.$ac_ext
15531 fi
15532
15533 echo "$as_me:15533: result: $cf_cv_type_sigaction" >&5
15534 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15535 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15536 #define HAVE_TYPE_SIGACTION 1
15537 EOF
15538
15539 echo "$as_me:15539: checking declaration of size-change" >&5
15540 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15541 if test "${cf_cv_sizechange+set}" = set; then
15542   echo $ECHO_N "(cached) $ECHO_C" >&6
15543 else
15544
15545     cf_cv_sizechange=unknown
15546     cf_save_CPPFLAGS="$CPPFLAGS"
15547
15548 for cf_opts in "" "NEED_PTEM_H"
15549 do
15550
15551     CPPFLAGS="$cf_save_CPPFLAGS"
15552     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15553     cat >conftest.$ac_ext <<_ACEOF
15554 #line 15554 "configure"
15555 #include "confdefs.h"
15556 #include <sys/types.h>
15557 #ifdef HAVE_TERMIOS_H
15558 #include <termios.h>
15559 #else
15560 #ifdef HAVE_TERMIO_H
15561 #include <termio.h>
15562 #endif
15563 #endif
15564 #ifdef NEED_PTEM_H
15565 /* This is a workaround for SCO:  they neglected to define struct winsize in
15566  * termios.h -- it's only in termio.h and ptem.h
15567  */
15568 #include        <sys/stream.h>
15569 #include        <sys/ptem.h>
15570 #endif
15571 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15572 #include <sys/ioctl.h>
15573 #endif
15574
15575 int
15576 main ()
15577 {
15578
15579 #ifdef TIOCGSIZE
15580         struct ttysize win;     /* FIXME: what system is this? */
15581         int y = win.ts_lines;
15582         int x = win.ts_cols;
15583 #else
15584 #ifdef TIOCGWINSZ
15585         struct winsize win;
15586         int y = win.ws_row;
15587         int x = win.ws_col;
15588 #else
15589         no TIOCGSIZE or TIOCGWINSZ
15590 #endif /* TIOCGWINSZ */
15591 #endif /* TIOCGSIZE */
15592
15593   ;
15594   return 0;
15595 }
15596 _ACEOF
15597 rm -f conftest.$ac_objext
15598 if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599   (eval $ac_compile) 2>&5
15600   ac_status=$?
15601   echo "$as_me:15601: \$? = $ac_status" >&5
15602   (exit $ac_status); } &&
15603          { ac_try='test -s conftest.$ac_objext'
15604   { (eval echo "$as_me:15604: \"$ac_try\"") >&5
15605   (eval $ac_try) 2>&5
15606   ac_status=$?
15607   echo "$as_me:15607: \$? = $ac_status" >&5
15608   (exit $ac_status); }; }; then
15609   cf_cv_sizechange=yes
15610 else
15611   echo "$as_me: failed program was:" >&5
15612 cat conftest.$ac_ext >&5
15613 cf_cv_sizechange=no
15614 fi
15615 rm -f conftest.$ac_objext conftest.$ac_ext
15616
15617         CPPFLAGS="$cf_save_CPPFLAGS"
15618         if test "$cf_cv_sizechange" = yes ; then
15619                 echo "size-change succeeded ($cf_opts)" >&5
15620                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15621                 break
15622         fi
15623 done
15624
15625 fi
15626 echo "$as_me:15626: result: $cf_cv_sizechange" >&5
15627 echo "${ECHO_T}$cf_cv_sizechange" >&6
15628 if test "$cf_cv_sizechange" != no ; then
15629         cat >>confdefs.h <<\EOF
15630 #define HAVE_SIZECHANGE 1
15631 EOF
15632
15633         case $cf_cv_sizechange in #(vi
15634         NEED*)
15635                 cat >>confdefs.h <<EOF
15636 #define $cf_cv_sizechange  1
15637 EOF
15638
15639                 ;;
15640         esac
15641 fi
15642
15643 echo "$as_me:15643: checking for memmove" >&5
15644 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15645 if test "${ac_cv_func_memmove+set}" = set; then
15646   echo $ECHO_N "(cached) $ECHO_C" >&6
15647 else
15648   cat >conftest.$ac_ext <<_ACEOF
15649 #line 15649 "configure"
15650 #include "confdefs.h"
15651 /* System header to define __stub macros and hopefully few prototypes,
15652     which can conflict with char memmove (); below.  */
15653 #include <assert.h>
15654 /* Override any gcc2 internal prototype to avoid an error.  */
15655 #ifdef __cplusplus
15656 extern "C"
15657 #endif
15658 /* We use char because int might match the return type of a gcc2
15659    builtin and then its argument prototype would still apply.  */
15660 char memmove ();
15661 char (*f) ();
15662
15663 int
15664 main ()
15665 {
15666 /* The GNU C library defines this for functions which it implements
15667     to always fail with ENOSYS.  Some functions are actually named
15668     something starting with __ and the normal name is an alias.  */
15669 #if defined (__stub_memmove) || defined (__stub___memmove)
15670 choke me
15671 #else
15672 f = memmove;
15673 #endif
15674
15675   ;
15676   return 0;
15677 }
15678 _ACEOF
15679 rm -f conftest.$ac_objext conftest$ac_exeext
15680 if { (eval echo "$as_me:15680: \"$ac_link\"") >&5
15681   (eval $ac_link) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); } &&
15685          { ac_try='test -s conftest$ac_exeext'
15686   { (eval echo "$as_me:15686: \"$ac_try\"") >&5
15687   (eval $ac_try) 2>&5
15688   ac_status=$?
15689   echo "$as_me:15689: \$? = $ac_status" >&5
15690   (exit $ac_status); }; }; then
15691   ac_cv_func_memmove=yes
15692 else
15693   echo "$as_me: failed program was:" >&5
15694 cat conftest.$ac_ext >&5
15695 ac_cv_func_memmove=no
15696 fi
15697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15698 fi
15699 echo "$as_me:15699: result: $ac_cv_func_memmove" >&5
15700 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15701 if test $ac_cv_func_memmove = yes; then
15702   :
15703 else
15704
15705 echo "$as_me:15705: checking for bcopy" >&5
15706 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15707 if test "${ac_cv_func_bcopy+set}" = set; then
15708   echo $ECHO_N "(cached) $ECHO_C" >&6
15709 else
15710   cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713 /* System header to define __stub macros and hopefully few prototypes,
15714     which can conflict with char bcopy (); below.  */
15715 #include <assert.h>
15716 /* Override any gcc2 internal prototype to avoid an error.  */
15717 #ifdef __cplusplus
15718 extern "C"
15719 #endif
15720 /* We use char because int might match the return type of a gcc2
15721    builtin and then its argument prototype would still apply.  */
15722 char bcopy ();
15723 char (*f) ();
15724
15725 int
15726 main ()
15727 {
15728 /* The GNU C library defines this for functions which it implements
15729     to always fail with ENOSYS.  Some functions are actually named
15730     something starting with __ and the normal name is an alias.  */
15731 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15732 choke me
15733 #else
15734 f = bcopy;
15735 #endif
15736
15737   ;
15738   return 0;
15739 }
15740 _ACEOF
15741 rm -f conftest.$ac_objext conftest$ac_exeext
15742 if { (eval echo "$as_me:15742: \"$ac_link\"") >&5
15743   (eval $ac_link) 2>&5
15744   ac_status=$?
15745   echo "$as_me:15745: \$? = $ac_status" >&5
15746   (exit $ac_status); } &&
15747          { ac_try='test -s conftest$ac_exeext'
15748   { (eval echo "$as_me:15748: \"$ac_try\"") >&5
15749   (eval $ac_try) 2>&5
15750   ac_status=$?
15751   echo "$as_me:15751: \$? = $ac_status" >&5
15752   (exit $ac_status); }; }; then
15753   ac_cv_func_bcopy=yes
15754 else
15755   echo "$as_me: failed program was:" >&5
15756 cat conftest.$ac_ext >&5
15757 ac_cv_func_bcopy=no
15758 fi
15759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15760 fi
15761 echo "$as_me:15761: result: $ac_cv_func_bcopy" >&5
15762 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15763 if test $ac_cv_func_bcopy = yes; then
15764
15765         echo "$as_me:15765: checking if bcopy does overlapping moves" >&5
15766 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15767 if test "${cf_cv_good_bcopy+set}" = set; then
15768   echo $ECHO_N "(cached) $ECHO_C" >&6
15769 else
15770
15771                 if test "$cross_compiling" = yes; then
15772   cf_cv_good_bcopy=unknown
15773 else
15774   cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777
15778 int main() {
15779         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15780         char temp[40];
15781         bcopy(data, temp, sizeof(data));
15782         bcopy(temp+10, temp, 15);
15783         bcopy(temp+5, temp+15, 10);
15784         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15785 }
15786
15787 _ACEOF
15788 rm -f conftest$ac_exeext
15789 if { (eval echo "$as_me:15789: \"$ac_link\"") >&5
15790   (eval $ac_link) 2>&5
15791   ac_status=$?
15792   echo "$as_me:15792: \$? = $ac_status" >&5
15793   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15794   { (eval echo "$as_me:15794: \"$ac_try\"") >&5
15795   (eval $ac_try) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); }; }; then
15799   cf_cv_good_bcopy=yes
15800 else
15801   echo "$as_me: program exited with status $ac_status" >&5
15802 echo "$as_me: failed program was:" >&5
15803 cat conftest.$ac_ext >&5
15804 cf_cv_good_bcopy=no
15805 fi
15806 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15807 fi
15808
15809 fi
15810 echo "$as_me:15810: result: $cf_cv_good_bcopy" >&5
15811 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15812
15813 else
15814   cf_cv_good_bcopy=no
15815 fi
15816
15817         if test "$cf_cv_good_bcopy" = yes ; then
15818                 cat >>confdefs.h <<\EOF
15819 #define USE_OK_BCOPY 1
15820 EOF
15821
15822         else
15823                 cat >>confdefs.h <<\EOF
15824 #define USE_MY_MEMMOVE 1
15825 EOF
15826
15827         fi
15828
15829 fi
15830
15831 echo "$as_me:15831: checking if poll really works" >&5
15832 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15833 if test "${cf_cv_working_poll+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836
15837 if test "$cross_compiling" = yes; then
15838   cf_cv_working_poll=unknown
15839 else
15840   cat >conftest.$ac_ext <<_ACEOF
15841 #line 15841 "configure"
15842 #include "confdefs.h"
15843
15844 #include <stdio.h>
15845 #ifdef HAVE_POLL_H
15846 #include <poll.h>
15847 #else
15848 #include <sys/poll.h>
15849 #endif
15850 int main() {
15851         struct pollfd myfds;
15852         int ret;
15853
15854         myfds.fd = 0;
15855         myfds.events = POLLIN;
15856
15857         ret = poll(&myfds, 1, 100);
15858         ${cf_cv_main_return:-return}(ret != 0);
15859 }
15860 _ACEOF
15861 rm -f conftest$ac_exeext
15862 if { (eval echo "$as_me:15862: \"$ac_link\"") >&5
15863   (eval $ac_link) 2>&5
15864   ac_status=$?
15865   echo "$as_me:15865: \$? = $ac_status" >&5
15866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15867   { (eval echo "$as_me:15867: \"$ac_try\"") >&5
15868   (eval $ac_try) 2>&5
15869   ac_status=$?
15870   echo "$as_me:15870: \$? = $ac_status" >&5
15871   (exit $ac_status); }; }; then
15872   cf_cv_working_poll=yes
15873 else
15874   echo "$as_me: program exited with status $ac_status" >&5
15875 echo "$as_me: failed program was:" >&5
15876 cat conftest.$ac_ext >&5
15877 cf_cv_working_poll=no
15878 fi
15879 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15880 fi
15881 fi
15882 echo "$as_me:15882: result: $cf_cv_working_poll" >&5
15883 echo "${ECHO_T}$cf_cv_working_poll" >&6
15884 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15885 #define HAVE_WORKING_POLL 1
15886 EOF
15887
15888 echo "$as_me:15888: checking for va_copy" >&5
15889 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15890 if test "${cf_cv_have_va_copy+set}" = set; then
15891   echo $ECHO_N "(cached) $ECHO_C" >&6
15892 else
15893
15894 cat >conftest.$ac_ext <<_ACEOF
15895 #line 15895 "configure"
15896 #include "confdefs.h"
15897
15898 #include <stdarg.h>
15899
15900 int
15901 main ()
15902 {
15903
15904         static va_list dst;
15905         static va_list src;
15906         va_copy(dst, src)
15907   ;
15908   return 0;
15909 }
15910 _ACEOF
15911 rm -f conftest.$ac_objext conftest$ac_exeext
15912 if { (eval echo "$as_me:15912: \"$ac_link\"") >&5
15913   (eval $ac_link) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); } &&
15917          { ac_try='test -s conftest$ac_exeext'
15918   { (eval echo "$as_me:15918: \"$ac_try\"") >&5
15919   (eval $ac_try) 2>&5
15920   ac_status=$?
15921   echo "$as_me:15921: \$? = $ac_status" >&5
15922   (exit $ac_status); }; }; then
15923   cf_cv_have_va_copy=yes
15924 else
15925   echo "$as_me: failed program was:" >&5
15926 cat conftest.$ac_ext >&5
15927 cf_cv_have_va_copy=no
15928 fi
15929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15930 fi
15931 echo "$as_me:15931: result: $cf_cv_have_va_copy" >&5
15932 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15933
15934 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15935 #define HAVE_VA_COPY 1
15936 EOF
15937
15938 echo "$as_me:15938: checking for __va_copy" >&5
15939 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15940 if test "${cf_cv_have___va_copy+set}" = set; then
15941   echo $ECHO_N "(cached) $ECHO_C" >&6
15942 else
15943
15944 cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15947
15948 #include <stdarg.h>
15949
15950 int
15951 main ()
15952 {
15953
15954         static va_list dst;
15955         static va_list src;
15956         __va_copy(dst, src)
15957   ;
15958   return 0;
15959 }
15960 _ACEOF
15961 rm -f conftest.$ac_objext conftest$ac_exeext
15962 if { (eval echo "$as_me:15962: \"$ac_link\"") >&5
15963   (eval $ac_link) 2>&5
15964   ac_status=$?
15965   echo "$as_me:15965: \$? = $ac_status" >&5
15966   (exit $ac_status); } &&
15967          { ac_try='test -s conftest$ac_exeext'
15968   { (eval echo "$as_me:15968: \"$ac_try\"") >&5
15969   (eval $ac_try) 2>&5
15970   ac_status=$?
15971   echo "$as_me:15971: \$? = $ac_status" >&5
15972   (exit $ac_status); }; }; then
15973   cf_cv_have___va_copy=yes
15974 else
15975   echo "$as_me: failed program was:" >&5
15976 cat conftest.$ac_ext >&5
15977 cf_cv_have___va_copy=no
15978 fi
15979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15980 fi
15981 echo "$as_me:15981: result: $cf_cv_have___va_copy" >&5
15982 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15983
15984 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15985 #define HAVE___VA_COPY 1
15986 EOF
15987
15988 echo "$as_me:15988: checking for pid_t" >&5
15989 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15990 if test "${ac_cv_type_pid_t+set}" = set; then
15991   echo $ECHO_N "(cached) $ECHO_C" >&6
15992 else
15993   cat >conftest.$ac_ext <<_ACEOF
15994 #line 15994 "configure"
15995 #include "confdefs.h"
15996 $ac_includes_default
15997 int
15998 main ()
15999 {
16000 if ((pid_t *) 0)
16001   return 0;
16002 if (sizeof (pid_t))
16003   return 0;
16004   ;
16005   return 0;
16006 }
16007 _ACEOF
16008 rm -f conftest.$ac_objext
16009 if { (eval echo "$as_me:16009: \"$ac_compile\"") >&5
16010   (eval $ac_compile) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); } &&
16014          { ac_try='test -s conftest.$ac_objext'
16015   { (eval echo "$as_me:16015: \"$ac_try\"") >&5
16016   (eval $ac_try) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); }; }; then
16020   ac_cv_type_pid_t=yes
16021 else
16022   echo "$as_me: failed program was:" >&5
16023 cat conftest.$ac_ext >&5
16024 ac_cv_type_pid_t=no
16025 fi
16026 rm -f conftest.$ac_objext conftest.$ac_ext
16027 fi
16028 echo "$as_me:16028: result: $ac_cv_type_pid_t" >&5
16029 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16030 if test $ac_cv_type_pid_t = yes; then
16031   :
16032 else
16033
16034 cat >>confdefs.h <<EOF
16035 #define pid_t int
16036 EOF
16037
16038 fi
16039
16040 for ac_header in unistd.h vfork.h
16041 do
16042 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16043 echo "$as_me:16043: checking for $ac_header" >&5
16044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16046   echo $ECHO_N "(cached) $ECHO_C" >&6
16047 else
16048   cat >conftest.$ac_ext <<_ACEOF
16049 #line 16049 "configure"
16050 #include "confdefs.h"
16051 #include <$ac_header>
16052 _ACEOF
16053 if { (eval echo "$as_me:16053: \"$ac_cpp conftest.$ac_ext\"") >&5
16054   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16055   ac_status=$?
16056   egrep -v '^ *\+' conftest.er1 >conftest.err
16057   rm -f conftest.er1
16058   cat conftest.err >&5
16059   echo "$as_me:16059: \$? = $ac_status" >&5
16060   (exit $ac_status); } >/dev/null; then
16061   if test -s conftest.err; then
16062     ac_cpp_err=$ac_c_preproc_warn_flag
16063   else
16064     ac_cpp_err=
16065   fi
16066 else
16067   ac_cpp_err=yes
16068 fi
16069 if test -z "$ac_cpp_err"; then
16070   eval "$as_ac_Header=yes"
16071 else
16072   echo "$as_me: failed program was:" >&5
16073   cat conftest.$ac_ext >&5
16074   eval "$as_ac_Header=no"
16075 fi
16076 rm -f conftest.err conftest.$ac_ext
16077 fi
16078 echo "$as_me:16078: result: `eval echo '${'$as_ac_Header'}'`" >&5
16079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16080 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16081   cat >>confdefs.h <<EOF
16082 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16083 EOF
16084
16085 fi
16086 done
16087
16088 for ac_func in fork vfork
16089 do
16090 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16091 echo "$as_me:16091: checking for $ac_func" >&5
16092 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16093 if eval "test \"\${$as_ac_var+set}\" = set"; then
16094   echo $ECHO_N "(cached) $ECHO_C" >&6
16095 else
16096   cat >conftest.$ac_ext <<_ACEOF
16097 #line 16097 "configure"
16098 #include "confdefs.h"
16099 /* System header to define __stub macros and hopefully few prototypes,
16100     which can conflict with char $ac_func (); below.  */
16101 #include <assert.h>
16102 /* Override any gcc2 internal prototype to avoid an error.  */
16103 #ifdef __cplusplus
16104 extern "C"
16105 #endif
16106 /* We use char because int might match the return type of a gcc2
16107    builtin and then its argument prototype would still apply.  */
16108 char $ac_func ();
16109 char (*f) ();
16110
16111 int
16112 main ()
16113 {
16114 /* The GNU C library defines this for functions which it implements
16115     to always fail with ENOSYS.  Some functions are actually named
16116     something starting with __ and the normal name is an alias.  */
16117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16118 choke me
16119 #else
16120 f = $ac_func;
16121 #endif
16122
16123   ;
16124   return 0;
16125 }
16126 _ACEOF
16127 rm -f conftest.$ac_objext conftest$ac_exeext
16128 if { (eval echo "$as_me:16128: \"$ac_link\"") >&5
16129   (eval $ac_link) 2>&5
16130   ac_status=$?
16131   echo "$as_me:16131: \$? = $ac_status" >&5
16132   (exit $ac_status); } &&
16133          { ac_try='test -s conftest$ac_exeext'
16134   { (eval echo "$as_me:16134: \"$ac_try\"") >&5
16135   (eval $ac_try) 2>&5
16136   ac_status=$?
16137   echo "$as_me:16137: \$? = $ac_status" >&5
16138   (exit $ac_status); }; }; then
16139   eval "$as_ac_var=yes"
16140 else
16141   echo "$as_me: failed program was:" >&5
16142 cat conftest.$ac_ext >&5
16143 eval "$as_ac_var=no"
16144 fi
16145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16146 fi
16147 echo "$as_me:16147: result: `eval echo '${'$as_ac_var'}'`" >&5
16148 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16149 if test `eval echo '${'$as_ac_var'}'` = yes; then
16150   cat >>confdefs.h <<EOF
16151 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16152 EOF
16153
16154 fi
16155 done
16156
16157 ac_cv_func_fork_works=$ac_cv_func_fork
16158 if test "x$ac_cv_func_fork" = xyes; then
16159   echo "$as_me:16159: checking for working fork" >&5
16160 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16161 if test "${ac_cv_func_fork_works+set}" = set; then
16162   echo $ECHO_N "(cached) $ECHO_C" >&6
16163 else
16164   if test "$cross_compiling" = yes; then
16165   ac_cv_func_fork_works=cross
16166 else
16167   cat >conftest.$ac_ext <<_ACEOF
16168 /* By Rüdiger Kuhlmann. */
16169       #include <sys/types.h>
16170       #if HAVE_UNISTD_H
16171       # include <unistd.h>
16172       #endif
16173       /* Some systems only have a dummy stub for fork() */
16174       int main ()
16175       {
16176         if (fork() < 0)
16177           $ac_main_return (1);
16178         $ac_main_return (0);
16179       }
16180 _ACEOF
16181 rm -f conftest$ac_exeext
16182 if { (eval echo "$as_me:16182: \"$ac_link\"") >&5
16183   (eval $ac_link) 2>&5
16184   ac_status=$?
16185   echo "$as_me:16185: \$? = $ac_status" >&5
16186   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16187   { (eval echo "$as_me:16187: \"$ac_try\"") >&5
16188   (eval $ac_try) 2>&5
16189   ac_status=$?
16190   echo "$as_me:16190: \$? = $ac_status" >&5
16191   (exit $ac_status); }; }; then
16192   ac_cv_func_fork_works=yes
16193 else
16194   echo "$as_me: program exited with status $ac_status" >&5
16195 echo "$as_me: failed program was:" >&5
16196 cat conftest.$ac_ext >&5
16197 ac_cv_func_fork_works=no
16198 fi
16199 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16200 fi
16201 fi
16202 echo "$as_me:16202: result: $ac_cv_func_fork_works" >&5
16203 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16204
16205 fi
16206 if test "x$ac_cv_func_fork_works" = xcross; then
16207   case $host in
16208     *-*-amigaos* | *-*-msdosdjgpp*)
16209       # Override, as these systems have only a dummy fork() stub
16210       ac_cv_func_fork_works=no
16211       ;;
16212     *)
16213       ac_cv_func_fork_works=yes
16214       ;;
16215   esac
16216   { echo "$as_me:16216: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16217 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16218 fi
16219 ac_cv_func_vfork_works=$ac_cv_func_vfork
16220 if test "x$ac_cv_func_vfork" = xyes; then
16221   echo "$as_me:16221: checking for working vfork" >&5
16222 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16223 if test "${ac_cv_func_vfork_works+set}" = set; then
16224   echo $ECHO_N "(cached) $ECHO_C" >&6
16225 else
16226   if test "$cross_compiling" = yes; then
16227   ac_cv_func_vfork_works=cross
16228 else
16229   cat >conftest.$ac_ext <<_ACEOF
16230 #line 16230 "configure"
16231 #include "confdefs.h"
16232 /* Thanks to Paul Eggert for this test.  */
16233 #include <stdio.h>
16234 #include <sys/types.h>
16235 #include <sys/stat.h>
16236 #if HAVE_UNISTD_H
16237 # include <unistd.h>
16238 #endif
16239 #if HAVE_VFORK_H
16240 # include <vfork.h>
16241 #endif
16242 /* On some sparc systems, changes by the child to local and incoming
16243    argument registers are propagated back to the parent.  The compiler
16244    is told about this with #include <vfork.h>, but some compilers
16245    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16246    static variable whose address is put into a register that is
16247    clobbered by the vfork.  */
16248 static
16249 #ifdef __cplusplus
16250 sparc_address_test (int arg)
16251 # else
16252 sparc_address_test (arg) int arg;
16253 #endif
16254 {
16255   static pid_t child;
16256   if (!child) {
16257     child = vfork ();
16258     if (child < 0) {
16259       perror ("vfork");
16260       _exit(2);
16261     }
16262     if (!child) {
16263       arg = getpid();
16264       write(-1, "", 0);
16265       _exit (arg);
16266     }
16267   }
16268 }
16269
16270 int
16271 main ()
16272 {
16273   pid_t parent = getpid ();
16274   pid_t child;
16275
16276   sparc_address_test ();
16277
16278   child = vfork ();
16279
16280   if (child == 0) {
16281     /* Here is another test for sparc vfork register problems.  This
16282        test uses lots of local variables, at least as many local
16283        variables as main has allocated so far including compiler
16284        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16285        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16286        reuse the register of parent for one of the local variables,
16287        since it will think that parent can't possibly be used any more
16288        in this routine.  Assigning to the local variable will thus
16289        munge parent in the parent process.  */
16290     pid_t
16291       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16292       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16293     /* Convince the compiler that p..p7 are live; otherwise, it might
16294        use the same hardware register for all 8 local variables.  */
16295     if (p != p1 || p != p2 || p != p3 || p != p4
16296         || p != p5 || p != p6 || p != p7)
16297       _exit(1);
16298
16299     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16300        from child file descriptors.  If the child closes a descriptor
16301        before it execs or exits, this munges the parent's descriptor
16302        as well.  Test for this by closing stdout in the child.  */
16303     _exit(close(fileno(stdout)) != 0);
16304   } else {
16305     int status;
16306     struct stat st;
16307
16308     while (wait(&status) != child)
16309       ;
16310     $ac_main_return(
16311          /* Was there some problem with vforking?  */
16312          child < 0
16313
16314          /* Did the child fail?  (This shouldn't happen.)  */
16315          || status
16316
16317          /* Did the vfork/compiler bug occur?  */
16318          || parent != getpid()
16319
16320          /* Did the file descriptor bug occur?  */
16321          || fstat(fileno(stdout), &st) != 0
16322          );
16323   }
16324 }
16325 _ACEOF
16326 rm -f conftest$ac_exeext
16327 if { (eval echo "$as_me:16327: \"$ac_link\"") >&5
16328   (eval $ac_link) 2>&5
16329   ac_status=$?
16330   echo "$as_me:16330: \$? = $ac_status" >&5
16331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16332   { (eval echo "$as_me:16332: \"$ac_try\"") >&5
16333   (eval $ac_try) 2>&5
16334   ac_status=$?
16335   echo "$as_me:16335: \$? = $ac_status" >&5
16336   (exit $ac_status); }; }; then
16337   ac_cv_func_vfork_works=yes
16338 else
16339   echo "$as_me: program exited with status $ac_status" >&5
16340 echo "$as_me: failed program was:" >&5
16341 cat conftest.$ac_ext >&5
16342 ac_cv_func_vfork_works=no
16343 fi
16344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16345 fi
16346 fi
16347 echo "$as_me:16347: result: $ac_cv_func_vfork_works" >&5
16348 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16349
16350 fi;
16351 if test "x$ac_cv_func_fork_works" = xcross; then
16352   ac_cv_func_vfork_works=ac_cv_func_vfork
16353   { echo "$as_me:16353: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16354 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16355 fi
16356
16357 if test "x$ac_cv_func_vfork_works" = xyes; then
16358
16359 cat >>confdefs.h <<\EOF
16360 #define HAVE_WORKING_VFORK 1
16361 EOF
16362
16363 else
16364
16365 cat >>confdefs.h <<\EOF
16366 #define vfork fork
16367 EOF
16368
16369 fi
16370 if test "x$ac_cv_func_fork_works" = xyes; then
16371
16372 cat >>confdefs.h <<\EOF
16373 #define HAVE_WORKING_FORK 1
16374 EOF
16375
16376 fi
16377
16378 # special check for test/ditto.c
16379
16380 echo "$as_me:16380: checking for openpty in -lutil" >&5
16381 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16382 if test "${ac_cv_lib_util_openpty+set}" = set; then
16383   echo $ECHO_N "(cached) $ECHO_C" >&6
16384 else
16385   ac_check_lib_save_LIBS=$LIBS
16386 LIBS="-lutil  $LIBS"
16387 cat >conftest.$ac_ext <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16390
16391 /* Override any gcc2 internal prototype to avoid an error.  */
16392 #ifdef __cplusplus
16393 extern "C"
16394 #endif
16395 /* We use char because int might match the return type of a gcc2
16396    builtin and then its argument prototype would still apply.  */
16397 char openpty ();
16398 int
16399 main ()
16400 {
16401 openpty ();
16402   ;
16403   return 0;
16404 }
16405 _ACEOF
16406 rm -f conftest.$ac_objext conftest$ac_exeext
16407 if { (eval echo "$as_me:16407: \"$ac_link\"") >&5
16408   (eval $ac_link) 2>&5
16409   ac_status=$?
16410   echo "$as_me:16410: \$? = $ac_status" >&5
16411   (exit $ac_status); } &&
16412          { ac_try='test -s conftest$ac_exeext'
16413   { (eval echo "$as_me:16413: \"$ac_try\"") >&5
16414   (eval $ac_try) 2>&5
16415   ac_status=$?
16416   echo "$as_me:16416: \$? = $ac_status" >&5
16417   (exit $ac_status); }; }; then
16418   ac_cv_lib_util_openpty=yes
16419 else
16420   echo "$as_me: failed program was:" >&5
16421 cat conftest.$ac_ext >&5
16422 ac_cv_lib_util_openpty=no
16423 fi
16424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16425 LIBS=$ac_check_lib_save_LIBS
16426 fi
16427 echo "$as_me:16427: result: $ac_cv_lib_util_openpty" >&5
16428 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16429 if test $ac_cv_lib_util_openpty = yes; then
16430   cf_cv_lib_util=yes
16431 else
16432   cf_cv_lib_util=no
16433 fi
16434
16435 echo "$as_me:16435: checking for openpty header" >&5
16436 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16437 if test "${cf_cv_func_openpty+set}" = set; then
16438   echo $ECHO_N "(cached) $ECHO_C" >&6
16439 else
16440
16441     cf_save_LIBS="$LIBS"
16442     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16443     for cf_header in pty.h libutil.h util.h
16444     do
16445     cat >conftest.$ac_ext <<_ACEOF
16446 #line 16446 "configure"
16447 #include "confdefs.h"
16448
16449 #include <$cf_header>
16450
16451 int
16452 main ()
16453 {
16454
16455     int x = openpty((int *)0, (int *)0, (char *)0,
16456                    (struct termios *)0, (struct winsize *)0);
16457
16458   ;
16459   return 0;
16460 }
16461 _ACEOF
16462 rm -f conftest.$ac_objext conftest$ac_exeext
16463 if { (eval echo "$as_me:16463: \"$ac_link\"") >&5
16464   (eval $ac_link) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit $ac_status); } &&
16468          { ac_try='test -s conftest$ac_exeext'
16469   { (eval echo "$as_me:16469: \"$ac_try\"") >&5
16470   (eval $ac_try) 2>&5
16471   ac_status=$?
16472   echo "$as_me:16472: \$? = $ac_status" >&5
16473   (exit $ac_status); }; }; then
16474
16475         cf_cv_func_openpty=$cf_header
16476         break
16477
16478 else
16479   echo "$as_me: failed program was:" >&5
16480 cat conftest.$ac_ext >&5
16481
16482         cf_cv_func_openpty=no
16483
16484 fi
16485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16486     done
16487     LIBS="$cf_save_LIBS"
16488
16489 fi
16490 echo "$as_me:16490: result: $cf_cv_func_openpty" >&5
16491 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16492
16493 if test "$cf_cv_func_openpty" != no ; then
16494     cat >>confdefs.h <<EOF
16495 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16496 EOF
16497
16498     cat >>confdefs.h <<\EOF
16499 #define USE_XTERM_PTY 1
16500 EOF
16501
16502     if test "$cf_cv_lib_util" = yes ; then
16503         TEST_LIBS="-lutil $TEST_LIBS"
16504     fi
16505 fi
16506
16507 if test "$with_hashed_db" != no ; then
16508         cat >>confdefs.h <<\EOF
16509 #define USE_HASHED_DB 1
16510 EOF
16511
16512 case $with_hashed_db in #(vi
16513 yes|*able*) #(vi
16514     ;;
16515 *)
16516     if test -d "$with_hashed_db" ; then
16517
16518 if test -n "$with_hashed_db/include" ; then
16519   for cf_add_incdir in $with_hashed_db/include
16520   do
16521         while test $cf_add_incdir != /usr/include
16522         do
16523           if test -d $cf_add_incdir
16524           then
16525                 cf_have_incdir=no
16526                 if test -n "$CFLAGS$CPPFLAGS" ; then
16527                   # a loop is needed to ensure we can add subdirs of existing dirs
16528                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16529                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16530                           cf_have_incdir=yes; break
16531                         fi
16532                   done
16533                 fi
16534
16535                 if test "$cf_have_incdir" = no ; then
16536                   if test "$cf_add_incdir" = /usr/local/include ; then
16537                         if test "$GCC" = yes
16538                         then
16539                           cf_save_CPPFLAGS=$CPPFLAGS
16540                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16541                           cat >conftest.$ac_ext <<_ACEOF
16542 #line 16542 "configure"
16543 #include "confdefs.h"
16544 #include <stdio.h>
16545 int
16546 main ()
16547 {
16548 printf("Hello")
16549   ;
16550   return 0;
16551 }
16552 _ACEOF
16553 rm -f conftest.$ac_objext
16554 if { (eval echo "$as_me:16554: \"$ac_compile\"") >&5
16555   (eval $ac_compile) 2>&5
16556   ac_status=$?
16557   echo "$as_me:16557: \$? = $ac_status" >&5
16558   (exit $ac_status); } &&
16559          { ac_try='test -s conftest.$ac_objext'
16560   { (eval echo "$as_me:16560: \"$ac_try\"") >&5
16561   (eval $ac_try) 2>&5
16562   ac_status=$?
16563   echo "$as_me:16563: \$? = $ac_status" >&5
16564   (exit $ac_status); }; }; then
16565   :
16566 else
16567   echo "$as_me: failed program was:" >&5
16568 cat conftest.$ac_ext >&5
16569 cf_have_incdir=yes
16570 fi
16571 rm -f conftest.$ac_objext conftest.$ac_ext
16572                           CPPFLAGS=$cf_save_CPPFLAGS
16573                         fi
16574                   fi
16575                 fi
16576
16577                 if test "$cf_have_incdir" = no ; then
16578                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16579
16580 echo "${as_me:-configure}:16580: testing adding $cf_add_incdir to include-path ..." 1>&5
16581
16582                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16583
16584                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16585                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16586                   cf_add_incdir="$cf_top_incdir"
16587                 else
16588                   break
16589                 fi
16590           fi
16591         done
16592   done
16593 fi
16594
16595 if test -n "$with_hashed_db/lib" ; then
16596   for cf_add_libdir in $with_hashed_db/lib
16597   do
16598     if test $cf_add_libdir = /usr/lib ; then
16599       :
16600     elif test -d $cf_add_libdir
16601     then
16602       cf_have_libdir=no
16603       if test -n "$LDFLAGS$LIBS" ; then
16604         # a loop is needed to ensure we can add subdirs of existing dirs
16605         for cf_test_libdir in $LDFLAGS $LIBS ; do
16606           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16607             cf_have_libdir=yes; break
16608           fi
16609         done
16610       fi
16611       if test "$cf_have_libdir" = no ; then
16612         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16613
16614 echo "${as_me:-configure}:16614: testing adding $cf_add_libdir to library-path ..." 1>&5
16615
16616         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16617       fi
16618     fi
16619   done
16620 fi
16621
16622     fi
16623 esac
16624
16625 echo "$as_me:16625: checking for db.h" >&5
16626 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16627 if test "${ac_cv_header_db_h+set}" = set; then
16628   echo $ECHO_N "(cached) $ECHO_C" >&6
16629 else
16630   cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633 #include <db.h>
16634 _ACEOF
16635 if { (eval echo "$as_me:16635: \"$ac_cpp conftest.$ac_ext\"") >&5
16636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16637   ac_status=$?
16638   egrep -v '^ *\+' conftest.er1 >conftest.err
16639   rm -f conftest.er1
16640   cat conftest.err >&5
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit $ac_status); } >/dev/null; then
16643   if test -s conftest.err; then
16644     ac_cpp_err=$ac_c_preproc_warn_flag
16645   else
16646     ac_cpp_err=
16647   fi
16648 else
16649   ac_cpp_err=yes
16650 fi
16651 if test -z "$ac_cpp_err"; then
16652   ac_cv_header_db_h=yes
16653 else
16654   echo "$as_me: failed program was:" >&5
16655   cat conftest.$ac_ext >&5
16656   ac_cv_header_db_h=no
16657 fi
16658 rm -f conftest.err conftest.$ac_ext
16659 fi
16660 echo "$as_me:16660: result: $ac_cv_header_db_h" >&5
16661 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16662 if test $ac_cv_header_db_h = yes; then
16663
16664 echo "$as_me:16664: checking for version of db" >&5
16665 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16666 if test "${cf_cv_hashed_db_version+set}" = set; then
16667   echo $ECHO_N "(cached) $ECHO_C" >&6
16668 else
16669
16670 cf_cv_hashed_db_version=unknown
16671
16672 for cf_db_version in 1 2 3 4 5
16673 do
16674
16675 echo "${as_me:-configure}:16675: testing checking for db version $cf_db_version ..." 1>&5
16676
16677         cat >conftest.$ac_ext <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16680
16681 $ac_includes_default
16682 #include <db.h>
16683
16684 #ifdef DB_VERSION_MAJOR
16685         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16686 #if $cf_db_version == DB_VERSION_MAJOR
16687         /* ok */
16688 #else
16689         make an error
16690 #endif
16691 #else
16692 #if $cf_db_version == 1
16693         /* ok: assuming this is DB 1.8.5 */
16694 #else
16695         make an error
16696 #endif
16697 #endif
16698
16699 int
16700 main ()
16701 {
16702 DBT *foo = 0
16703   ;
16704   return 0;
16705 }
16706 _ACEOF
16707 rm -f conftest.$ac_objext
16708 if { (eval echo "$as_me:16708: \"$ac_compile\"") >&5
16709   (eval $ac_compile) 2>&5
16710   ac_status=$?
16711   echo "$as_me:16711: \$? = $ac_status" >&5
16712   (exit $ac_status); } &&
16713          { ac_try='test -s conftest.$ac_objext'
16714   { (eval echo "$as_me:16714: \"$ac_try\"") >&5
16715   (eval $ac_try) 2>&5
16716   ac_status=$?
16717   echo "$as_me:16717: \$? = $ac_status" >&5
16718   (exit $ac_status); }; }; then
16719
16720         cf_cv_hashed_db_version=$cf_db_version
16721         break
16722
16723 else
16724   echo "$as_me: failed program was:" >&5
16725 cat conftest.$ac_ext >&5
16726 fi
16727 rm -f conftest.$ac_objext conftest.$ac_ext
16728 done
16729
16730 fi
16731 echo "$as_me:16731: result: $cf_cv_hashed_db_version" >&5
16732 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16733
16734 if test "$cf_cv_hashed_db_version" = unknown ; then
16735         { { echo "$as_me:16735: error: Cannot determine version of db" >&5
16736 echo "$as_me: error: Cannot determine version of db" >&2;}
16737    { (exit 1); exit 1; }; }
16738 else
16739
16740 echo "$as_me:16740: checking for db libraries" >&5
16741 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16742 if test "${cf_cv_hashed_db_libs+set}" = set; then
16743   echo $ECHO_N "(cached) $ECHO_C" >&6
16744 else
16745
16746 cf_cv_hashed_db_libs=unknown
16747 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16748 do
16749         cf_save_libs="$LIBS"
16750         if test -n "$cf_db_libs"; then
16751                 LIBS="-l$cf_db_libs $LIBS"
16752         fi
16753
16754 echo "${as_me:-configure}:16754: testing checking for library "$cf_db_libs" ..." 1>&5
16755
16756         cat >conftest.$ac_ext <<_ACEOF
16757 #line 16757 "configure"
16758 #include "confdefs.h"
16759
16760 $ac_includes_default
16761 #include <db.h>
16762
16763 int
16764 main ()
16765 {
16766
16767         char *path = "/tmp/foo";
16768 #ifdef DB_VERSION_MAJOR
16769 #if DB_VERSION_MAJOR >= 4
16770         DB *result = 0;
16771         db_create(&result, NULL, 0);
16772         result->open(result,
16773                 NULL,
16774                 path,
16775                 path,
16776                 DB_HASH,
16777                 DB_CREATE,
16778                 0644);
16779 #elif DB_VERSION_MAJOR >= 3
16780         DB *result = 0;
16781         db_create(&result, NULL, 0);
16782         result->open(result,
16783                 path,
16784                 path,
16785                 DB_HASH,
16786                 DB_CREATE,
16787                 0644);
16788 #elif DB_VERSION_MAJOR >= 2
16789         DB *result = 0;
16790         db_open(path,
16791                 DB_HASH,
16792                 DB_CREATE,
16793                 0644,
16794                 (DB_ENV *) 0,
16795                 (DB_INFO *) 0,
16796                 &result);
16797 #endif /* DB_VERSION_MAJOR */
16798 #else
16799         DB *result = dbopen(path,
16800                      2,
16801                      0644,
16802                      DB_HASH,
16803                      0);
16804 #endif
16805         ${cf_cv_main_return:-return}(result != 0)
16806
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 rm -f conftest.$ac_objext conftest$ac_exeext
16812 if { (eval echo "$as_me:16812: \"$ac_link\"") >&5
16813   (eval $ac_link) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -s conftest$ac_exeext'
16818   { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823
16824         if test -n "$cf_db_libs" ; then
16825                 cf_cv_hashed_db_libs=$cf_db_libs
16826         else
16827                 cf_cv_hashed_db_libs=default
16828         fi
16829         LIBS="$cf_save_libs"
16830         break
16831
16832 else
16833   echo "$as_me: failed program was:" >&5
16834 cat conftest.$ac_ext >&5
16835 fi
16836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16837         LIBS="$cf_save_libs"
16838 done
16839
16840 fi
16841 echo "$as_me:16841: result: $cf_cv_hashed_db_libs" >&5
16842 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16843
16844         if test "$cf_cv_hashed_db_libs" = unknown ; then
16845                 { { echo "$as_me:16845: error: Cannot determine library for db" >&5
16846 echo "$as_me: error: Cannot determine library for db" >&2;}
16847    { (exit 1); exit 1; }; }
16848         elif test "$cf_cv_hashed_db_libs" != default ; then
16849                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16850         fi
16851 fi
16852
16853 else
16854
16855         { { echo "$as_me:16855: error: Cannot find db.h" >&5
16856 echo "$as_me: error: Cannot find db.h" >&2;}
16857    { (exit 1); exit 1; }; }
16858
16859 fi
16860
16861 fi
16862
16863 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16864         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16865         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16866 fi
16867
16868 # Just in case, check if the C compiler has a bool type.
16869
16870 echo "$as_me:16870: checking if we should include stdbool.h" >&5
16871 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16872
16873 if test "${cf_cv_header_stdbool_h+set}" = set; then
16874   echo $ECHO_N "(cached) $ECHO_C" >&6
16875 else
16876
16877         cat >conftest.$ac_ext <<_ACEOF
16878 #line 16878 "configure"
16879 #include "confdefs.h"
16880
16881 int
16882 main ()
16883 {
16884 bool foo = false
16885   ;
16886   return 0;
16887 }
16888 _ACEOF
16889 rm -f conftest.$ac_objext
16890 if { (eval echo "$as_me:16890: \"$ac_compile\"") >&5
16891   (eval $ac_compile) 2>&5
16892   ac_status=$?
16893   echo "$as_me:16893: \$? = $ac_status" >&5
16894   (exit $ac_status); } &&
16895          { ac_try='test -s conftest.$ac_objext'
16896   { (eval echo "$as_me:16896: \"$ac_try\"") >&5
16897   (eval $ac_try) 2>&5
16898   ac_status=$?
16899   echo "$as_me:16899: \$? = $ac_status" >&5
16900   (exit $ac_status); }; }; then
16901   cf_cv_header_stdbool_h=0
16902 else
16903   echo "$as_me: failed program was:" >&5
16904 cat conftest.$ac_ext >&5
16905 cat >conftest.$ac_ext <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16908
16909 #ifndef __BEOS__
16910 #include <stdbool.h>
16911 #endif
16912
16913 int
16914 main ()
16915 {
16916 bool foo = false
16917   ;
16918   return 0;
16919 }
16920 _ACEOF
16921 rm -f conftest.$ac_objext
16922 if { (eval echo "$as_me:16922: \"$ac_compile\"") >&5
16923   (eval $ac_compile) 2>&5
16924   ac_status=$?
16925   echo "$as_me:16925: \$? = $ac_status" >&5
16926   (exit $ac_status); } &&
16927          { ac_try='test -s conftest.$ac_objext'
16928   { (eval echo "$as_me:16928: \"$ac_try\"") >&5
16929   (eval $ac_try) 2>&5
16930   ac_status=$?
16931   echo "$as_me:16931: \$? = $ac_status" >&5
16932   (exit $ac_status); }; }; then
16933   cf_cv_header_stdbool_h=1
16934 else
16935   echo "$as_me: failed program was:" >&5
16936 cat conftest.$ac_ext >&5
16937 cf_cv_header_stdbool_h=0
16938 fi
16939 rm -f conftest.$ac_objext conftest.$ac_ext
16940 fi
16941 rm -f conftest.$ac_objext conftest.$ac_ext
16942 fi
16943
16944 if test "$cf_cv_header_stdbool_h" = 1
16945 then    echo "$as_me:16945: result: yes" >&5
16946 echo "${ECHO_T}yes" >&6
16947 else    echo "$as_me:16947: result: no" >&5
16948 echo "${ECHO_T}no" >&6
16949 fi
16950
16951 echo "$as_me:16951: checking for builtin bool type" >&5
16952 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16953
16954 if test "${cf_cv_cc_bool_type+set}" = set; then
16955   echo $ECHO_N "(cached) $ECHO_C" >&6
16956 else
16957
16958         cat >conftest.$ac_ext <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961
16962 #include <stdio.h>
16963 #include <sys/types.h>
16964
16965 int
16966 main ()
16967 {
16968 bool x = false
16969   ;
16970   return 0;
16971 }
16972 _ACEOF
16973 rm -f conftest.$ac_objext
16974 if { (eval echo "$as_me:16974: \"$ac_compile\"") >&5
16975   (eval $ac_compile) 2>&5
16976   ac_status=$?
16977   echo "$as_me:16977: \$? = $ac_status" >&5
16978   (exit $ac_status); } &&
16979          { ac_try='test -s conftest.$ac_objext'
16980   { (eval echo "$as_me:16980: \"$ac_try\"") >&5
16981   (eval $ac_try) 2>&5
16982   ac_status=$?
16983   echo "$as_me:16983: \$? = $ac_status" >&5
16984   (exit $ac_status); }; }; then
16985   cf_cv_cc_bool_type=1
16986 else
16987   echo "$as_me: failed program was:" >&5
16988 cat conftest.$ac_ext >&5
16989 cf_cv_cc_bool_type=0
16990 fi
16991 rm -f conftest.$ac_objext conftest.$ac_ext
16992
16993 fi
16994
16995 if test "$cf_cv_cc_bool_type" = 1
16996 then    echo "$as_me:16996: result: yes" >&5
16997 echo "${ECHO_T}yes" >&6
16998 else    echo "$as_me:16998: result: no" >&5
16999 echo "${ECHO_T}no" >&6
17000 fi
17001
17002 # Check for C++ compiler characteristics (and ensure that it's there!)
17003 if test -n "$CXX" ; then
17004         ac_ext=cc
17005 ac_cpp='$CXXCPP $CPPFLAGS'
17006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17007 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17009 ac_main_return=return
17010
17011 if test -n "$GXX" ; then
17012 case $cf_cv_system_name in #(vi
17013 os2*) #(vi
17014         cf_stdcpp_libname=stdcpp
17015         ;;
17016 *)
17017         cf_stdcpp_libname=stdc++
17018         ;;
17019 esac
17020 echo "$as_me:17020: checking for library $cf_stdcpp_libname" >&5
17021 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17022 if test "${cf_cv_libstdcpp+set}" = set; then
17023   echo $ECHO_N "(cached) $ECHO_C" >&6
17024 else
17025
17026         cf_save="$LIBS"
17027         LIBS="-l$cf_stdcpp_libname $LIBS"
17028 cat >conftest.$ac_ext <<_ACEOF
17029 #line 17029 "configure"
17030 #include "confdefs.h"
17031
17032 #include <strstream.h>
17033 int
17034 main ()
17035 {
17036
17037 char buf[80];
17038 strstreambuf foo(buf, sizeof(buf))
17039
17040   ;
17041   return 0;
17042 }
17043 _ACEOF
17044 rm -f conftest.$ac_objext conftest$ac_exeext
17045 if { (eval echo "$as_me:17045: \"$ac_link\"") >&5
17046   (eval $ac_link) 2>&5
17047   ac_status=$?
17048   echo "$as_me:17048: \$? = $ac_status" >&5
17049   (exit $ac_status); } &&
17050          { ac_try='test -s conftest$ac_exeext'
17051   { (eval echo "$as_me:17051: \"$ac_try\"") >&5
17052   (eval $ac_try) 2>&5
17053   ac_status=$?
17054   echo "$as_me:17054: \$? = $ac_status" >&5
17055   (exit $ac_status); }; }; then
17056   cf_cv_libstdcpp=yes
17057 else
17058   echo "$as_me: failed program was:" >&5
17059 cat conftest.$ac_ext >&5
17060 cf_cv_libstdcpp=no
17061 fi
17062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17063         LIBS="$cf_save"
17064
17065 fi
17066 echo "$as_me:17066: result: $cf_cv_libstdcpp" >&5
17067 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17068 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17069 fi
17070
17071         echo "$as_me:17071: checking whether $CXX understands -c and -o together" >&5
17072 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17073 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17074   echo $ECHO_N "(cached) $ECHO_C" >&6
17075 else
17076
17077 cat > conftest.$ac_ext <<CF_EOF
17078 #include <stdio.h>
17079 int main()
17080 {
17081         ${cf_cv_main_return:-return}(0);
17082 }
17083 CF_EOF
17084 # We do the test twice because some compilers refuse to overwrite an
17085 # existing .o file with -o, though they will create one.
17086 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17087 if { (eval echo "$as_me:17087: \"$ac_try\"") >&5
17088   (eval $ac_try) 2>&5
17089   ac_status=$?
17090   echo "$as_me:17090: \$? = $ac_status" >&5
17091   (exit $ac_status); } &&
17092   test -f conftest2.$ac_objext && { (eval echo "$as_me:17092: \"$ac_try\"") >&5
17093   (eval $ac_try) 2>&5
17094   ac_status=$?
17095   echo "$as_me:17095: \$? = $ac_status" >&5
17096   (exit $ac_status); };
17097 then
17098   eval cf_cv_prog_CXX_c_o=yes
17099 else
17100   eval cf_cv_prog_CXX_c_o=no
17101 fi
17102 rm -rf conftest*
17103
17104 fi
17105 if test $cf_cv_prog_CXX_c_o = yes; then
17106   echo "$as_me:17106: result: yes" >&5
17107 echo "${ECHO_T}yes" >&6
17108 else
17109   echo "$as_me:17109: result: no" >&5
17110 echo "${ECHO_T}no" >&6
17111 fi
17112
17113         case $GXX_VERSION in
17114         1*|2.0-6*)
17115                 cf_cxx_library=yes
17116                 ;;
17117         *-2.7*|2.7*)
17118
17119 cf_cxx_library=unknown
17120 case $cf_cv_system_name in #(vi
17121 os2*) #(vi
17122         cf_gpp_libname=gpp
17123         ;;
17124 *)
17125         cf_gpp_libname=g++
17126         ;;
17127 esac
17128 if test "$GXX" = yes; then
17129         echo "$as_me:17129: checking for lib$cf_gpp_libname" >&5
17130 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17131         cf_save="$LIBS"
17132         LIBS="-l$cf_gpp_libname $LIBS"
17133         cat >conftest.$ac_ext <<_ACEOF
17134 #line 17134 "configure"
17135 #include "confdefs.h"
17136
17137 #include <$cf_gpp_libname/builtin.h>
17138
17139 int
17140 main ()
17141 {
17142 two_arg_error_handler_t foo2 = lib_error_handler
17143   ;
17144   return 0;
17145 }
17146 _ACEOF
17147 rm -f conftest.$ac_objext conftest$ac_exeext
17148 if { (eval echo "$as_me:17148: \"$ac_link\"") >&5
17149   (eval $ac_link) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); } &&
17153          { ac_try='test -s conftest$ac_exeext'
17154   { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159   cf_cxx_library=yes
17160          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17161          if test "$cf_gpp_libname" = cpp ; then
17162             cat >>confdefs.h <<\EOF
17163 #define HAVE_GPP_BUILTIN_H 1
17164 EOF
17165
17166          else
17167             cat >>confdefs.h <<\EOF
17168 #define HAVE_GXX_BUILTIN_H 1
17169 EOF
17170
17171          fi
17172 else
17173   echo "$as_me: failed program was:" >&5
17174 cat conftest.$ac_ext >&5
17175 cat >conftest.$ac_ext <<_ACEOF
17176 #line 17176 "configure"
17177 #include "confdefs.h"
17178
17179 #include <builtin.h>
17180
17181 int
17182 main ()
17183 {
17184 two_arg_error_handler_t foo2 = lib_error_handler
17185   ;
17186   return 0;
17187 }
17188 _ACEOF
17189 rm -f conftest.$ac_objext conftest$ac_exeext
17190 if { (eval echo "$as_me:17190: \"$ac_link\"") >&5
17191   (eval $ac_link) 2>&5
17192   ac_status=$?
17193   echo "$as_me:17193: \$? = $ac_status" >&5
17194   (exit $ac_status); } &&
17195          { ac_try='test -s conftest$ac_exeext'
17196   { (eval echo "$as_me:17196: \"$ac_try\"") >&5
17197   (eval $ac_try) 2>&5
17198   ac_status=$?
17199   echo "$as_me:17199: \$? = $ac_status" >&5
17200   (exit $ac_status); }; }; then
17201   cf_cxx_library=yes
17202          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17203          cat >>confdefs.h <<\EOF
17204 #define HAVE_BUILTIN_H 1
17205 EOF
17206
17207 else
17208   echo "$as_me: failed program was:" >&5
17209 cat conftest.$ac_ext >&5
17210 cf_cxx_library=no
17211 fi
17212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17213 fi
17214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17215         LIBS="$cf_save"
17216         echo "$as_me:17216: result: $cf_cxx_library" >&5
17217 echo "${ECHO_T}$cf_cxx_library" >&6
17218 fi
17219
17220                 ;;
17221         *)
17222                 cf_cxx_library=no
17223                 ;;
17224         esac
17225
17226         ac_ext=cc
17227 ac_cpp='$CXXCPP $CPPFLAGS'
17228 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17229 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17230 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17231 ac_main_return=return
17232 echo "$as_me:17232: checking how to run the C++ preprocessor" >&5
17233 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17234 if test -z "$CXXCPP"; then
17235   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17236   echo $ECHO_N "(cached) $ECHO_C" >&6
17237 else
17238       # Double quotes because CXXCPP needs to be expanded
17239     for CXXCPP in "$CXX -E" "/lib/cpp"
17240     do
17241       ac_preproc_ok=false
17242 for ac_cxx_preproc_warn_flag in '' yes
17243 do
17244   # Use a header file that comes with gcc, so configuring glibc
17245   # with a fresh cross-compiler works.
17246   # On the NeXT, cc -E runs the code through the compiler's parser,
17247   # not just through cpp. "Syntax error" is here to catch this case.
17248   cat >conftest.$ac_ext <<_ACEOF
17249 #line 17249 "configure"
17250 #include "confdefs.h"
17251 #include <assert.h>
17252                      Syntax error
17253 _ACEOF
17254 if { (eval echo "$as_me:17254: \"$ac_cpp conftest.$ac_ext\"") >&5
17255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17256   ac_status=$?
17257   egrep -v '^ *\+' conftest.er1 >conftest.err
17258   rm -f conftest.er1
17259   cat conftest.err >&5
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); } >/dev/null; then
17262   if test -s conftest.err; then
17263     ac_cpp_err=$ac_cxx_preproc_warn_flag
17264   else
17265     ac_cpp_err=
17266   fi
17267 else
17268   ac_cpp_err=yes
17269 fi
17270 if test -z "$ac_cpp_err"; then
17271   :
17272 else
17273   echo "$as_me: failed program was:" >&5
17274   cat conftest.$ac_ext >&5
17275   # Broken: fails on valid input.
17276 continue
17277 fi
17278 rm -f conftest.err conftest.$ac_ext
17279
17280   # OK, works on sane cases.  Now check whether non-existent headers
17281   # can be detected and how.
17282   cat >conftest.$ac_ext <<_ACEOF
17283 #line 17283 "configure"
17284 #include "confdefs.h"
17285 #include <ac_nonexistent.h>
17286 _ACEOF
17287 if { (eval echo "$as_me:17287: \"$ac_cpp conftest.$ac_ext\"") >&5
17288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17289   ac_status=$?
17290   egrep -v '^ *\+' conftest.er1 >conftest.err
17291   rm -f conftest.er1
17292   cat conftest.err >&5
17293   echo "$as_me:17293: \$? = $ac_status" >&5
17294   (exit $ac_status); } >/dev/null; then
17295   if test -s conftest.err; then
17296     ac_cpp_err=$ac_cxx_preproc_warn_flag
17297   else
17298     ac_cpp_err=
17299   fi
17300 else
17301   ac_cpp_err=yes
17302 fi
17303 if test -z "$ac_cpp_err"; then
17304   # Broken: success on invalid input.
17305 continue
17306 else
17307   echo "$as_me: failed program was:" >&5
17308   cat conftest.$ac_ext >&5
17309   # Passes both tests.
17310 ac_preproc_ok=:
17311 break
17312 fi
17313 rm -f conftest.err conftest.$ac_ext
17314
17315 done
17316 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17317 rm -f conftest.err conftest.$ac_ext
17318 if $ac_preproc_ok; then
17319   break
17320 fi
17321
17322     done
17323     ac_cv_prog_CXXCPP=$CXXCPP
17324
17325 fi
17326   CXXCPP=$ac_cv_prog_CXXCPP
17327 else
17328   ac_cv_prog_CXXCPP=$CXXCPP
17329 fi
17330 echo "$as_me:17330: result: $CXXCPP" >&5
17331 echo "${ECHO_T}$CXXCPP" >&6
17332 ac_preproc_ok=false
17333 for ac_cxx_preproc_warn_flag in '' yes
17334 do
17335   # Use a header file that comes with gcc, so configuring glibc
17336   # with a fresh cross-compiler works.
17337   # On the NeXT, cc -E runs the code through the compiler's parser,
17338   # not just through cpp. "Syntax error" is here to catch this case.
17339   cat >conftest.$ac_ext <<_ACEOF
17340 #line 17340 "configure"
17341 #include "confdefs.h"
17342 #include <assert.h>
17343                      Syntax error
17344 _ACEOF
17345 if { (eval echo "$as_me:17345: \"$ac_cpp conftest.$ac_ext\"") >&5
17346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17347   ac_status=$?
17348   egrep -v '^ *\+' conftest.er1 >conftest.err
17349   rm -f conftest.er1
17350   cat conftest.err >&5
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); } >/dev/null; then
17353   if test -s conftest.err; then
17354     ac_cpp_err=$ac_cxx_preproc_warn_flag
17355   else
17356     ac_cpp_err=
17357   fi
17358 else
17359   ac_cpp_err=yes
17360 fi
17361 if test -z "$ac_cpp_err"; then
17362   :
17363 else
17364   echo "$as_me: failed program was:" >&5
17365   cat conftest.$ac_ext >&5
17366   # Broken: fails on valid input.
17367 continue
17368 fi
17369 rm -f conftest.err conftest.$ac_ext
17370
17371   # OK, works on sane cases.  Now check whether non-existent headers
17372   # can be detected and how.
17373   cat >conftest.$ac_ext <<_ACEOF
17374 #line 17374 "configure"
17375 #include "confdefs.h"
17376 #include <ac_nonexistent.h>
17377 _ACEOF
17378 if { (eval echo "$as_me:17378: \"$ac_cpp conftest.$ac_ext\"") >&5
17379   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17380   ac_status=$?
17381   egrep -v '^ *\+' conftest.er1 >conftest.err
17382   rm -f conftest.er1
17383   cat conftest.err >&5
17384   echo "$as_me:17384: \$? = $ac_status" >&5
17385   (exit $ac_status); } >/dev/null; then
17386   if test -s conftest.err; then
17387     ac_cpp_err=$ac_cxx_preproc_warn_flag
17388   else
17389     ac_cpp_err=
17390   fi
17391 else
17392   ac_cpp_err=yes
17393 fi
17394 if test -z "$ac_cpp_err"; then
17395   # Broken: success on invalid input.
17396 continue
17397 else
17398   echo "$as_me: failed program was:" >&5
17399   cat conftest.$ac_ext >&5
17400   # Passes both tests.
17401 ac_preproc_ok=:
17402 break
17403 fi
17404 rm -f conftest.err conftest.$ac_ext
17405
17406 done
17407 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17408 rm -f conftest.err conftest.$ac_ext
17409 if $ac_preproc_ok; then
17410   :
17411 else
17412   { { echo "$as_me:17412: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17413 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17414    { (exit 1); exit 1; }; }
17415 fi
17416
17417 ac_ext=cc
17418 ac_cpp='$CXXCPP $CPPFLAGS'
17419 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17420 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17421 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17422 ac_main_return=return
17423
17424 for ac_header in iostream typeinfo
17425 do
17426 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17427 echo "$as_me:17427: checking for $ac_header" >&5
17428 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17429 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17430   echo $ECHO_N "(cached) $ECHO_C" >&6
17431 else
17432   cat >conftest.$ac_ext <<_ACEOF
17433 #line 17433 "configure"
17434 #include "confdefs.h"
17435 #include <$ac_header>
17436 _ACEOF
17437 if { (eval echo "$as_me:17437: \"$ac_cpp conftest.$ac_ext\"") >&5
17438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17439   ac_status=$?
17440   egrep -v '^ *\+' conftest.er1 >conftest.err
17441   rm -f conftest.er1
17442   cat conftest.err >&5
17443   echo "$as_me:17443: \$? = $ac_status" >&5
17444   (exit $ac_status); } >/dev/null; then
17445   if test -s conftest.err; then
17446     ac_cpp_err=$ac_cxx_preproc_warn_flag
17447   else
17448     ac_cpp_err=
17449   fi
17450 else
17451   ac_cpp_err=yes
17452 fi
17453 if test -z "$ac_cpp_err"; then
17454   eval "$as_ac_Header=yes"
17455 else
17456   echo "$as_me: failed program was:" >&5
17457   cat conftest.$ac_ext >&5
17458   eval "$as_ac_Header=no"
17459 fi
17460 rm -f conftest.err conftest.$ac_ext
17461 fi
17462 echo "$as_me:17462: result: `eval echo '${'$as_ac_Header'}'`" >&5
17463 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17464 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17465   cat >>confdefs.h <<EOF
17466 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17467 EOF
17468
17469 fi
17470 done
17471
17472     if test x"$ac_cv_header_iostream" = xyes ; then
17473         echo "$as_me:17473: checking if iostream uses std-namespace" >&5
17474 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17475         cat >conftest.$ac_ext <<_ACEOF
17476 #line 17476 "configure"
17477 #include "confdefs.h"
17478
17479 #include <iostream>
17480 using std::endl;
17481 using std::cerr;
17482 int
17483 main ()
17484 {
17485
17486 cerr << "testing" << endl;
17487
17488   ;
17489   return 0;
17490 }
17491 _ACEOF
17492 rm -f conftest.$ac_objext
17493 if { (eval echo "$as_me:17493: \"$ac_compile\"") >&5
17494   (eval $ac_compile) 2>&5
17495   ac_status=$?
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); } &&
17498          { ac_try='test -s conftest.$ac_objext'
17499   { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500   (eval $ac_try) 2>&5
17501   ac_status=$?
17502   echo "$as_me:17502: \$? = $ac_status" >&5
17503   (exit $ac_status); }; }; then
17504   cf_iostream_namespace=yes
17505 else
17506   echo "$as_me: failed program was:" >&5
17507 cat conftest.$ac_ext >&5
17508 cf_iostream_namespace=no
17509 fi
17510 rm -f conftest.$ac_objext conftest.$ac_ext
17511         echo "$as_me:17511: result: $cf_iostream_namespace" >&5
17512 echo "${ECHO_T}$cf_iostream_namespace" >&6
17513         if test "$cf_iostream_namespace" = yes ; then
17514             cat >>confdefs.h <<\EOF
17515 #define IOSTREAM_NAMESPACE 1
17516 EOF
17517
17518         fi
17519     fi
17520
17521 echo "$as_me:17521: checking if we should include stdbool.h" >&5
17522 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17523
17524 if test "${cf_cv_header_stdbool_h+set}" = set; then
17525   echo $ECHO_N "(cached) $ECHO_C" >&6
17526 else
17527
17528         cat >conftest.$ac_ext <<_ACEOF
17529 #line 17529 "configure"
17530 #include "confdefs.h"
17531
17532 int
17533 main ()
17534 {
17535 bool foo = false
17536   ;
17537   return 0;
17538 }
17539 _ACEOF
17540 rm -f conftest.$ac_objext
17541 if { (eval echo "$as_me:17541: \"$ac_compile\"") >&5
17542   (eval $ac_compile) 2>&5
17543   ac_status=$?
17544   echo "$as_me:17544: \$? = $ac_status" >&5
17545   (exit $ac_status); } &&
17546          { ac_try='test -s conftest.$ac_objext'
17547   { (eval echo "$as_me:17547: \"$ac_try\"") >&5
17548   (eval $ac_try) 2>&5
17549   ac_status=$?
17550   echo "$as_me:17550: \$? = $ac_status" >&5
17551   (exit $ac_status); }; }; then
17552   cf_cv_header_stdbool_h=0
17553 else
17554   echo "$as_me: failed program was:" >&5
17555 cat conftest.$ac_ext >&5
17556 cat >conftest.$ac_ext <<_ACEOF
17557 #line 17557 "configure"
17558 #include "confdefs.h"
17559
17560 #ifndef __BEOS__
17561 #include <stdbool.h>
17562 #endif
17563
17564 int
17565 main ()
17566 {
17567 bool foo = false
17568   ;
17569   return 0;
17570 }
17571 _ACEOF
17572 rm -f conftest.$ac_objext
17573 if { (eval echo "$as_me:17573: \"$ac_compile\"") >&5
17574   (eval $ac_compile) 2>&5
17575   ac_status=$?
17576   echo "$as_me:17576: \$? = $ac_status" >&5
17577   (exit $ac_status); } &&
17578          { ac_try='test -s conftest.$ac_objext'
17579   { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580   (eval $ac_try) 2>&5
17581   ac_status=$?
17582   echo "$as_me:17582: \$? = $ac_status" >&5
17583   (exit $ac_status); }; }; then
17584   cf_cv_header_stdbool_h=1
17585 else
17586   echo "$as_me: failed program was:" >&5
17587 cat conftest.$ac_ext >&5
17588 cf_cv_header_stdbool_h=0
17589 fi
17590 rm -f conftest.$ac_objext conftest.$ac_ext
17591 fi
17592 rm -f conftest.$ac_objext conftest.$ac_ext
17593 fi
17594
17595 if test "$cf_cv_header_stdbool_h" = 1
17596 then    echo "$as_me:17596: result: yes" >&5
17597 echo "${ECHO_T}yes" >&6
17598 else    echo "$as_me:17598: result: no" >&5
17599 echo "${ECHO_T}no" >&6
17600 fi
17601
17602 echo "$as_me:17602: checking for builtin bool type" >&5
17603 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17604
17605 if test "${cf_cv_builtin_bool+set}" = set; then
17606   echo $ECHO_N "(cached) $ECHO_C" >&6
17607 else
17608
17609         cat >conftest.$ac_ext <<_ACEOF
17610 #line 17610 "configure"
17611 #include "confdefs.h"
17612
17613 #include <stdio.h>
17614 #include <sys/types.h>
17615
17616 int
17617 main ()
17618 {
17619 bool x = false
17620   ;
17621   return 0;
17622 }
17623 _ACEOF
17624 rm -f conftest.$ac_objext
17625 if { (eval echo "$as_me:17625: \"$ac_compile\"") >&5
17626   (eval $ac_compile) 2>&5
17627   ac_status=$?
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); } &&
17630          { ac_try='test -s conftest.$ac_objext'
17631   { (eval echo "$as_me:17631: \"$ac_try\"") >&5
17632   (eval $ac_try) 2>&5
17633   ac_status=$?
17634   echo "$as_me:17634: \$? = $ac_status" >&5
17635   (exit $ac_status); }; }; then
17636   cf_cv_builtin_bool=1
17637 else
17638   echo "$as_me: failed program was:" >&5
17639 cat conftest.$ac_ext >&5
17640 cf_cv_builtin_bool=0
17641 fi
17642 rm -f conftest.$ac_objext conftest.$ac_ext
17643
17644 fi
17645
17646 if test "$cf_cv_builtin_bool" = 1
17647 then    echo "$as_me:17647: result: yes" >&5
17648 echo "${ECHO_T}yes" >&6
17649 else    echo "$as_me:17649: result: no" >&5
17650 echo "${ECHO_T}no" >&6
17651 fi
17652
17653 echo "$as_me:17653: checking for size of bool" >&5
17654 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17655 if test "${cf_cv_type_of_bool+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658
17659         rm -f cf_test.out
17660         if test "$cross_compiling" = yes; then
17661   cf_cv_type_of_bool=unknown
17662 else
17663   cat >conftest.$ac_ext <<_ACEOF
17664 #line 17664 "configure"
17665 #include "confdefs.h"
17666
17667 #include <stdlib.h>
17668 #include <stdio.h>
17669
17670 #if defined(__cplusplus)
17671
17672 #ifdef HAVE_GXX_BUILTIN_H
17673 #include <g++/builtin.h>
17674 #elif HAVE_GPP_BUILTIN_H
17675 #include <gpp/builtin.h>
17676 #elif HAVE_BUILTIN_H
17677 #include <builtin.h>
17678 #endif
17679
17680 #else
17681
17682 #if $cf_cv_header_stdbool_h
17683 #include <stdbool.h>
17684 #endif
17685
17686 #endif
17687
17688 main()
17689 {
17690         FILE *fp = fopen("cf_test.out", "w");
17691         if (fp != 0) {
17692                 bool x = true;
17693                 if ((bool)(-x) >= 0)
17694                         fputs("unsigned ", fp);
17695                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17696                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17697                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17698                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17699                 fclose(fp);
17700         }
17701         ${cf_cv_main_return:-return}(0);
17702 }
17703
17704 _ACEOF
17705 rm -f conftest$ac_exeext
17706 if { (eval echo "$as_me:17706: \"$ac_link\"") >&5
17707   (eval $ac_link) 2>&5
17708   ac_status=$?
17709   echo "$as_me:17709: \$? = $ac_status" >&5
17710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17711   { (eval echo "$as_me:17711: \"$ac_try\"") >&5
17712   (eval $ac_try) 2>&5
17713   ac_status=$?
17714   echo "$as_me:17714: \$? = $ac_status" >&5
17715   (exit $ac_status); }; }; then
17716   cf_cv_type_of_bool=`cat cf_test.out`
17717                  if test -z "$cf_cv_type_of_bool"; then
17718                    cf_cv_type_of_bool=unknown
17719                  fi
17720 else
17721   echo "$as_me: program exited with status $ac_status" >&5
17722 echo "$as_me: failed program was:" >&5
17723 cat conftest.$ac_ext >&5
17724 cf_cv_type_of_bool=unknown
17725 fi
17726 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17727 fi
17728
17729 fi
17730
17731         rm -f cf_test.out
17732 echo "$as_me:17732: result: $cf_cv_type_of_bool" >&5
17733 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17734 if test "$cf_cv_type_of_bool" = unknown ; then
17735         case .$NCURSES_BOOL in #(vi
17736         .auto|.) NCURSES_BOOL=unsigned;;
17737         esac
17738         { echo "$as_me:17738: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17739 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17740         cf_cv_type_of_bool=$NCURSES_BOOL
17741 fi
17742
17743 echo "$as_me:17743: checking for special defines needed for etip.h" >&5
17744 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17745 cf_save_CXXFLAGS="$CXXFLAGS"
17746 cf_result="none"
17747 for cf_math in "" MATH_H
17748 do
17749 for cf_excp in "" MATH_EXCEPTION
17750 do
17751         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17752         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17753         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17754 cat >conftest.$ac_ext <<_ACEOF
17755 #line 17755 "configure"
17756 #include "confdefs.h"
17757
17758 #include <etip.h.in>
17759
17760 int
17761 main ()
17762 {
17763
17764   ;
17765   return 0;
17766 }
17767 _ACEOF
17768 rm -f conftest.$ac_objext
17769 if { (eval echo "$as_me:17769: \"$ac_compile\"") >&5
17770   (eval $ac_compile) 2>&5
17771   ac_status=$?
17772   echo "$as_me:17772: \$? = $ac_status" >&5
17773   (exit $ac_status); } &&
17774          { ac_try='test -s conftest.$ac_objext'
17775   { (eval echo "$as_me:17775: \"$ac_try\"") >&5
17776   (eval $ac_try) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); }; }; then
17780
17781         test -n "$cf_math" && cat >>confdefs.h <<EOF
17782 #define ETIP_NEEDS_${cf_math} 1
17783 EOF
17784
17785         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17786 #define ETIP_NEEDS_${cf_excp} 1
17787 EOF
17788
17789         cf_result="$cf_math $cf_excp"
17790         break
17791
17792 else
17793   echo "$as_me: failed program was:" >&5
17794 cat conftest.$ac_ext >&5
17795 fi
17796 rm -f conftest.$ac_objext conftest.$ac_ext
17797 done
17798 done
17799 echo "$as_me:17799: result: $cf_result" >&5
17800 echo "${ECHO_T}$cf_result" >&6
17801 CXXFLAGS="$cf_save_CXXFLAGS"
17802
17803 if test -n "$CXX"; then
17804 echo "$as_me:17804: checking if $CXX accepts parameter initialization" >&5
17805 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17806 if test "${cf_cv_cpp_param_init+set}" = set; then
17807   echo $ECHO_N "(cached) $ECHO_C" >&6
17808 else
17809
17810         ac_ext=cc
17811 ac_cpp='$CXXCPP $CPPFLAGS'
17812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17815 ac_main_return=return
17816
17817         if test "$cross_compiling" = yes; then
17818   cf_cv_cpp_param_init=unknown
17819 else
17820   cat >conftest.$ac_ext <<_ACEOF
17821 #line 17821 "configure"
17822 #include "confdefs.h"
17823
17824 class TEST {
17825 private:
17826         int value;
17827 public:
17828         TEST(int x = 1);
17829         ~TEST();
17830 };
17831
17832 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17833 {
17834         value = x;
17835 }
17836 void main() { }
17837
17838 _ACEOF
17839 rm -f conftest$ac_exeext
17840 if { (eval echo "$as_me:17840: \"$ac_link\"") >&5
17841   (eval $ac_link) 2>&5
17842   ac_status=$?
17843   echo "$as_me:17843: \$? = $ac_status" >&5
17844   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17845   { (eval echo "$as_me:17845: \"$ac_try\"") >&5
17846   (eval $ac_try) 2>&5
17847   ac_status=$?
17848   echo "$as_me:17848: \$? = $ac_status" >&5
17849   (exit $ac_status); }; }; then
17850   cf_cv_cpp_param_init=yes
17851 else
17852   echo "$as_me: program exited with status $ac_status" >&5
17853 echo "$as_me: failed program was:" >&5
17854 cat conftest.$ac_ext >&5
17855 cf_cv_cpp_param_init=no
17856 fi
17857 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17858 fi
17859         ac_ext=cc
17860 ac_cpp='$CXXCPP $CPPFLAGS'
17861 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17862 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17863 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17864 ac_main_return=return
17865
17866 fi
17867 echo "$as_me:17867: result: $cf_cv_cpp_param_init" >&5
17868 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17869 fi
17870 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17871 #define CPP_HAS_PARAM_INIT 1
17872 EOF
17873
17874 if test -n "$CXX"; then
17875
17876 echo "$as_me:17876: checking if $CXX accepts static_cast" >&5
17877 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17878 if test "${cf_cv_cpp_static_cast+set}" = set; then
17879   echo $ECHO_N "(cached) $ECHO_C" >&6
17880 else
17881
17882         ac_ext=cc
17883 ac_cpp='$CXXCPP $CPPFLAGS'
17884 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17885 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17886 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17887 ac_main_return=return
17888
17889         cat >conftest.$ac_ext <<_ACEOF
17890 #line 17890 "configure"
17891 #include "confdefs.h"
17892
17893 class NCursesPanel
17894 {
17895 public:
17896   NCursesPanel(int nlines,
17897                int ncols,
17898                int begin_y = 0,
17899                int begin_x = 0)
17900   {
17901   }
17902
17903   ~NCursesPanel();
17904 };
17905
17906 template<class T> class NCursesUserPanel : public NCursesPanel
17907 {
17908 public:
17909   NCursesUserPanel (int nlines,
17910                     int ncols,
17911                     int begin_y = 0,
17912                     int begin_x = 0,
17913                     const T* p_UserData = static_cast<T*>(0))
17914     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17915   {
17916   };
17917   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17918   {
17919   };
17920
17921   virtual ~NCursesUserPanel() {};
17922 };
17923
17924 int
17925 main ()
17926 {
17927
17928         const char* p_UserData = static_cast<char*>(0)
17929   ;
17930   return 0;
17931 }
17932 _ACEOF
17933 rm -f conftest.$ac_objext
17934 if { (eval echo "$as_me:17934: \"$ac_compile\"") >&5
17935   (eval $ac_compile) 2>&5
17936   ac_status=$?
17937   echo "$as_me:17937: \$? = $ac_status" >&5
17938   (exit $ac_status); } &&
17939          { ac_try='test -s conftest.$ac_objext'
17940   { (eval echo "$as_me:17940: \"$ac_try\"") >&5
17941   (eval $ac_try) 2>&5
17942   ac_status=$?
17943   echo "$as_me:17943: \$? = $ac_status" >&5
17944   (exit $ac_status); }; }; then
17945   cf_cv_cpp_static_cast=yes
17946 else
17947   echo "$as_me: failed program was:" >&5
17948 cat conftest.$ac_ext >&5
17949 cf_cv_cpp_static_cast=no
17950 fi
17951 rm -f conftest.$ac_objext conftest.$ac_ext
17952
17953         ac_ext=cc
17954 ac_cpp='$CXXCPP $CPPFLAGS'
17955 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17956 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17957 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17958 ac_main_return=return
17959
17960 fi
17961 echo "$as_me:17961: result: $cf_cv_cpp_static_cast" >&5
17962 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17963
17964 fi
17965
17966 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17967 #define CPP_HAS_STATIC_CAST 1
17968 EOF
17969
17970         CXX_AR='$(AR)'
17971         CXX_ARFLAGS='$(ARFLAGS)'
17972         case $cf_cv_system_name in #(vi
17973         irix*) #(vi
17974             if test "$GXX" != yes ; then
17975                 CXX_AR='$(CXX)'
17976                 CXX_ARFLAGS='-ar -o'
17977             fi
17978             ;;
17979         sco3.2v5*) #(vi
17980             CXXLDFLAGS="-u main"
17981             ;;
17982         solaris2*)
17983             if test "$GXX" != yes ; then
17984                 CXX_AR='$(CXX)'
17985                 CXX_ARFLAGS='-xar -o'
17986             fi
17987             ;;
17988         esac
17989
17990 else
17991         cf_cxx_library=no
17992         cf_cv_builtin_bool=1
17993
17994         # Just because we are not configuring against C++ right now does not
17995         # mean that a user will not want to use C++.  Some distributors disable
17996         # the C++ portion of this configuration as a shortcut (or just to avoid
17997         # compiling the demo in the c++ directory).  So we need a reasonable
17998         # default for the 'bool' type.
17999         #
18000         # Caveat: since the storage of the bool type is not standardized, it
18001         # may change.
18002
18003         if test "$NCURSES_BOOL" != auto ; then
18004                 cf_cv_type_of_bool=$NCURSES_BOOL
18005                 cf_cv_header_stdbool_h=0
18006         else
18007                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18008
18009 echo "$as_me:18009: checking for size of bool" >&5
18010 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18011 if test "${cf_cv_type_of_bool+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014
18015         rm -f cf_test.out
18016         if test "$cross_compiling" = yes; then
18017   cf_cv_type_of_bool=unknown
18018 else
18019   cat >conftest.$ac_ext <<_ACEOF
18020 #line 18020 "configure"
18021 #include "confdefs.h"
18022
18023 #include <stdlib.h>
18024 #include <stdio.h>
18025
18026 #if defined(__cplusplus)
18027
18028 #ifdef HAVE_GXX_BUILTIN_H
18029 #include <g++/builtin.h>
18030 #elif HAVE_GPP_BUILTIN_H
18031 #include <gpp/builtin.h>
18032 #elif HAVE_BUILTIN_H
18033 #include <builtin.h>
18034 #endif
18035
18036 #else
18037
18038 #if $cf_cv_header_stdbool_h
18039 #include <stdbool.h>
18040 #endif
18041
18042 #endif
18043
18044 main()
18045 {
18046         FILE *fp = fopen("cf_test.out", "w");
18047         if (fp != 0) {
18048                 bool x = true;
18049                 if ((bool)(-x) >= 0)
18050                         fputs("unsigned ", fp);
18051                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18052                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18053                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18054                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18055                 fclose(fp);
18056         }
18057         ${cf_cv_main_return:-return}(0);
18058 }
18059
18060 _ACEOF
18061 rm -f conftest$ac_exeext
18062 if { (eval echo "$as_me:18062: \"$ac_link\"") >&5
18063   (eval $ac_link) 2>&5
18064   ac_status=$?
18065   echo "$as_me:18065: \$? = $ac_status" >&5
18066   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18067   { (eval echo "$as_me:18067: \"$ac_try\"") >&5
18068   (eval $ac_try) 2>&5
18069   ac_status=$?
18070   echo "$as_me:18070: \$? = $ac_status" >&5
18071   (exit $ac_status); }; }; then
18072   cf_cv_type_of_bool=`cat cf_test.out`
18073                  if test -z "$cf_cv_type_of_bool"; then
18074                    cf_cv_type_of_bool=unknown
18075                  fi
18076 else
18077   echo "$as_me: program exited with status $ac_status" >&5
18078 echo "$as_me: failed program was:" >&5
18079 cat conftest.$ac_ext >&5
18080 cf_cv_type_of_bool=unknown
18081 fi
18082 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18083 fi
18084
18085 fi
18086
18087         rm -f cf_test.out
18088 echo "$as_me:18088: result: $cf_cv_type_of_bool" >&5
18089 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18090 if test "$cf_cv_type_of_bool" = unknown ; then
18091         case .$NCURSES_BOOL in #(vi
18092         .auto|.) NCURSES_BOOL=unsigned;;
18093         esac
18094         { echo "$as_me:18094: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18095 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18096         cf_cv_type_of_bool=$NCURSES_BOOL
18097 fi
18098
18099                 else
18100                         echo "$as_me:18100: checking for fallback type of bool" >&5
18101 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18102                         case "$host_cpu" in #(vi
18103                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18104                         *)      cf_cv_type_of_bool=int  ;;
18105                         esac
18106                         echo "$as_me:18106: result: $cf_cv_type_of_bool" >&5
18107 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18108                 fi
18109         fi
18110 fi
18111
18112 # If the C compiler did not declare bool, and we did not determine that the C++
18113 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18114 # ncurses library use the same type as C++ bool.  Note that this allows one to
18115 # specify the type of bool in a configure-script option and postpone
18116 # integration with the C++ compiler provided that the types are compatible.
18117 USE_CXX_BOOL=1
18118 if test $cf_cv_cc_bool_type = 1
18119 then
18120         # oops: C has a bool.  Unlikely, but C++ could differ.
18121         USE_CXX_BOOL=0
18122 elif test $cf_cv_builtin_bool = 0
18123 then
18124         # C++ has no bool
18125         USE_CXX_BOOL=0
18126 else
18127         # this is the normal case
18128         USE_CXX_BOOL='defined(__cplusplus)'
18129 fi
18130
18131 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18132
18133         if test "$cf_with_ada" != "no" ; then
18134                 if test "$with_libtool" != "no"; then
18135                         { echo "$as_me:18135: WARNING: libtool does not support Ada - disabling feature" >&5
18136 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18137                         cf_with_ada=no
18138                 fi
18139         fi
18140
18141         if test "$cf_with_ada" != "no" ; then
18142
18143 cf_ada_make=gnatmake
18144 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18145 set dummy $cf_ada_make; ac_word=$2
18146 echo "$as_me:18146: checking for $ac_word" >&5
18147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18148 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   if test -n "$gnat_exists"; then
18152   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18153 else
18154   ac_save_IFS=$IFS; IFS=$ac_path_separator
18155 ac_dummy="$PATH"
18156 for ac_dir in $ac_dummy; do
18157   IFS=$ac_save_IFS
18158   test -z "$ac_dir" && ac_dir=.
18159   $as_executable_p "$ac_dir/$ac_word" || continue
18160 ac_cv_prog_gnat_exists="yes"
18161 echo "$as_me:18161: found $ac_dir/$ac_word" >&5
18162 break
18163 done
18164
18165   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18166 fi
18167 fi
18168 gnat_exists=$ac_cv_prog_gnat_exists
18169 if test -n "$gnat_exists"; then
18170   echo "$as_me:18170: result: $gnat_exists" >&5
18171 echo "${ECHO_T}$gnat_exists" >&6
18172 else
18173   echo "$as_me:18173: result: no" >&5
18174 echo "${ECHO_T}no" >&6
18175 fi
18176
18177 if test "$ac_cv_prog_gnat_exists" = no; then
18178    cf_ada_make=
18179 else
18180
18181 echo "$as_me:18181: checking for gnat version" >&5
18182 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18183 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18184         grep '[0-9].[0-9][0-9]*' |\
18185     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18186 echo "$as_me:18186: result: $cf_gnat_version" >&5
18187 echo "${ECHO_T}$cf_gnat_version" >&6
18188
18189 case $cf_gnat_version in #(vi
18190 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18191         cf_cv_prog_gnat_correct=yes
18192         ;;
18193 *)
18194         { echo "$as_me:18194: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18195 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18196         cf_cv_prog_gnat_correct=no
18197         ;;
18198 esac
18199
18200    # Extract the first word of "m4", so it can be a program name with args.
18201 set dummy m4; ac_word=$2
18202 echo "$as_me:18202: checking for $ac_word" >&5
18203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18204 if test "${ac_cv_prog_M4_exists+set}" = set; then
18205   echo $ECHO_N "(cached) $ECHO_C" >&6
18206 else
18207   if test -n "$M4_exists"; then
18208   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18209 else
18210   ac_save_IFS=$IFS; IFS=$ac_path_separator
18211 ac_dummy="$PATH"
18212 for ac_dir in $ac_dummy; do
18213   IFS=$ac_save_IFS
18214   test -z "$ac_dir" && ac_dir=.
18215   $as_executable_p "$ac_dir/$ac_word" || continue
18216 ac_cv_prog_M4_exists="yes"
18217 echo "$as_me:18217: found $ac_dir/$ac_word" >&5
18218 break
18219 done
18220
18221   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18222 fi
18223 fi
18224 M4_exists=$ac_cv_prog_M4_exists
18225 if test -n "$M4_exists"; then
18226   echo "$as_me:18226: result: $M4_exists" >&5
18227 echo "${ECHO_T}$M4_exists" >&6
18228 else
18229   echo "$as_me:18229: result: no" >&5
18230 echo "${ECHO_T}no" >&6
18231 fi
18232
18233    if test "$ac_cv_prog_M4_exists" = no; then
18234       cf_cv_prog_gnat_correct=no
18235       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18236    fi
18237    if test "$cf_cv_prog_gnat_correct" = yes; then
18238       echo "$as_me:18238: checking if GNAT works" >&5
18239 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18240
18241 rm -rf conftest* *~conftest*
18242 cat >>conftest.ads <<CF_EOF
18243 procedure conftest;
18244 CF_EOF
18245 cat >>conftest.adb <<CF_EOF
18246 with Text_IO;
18247 with GNAT.OS_Lib;
18248 procedure conftest is
18249 begin
18250    Text_IO.Put ("Hello World");
18251    Text_IO.New_Line;
18252    GNAT.OS_Lib.OS_Exit (0);
18253 end conftest;
18254 CF_EOF
18255 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18256    if ( ./conftest 1>&5 2>&1 ) ; then
18257       cf_cv_prog_gnat_correct=yes
18258    else
18259       cf_cv_prog_gnat_correct=no
18260    fi
18261 else
18262    cf_cv_prog_gnat_correct=no
18263 fi
18264 rm -rf conftest* *~conftest*
18265
18266       echo "$as_me:18266: result: $cf_cv_prog_gnat_correct" >&5
18267 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18268    fi
18269 fi
18270
18271                 if test "$cf_cv_prog_gnat_correct" = yes; then
18272
18273         ADAFLAGS="$ADAFLAGS -gnatpn"
18274
18275                         # make ADAFLAGS consistent with CFLAGS
18276                         case "$CFLAGS" in
18277                         *-g*)
18278
18279         ADAFLAGS="$ADAFLAGS -g"
18280
18281                                 ;;
18282                         esac
18283                         case "$CFLAGS" in
18284                         *-O*)
18285
18286         ADAFLAGS="$ADAFLAGS -O3"
18287
18288                                 ;;
18289                         esac
18290
18291 echo "$as_me:18291: checking if GNAT supports generics" >&5
18292 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18293 case $cf_gnat_version in #(vi
18294 3.[1-9]*|[4-9].*) #(vi
18295         cf_gnat_generics=yes
18296         ;;
18297 *)
18298         cf_gnat_generics=no
18299         ;;
18300 esac
18301 echo "$as_me:18301: result: $cf_gnat_generics" >&5
18302 echo "${ECHO_T}$cf_gnat_generics" >&6
18303
18304 if test "$cf_gnat_generics" = yes
18305 then
18306         cf_compile_generics=generics
18307         cf_generic_objects="\${GENOBJS}"
18308 else
18309         cf_compile_generics=
18310         cf_generic_objects=
18311 fi
18312
18313 echo "$as_me:18313: checking if GNAT supports SIGINT" >&5
18314 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18315 if test "${cf_cv_gnat_sigint+set}" = set; then
18316   echo $ECHO_N "(cached) $ECHO_C" >&6
18317 else
18318
18319 rm -rf conftest* *~conftest*
18320 cat >>conftest.ads <<CF_EOF
18321 with Ada.Interrupts.Names;
18322
18323 package ConfTest is
18324
18325    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18326    pragma Unreserve_All_Interrupts;
18327    pragma Warnings (On);
18328
18329    protected Process is
18330       procedure Stop;
18331       function Continue return Boolean;
18332       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18333    private
18334       Done : Boolean := False;
18335    end Process;
18336
18337 end ConfTest;
18338 CF_EOF
18339 cat >>conftest.adb <<CF_EOF
18340 package body ConfTest is
18341    protected body Process is
18342       procedure Stop is
18343       begin
18344          Done := True;
18345       end Stop;
18346       function Continue return Boolean is
18347       begin
18348          return not Done;
18349       end Continue;
18350    end Process;
18351 end ConfTest;
18352 CF_EOF
18353 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18354       cf_cv_gnat_sigint=yes
18355 else
18356    cf_cv_gnat_sigint=no
18357 fi
18358 rm -rf conftest* *~conftest*
18359
18360 fi
18361 echo "$as_me:18361: result: $cf_cv_gnat_sigint" >&5
18362 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18363
18364 if test $cf_cv_gnat_sigint = yes ; then
18365         USE_GNAT_SIGINT=""
18366 else
18367         USE_GNAT_SIGINT="#"
18368 fi
18369
18370 echo "$as_me:18370: checking if GNAT pragma Unreferenced works" >&5
18371 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18372 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18373   echo $ECHO_N "(cached) $ECHO_C" >&6
18374 else
18375
18376 rm -rf conftest* *~conftest*
18377 cat >>conftest.ads <<CF_EOF
18378 procedure conftest;
18379 CF_EOF
18380 cat >>conftest.adb <<CF_EOF
18381 with Text_IO;
18382 with GNAT.OS_Lib;
18383 procedure conftest is
18384    test : Integer;
18385    pragma Unreferenced (test);
18386 begin
18387    test := 1;
18388    Text_IO.Put ("Hello World");
18389    Text_IO.New_Line;
18390    GNAT.OS_Lib.OS_Exit (0);
18391 end conftest;
18392 CF_EOF
18393 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18394       cf_cv_pragma_unreferenced=yes
18395 else
18396    cf_cv_pragma_unreferenced=no
18397 fi
18398 rm -rf conftest* *~conftest*
18399
18400 fi
18401 echo "$as_me:18401: result: $cf_cv_pragma_unreferenced" >&5
18402 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18403
18404 # if the pragma is supported, use it (needed in the Trace code).
18405 if test $cf_cv_pragma_unreferenced = yes ; then
18406         PRAGMA_UNREF=TRUE
18407 else
18408         PRAGMA_UNREF=FALSE
18409 fi
18410
18411 cf_gnat_libraries=no
18412 cf_gnat_projects=no
18413
18414 echo "$as_me:18414: checking if GNAT supports project files" >&5
18415 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18416 case $cf_gnat_version in #(vi
18417 3.[0-9]*) #(vi
18418         ;;
18419 *)
18420         case $cf_cv_system_name in #(vi
18421         cygwin*) #(vi
18422                 ;;
18423         *)
18424                 mkdir conftest.src conftest.bin conftest.lib
18425                 cd conftest.src
18426                 rm -rf conftest* *~conftest*
18427                 cat >>library.gpr <<CF_EOF
18428 project Library is
18429   Kind := External ("LIB_KIND");
18430   for Library_Name use "ConfTest";
18431   for Object_Dir use ".";
18432   for Library_ALI_Dir use External("LIBRARY_DIR");
18433   for Library_Version use External ("SONAME");
18434   for Library_Kind use Kind;
18435   for Library_Dir use External("BUILD_DIR");
18436   Source_Dir := External ("SOURCE_DIR");
18437   for Source_Dirs use (Source_Dir);
18438   package Compiler is
18439      for Default_Switches ("Ada") use
18440        ("-g",
18441         "-O2",
18442         "-gnatafno",
18443         "-gnatVa",   -- All validity checks
18444         "-gnatwa");  -- Activate all optional errors
18445   end Compiler;
18446 end Library;
18447 CF_EOF
18448                 cat >>confpackage.ads <<CF_EOF
18449 package ConfPackage is
18450    procedure conftest;
18451 end ConfPackage;
18452 CF_EOF
18453                 cat >>confpackage.adb <<CF_EOF
18454 with Text_IO;
18455 package body ConfPackage is
18456    procedure conftest is
18457    begin
18458       Text_IO.Put ("Hello World");
18459       Text_IO.New_Line;
18460    end conftest;
18461 end ConfPackage;
18462 CF_EOF
18463                 if ( $cf_ada_make $ADAFLAGS \
18464                                 -Plibrary.gpr \
18465                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18466                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18467                                 -XSOURCE_DIR=`pwd` \
18468                                 -XSONAME=libConfTest.so.1 \
18469                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18470                         cf_gnat_projects=yes
18471                 fi
18472                 cd ..
18473                 if test -f conftest.lib/confpackage.ali
18474                 then
18475                         cf_gnat_libraries=yes
18476                 fi
18477                 rm -rf conftest* *~conftest*
18478                 ;;
18479         esac
18480         ;;
18481 esac
18482 echo "$as_me:18482: result: $cf_gnat_projects" >&5
18483 echo "${ECHO_T}$cf_gnat_projects" >&6
18484
18485 if test $cf_gnat_projects = yes
18486 then
18487         echo "$as_me:18487: checking if GNAT supports libraries" >&5
18488 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18489         echo "$as_me:18489: result: $cf_gnat_libraries" >&5
18490 echo "${ECHO_T}$cf_gnat_libraries" >&6
18491 fi
18492
18493 if test "$cf_gnat_projects" = yes
18494 then
18495         USE_OLD_MAKERULES="#"
18496         USE_GNAT_PROJECTS=""
18497 else
18498         USE_OLD_MAKERULES=""
18499         USE_GNAT_PROJECTS="#"
18500 fi
18501
18502 if test "$cf_gnat_libraries" = yes
18503 then
18504         USE_GNAT_LIBRARIES=""
18505 else
18506         USE_GNAT_LIBRARIES="#"
18507 fi
18508
18509 echo "$as_me:18509: checking for ada-compiler" >&5
18510 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18511
18512 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18513 if test "${with_ada_compiler+set}" = set; then
18514   withval="$with_ada_compiler"
18515   cf_ada_compiler=$withval
18516 else
18517   cf_ada_compiler=gnatmake
18518 fi;
18519
18520 echo "$as_me:18520: result: $cf_ada_compiler" >&5
18521 echo "${ECHO_T}$cf_ada_compiler" >&6
18522
18523                         cf_ada_package=terminal_interface
18524
18525 echo "$as_me:18525: checking for ada-include" >&5
18526 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18527
18528 # Check whether --with-ada-include or --without-ada-include was given.
18529 if test "${with_ada_include+set}" = set; then
18530   withval="$with_ada_include"
18531
18532 else
18533   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18534 fi; if test -n "$prefix/share/ada/adainclude" ; then
18535
18536 if test "x$prefix" != xNONE; then
18537   cf_path_syntax="$prefix"
18538 else
18539   cf_path_syntax="$ac_default_prefix"
18540 fi
18541
18542 case ".$withval" in #(vi
18543 .\$\(*\)*|.\'*\'*) #(vi
18544   ;;
18545 ..|./*|.\\*) #(vi
18546   ;;
18547 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18548   ;;
18549 .\${*prefix}*) #(vi
18550   eval withval="$withval"
18551   case ".$withval" in #(vi
18552   .NONE/*)
18553     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18554     ;;
18555   esac
18556   ;; #(vi
18557 .no|.NONE/*)
18558   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18559   ;;
18560 *)
18561   { { echo "$as_me:18561: error: expected a pathname, not \"$withval\"" >&5
18562 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18563    { (exit 1); exit 1; }; }
18564   ;;
18565 esac
18566
18567 fi
18568 ADA_INCLUDE="$withval"
18569
18570 echo "$as_me:18570: result: $ADA_INCLUDE" >&5
18571 echo "${ECHO_T}$ADA_INCLUDE" >&6
18572
18573 echo "$as_me:18573: checking for ada-objects" >&5
18574 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18575
18576 # Check whether --with-ada-objects or --without-ada-objects was given.
18577 if test "${with_ada_objects+set}" = set; then
18578   withval="$with_ada_objects"
18579
18580 else
18581   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18582 fi; if test -n "$prefix/lib/ada/adalib" ; then
18583
18584 if test "x$prefix" != xNONE; then
18585   cf_path_syntax="$prefix"
18586 else
18587   cf_path_syntax="$ac_default_prefix"
18588 fi
18589
18590 case ".$withval" in #(vi
18591 .\$\(*\)*|.\'*\'*) #(vi
18592   ;;
18593 ..|./*|.\\*) #(vi
18594   ;;
18595 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18596   ;;
18597 .\${*prefix}*) #(vi
18598   eval withval="$withval"
18599   case ".$withval" in #(vi
18600   .NONE/*)
18601     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18602     ;;
18603   esac
18604   ;; #(vi
18605 .no|.NONE/*)
18606   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18607   ;;
18608 *)
18609   { { echo "$as_me:18609: error: expected a pathname, not \"$withval\"" >&5
18610 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18611    { (exit 1); exit 1; }; }
18612   ;;
18613 esac
18614
18615 fi
18616 ADA_OBJECTS="$withval"
18617
18618 echo "$as_me:18618: result: $ADA_OBJECTS" >&5
18619 echo "${ECHO_T}$ADA_OBJECTS" >&6
18620
18621 echo "$as_me:18621: checking if an Ada95 shared-library should be built" >&5
18622 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18623
18624 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18625 if test "${with_ada_sharedlib+set}" = set; then
18626   withval="$with_ada_sharedlib"
18627   with_ada_sharedlib=$withval
18628 else
18629   with_ada_sharedlib=no
18630 fi;
18631 echo "$as_me:18631: result: $with_ada_sharedlib" >&5
18632 echo "${ECHO_T}$with_ada_sharedlib" >&6
18633
18634 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18635 MAKE_ADA_SHAREDLIB="#"
18636
18637 if test "x$with_ada_sharedlib" != xno
18638 then
18639         MAKE_ADA_SHAREDLIB=
18640         if test "x$with_ada_sharedlib" != xyes
18641         then
18642                 ADA_SHAREDLIB="$with_ada_sharedlib"
18643         fi
18644 fi
18645
18646                 fi
18647         fi
18648 else
18649         cf_with_ada=no
18650 fi
18651
18652 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18653 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18654 ###
18655 ### ticlib modules may be a separate library, otherwise contained in termlib.
18656 ### termlib modules may be a separate library, otherwise contained in ncurses.
18657 ###
18658 ### The of "+" or " " between the tokens controls the way the script
18659 ### chooses to split module lists into libraries.
18660 ###
18661 ### (see CF_LIB_RULES).
18662 echo "$as_me:18662: checking for library subsets" >&5
18663 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18664 LIB_SUBSETS=
18665
18666 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18667         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18668         if test "$with_ticlib" != no ; then
18669                 LIB_SUBSETS="${LIB_SUBSETS} "
18670         else
18671                 LIB_SUBSETS="${LIB_SUBSETS}+"
18672         fi
18673 fi
18674
18675 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18676 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18677
18678 if test "$with_termlib" != no ; then
18679         LIB_SUBSETS="${LIB_SUBSETS} "
18680 else
18681         LIB_SUBSETS="${LIB_SUBSETS}+"
18682 fi
18683
18684 LIB_SUBSETS="${LIB_SUBSETS}base"
18685
18686 # Most term-driver calls are to tinfo, but some like init_pair are to the
18687 # base library (so it resides in base).
18688 if test "$with_term_driver" != no ; then
18689         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18690         case $cf_cv_system_name in #(vi
18691         *mingw32*) #(vi
18692                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18693                 ;;
18694         *) #(vi
18695                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18696                 ;;
18697         esac
18698 fi
18699
18700 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18701 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18702
18703 echo "$as_me:18703: result: $LIB_SUBSETS" >&5
18704 echo "${ECHO_T}$LIB_SUBSETS" >&6
18705
18706 ### Construct the list of include-directories to be generated
18707
18708 CPPFLAGS="$CPPFLAGS -I. -I../include"
18709 if test "$srcdir" != "."; then
18710         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18711 fi
18712 if test "$GCC" != yes; then
18713         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18714 elif test "$includedir" != "/usr/include"; then
18715         if test "$includedir" = '${prefix}/include' ; then
18716                 if test $prefix != /usr ; then
18717                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18718                 fi
18719         else
18720                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18721         fi
18722 fi
18723
18724 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18725 if test "$srcdir" != "."; then
18726         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18727 fi
18728 if test "$GCC" != yes; then
18729         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18730 elif test "$includedir" != "/usr/include"; then
18731         if test "$includedir" = '${prefix}/include' ; then
18732                 if test $prefix != /usr ; then
18733                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18734                 fi
18735         else
18736                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18737         fi
18738 fi
18739
18740 ### Build up pieces for makefile rules
18741 echo "$as_me:18741: checking default library suffix" >&5
18742 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18743
18744         case $DFT_LWR_MODEL in
18745         libtool) DFT_ARG_SUFFIX=''   ;;
18746         normal)  DFT_ARG_SUFFIX=''   ;;
18747         debug)   DFT_ARG_SUFFIX='_g' ;;
18748         profile) DFT_ARG_SUFFIX='_p' ;;
18749         shared)  DFT_ARG_SUFFIX=''   ;;
18750         esac
18751         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18752 echo "$as_me:18752: result: $DFT_ARG_SUFFIX" >&5
18753 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18754
18755 echo "$as_me:18755: checking default library-dependency suffix" >&5
18756 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18757
18758         case $DFT_LWR_MODEL in #(vi
18759         libtool) #(vi
18760                 DFT_LIB_SUFFIX='.la'
18761                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18762                 ;;
18763         normal) #(vi
18764                 DFT_LIB_SUFFIX='.a'
18765                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18766                 ;;
18767         debug) #(vi
18768                 DFT_LIB_SUFFIX='_g.a'
18769                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18770                 ;;
18771         profile) #(vi
18772                 DFT_LIB_SUFFIX='_p.a'
18773                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18774                 ;;
18775         shared) #(vi
18776                 case $cf_cv_system_name in
18777                 aix[56]*) #(vi
18778                         DFT_LIB_SUFFIX='.a'
18779                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18780                         ;;
18781                 cygwin*) #(vi
18782                         DFT_LIB_SUFFIX='.dll'
18783                         DFT_DEP_SUFFIX='.dll.a'
18784                         ;;
18785                 darwin*) #(vi
18786                         DFT_LIB_SUFFIX='.dylib'
18787                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18788                         ;;
18789                 hpux*) #(vi
18790                         case $target in
18791                         ia64*) #(vi
18792                                 DFT_LIB_SUFFIX='.so'
18793                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18794                                 ;;
18795                         *) #(vi
18796                                 DFT_LIB_SUFFIX='.sl'
18797                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18798                                 ;;
18799                         esac
18800                         ;;
18801                 *)      DFT_LIB_SUFFIX='.so'
18802                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18803                         ;;
18804                 esac
18805         esac
18806         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18807         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18808 echo "$as_me:18808: result: $DFT_DEP_SUFFIX" >&5
18809 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18810
18811 echo "$as_me:18811: checking default object directory" >&5
18812 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18813
18814         case $DFT_LWR_MODEL in
18815         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18816         normal)  DFT_OBJ_SUBDIR='objects' ;;
18817         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18818         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18819         shared)
18820                 case $cf_cv_system_name in #(vi
18821                 cygwin) #(vi
18822                         DFT_OBJ_SUBDIR='objects' ;;
18823                 *)
18824                         DFT_OBJ_SUBDIR='obj_s' ;;
18825                 esac
18826         esac
18827 echo "$as_me:18827: result: $DFT_OBJ_SUBDIR" >&5
18828 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18829
18830 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18831 if test "$cf_with_cxx" = yes ; then
18832 echo "$as_me:18832: checking c++ library-dependency suffix" >&5
18833 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18834 if test "$with_libtool" != "no"; then
18835         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18836 else
18837
18838         case normal in #(vi
18839         libtool) #(vi
18840                 CXX_LIB_SUFFIX='.la'
18841                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18842                 ;;
18843         normal) #(vi
18844                 CXX_LIB_SUFFIX='.a'
18845                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18846                 ;;
18847         debug) #(vi
18848                 CXX_LIB_SUFFIX='_g.a'
18849                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18850                 ;;
18851         profile) #(vi
18852                 CXX_LIB_SUFFIX='_p.a'
18853                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18854                 ;;
18855         shared) #(vi
18856                 case $cf_cv_system_name in
18857                 aix[56]*) #(vi
18858                         CXX_LIB_SUFFIX='.a'
18859                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18860                         ;;
18861                 cygwin*) #(vi
18862                         CXX_LIB_SUFFIX='.dll'
18863                         CXX_DEP_SUFFIX='.dll.a'
18864                         ;;
18865                 darwin*) #(vi
18866                         CXX_LIB_SUFFIX='.dylib'
18867                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18868                         ;;
18869                 hpux*) #(vi
18870                         case $target in
18871                         ia64*) #(vi
18872                                 CXX_LIB_SUFFIX='.so'
18873                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18874                                 ;;
18875                         *) #(vi
18876                                 CXX_LIB_SUFFIX='.sl'
18877                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18878                                 ;;
18879                         esac
18880                         ;;
18881                 *)      CXX_LIB_SUFFIX='.so'
18882                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18883                         ;;
18884                 esac
18885         esac
18886         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18887         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18888 fi
18889 echo "$as_me:18889: result: $CXX_LIB_SUFFIX" >&5
18890 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18891
18892 fi
18893
18894 # do not want -ldl in build except as needed for -lncurses dependency
18895 if test "$with_dlsym" = yes ; then
18896 if test $DFT_LWR_MODEL = shared || \
18897    test $DFT_LWR_MODEL = libtool ; then
18898
18899 # remove dl library from $LIBS
18900 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18901
18902 fi
18903 fi
18904 ### Set up low-level terminfo dependencies for makefiles.
18905
18906 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18907 # do not need libdl
18908 TICS_LIST=
18909 if test "$with_dlsym" = yes ; then
18910
18911 # remove dl library from $SHLIB_LIST
18912 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18913
18914 fi
18915
18916 if test "$with_ticlib" != no ; then
18917
18918         if test "$with_ticlib" != yes ; then
18919                 TICS_NAME=$with_ticlib
18920                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18921                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18922                 TICS_LIB_SUFFIX="${with_ticlib}"
18923         else
18924                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18925                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18926                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18927         fi
18928         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18929 else
18930         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18931 fi
18932
18933 if test "$with_termlib" != no ; then
18934
18935         if test "$with_termlib" != yes ; then
18936                 TINFO_NAME=$with_termlib
18937                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18938                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18939                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18940                 TINFO_LIB_SUFFIX="${with_termlib}"
18941         else
18942                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18943                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18944                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18945                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18946         fi
18947
18948         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18949         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18950         if test "$DFT_LWR_MODEL" = "libtool"; then
18951                 TEST_ARGS="${TEST_DEPS}"
18952                 TEST_ARG2="${TEST_DEP2}"
18953                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18954                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18955                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18956         else
18957                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18958                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18959                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18960                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18961                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18962         fi
18963 else
18964         # the next lines are needed for linking libtic over libncurses
18965         TINFO_NAME=${LIB_NAME}
18966         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18967         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18968         if test "$with_tic_depends" = yes ; then
18969                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18970         else
18971                 TICS_LIST="$SHLIB_LIST"
18972         fi
18973
18974         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18975 fi
18976
18977 if test "$DFT_LWR_MODEL" = shared ; then
18978         case $cf_cv_system_name in #(vi
18979         cygwin*)
18980                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18981                 TINFO_SUFFIX=.dll
18982                 ;;
18983         esac
18984 fi
18985
18986 if test "$with_dlsym" = yes ; then
18987
18988 # remove dl library from $TICS_LIST
18989 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18990
18991 fi
18992
18993 if test "$DFT_LWR_MODEL" = "libtool"; then
18994     OBJEXT=lo
18995 fi
18996
18997 # needed for Ada95
18998 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18999
19000 case $DFT_LWR_MODEL in
19001 normal|debug|profile)
19002
19003 if test "$GCC" = yes ; then
19004         case $cf_cv_system_name in #(
19005         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19006                 LDFLAGS_STATIC=
19007                 LDFLAGS_SHARED=
19008                 ;;
19009     *)  #( normally, except when broken
19010         LDFLAGS_STATIC=-static
19011         LDFLAGS_SHARED=-dynamic
19012         ;;
19013     esac
19014 else
19015         case $cf_cv_system_name in #(
19016         aix[456]*)      #( from ld manpage
19017                 LDFLAGS_STATIC=-bstatic
19018                 LDFLAGS_SHARED=-bdynamic
19019                 ;;
19020         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19021                 # We could also use just "archive" and "shared".
19022                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19023                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19024                 ;;
19025         irix*)          #( from ld manpage IRIX64
19026                 LDFLAGS_STATIC=-Bstatic
19027                 LDFLAGS_SHARED=-Bdynamic
19028                 ;;
19029         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19030                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19031                 LDFLAGS_STATIC=-noso
19032                 LDFLAGS_SHARED=-so_archive
19033                 ;;
19034         solaris2*)
19035                 LDFLAGS_STATIC=-Bstatic
19036                 LDFLAGS_SHARED=-Bdynamic
19037                 ;;
19038         esac
19039 fi
19040
19041 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19042 then
19043         echo "$as_me:19043: checking if linker supports switching between static/dynamic" >&5
19044 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19045
19046         rm -f libconftest.a
19047         cat >conftest.$ac_ext <<EOF
19048 #line 19048 "configure"
19049 #include <stdio.h>
19050 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19051 EOF
19052         if { (eval echo "$as_me:19052: \"$ac_compile\"") >&5
19053   (eval $ac_compile) 2>&5
19054   ac_status=$?
19055   echo "$as_me:19055: \$? = $ac_status" >&5
19056   (exit $ac_status); } ; then
19057                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19058                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19059         fi
19060         rm -f conftest.*
19061
19062         cf_save_LIBS="$LIBS"
19063
19064         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19065         cat >conftest.$ac_ext <<_ACEOF
19066 #line 19066 "configure"
19067 #include "confdefs.h"
19068
19069 #line 19069 "configure"
19070 #include <stdio.h>
19071 int cf_ldflags_static(FILE *fp);
19072
19073 int
19074 main ()
19075 {
19076
19077         return cf_ldflags_static(stdin);
19078
19079   ;
19080   return 0;
19081 }
19082 _ACEOF
19083 rm -f conftest.$ac_objext conftest$ac_exeext
19084 if { (eval echo "$as_me:19084: \"$ac_link\"") >&5
19085   (eval $ac_link) 2>&5
19086   ac_status=$?
19087   echo "$as_me:19087: \$? = $ac_status" >&5
19088   (exit $ac_status); } &&
19089          { ac_try='test -s conftest$ac_exeext'
19090   { (eval echo "$as_me:19090: \"$ac_try\"") >&5
19091   (eval $ac_try) 2>&5
19092   ac_status=$?
19093   echo "$as_me:19093: \$? = $ac_status" >&5
19094   (exit $ac_status); }; }; then
19095   cf_ldflags_static=yes
19096 else
19097   echo "$as_me: failed program was:" >&5
19098 cat conftest.$ac_ext >&5
19099 cf_ldflags_static=no
19100 fi
19101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19102
19103         rm -f libconftest.*
19104         LIBS="$cf_save_LIBS"
19105
19106         echo "$as_me:19106: result: $cf_ldflags_static" >&5
19107 echo "${ECHO_T}$cf_ldflags_static" >&6
19108
19109         if test $cf_ldflags_static != yes
19110         then
19111                 LDFLAGS_STATIC=
19112                 LDFLAGS_SHARED=
19113         fi
19114 else
19115         LDFLAGS_STATIC=
19116         LDFLAGS_SHARED=
19117 fi
19118
19119         ;;
19120 esac
19121
19122 echo "$as_me:19122: checking where we will install curses.h" >&5
19123 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19124 test "$with_overwrite" = no && \
19125 test "x$includedir" = 'x${prefix}/include' && \
19126         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19127 echo "$as_me:19127: result: $includedir" >&5
19128 echo "${ECHO_T}$includedir" >&6
19129
19130 ### Resolve a conflict between normal and wide-curses by forcing applications
19131 ### that will need libutf8 to add it to their configure script.
19132 if test "$with_overwrite" != no ; then
19133 if test "$NCURSES_LIBUTF8" = 1 ; then
19134         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19135         { echo "$as_me:19135: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19136 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19137 fi
19138 fi
19139 WITH_OVERWRITE=$with_overwrite
19140
19141 # used to separate tack out of the tree
19142 NCURSES_TREE=
19143
19144 ### predefined stuff for the test programs
19145 cat >>confdefs.h <<\EOF
19146 #define HAVE_SLK_COLOR 1
19147 EOF
19148
19149 ### Construct the list of subdirectories for which we'll customize makefiles
19150 ### with the appropriate compile-rules.
19151
19152 echo "$as_me:19152: checking for src modules" >&5
19153 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19154
19155 # dependencies and linker-arguments for test-programs
19156 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19157 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19158 if test "$DFT_LWR_MODEL" = "libtool"; then
19159         TEST_ARGS="${TEST_DEPS}"
19160         TEST_ARG2="${TEST_DEP2}"
19161 else
19162         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19163         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19164 fi
19165
19166 cf_cv_src_modules=
19167 for cf_dir in $modules_to_build
19168 do
19169         if test -f $srcdir/$cf_dir/modules; then
19170
19171                 # We may/may not have tack in the distribution, though the
19172                 # makefile is.
19173                 if test $cf_dir = tack ; then
19174                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19175                                 continue
19176                         fi
19177                 fi
19178
19179                 if test -z "$cf_cv_src_modules"; then
19180                         cf_cv_src_modules=$cf_dir
19181                 else
19182                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19183                 fi
19184
19185                 # Make the ncurses_cfg.h file record the library interface files as
19186                 # well.  These are header files that are the same name as their
19187                 # directory.  Ncurses is the only library that does not follow
19188                 # that pattern.
19189                 if test $cf_dir = tack ; then
19190                         continue
19191                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19192
19193 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19194
19195                         cat >>confdefs.h <<EOF
19196 #define HAVE_${cf_have_include}_H 1
19197 EOF
19198
19199                         cat >>confdefs.h <<EOF
19200 #define HAVE_LIB${cf_have_include} 1
19201 EOF
19202
19203                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19204                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19205                         if test "$DFT_LWR_MODEL" = "libtool"; then
19206                                 TEST_ARGS="${TEST_DEPS}"
19207                                 TEST_ARG2="${TEST_DEP2}"
19208                         else
19209                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19210                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19211                         fi
19212                 fi
19213         fi
19214 done
19215 echo "$as_me:19215: result: $cf_cv_src_modules" >&5
19216 echo "${ECHO_T}$cf_cv_src_modules" >&6
19217
19218 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19219 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19220
19221 SRC_SUBDIRS=
19222 if test "x$cf_with_manpages" != xno ; then
19223         SRC_SUBDIRS="$SRC_SUBDIRS man"
19224 fi
19225 SRC_SUBDIRS="$SRC_SUBDIRS include"
19226 for cf_dir in $cf_cv_src_modules
19227 do
19228         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19229 done
19230 if test "x$cf_with_tests" != "xno" ; then
19231         SRC_SUBDIRS="$SRC_SUBDIRS test"
19232 fi
19233 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19234 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19235
19236 ADA_SUBDIRS=
19237 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19238         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19239         ADA_SUBDIRS="gen src"
19240         if test "x$cf_with_tests" != "xno" ; then
19241                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19242         fi
19243 fi
19244
19245 SUB_MAKEFILES=
19246 for cf_dir in $SRC_SUBDIRS
19247 do
19248         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19249 done
19250
19251 if test -n "$ADA_SUBDIRS"; then
19252         for cf_dir in $ADA_SUBDIRS
19253         do
19254                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19255         done
19256
19257 fi
19258
19259 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19260    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19261    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19262 fi
19263
19264 DIRS_TO_MAKE="lib"
19265 for cf_item in $cf_list_models
19266 do
19267
19268         case $cf_item in
19269         libtool) cf_subdir='obj_lo'  ;;
19270         normal)  cf_subdir='objects' ;;
19271         debug)   cf_subdir='obj_g' ;;
19272         profile) cf_subdir='obj_p' ;;
19273         shared)
19274                 case $cf_cv_system_name in #(vi
19275                 cygwin) #(vi
19276                         cf_subdir='objects' ;;
19277                 *)
19278                         cf_subdir='obj_s' ;;
19279                 esac
19280         esac
19281
19282         for cf_item2 in $DIRS_TO_MAKE
19283         do
19284                 test $cf_item2 = $cf_subdir && break
19285         done
19286         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19287 done
19288 for cf_dir in $DIRS_TO_MAKE
19289 do
19290         test ! -d $cf_dir && mkdir $cf_dir
19291 done
19292
19293 # symbols that differ when compiling Ada95 by itself.
19294 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19295
19296 # values to use as strings
19297 cat >>confdefs.h <<EOF
19298 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19299 EOF
19300
19301 cat >>confdefs.h <<EOF
19302 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19303 EOF
19304
19305 ### Now that we're done running tests, add the compiler-warnings, if any
19306
19307 cf_fix_cppflags=no
19308 cf_new_cflags=
19309 cf_new_cppflags=
19310 cf_new_extra_cppflags=
19311
19312 for cf_add_cflags in $EXTRA_CFLAGS
19313 do
19314 case $cf_fix_cppflags in
19315 no)
19316         case $cf_add_cflags in #(vi
19317         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19318                 case $cf_add_cflags in
19319                 -D*)
19320                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19321
19322                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19323                                 && test -z "${cf_tst_cflags}" \
19324                                 && cf_fix_cppflags=yes
19325
19326                         if test $cf_fix_cppflags = yes ; then
19327                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19328                                 continue
19329                         elif test "${cf_tst_cflags}" = "\"'" ; then
19330                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19331                                 continue
19332                         fi
19333                         ;;
19334                 esac
19335                 case "$CPPFLAGS" in
19336                 *$cf_add_cflags) #(vi
19337                         ;;
19338                 *) #(vi
19339                         case $cf_add_cflags in #(vi
19340                         -D*)
19341                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19342
19343 CPPFLAGS=`echo "$CPPFLAGS" | \
19344         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19345                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19346
19347                                 ;;
19348                         esac
19349                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19350                         ;;
19351                 esac
19352                 ;;
19353         *)
19354                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19355                 ;;
19356         esac
19357         ;;
19358 yes)
19359         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19360
19361         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19362
19363         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19364                 && test -z "${cf_tst_cflags}" \
19365                 && cf_fix_cppflags=no
19366         ;;
19367 esac
19368 done
19369
19370 if test -n "$cf_new_cflags" ; then
19371
19372         CFLAGS="$CFLAGS $cf_new_cflags"
19373 fi
19374
19375 if test -n "$cf_new_cppflags" ; then
19376
19377         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19378 fi
19379
19380 if test -n "$cf_new_extra_cppflags" ; then
19381
19382         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19383 fi
19384
19385 ### Define substitutions for header files to avoid name-pollution
19386
19387 if test "$cf_cv_have_tcgetattr" = yes ; then
19388         HAVE_TCGETATTR=1
19389 else
19390         HAVE_TCGETATTR=0
19391 fi
19392
19393 if test "$ac_cv_header_termio_h" = yes ; then
19394         HAVE_TERMIO_H=1
19395 else
19396         HAVE_TERMIO_H=0
19397 fi
19398
19399 if test "$ac_cv_header_termios_h" = yes ; then
19400         HAVE_TERMIOS_H=1
19401 else
19402         HAVE_TERMIOS_H=0
19403 fi
19404
19405 ################################################################################
19406 test "$use_database" = yes && \
19407 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19408
19409 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19410 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19411
19412 if test x"$enable_pc_files" = xyes ; then \
19413 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19414 MAKE_PC_FILES=
19415 else
19416 MAKE_PC_FILES="#"
19417 fi
19418
19419 # Extract the first word of "tic", so it can be a program name with args.
19420 set dummy tic; ac_word=$2
19421 echo "$as_me:19421: checking for $ac_word" >&5
19422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19423 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19424   echo $ECHO_N "(cached) $ECHO_C" >&6
19425 else
19426   case $TIC_PATH in
19427   [\\/]* | ?:[\\/]*)
19428   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19429   ;;
19430   *)
19431   ac_save_IFS=$IFS; IFS=$ac_path_separator
19432 ac_dummy="$PATH:/usr/local/ncurses/bin"
19433 for ac_dir in $ac_dummy; do
19434   IFS=$ac_save_IFS
19435   test -z "$ac_dir" && ac_dir=.
19436   if $as_executable_p "$ac_dir/$ac_word"; then
19437    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19438    echo "$as_me:19438: found $ac_dir/$ac_word" >&5
19439    break
19440 fi
19441 done
19442
19443   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19444   ;;
19445 esac
19446 fi
19447 TIC_PATH=$ac_cv_path_TIC_PATH
19448
19449 if test -n "$TIC_PATH"; then
19450   echo "$as_me:19450: result: $TIC_PATH" >&5
19451 echo "${ECHO_T}$TIC_PATH" >&6
19452 else
19453   echo "$as_me:19453: result: no" >&5
19454 echo "${ECHO_T}no" >&6
19455 fi
19456
19457 if test -n "$FALLBACK_LIST"
19458 then
19459         if test "$TIC_PATH" = unknown
19460         then
19461                 { echo "$as_me:19461: WARNING: no tic program found for fallbacks" >&5
19462 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19463         fi
19464 fi
19465
19466 if test "x$cf_with_tests" != xno ; then
19467         MAKE_TESTS=
19468 else
19469         MAKE_TESTS="#"
19470 fi
19471
19472 ADAHTML_DIR=../../doc/html/ada
19473
19474 SUB_SCRIPTS=
19475 case $cf_cv_system_name in #(vi
19476 *mingw32*) #(vi
19477         SUB_SCRIPTS="mk-dlls.sh"
19478         ;;
19479 esac
19480
19481 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"
19482 ac_config_commands="$ac_config_commands default"
19483 cat >confcache <<\_ACEOF
19484 # This file is a shell script that caches the results of configure
19485 # tests run on this system so they can be shared between configure
19486 # scripts and configure runs, see configure's option --config-cache.
19487 # It is not useful on other systems.  If it contains results you don't
19488 # want to keep, you may remove or edit it.
19489 #
19490 # config.status only pays attention to the cache file if you give it
19491 # the --recheck option to rerun configure.
19492 #
19493 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19494 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19495 # following values.
19496
19497 _ACEOF
19498
19499 # The following way of writing the cache mishandles newlines in values,
19500 # but we know of no workaround that is simple, portable, and efficient.
19501 # So, don't put newlines in cache variables' values.
19502 # Ultrix sh set writes to stderr and can't be redirected directly,
19503 # and sets the high bit in the cache file unless we assign to the vars.
19504 {
19505   (set) 2>&1 |
19506     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19507     *ac_space=\ *)
19508       # `set' does not quote correctly, so add quotes (double-quote
19509       # substitution turns \\\\ into \\, and sed turns \\ into \).
19510       sed -n \
19511         "s/'/'\\\\''/g;
19512           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19513       ;;
19514     *)
19515       # `set' quotes correctly as required by POSIX, so do not add quotes.
19516       sed -n \
19517         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19518       ;;
19519     esac;
19520 } |
19521   sed '
19522      t clear
19523      : clear
19524      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19525      t end
19526      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19527      : end' >>confcache
19528 if cmp -s $cache_file confcache; then :; else
19529   if test -w $cache_file; then
19530     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19531     cat confcache >$cache_file
19532   else
19533     echo "not updating unwritable cache $cache_file"
19534   fi
19535 fi
19536 rm -f confcache
19537
19538 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19539 # Let make expand exec_prefix.
19540 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19541
19542 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19543 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19544 # trailing colons and then remove the whole line if VPATH becomes empty
19545 # (actually we leave an empty line to preserve line numbers).
19546 if test "x$srcdir" = x.; then
19547   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19548 s/:*\$(srcdir):*/:/;
19549 s/:*\${srcdir}:*/:/;
19550 s/:*@srcdir@:*/:/;
19551 s/^\([^=]*=[    ]*\):*/\1/;
19552 s/:*$//;
19553 s/^[^=]*=[      ]*$//;
19554 }'
19555 fi
19556
19557 DEFS=-DHAVE_CONFIG_H
19558
19559 : ${CONFIG_STATUS=./config.status}
19560 ac_clean_files_save=$ac_clean_files
19561 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19562 { echo "$as_me:19562: creating $CONFIG_STATUS" >&5
19563 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19564 cat >$CONFIG_STATUS <<_ACEOF
19565 #! $SHELL
19566 # Generated automatically by configure.
19567 # Run this file to recreate the current configuration.
19568 # Compiler output produced by configure, useful for debugging
19569 # configure, is in config.log if it exists.
19570
19571 debug=false
19572 SHELL=\${CONFIG_SHELL-$SHELL}
19573 ac_cs_invocation="\$0 \$@"
19574
19575 _ACEOF
19576
19577 cat >>$CONFIG_STATUS <<\_ACEOF
19578 # Be Bourne compatible
19579 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19580   emulate sh
19581   NULLCMD=:
19582 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19583   set -o posix
19584 fi
19585
19586 # Name of the executable.
19587 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19588
19589 if expr a : '\(a\)' >/dev/null 2>&1; then
19590   as_expr=expr
19591 else
19592   as_expr=false
19593 fi
19594
19595 rm -f conf$$ conf$$.exe conf$$.file
19596 echo >conf$$.file
19597 if ln -s conf$$.file conf$$ 2>/dev/null; then
19598   # We could just check for DJGPP; but this test a) works b) is more generic
19599   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19600   if test -f conf$$.exe; then
19601     # Don't use ln at all; we don't have any links
19602     as_ln_s='cp -p'
19603   else
19604     as_ln_s='ln -s'
19605   fi
19606 elif ln conf$$.file conf$$ 2>/dev/null; then
19607   as_ln_s=ln
19608 else
19609   as_ln_s='cp -p'
19610 fi
19611 rm -f conf$$ conf$$.exe conf$$.file
19612
19613 as_executable_p="test -f"
19614
19615 # Support unset when possible.
19616 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19617   as_unset=unset
19618 else
19619   as_unset=false
19620 fi
19621
19622 # NLS nuisances.
19623 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19624 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19625 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19626 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19627 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19628 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19629 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19630 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19631
19632 # IFS
19633 # We need space, tab and new line, in precisely that order.
19634 as_nl='
19635 '
19636 IFS="   $as_nl"
19637
19638 # CDPATH.
19639 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19640
19641 exec 6>&1
19642
19643 _ACEOF
19644
19645 # Files that config.status was made for.
19646 if test -n "$ac_config_files"; then
19647   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19648 fi
19649
19650 if test -n "$ac_config_headers"; then
19651   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19652 fi
19653
19654 if test -n "$ac_config_links"; then
19655   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19656 fi
19657
19658 if test -n "$ac_config_commands"; then
19659   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19660 fi
19661
19662 cat >>$CONFIG_STATUS <<\EOF
19663
19664 ac_cs_usage="\
19665 \`$as_me' instantiates files from templates according to the
19666 current configuration.
19667
19668 Usage: $0 [OPTIONS] [FILE]...
19669
19670   -h, --help       print this help, then exit
19671   -V, --version    print version number, then exit
19672   -d, --debug      don't remove temporary files
19673       --recheck    update $as_me by reconfiguring in the same conditions
19674   --file=FILE[:TEMPLATE]
19675                    instantiate the configuration file FILE
19676   --header=FILE[:TEMPLATE]
19677                    instantiate the configuration header FILE
19678
19679 Configuration files:
19680 $config_files
19681
19682 Configuration headers:
19683 $config_headers
19684
19685 Configuration commands:
19686 $config_commands
19687
19688 Report bugs to <dickey@invisible-island.net>."
19689 EOF
19690
19691 cat >>$CONFIG_STATUS <<EOF
19692 ac_cs_version="\\
19693 config.status
19694 configured by $0, generated by GNU Autoconf 2.52.20101002,
19695   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19696
19697 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19698 Free Software Foundation, Inc.
19699 This config.status script is free software; the Free Software Foundation
19700 gives unlimited permission to copy, distribute and modify it."
19701 srcdir=$srcdir
19702 INSTALL="$INSTALL"
19703 EOF
19704
19705 cat >>$CONFIG_STATUS <<\EOF
19706 # If no file are specified by the user, then we need to provide default
19707 # value.  By we need to know if files were specified by the user.
19708 ac_need_defaults=:
19709 while test $# != 0
19710 do
19711   case $1 in
19712   --*=*)
19713     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19714     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19715     shift
19716     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19717     shift
19718     ;;
19719   -*);;
19720   *) # This is not an option, so the user has probably given explicit
19721      # arguments.
19722      ac_need_defaults=false;;
19723   esac
19724
19725   case $1 in
19726   # Handling of the options.
19727 EOF
19728 cat >>$CONFIG_STATUS <<EOF
19729   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19730     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19731     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19732 EOF
19733 cat >>$CONFIG_STATUS <<\EOF
19734   --version | --vers* | -V )
19735     echo "$ac_cs_version"; exit 0 ;;
19736   --he | --h)
19737     # Conflict between --help and --header
19738     { { echo "$as_me:19738: error: ambiguous option: $1
19739 Try \`$0 --help' for more information." >&5
19740 echo "$as_me: error: ambiguous option: $1
19741 Try \`$0 --help' for more information." >&2;}
19742    { (exit 1); exit 1; }; };;
19743   --help | --hel | -h )
19744     echo "$ac_cs_usage"; exit 0 ;;
19745   --debug | --d* | -d )
19746     debug=: ;;
19747   --file | --fil | --fi | --f )
19748     shift
19749     CONFIG_FILES="$CONFIG_FILES $1"
19750     ac_need_defaults=false;;
19751   --header | --heade | --head | --hea )
19752     shift
19753     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19754     ac_need_defaults=false;;
19755
19756   # This is an error.
19757   -*) { { echo "$as_me:19757: error: unrecognized option: $1
19758 Try \`$0 --help' for more information." >&5
19759 echo "$as_me: error: unrecognized option: $1
19760 Try \`$0 --help' for more information." >&2;}
19761    { (exit 1); exit 1; }; } ;;
19762
19763   *) ac_config_targets="$ac_config_targets $1" ;;
19764
19765   esac
19766   shift
19767 done
19768
19769 exec 5>>config.log
19770 cat >&5 << _ACEOF
19771
19772 ## ----------------------- ##
19773 ## Running config.status.  ##
19774 ## ----------------------- ##
19775
19776 This file was extended by $as_me 2.52.20101002, executed with
19777   CONFIG_FILES    = $CONFIG_FILES
19778   CONFIG_HEADERS  = $CONFIG_HEADERS
19779   CONFIG_LINKS    = $CONFIG_LINKS
19780   CONFIG_COMMANDS = $CONFIG_COMMANDS
19781   > $ac_cs_invocation
19782 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19783
19784 _ACEOF
19785 EOF
19786
19787 cat >>$CONFIG_STATUS <<EOF
19788 #
19789 # INIT-COMMANDS section.
19790 #
19791
19792 ### Special initialization commands, used to pass information from the
19793 ### configuration-run into config.status
19794
19795 AWK="$AWK"
19796 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19797 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19798 ECHO_LINK="$ECHO_LINK"
19799 LDCONFIG="$LDCONFIG"
19800 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19801 LIB_NAME="$LIB_NAME"
19802 LIB_SUBSETS="$LIB_SUBSETS"
19803 LIB_SUFFIX="$LIB_SUFFIX"
19804 LIB_TRACING="$LIB_TRACING"
19805 LN_S="$LN_S"
19806 MAKE_TERMINFO="$MAKE_TERMINFO"
19807 NCURSES_MAJOR="$NCURSES_MAJOR"
19808 NCURSES_MINOR="$NCURSES_MINOR"
19809 NCURSES_OSPEED="$NCURSES_OSPEED"
19810 NCURSES_PATCH="$NCURSES_PATCH"
19811 SRC_SUBDIRS="$SRC_SUBDIRS"
19812 TERMINFO="$TERMINFO"
19813 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19814 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19815 TICS_NAME="$TICS_NAME"
19816 TIC_PATH="$TIC_PATH"
19817 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19818 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19819 TINFO_NAME="$TINFO_NAME"
19820 TINFO_SUFFIX="$TINFO_SUFFIX"
19821 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19822 WITH_CURSES_H="$with_curses_h"
19823 WITH_ECHO="$with_echo"
19824 WITH_OVERWRITE="$with_overwrite"
19825 cf_LIST_MODELS="$cf_list_models"
19826 cf_cv_abi_version="$cf_cv_abi_version"
19827 cf_cv_do_relink="$cf_cv_do_relink"
19828 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19829 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19830 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19831 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19832 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19833 cf_cv_rel_version="$cf_cv_rel_version"
19834 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19835 cf_cv_shared_soname='$cf_cv_shared_soname'
19836 cf_cv_shlib_version="$cf_cv_shlib_version"
19837 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19838 cf_cv_system_name="$cf_cv_system_name"
19839 cf_with_ada="$cf_with_ada"
19840 cf_with_cxx_binding="$cf_with_cxx_binding"
19841 cf_with_manpages="$cf_with_manpages"
19842 cf_with_tests="$cf_with_tests"
19843 host="$host"
19844 target="$target"
19845
19846 EOF
19847
19848 cat >>$CONFIG_STATUS <<\EOF
19849 for ac_config_target in $ac_config_targets
19850 do
19851   case "$ac_config_target" in
19852   # Handling of arguments.
19853   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19854   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19855   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19856   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19857   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19858   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19859   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19860   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19861   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19862   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19863   *) { { echo "$as_me:19863: error: invalid argument: $ac_config_target" >&5
19864 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19865    { (exit 1); exit 1; }; };;
19866   esac
19867 done
19868
19869 # If the user did not use the arguments to specify the items to instantiate,
19870 # then the envvar interface is used.  Set only those that are not.
19871 # We use the long form for the default assignment because of an extremely
19872 # bizarre bug on SunOS 4.1.3.
19873 if $ac_need_defaults; then
19874   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19875   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19876   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19877 fi
19878
19879 # Create a temporary directory, and hook for its removal unless debugging.
19880 $debug ||
19881 {
19882   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19883   trap '{ (exit 1); exit 1; }' 1 2 13 15
19884 }
19885
19886 # Create a (secure) tmp directory for tmp files.
19887 : ${TMPDIR=/tmp}
19888 {
19889   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19890   test -n "$tmp" && test -d "$tmp"
19891 }  ||
19892 {
19893   tmp=$TMPDIR/cs$$-$RANDOM
19894   (umask 077 && mkdir $tmp)
19895 } ||
19896 {
19897    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19898    { (exit 1); exit 1; }
19899 }
19900
19901 EOF
19902
19903 cat >>$CONFIG_STATUS <<EOF
19904
19905 #
19906 # CONFIG_FILES section.
19907 #
19908
19909 # No need to generate the scripts if there are no CONFIG_FILES.
19910 # This happens for instance when ./config.status config.h
19911 if test -n "\$CONFIG_FILES"; then
19912   # Protect against being on the right side of a sed subst in config.status.
19913   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19914    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19915 s,@SHELL@,$SHELL,;t t
19916 s,@exec_prefix@,$exec_prefix,;t t
19917 s,@prefix@,$prefix,;t t
19918 s,@program_transform_name@,$program_transform_name,;t t
19919 s,@bindir@,$bindir,;t t
19920 s,@sbindir@,$sbindir,;t t
19921 s,@libexecdir@,$libexecdir,;t t
19922 s,@datadir@,$datadir,;t t
19923 s,@sysconfdir@,$sysconfdir,;t t
19924 s,@sharedstatedir@,$sharedstatedir,;t t
19925 s,@localstatedir@,$localstatedir,;t t
19926 s,@libdir@,$libdir,;t t
19927 s,@includedir@,$includedir,;t t
19928 s,@oldincludedir@,$oldincludedir,;t t
19929 s,@infodir@,$infodir,;t t
19930 s,@mandir@,$mandir,;t t
19931 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19932 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19933 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19934 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19935 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19936 s,@build_alias@,$build_alias,;t t
19937 s,@host_alias@,$host_alias,;t t
19938 s,@target_alias@,$target_alias,;t t
19939 s,@ECHO_C@,$ECHO_C,;t t
19940 s,@ECHO_N@,$ECHO_N,;t t
19941 s,@ECHO_T@,$ECHO_T,;t t
19942 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19943 s,@DEFS@,$DEFS,;t t
19944 s,@LIBS@,$LIBS,;t t
19945 s,@top_builddir@,$top_builddir,;t t
19946 s,@EGREP@,$EGREP,;t t
19947 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19948 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19949 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19950 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19951 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19952 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19953 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19954 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19955 s,@build@,$build,;t t
19956 s,@build_cpu@,$build_cpu,;t t
19957 s,@build_vendor@,$build_vendor,;t t
19958 s,@build_os@,$build_os,;t t
19959 s,@host@,$host,;t t
19960 s,@host_cpu@,$host_cpu,;t t
19961 s,@host_vendor@,$host_vendor,;t t
19962 s,@host_os@,$host_os,;t t
19963 s,@target@,$target,;t t
19964 s,@target_cpu@,$target_cpu,;t t
19965 s,@target_vendor@,$target_vendor,;t t
19966 s,@target_os@,$target_os,;t t
19967 s,@CC@,$CC,;t t
19968 s,@CFLAGS@,$CFLAGS,;t t
19969 s,@LDFLAGS@,$LDFLAGS,;t t
19970 s,@CPPFLAGS@,$CPPFLAGS,;t t
19971 s,@ac_ct_CC@,$ac_ct_CC,;t t
19972 s,@EXEEXT@,$EXEEXT,;t t
19973 s,@OBJEXT@,$OBJEXT,;t t
19974 s,@CPP@,$CPP,;t t
19975 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19976 s,@PROG_EXT@,$PROG_EXT,;t t
19977 s,@LDCONFIG@,$LDCONFIG,;t t
19978 s,@CXX@,$CXX,;t t
19979 s,@CXXFLAGS@,$CXXFLAGS,;t t
19980 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19981 s,@AWK@,$AWK,;t t
19982 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19983 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19984 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19985 s,@LINT@,$LINT,;t t
19986 s,@LINT_OPTS@,$LINT_OPTS,;t t
19987 s,@LN_S@,$LN_S,;t t
19988 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19989 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19990 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19991 s,@SET_MAKE@,$SET_MAKE,;t t
19992 s,@CTAGS@,$CTAGS,;t t
19993 s,@ETAGS@,$ETAGS,;t t
19994 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19995 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19996 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19997 s,@RANLIB@,$RANLIB,;t t
19998 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19999 s,@LD@,$LD,;t t
20000 s,@ac_ct_LD@,$ac_ct_LD,;t t
20001 s,@AR@,$AR,;t t
20002 s,@ac_ct_AR@,$ac_ct_AR,;t t
20003 s,@ARFLAGS@,$ARFLAGS,;t t
20004 s,@DESTDIR@,$DESTDIR,;t t
20005 s,@BUILD_CC@,$BUILD_CC,;t t
20006 s,@BUILD_CPP@,$BUILD_CPP,;t t
20007 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20008 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20009 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20010 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20011 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20012 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20013 s,@cf_list_models@,$cf_list_models,;t t
20014 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20015 s,@LIBTOOL@,$LIBTOOL,;t t
20016 s,@LT_UNDEF@,$LT_UNDEF,;t t
20017 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20018 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20019 s,@LIB_CREATE@,$LIB_CREATE,;t t
20020 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20021 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20022 s,@LIB_PREP@,$LIB_PREP,;t t
20023 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20024 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20025 s,@LIB_LINK@,$LIB_LINK,;t t
20026 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20027 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20028 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20029 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20030 s,@TICS_NAME@,$TICS_NAME,;t t
20031 s,@TINFO_NAME@,$TINFO_NAME,;t t
20032 s,@LIB_NAME@,$LIB_NAME,;t t
20033 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20034 s,@CC_G_OPT@,$CC_G_OPT,;t t
20035 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20036 s,@LD_MODEL@,$LD_MODEL,;t t
20037 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20038 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20039 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20040 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20041 s,@LINK_PROGS@,$LINK_PROGS,;t t
20042 s,@LINK_TESTS@,$LINK_TESTS,;t t
20043 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20044 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20045 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20046 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20047 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20048 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20049 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20050 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20051 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20052 s,@TERMINFO@,$TERMINFO,;t t
20053 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20054 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20055 s,@TERMPATH@,$TERMPATH,;t t
20056 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20057 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20058 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20059 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20060 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20061 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20062 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20063 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20064 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20065 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20066 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20067 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20068 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20069 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20070 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20071 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20072 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20073 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20074 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20075 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20076 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20077 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20078 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20079 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20080 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20081 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20082 s,@PTHREAD@,$PTHREAD,;t t
20083 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20084 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20085 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20086 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20087 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20088 s,@ECHO_LINK@,$ECHO_LINK,;t t
20089 s,@ADAFLAGS@,$ADAFLAGS,;t t
20090 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20091 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20092 s,@ADA_TRACE@,$ADA_TRACE,;t t
20093 s,@MATH_LIB@,$MATH_LIB,;t t
20094 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20095 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20096 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20097 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20098 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20099 s,@TEST_LIBS@,$TEST_LIBS,;t t
20100 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20101 s,@CXXCPP@,$CXXCPP,;t t
20102 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20103 s,@CXX_AR@,$CXX_AR,;t t
20104 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20105 s,@CXXLIBS@,$CXXLIBS,;t t
20106 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20107 s,@gnat_exists@,$gnat_exists,;t t
20108 s,@M4_exists@,$M4_exists,;t t
20109 s,@cf_ada_make@,$cf_ada_make,;t t
20110 s,@cf_compile_generics@,$cf_compile_generics,;t t
20111 s,@cf_generic_objects@,$cf_generic_objects,;t t
20112 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20113 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20114 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20115 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20116 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20117 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20118 s,@cf_ada_package@,$cf_ada_package,;t t
20119 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20120 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20121 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20122 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20123 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20124 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20125 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20126 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20127 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20128 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20129 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20130 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20131 s,@TICS_ARGS@,$TICS_ARGS,;t t
20132 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20133 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20134 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20135 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20136 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20137 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20138 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20139 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20140 s,@TICS_LIST@,$TICS_LIST,;t t
20141 s,@TINFO_LIST@,$TINFO_LIST,;t t
20142 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20143 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20144 s,@TEST_ARGS@,$TEST_ARGS,;t t
20145 s,@TEST_DEPS@,$TEST_DEPS,;t t
20146 s,@TEST_ARG2@,$TEST_ARG2,;t t
20147 s,@TEST_DEP2@,$TEST_DEP2,;t t
20148 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20149 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20150 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20151 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20152 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20153 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20154 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20155 s,@cross_compiling@,$cross_compiling,;t t
20156 s,@TIC_PATH@,$TIC_PATH,;t t
20157 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20158 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20159 CEOF
20160
20161 EOF
20162
20163   cat >>$CONFIG_STATUS <<\EOF
20164   # Split the substitutions into bite-sized pieces for seds with
20165   # small command number limits, like on Digital OSF/1 and HP-UX.
20166   ac_max_sed_lines=48
20167   ac_sed_frag=1 # Number of current file.
20168   ac_beg=1 # First line for current file.
20169   ac_end=$ac_max_sed_lines # Line after last line for current file.
20170   ac_more_lines=:
20171   ac_sed_cmds=
20172   while $ac_more_lines; do
20173     if test $ac_beg -gt 1; then
20174       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20175     else
20176       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20177     fi
20178     if test ! -s $tmp/subs.frag; then
20179       ac_more_lines=false
20180     else
20181       # The purpose of the label and of the branching condition is to
20182       # speed up the sed processing (if there are no `@' at all, there
20183       # is no need to browse any of the substitutions).
20184       # These are the two extra sed commands mentioned above.
20185       (echo ':t
20186   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20187       if test -z "$ac_sed_cmds"; then
20188         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20189       else
20190         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20191       fi
20192       ac_sed_frag=`expr $ac_sed_frag + 1`
20193       ac_beg=$ac_end
20194       ac_end=`expr $ac_end + $ac_max_sed_lines`
20195     fi
20196   done
20197   if test -z "$ac_sed_cmds"; then
20198     ac_sed_cmds=cat
20199   fi
20200 fi # test -n "$CONFIG_FILES"
20201
20202 EOF
20203 cat >>$CONFIG_STATUS <<\EOF
20204 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20205   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20206   case $ac_file in
20207   - | *:- | *:-:* ) # input from stdin
20208         cat >$tmp/stdin
20209         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20210         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20211   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20212         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20213   * )   ac_file_in=$ac_file.in ;;
20214   esac
20215
20216   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20217   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20218          X"$ac_file" : 'X\(//\)[^/]' \| \
20219          X"$ac_file" : 'X\(//\)$' \| \
20220          X"$ac_file" : 'X\(/\)' \| \
20221          .     : '\(.\)' 2>/dev/null ||
20222 echo X"$ac_file" |
20223     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20224           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20225           /^X\(\/\/\)$/{ s//\1/; q; }
20226           /^X\(\/\).*/{ s//\1/; q; }
20227           s/.*/./; q'`
20228   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20229     { case "$ac_dir" in
20230   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20231   *)                      as_incr_dir=.;;
20232 esac
20233 as_dummy="$ac_dir"
20234 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20235   case $as_mkdir_dir in
20236     # Skip DOS drivespec
20237     ?:) as_incr_dir=$as_mkdir_dir ;;
20238     *)
20239       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20240       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20241     ;;
20242   esac
20243 done; }
20244
20245     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20246     # A "../" for each directory in $ac_dir_suffix.
20247     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20248   else
20249     ac_dir_suffix= ac_dots=
20250   fi
20251
20252   case $srcdir in
20253   .)  ac_srcdir=.
20254       if test -z "$ac_dots"; then
20255          ac_top_srcdir=.
20256       else
20257          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20258       fi ;;
20259   [\\/]* | ?:[\\/]* )
20260       ac_srcdir=$srcdir$ac_dir_suffix;
20261       ac_top_srcdir=$srcdir ;;
20262   *) # Relative path.
20263     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20264     ac_top_srcdir=$ac_dots$srcdir ;;
20265   esac
20266
20267   case $INSTALL in
20268   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20269   *) ac_INSTALL=$ac_dots$INSTALL ;;
20270   esac
20271
20272   if test x"$ac_file" != x-; then
20273     { echo "$as_me:20273: creating $ac_file" >&5
20274 echo "$as_me: creating $ac_file" >&6;}
20275     rm -f "$ac_file"
20276   fi
20277   # Let's still pretend it is `configure' which instantiates (i.e., don't
20278   # use $as_me), people would be surprised to read:
20279   #    /* config.h.  Generated automatically by config.status.  */
20280   configure_input="Generated automatically from `echo $ac_file_in |
20281                                                  sed 's,.*/,,'` by configure."
20282
20283   # First look for the input files in the build tree, otherwise in the
20284   # src tree.
20285   ac_file_inputs=`IFS=:
20286     for f in $ac_file_in; do
20287       case $f in
20288       -) echo $tmp/stdin ;;
20289       [\\/$]*)
20290          # Absolute (can't be DOS-style, as IFS=:)
20291          test -f "$f" || { { echo "$as_me:20291: error: cannot find input file: $f" >&5
20292 echo "$as_me: error: cannot find input file: $f" >&2;}
20293    { (exit 1); exit 1; }; }
20294          echo $f;;
20295       *) # Relative
20296          if test -f "$f"; then
20297            # Build tree
20298            echo $f
20299          elif test -f "$srcdir/$f"; then
20300            # Source tree
20301            echo $srcdir/$f
20302          else
20303            # /dev/null tree
20304            { { echo "$as_me:20304: error: cannot find input file: $f" >&5
20305 echo "$as_me: error: cannot find input file: $f" >&2;}
20306    { (exit 1); exit 1; }; }
20307          fi;;
20308       esac
20309     done` || { (exit 1); exit 1; }
20310 EOF
20311 cat >>$CONFIG_STATUS <<EOF
20312   sed "$ac_vpsub
20313 $extrasub
20314 EOF
20315 cat >>$CONFIG_STATUS <<\EOF
20316 :t
20317 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20318 s,@configure_input@,$configure_input,;t t
20319 s,@srcdir@,$ac_srcdir,;t t
20320 s,@top_srcdir@,$ac_top_srcdir,;t t
20321 s,@INSTALL@,$ac_INSTALL,;t t
20322 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20323   rm -f $tmp/stdin
20324   if test x"$ac_file" != x-; then
20325     mv $tmp/out $ac_file
20326   else
20327     cat $tmp/out
20328     rm -f $tmp/out
20329   fi
20330
20331 done
20332 EOF
20333 cat >>$CONFIG_STATUS <<\EOF
20334
20335 #
20336 # CONFIG_HEADER section.
20337 #
20338
20339 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20340 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20341 #
20342 # ac_d sets the value in "#define NAME VALUE" lines.
20343 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20344 ac_dB='[        ].*$,\1#\2'
20345 ac_dC=' '
20346 ac_dD=',;t'
20347 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20348 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20349 ac_iB='\([      ]\),\1#\2define\3'
20350 ac_iC=' '
20351 ac_iD='\4,;t'
20352 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20353 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20354 ac_uB='$,\1#\2define\3'
20355 ac_uC=' '
20356 ac_uD=',;t'
20357
20358 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20359   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20360   case $ac_file in
20361   - | *:- | *:-:* ) # input from stdin
20362         cat >$tmp/stdin
20363         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20364         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20365   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20366         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20367   * )   ac_file_in=$ac_file.in ;;
20368   esac
20369
20370   test x"$ac_file" != x- && { echo "$as_me:20370: creating $ac_file" >&5
20371 echo "$as_me: creating $ac_file" >&6;}
20372
20373   # First look for the input files in the build tree, otherwise in the
20374   # src tree.
20375   ac_file_inputs=`IFS=:
20376     for f in $ac_file_in; do
20377       case $f in
20378       -) echo $tmp/stdin ;;
20379       [\\/$]*)
20380          # Absolute (can't be DOS-style, as IFS=:)
20381          test -f "$f" || { { echo "$as_me:20381: error: cannot find input file: $f" >&5
20382 echo "$as_me: error: cannot find input file: $f" >&2;}
20383    { (exit 1); exit 1; }; }
20384          echo $f;;
20385       *) # Relative
20386          if test -f "$f"; then
20387            # Build tree
20388            echo $f
20389          elif test -f "$srcdir/$f"; then
20390            # Source tree
20391            echo $srcdir/$f
20392          else
20393            # /dev/null tree
20394            { { echo "$as_me:20394: error: cannot find input file: $f" >&5
20395 echo "$as_me: error: cannot find input file: $f" >&2;}
20396    { (exit 1); exit 1; }; }
20397          fi;;
20398       esac
20399     done` || { (exit 1); exit 1; }
20400   # Remove the trailing spaces.
20401   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20402
20403 EOF
20404
20405 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20406 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20407 # be either 'cat' or 'sort'.
20408 cat confdefs.h | uniq >conftest.vals
20409
20410 # Break up conftest.vals because some shells have a limit on
20411 # the size of here documents, and old seds have small limits too.
20412
20413 rm -f conftest.tail
20414 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20415 while grep . conftest.vals >/dev/null
20416 do
20417   # Write chunks of a limited-size here document to conftest.frag.
20418   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20419   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20420   echo 'CEOF' >> $CONFIG_STATUS
20421   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20422   rm -f conftest.vals
20423   mv conftest.tail conftest.vals
20424 done
20425 rm -f conftest.vals
20426
20427 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20428 # marker @DEFS@.
20429 echo '  cat >> conftest.edit <<CEOF
20430 /@DEFS@/r conftest.frag
20431 /@DEFS@/d
20432 CEOF
20433 sed -f conftest.edit $tmp/in > $tmp/out
20434 rm -f $tmp/in
20435 mv $tmp/out $tmp/in
20436 rm -f conftest.edit conftest.frag
20437 ' >> $CONFIG_STATUS
20438
20439 cat >>$CONFIG_STATUS <<\EOF
20440   # Let's still pretend it is `configure' which instantiates (i.e., don't
20441   # use $as_me), people would be surprised to read:
20442   #    /* config.h.  Generated automatically by config.status.  */
20443   if test x"$ac_file" = x-; then
20444     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20445   else
20446     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20447   fi
20448   cat $tmp/in >>$tmp/config.h
20449   rm -f $tmp/in
20450   if test x"$ac_file" != x-; then
20451     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20452       { echo "$as_me:20452: $ac_file is unchanged" >&5
20453 echo "$as_me: $ac_file is unchanged" >&6;}
20454     else
20455       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20456          X"$ac_file" : 'X\(//\)[^/]' \| \
20457          X"$ac_file" : 'X\(//\)$' \| \
20458          X"$ac_file" : 'X\(/\)' \| \
20459          .     : '\(.\)' 2>/dev/null ||
20460 echo X"$ac_file" |
20461     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20462           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20463           /^X\(\/\/\)$/{ s//\1/; q; }
20464           /^X\(\/\).*/{ s//\1/; q; }
20465           s/.*/./; q'`
20466       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20467         { case "$ac_dir" in
20468   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20469   *)                      as_incr_dir=.;;
20470 esac
20471 as_dummy="$ac_dir"
20472 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20473   case $as_mkdir_dir in
20474     # Skip DOS drivespec
20475     ?:) as_incr_dir=$as_mkdir_dir ;;
20476     *)
20477       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20478       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20479     ;;
20480   esac
20481 done; }
20482
20483       fi
20484       rm -f $ac_file
20485       mv $tmp/config.h $ac_file
20486     fi
20487   else
20488     cat $tmp/config.h
20489     rm -f $tmp/config.h
20490   fi
20491 done
20492 EOF
20493 cat >>$CONFIG_STATUS <<\EOF
20494 #
20495 # CONFIG_COMMANDS section.
20496 #
20497 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20498   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20499   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20500
20501   case $ac_dest in
20502     default )
20503 if test "x$cf_with_tests" != xno ; then
20504
20505 for cf_dir in test
20506 do
20507         if test ! -d $srcdir/$cf_dir; then
20508                 continue
20509         elif test -f $srcdir/$cf_dir/programs; then
20510                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20511         fi
20512 done
20513
20514 fi
20515
20516         case $cf_cv_system_name in #(vi
20517         OS/2*|os2*) #(vi
20518         LIB_PREFIX=''
20519         ;;
20520         *)      LIB_PREFIX='lib'
20521         ;;
20522         esac
20523 cf_prefix=$LIB_PREFIX
20524
20525 if test $cf_cv_shlib_version = cygdll ; then
20526         TINFO_NAME=$TINFO_ARG_SUFFIX
20527         TINFO_SUFFIX=.dll
20528 fi
20529
20530 if test -n "$TINFO_SUFFIX" ; then
20531         case $TINFO_SUFFIX in
20532         tw*)
20533                 TINFO_NAME="${TINFO_NAME}tw"
20534                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20535                 ;;
20536         t*)
20537                 TINFO_NAME="${TINFO_NAME}t"
20538                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20539                 ;;
20540         w*)
20541                 TINFO_NAME="${TINFO_NAME}w"
20542                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20543                 ;;
20544         esac
20545 fi
20546
20547 for cf_dir in $SRC_SUBDIRS
20548 do
20549         if test ! -d $srcdir/$cf_dir ; then
20550                 continue
20551         elif test -f $srcdir/$cf_dir/modules; then
20552
20553                 SHARED_LIB=
20554                 LIBS_TO_MAKE=
20555                 for cf_item in $cf_LIST_MODELS
20556                 do
20557
20558         case $cf_item in #(vi
20559         libtool) #(vi
20560                 cf_suffix='.la'
20561                 cf_depsuf=$cf_suffix
20562                 ;;
20563         normal) #(vi
20564                 cf_suffix='.a'
20565                 cf_depsuf=$cf_suffix
20566                 ;;
20567         debug) #(vi
20568                 cf_suffix='_g.a'
20569                 cf_depsuf=$cf_suffix
20570                 ;;
20571         profile) #(vi
20572                 cf_suffix='_p.a'
20573                 cf_depsuf=$cf_suffix
20574                 ;;
20575         shared) #(vi
20576                 case $cf_cv_system_name in
20577                 aix[56]*) #(vi
20578                         cf_suffix='.a'
20579                         cf_depsuf=$cf_suffix
20580                         ;;
20581                 cygwin*) #(vi
20582                         cf_suffix='.dll'
20583                         cf_depsuf='.dll.a'
20584                         ;;
20585                 darwin*) #(vi
20586                         cf_suffix='.dylib'
20587                         cf_depsuf=$cf_suffix
20588                         ;;
20589                 hpux*) #(vi
20590                         case $target in
20591                         ia64*) #(vi
20592                                 cf_suffix='.so'
20593                                 cf_depsuf=$cf_suffix
20594                                 ;;
20595                         *) #(vi
20596                                 cf_suffix='.sl'
20597                                 cf_depsuf=$cf_suffix
20598                                 ;;
20599                         esac
20600                         ;;
20601                 *)      cf_suffix='.so'
20602                         cf_depsuf=$cf_suffix
20603                         ;;
20604                 esac
20605         esac
20606         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20607         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20608
20609                         if test $cf_item = shared ; then
20610                         if test "$cf_cv_do_symlinks" = yes ; then
20611                                 case "$cf_cv_shlib_version" in #(vi
20612                                 rel) #(vi
20613                                         case "$cf_cv_system_name" in #(vi
20614                                         darwin*)
20615                                         case .${LIB_SUFFIX} in
20616                                         .tw*)
20617                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20618                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20619                                                 ;;
20620                                         .t*)
20621                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20622                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20623                                                 ;;
20624                                         .w*)
20625                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20626                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20627                                                 ;;
20628                                         *)
20629                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20630                                                 ;;
20631                                         esac
20632                                         ;; #(vi
20633                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20634                                         esac
20635                                         ;;
20636                                 abi)
20637                                         case "$cf_cv_system_name" in #(vi
20638                                         darwin*)
20639                                         case .${LIB_SUFFIX} in
20640                                         .tw*)
20641                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20642                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20643                                                 ;;
20644                                         .t*)
20645                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20646                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20647                                                 ;;
20648                                         .w*)
20649                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20650                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20651                                                 ;;
20652                                         *)
20653                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20654                                                 ;;
20655                                         esac
20656                                         ;; #(vi
20657                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20658                                         esac
20659                                         ;;
20660                                 esac
20661                         fi
20662                         # cygwin needs import library, and has unique naming convention
20663                         # use autodetected ${cf_prefix} for import lib and static lib, but
20664                         # use 'cyg' prefix for shared lib.
20665                         if test $cf_cv_shlib_version = cygdll ; then
20666                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20667                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20668                                 continue
20669                         fi
20670                         fi
20671                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20672                 done
20673
20674                 if test $cf_dir = ncurses ; then
20675                         cf_subsets="$LIB_SUBSETS"
20676                         cf_r_parts="$cf_subsets"
20677                         cf_liblist="$LIBS_TO_MAKE"
20678
20679                         while test -n "$cf_r_parts"
20680                         do
20681                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20682                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20683                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20684                                         cf_item=
20685                                         case $cf_l_parts in #(vi
20686                                         *termlib*) #(vi
20687                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20688                                                 ;;
20689                                         *ticlib*)
20690                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20691                                                 ;;
20692                                         *)
20693                                                 break
20694                                                 ;;
20695                                         esac
20696                                         if test -n "$cf_item"; then
20697                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20698                                         fi
20699                                 else
20700                                         break
20701                                 fi
20702                         done
20703                 else
20704                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20705                 fi
20706
20707                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20708                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20709                         $cf_dir/Makefile >$cf_dir/Makefile.out
20710                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20711
20712                 $AWK -f $srcdir/mk-0th.awk \
20713                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20714                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20715
20716                 for cf_subset in $cf_subsets
20717                 do
20718                         cf_subdirs=
20719                         for cf_item in $cf_LIST_MODELS
20720                         do
20721                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20722
20723 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20724
20725         case $cf_item in #(vi
20726         libtool) #(vi
20727                 cf_suffix='.la'
20728                 cf_depsuf=$cf_suffix
20729                 ;;
20730         normal) #(vi
20731                 cf_suffix='.a'
20732                 cf_depsuf=$cf_suffix
20733                 ;;
20734         debug) #(vi
20735                 cf_suffix='_g.a'
20736                 cf_depsuf=$cf_suffix
20737                 ;;
20738         profile) #(vi
20739                 cf_suffix='_p.a'
20740                 cf_depsuf=$cf_suffix
20741                 ;;
20742         shared) #(vi
20743                 case $cf_cv_system_name in
20744                 aix[56]*) #(vi
20745                         cf_suffix='.a'
20746                         cf_depsuf=$cf_suffix
20747                         ;;
20748                 cygwin*) #(vi
20749                         cf_suffix='.dll'
20750                         cf_depsuf='.dll.a'
20751                         ;;
20752                 darwin*) #(vi
20753                         cf_suffix='.dylib'
20754                         cf_depsuf=$cf_suffix
20755                         ;;
20756                 hpux*) #(vi
20757                         case $target in
20758                         ia64*) #(vi
20759                                 cf_suffix='.so'
20760                                 cf_depsuf=$cf_suffix
20761                                 ;;
20762                         *) #(vi
20763                                 cf_suffix='.sl'
20764                                 cf_depsuf=$cf_suffix
20765                                 ;;
20766                         esac
20767                         ;;
20768                 *)      cf_suffix='.so'
20769                         cf_depsuf=$cf_suffix
20770                         ;;
20771                 esac
20772         esac
20773         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20774         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20775
20776         case $cf_item in
20777         libtool) cf_subdir='obj_lo'  ;;
20778         normal)  cf_subdir='objects' ;;
20779         debug)   cf_subdir='obj_g' ;;
20780         profile) cf_subdir='obj_p' ;;
20781         shared)
20782                 case $cf_cv_system_name in #(vi
20783                 cygwin) #(vi
20784                         cf_subdir='objects' ;;
20785                 *)
20786                         cf_subdir='obj_s' ;;
20787                 esac
20788         esac
20789
20790                         # Test for case where we build libtinfo with a different name.
20791                         cf_libname=$cf_dir
20792                         if test $cf_dir = ncurses ; then
20793                                 case $cf_subset in
20794                                 *base*)
20795                                         cf_libname=${cf_libname}$LIB_SUFFIX
20796                                         ;;
20797                                 *termlib*)
20798                                         cf_libname=$TINFO_LIB_SUFFIX
20799                                         ;;
20800                                 ticlib*)
20801                                         cf_libname=$TICS_LIB_SUFFIX
20802                                         ;;
20803                                 esac
20804                         else
20805                                 cf_libname=${cf_libname}$LIB_SUFFIX
20806                         fi
20807                         if test -n "${DFT_ARG_SUFFIX}" ; then
20808                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20809                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20810                         fi
20811
20812                         # These dependencies really are for development, not
20813                         # builds, but they are useful in porting, too.
20814                         cf_depend="../include/ncurses_cfg.h"
20815                         if test "$srcdir" = "."; then
20816                                 cf_reldir="."
20817                         else
20818                                 cf_reldir="\${srcdir}"
20819                         fi
20820
20821                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20822                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20823                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20824                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20825                         fi
20826
20827                         cf_dir_suffix=
20828                         old_cf_suffix="$cf_suffix"
20829                         if test "$cf_cv_shlib_version_infix" = yes ; then
20830                         if test -n "$LIB_SUFFIX" ; then
20831                                 case $LIB_SUFFIX in
20832                                 tw*)
20833                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20834                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20835                                         cf_dir_suffix=tw
20836                                         ;;
20837                                 t*)
20838                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20839                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20840                                         cf_dir_suffix=t
20841                                         ;;
20842                                 w*)
20843                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20844                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20845                                         cf_dir_suffix=w
20846                                         ;;
20847                                 esac
20848                         fi
20849                         fi
20850
20851                         $AWK -f $srcdir/mk-1st.awk \
20852                                 name=${cf_libname}${cf_dir_suffix} \
20853                                 traces=$LIB_TRACING \
20854                                 MODEL=$cf_ITEM \
20855                                 model=$cf_subdir \
20856                                 prefix=$cf_prefix \
20857                                 suffix=$cf_suffix \
20858                                 subset=$cf_subset \
20859                                 SymLink="$LN_S" \
20860                                 TermlibRoot=$TINFO_NAME \
20861                                 TermlibSuffix=$TINFO_SUFFIX \
20862                                 ShlibVer=$cf_cv_shlib_version \
20863                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20864                                 ReLink=${cf_cv_do_relink:-no} \
20865                                 DoLinks=$cf_cv_do_symlinks \
20866                                 rmSoLocs=$cf_cv_rm_so_locs \
20867                                 ldconfig="$LDCONFIG" \
20868                                 overwrite=$WITH_OVERWRITE \
20869                                 depend="$cf_depend" \
20870                                 host="$host" \
20871                                 libtool_version="$LIBTOOL_VERSION" \
20872                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20873
20874                         cf_suffix="$old_cf_suffix"
20875
20876                         for cf_subdir2 in $cf_subdirs lib
20877                         do
20878                                 test $cf_subdir = $cf_subdir2 && break
20879                         done
20880                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20881                         $AWK -f $srcdir/mk-2nd.awk \
20882                                 name=$cf_dir \
20883                                 traces=$LIB_TRACING \
20884                                 MODEL=$cf_ITEM \
20885                                 model=$cf_subdir \
20886                                 subset=$cf_subset \
20887                                 srcdir=$srcdir \
20888                                 echo=$WITH_ECHO \
20889                                 crenames=$cf_cv_prog_CC_c_o \
20890                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20891                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20892                         cf_subdirs="$cf_subdirs $cf_subdir"
20893                         done
20894                 done
20895         fi
20896
20897         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20898 done
20899
20900 for cf_dir in $SRC_SUBDIRS
20901 do
20902         if test ! -d $srcdir/$cf_dir ; then
20903                 continue
20904         fi
20905
20906         if test -f $cf_dir/Makefile ; then
20907                 case "$cf_dir" in
20908                 Ada95) #(vi
20909                         echo 'libs \' >> Makefile
20910                         echo 'install.libs \' >> Makefile
20911                         echo 'uninstall.libs ::' >> Makefile
20912                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20913                         ;;
20914                 esac
20915         fi
20916
20917         if test -f $srcdir/$cf_dir/modules; then
20918                 echo >> Makefile
20919                 if test -f $srcdir/$cf_dir/headers; then
20920 cat >> Makefile <<CF_EOF
20921 install.includes \\
20922 uninstall.includes \\
20923 CF_EOF
20924                 fi
20925 if test "$cf_dir" != "c++" ; then
20926 echo 'lint \' >> Makefile
20927 fi
20928 cat >> Makefile <<CF_EOF
20929 libs \\
20930 lintlib \\
20931 install.libs \\
20932 uninstall.libs \\
20933 install.$cf_dir \\
20934 uninstall.$cf_dir ::
20935         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20936 CF_EOF
20937         elif test -f $srcdir/$cf_dir/headers; then
20938 cat >> Makefile <<CF_EOF
20939
20940 libs \\
20941 install.libs \\
20942 uninstall.libs \\
20943 install.includes \\
20944 uninstall.includes ::
20945         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20946 CF_EOF
20947 fi
20948 done
20949
20950 cat >> Makefile <<CF_EOF
20951
20952 install.libs uninstall.libs \\
20953 install.data uninstall.data ::
20954 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20955 CF_EOF
20956
20957 if test "x$cf_with_manpages" = xyes; then
20958 cat >> Makefile <<CF_EOF
20959
20960 install.man \\
20961 uninstall.man ::
20962         cd man && \${MAKE} \${CF_MFLAGS} \$@
20963 CF_EOF
20964 fi
20965
20966 cat >> Makefile <<CF_EOF
20967
20968 distclean ::
20969         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20970         rm -f headers.sh headers.sed mk_shared_lib.sh
20971         rm -f edit_man.* man_alias.*
20972         rm -rf \${DIRS_TO_MAKE}
20973 CF_EOF
20974
20975 # Special case: tack's manpage lives in its own directory.
20976 if test "x$cf_with_manpages" = xyes; then
20977 if test -d tack ; then
20978 if test -f $srcdir/$tack.h; then
20979 cat >> Makefile <<CF_EOF
20980
20981 install.man \\
20982 uninstall.man ::
20983         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20984 CF_EOF
20985 fi
20986 fi
20987 fi
20988
20989 rm -f headers.sed headers.sh
20990
20991 echo creating headers.sh
20992 cat >headers.sh <<CF_EOF
20993 #! /bin/sh
20994 # This shell script is generated by the 'configure' script.  It is invoked in a
20995 # subdirectory of the build tree.  It generates a sed-script in the parent
20996 # directory that is used to adjust includes for header files that reside in a
20997 # subdirectory of /usr/include, etc.
20998 PRG=""
20999 while test \$# != 3
21000 do
21001 PRG="\$PRG \$1"; shift
21002 done
21003 DST=\$1
21004 REF=\$2
21005 SRC=\$3
21006 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21007 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21008 echo installing \$SRC in \$DST
21009 CF_EOF
21010
21011 if test $WITH_CURSES_H = yes; then
21012         cat >>headers.sh <<CF_EOF
21013 case \$DST in
21014 /*/include/*)
21015         END=\`basename \$DST\`
21016         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21017         do
21018                 NAME=\`basename \$i\`
21019                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21020         done
21021         ;;
21022 *)
21023         echo "" >> \$TMPSED
21024         ;;
21025 esac
21026 CF_EOF
21027
21028 else
21029         cat >>headers.sh <<CF_EOF
21030 case \$DST in
21031 /*/include/*)
21032         END=\`basename \$DST\`
21033         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21034         do
21035                 NAME=\`basename \$i\`
21036                 if test "\$NAME" = "curses.h"
21037                 then
21038                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21039                         NAME=ncurses.h
21040                 fi
21041                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21042         done
21043         ;;
21044 *)
21045         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21046         ;;
21047 esac
21048 CF_EOF
21049 fi
21050 cat >>headers.sh <<CF_EOF
21051 rm -f \$TMPSRC
21052 sed -f \$TMPSED \$SRC > \$TMPSRC
21053 NAME=\`basename \$SRC\`
21054 CF_EOF
21055 if test $WITH_CURSES_H != yes; then
21056         cat >>headers.sh <<CF_EOF
21057 test "\$NAME" = "curses.h" && NAME=ncurses.h
21058 CF_EOF
21059 fi
21060 cat >>headers.sh <<CF_EOF
21061 # Just in case someone gzip'd manpages, remove the conflicting copy.
21062 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21063
21064 eval \$PRG \$TMPSRC \$DST/\$NAME
21065 rm -f \$TMPSRC \$TMPSED
21066 CF_EOF
21067
21068 chmod 0755 headers.sh
21069
21070 for cf_dir in $SRC_SUBDIRS
21071 do
21072         if test ! -d $srcdir/$cf_dir ; then
21073                 continue
21074         fi
21075
21076         if test -f $srcdir/$cf_dir/headers; then
21077                 $AWK -f $srcdir/mk-hdr.awk \
21078                         subset="$LIB_SUBSETS" \
21079                         compat="$WITH_CURSES_H" \
21080                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21081         fi
21082
21083         if test -f $srcdir/$cf_dir/modules; then
21084                 if test "$cf_dir" != "c++" ; then
21085                         cat >>$cf_dir/Makefile <<"CF_EOF"
21086 depend : ${AUTO_SRC}
21087         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21088
21089 # DO NOT DELETE THIS LINE -- make depend depends on it.
21090 CF_EOF
21091                 fi
21092         fi
21093 done
21094
21095 if test "x$cf_with_ada" != xno ; then
21096 if test -z "$USE_OLD_MAKERULES" ; then
21097         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21098 fi
21099 fi
21100  ;;
21101   esac
21102 done
21103 EOF
21104
21105 cat >>$CONFIG_STATUS <<\EOF
21106
21107 { (exit 0); exit 0; }
21108 EOF
21109 chmod +x $CONFIG_STATUS
21110 ac_clean_files=$ac_clean_files_save
21111
21112 # configure is writing to config.log, and then calls config.status.
21113 # config.status does its own redirection, appending to config.log.
21114 # Unfortunately, on DOS this fails, as config.log is still kept open
21115 # by configure, so config.status won't be able to write to it; its
21116 # output is simply discarded.  So we exec the FD to /dev/null,
21117 # effectively closing config.log, so it can be properly (re)opened and
21118 # appended to by config.status.  When coming back to configure, we
21119 # need to make the FD available again.
21120 if test "$no_create" != yes; then
21121   ac_cs_success=:
21122   exec 5>/dev/null
21123   $SHELL $CONFIG_STATUS || ac_cs_success=false
21124   exec 5>>config.log
21125   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21126   # would make configure fail if this is the last instruction.
21127   $ac_cs_success || { (exit 1); exit 1; }
21128 fi
21129 ${MAKE:-make} preinstall