]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
763b9716db1aa8496960127d50fe0498567bcd04
[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*|mirbsd*|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 # This should have been defined by AC_PROG_CC
2426 : ${CC:=cc}
2427
2428 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2429 # into CC.  This will not help with broken scripts that wrap the compiler with
2430 # options, but eliminates a more common category of user confusion.
2431 echo "$as_me:2431: checking \$CC variable" >&5
2432 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2433 case "$CC" in #(vi
2434 *[\ \   ]-[IUD]*)
2435         echo "$as_me:2435: result: broken" >&5
2436 echo "${ECHO_T}broken" >&6
2437         { echo "$as_me:2437: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2438 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2439         # humor him...
2440         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2441         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2442
2443 cf_fix_cppflags=no
2444 cf_new_cflags=
2445 cf_new_cppflags=
2446 cf_new_extra_cppflags=
2447
2448 for cf_add_cflags in $cf_flags
2449 do
2450 case $cf_fix_cppflags in
2451 no)
2452         case $cf_add_cflags in #(vi
2453         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2454                 case $cf_add_cflags in
2455                 -D*)
2456                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2457
2458                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2459                                 && test -z "${cf_tst_cflags}" \
2460                                 && cf_fix_cppflags=yes
2461
2462                         if test $cf_fix_cppflags = yes ; then
2463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2464                                 continue
2465                         elif test "${cf_tst_cflags}" = "\"'" ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         fi
2469                         ;;
2470                 esac
2471                 case "$CPPFLAGS" in
2472                 *$cf_add_cflags) #(vi
2473                         ;;
2474                 *) #(vi
2475                         case $cf_add_cflags in #(vi
2476                         -D*)
2477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2478
2479 CPPFLAGS=`echo "$CPPFLAGS" | \
2480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2482
2483                                 ;;
2484                         esac
2485                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2486                         ;;
2487                 esac
2488                 ;;
2489         *)
2490                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2491                 ;;
2492         esac
2493         ;;
2494 yes)
2495         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2496
2497         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2498
2499         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2500                 && test -z "${cf_tst_cflags}" \
2501                 && cf_fix_cppflags=no
2502         ;;
2503 esac
2504 done
2505
2506 if test -n "$cf_new_cflags" ; then
2507
2508         CFLAGS="$CFLAGS $cf_new_cflags"
2509 fi
2510
2511 if test -n "$cf_new_cppflags" ; then
2512
2513         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2514 fi
2515
2516 if test -n "$cf_new_extra_cppflags" ; then
2517
2518         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2519 fi
2520
2521         ;;
2522 *)
2523         echo "$as_me:2523: result: ok" >&5
2524 echo "${ECHO_T}ok" >&6
2525         ;;
2526 esac
2527
2528 echo "$as_me:2528: checking for ${CC:-cc} option to accept ANSI C" >&5
2529 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2530 if test "${cf_cv_ansi_cc+set}" = set; then
2531   echo $ECHO_N "(cached) $ECHO_C" >&6
2532 else
2533
2534 cf_cv_ansi_cc=no
2535 cf_save_CFLAGS="$CFLAGS"
2536 cf_save_CPPFLAGS="$CPPFLAGS"
2537 # Don't try gcc -ansi; that turns off useful extensions and
2538 # breaks some systems' header files.
2539 # AIX                   -qlanglvl=ansi
2540 # Ultrix and OSF/1      -std1
2541 # HP-UX                 -Aa -D_HPUX_SOURCE
2542 # SVR4                  -Xc
2543 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2544 for cf_arg in "-DCC_HAS_PROTOS" \
2545         "" \
2546         -qlanglvl=ansi \
2547         -std1 \
2548         -Ae \
2549         "-Aa -D_HPUX_SOURCE" \
2550         -Xc
2551 do
2552
2553 cf_fix_cppflags=no
2554 cf_new_cflags=
2555 cf_new_cppflags=
2556 cf_new_extra_cppflags=
2557
2558 for cf_add_cflags in $cf_arg
2559 do
2560 case $cf_fix_cppflags in
2561 no)
2562         case $cf_add_cflags in #(vi
2563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2564                 case $cf_add_cflags in
2565                 -D*)
2566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2567
2568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2569                                 && test -z "${cf_tst_cflags}" \
2570                                 && cf_fix_cppflags=yes
2571
2572                         if test $cf_fix_cppflags = yes ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         elif test "${cf_tst_cflags}" = "\"'" ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         fi
2579                         ;;
2580                 esac
2581                 case "$CPPFLAGS" in
2582                 *$cf_add_cflags) #(vi
2583                         ;;
2584                 *) #(vi
2585                         case $cf_add_cflags in #(vi
2586                         -D*)
2587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2588
2589 CPPFLAGS=`echo "$CPPFLAGS" | \
2590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2592
2593                                 ;;
2594                         esac
2595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2596                         ;;
2597                 esac
2598                 ;;
2599         *)
2600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2601                 ;;
2602         esac
2603         ;;
2604 yes)
2605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2606
2607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2608
2609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2610                 && test -z "${cf_tst_cflags}" \
2611                 && cf_fix_cppflags=no
2612         ;;
2613 esac
2614 done
2615
2616 if test -n "$cf_new_cflags" ; then
2617
2618         CFLAGS="$CFLAGS $cf_new_cflags"
2619 fi
2620
2621 if test -n "$cf_new_cppflags" ; then
2622
2623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2624 fi
2625
2626 if test -n "$cf_new_extra_cppflags" ; then
2627
2628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2629 fi
2630
2631         cat >conftest.$ac_ext <<_ACEOF
2632 #line 2632 "configure"
2633 #include "confdefs.h"
2634
2635 #ifndef CC_HAS_PROTOS
2636 #if !defined(__STDC__) || (__STDC__ != 1)
2637 choke me
2638 #endif
2639 #endif
2640
2641 int
2642 main ()
2643 {
2644
2645         int test (int i, double x);
2646         struct s1 {int (*f) (int a);};
2647         struct s2 {int (*f) (double a);};
2648   ;
2649   return 0;
2650 }
2651 _ACEOF
2652 rm -f conftest.$ac_objext
2653 if { (eval echo "$as_me:2653: \"$ac_compile\"") >&5
2654   (eval $ac_compile) 2>&5
2655   ac_status=$?
2656   echo "$as_me:2656: \$? = $ac_status" >&5
2657   (exit $ac_status); } &&
2658          { ac_try='test -s conftest.$ac_objext'
2659   { (eval echo "$as_me:2659: \"$ac_try\"") >&5
2660   (eval $ac_try) 2>&5
2661   ac_status=$?
2662   echo "$as_me:2662: \$? = $ac_status" >&5
2663   (exit $ac_status); }; }; then
2664   cf_cv_ansi_cc="$cf_arg"; break
2665 else
2666   echo "$as_me: failed program was:" >&5
2667 cat conftest.$ac_ext >&5
2668 fi
2669 rm -f conftest.$ac_objext conftest.$ac_ext
2670 done
2671 CFLAGS="$cf_save_CFLAGS"
2672 CPPFLAGS="$cf_save_CPPFLAGS"
2673
2674 fi
2675 echo "$as_me:2675: result: $cf_cv_ansi_cc" >&5
2676 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2677
2678 if test "$cf_cv_ansi_cc" != "no"; then
2679 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2680
2681 cf_fix_cppflags=no
2682 cf_new_cflags=
2683 cf_new_cppflags=
2684 cf_new_extra_cppflags=
2685
2686 for cf_add_cflags in $cf_cv_ansi_cc
2687 do
2688 case $cf_fix_cppflags in
2689 no)
2690         case $cf_add_cflags in #(vi
2691         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2692                 case $cf_add_cflags in
2693                 -D*)
2694                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2695
2696                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2697                                 && test -z "${cf_tst_cflags}" \
2698                                 && cf_fix_cppflags=yes
2699
2700                         if test $cf_fix_cppflags = yes ; then
2701                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2702                                 continue
2703                         elif test "${cf_tst_cflags}" = "\"'" ; then
2704                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2705                                 continue
2706                         fi
2707                         ;;
2708                 esac
2709                 case "$CPPFLAGS" in
2710                 *$cf_add_cflags) #(vi
2711                         ;;
2712                 *) #(vi
2713                         case $cf_add_cflags in #(vi
2714                         -D*)
2715                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2716
2717 CPPFLAGS=`echo "$CPPFLAGS" | \
2718         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2719                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2720
2721                                 ;;
2722                         esac
2723                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2724                         ;;
2725                 esac
2726                 ;;
2727         *)
2728                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2729                 ;;
2730         esac
2731         ;;
2732 yes)
2733         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2734
2735         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2736
2737         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2738                 && test -z "${cf_tst_cflags}" \
2739                 && cf_fix_cppflags=no
2740         ;;
2741 esac
2742 done
2743
2744 if test -n "$cf_new_cflags" ; then
2745
2746         CFLAGS="$CFLAGS $cf_new_cflags"
2747 fi
2748
2749 if test -n "$cf_new_cppflags" ; then
2750
2751         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2752 fi
2753
2754 if test -n "$cf_new_extra_cppflags" ; then
2755
2756         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2757 fi
2758
2759 else
2760         cat >>confdefs.h <<\EOF
2761 #define CC_HAS_PROTOS 1
2762 EOF
2763
2764 fi
2765 fi
2766
2767 if test "$cf_cv_ansi_cc" = "no"; then
2768         { { echo "$as_me:2768: error: Your compiler does not appear to recognize prototypes.
2769 You have the following choices:
2770         a. adjust your compiler options
2771         b. get an up-to-date compiler
2772         c. use a wrapper such as unproto" >&5
2773 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2774 You have the following choices:
2775         a. adjust your compiler options
2776         b. get an up-to-date compiler
2777         c. use a wrapper such as unproto" >&2;}
2778    { (exit 1); exit 1; }; }
2779 fi
2780
2781 case $cf_cv_system_name in
2782 os2*)
2783     CFLAGS="$CFLAGS -Zmt"
2784     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2785     CXXFLAGS="$CXXFLAGS -Zmt"
2786     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2787     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2788     ac_cv_exeext=.exe
2789     ;;
2790 esac
2791
2792 PROG_EXT="$EXEEXT"
2793
2794 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2795 #define PROG_EXT "$PROG_EXT"
2796 EOF
2797
2798 if test "$cross_compiling" = yes ; then
2799   LDCONFIG=:
2800 else
2801 case "$cf_cv_system_name" in #(vi
2802 dragonfly*|mirbsd*|freebsd*) #(vi
2803   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2804   ;;
2805 *) LDPATH=$PATH:/sbin:/usr/sbin
2806   # Extract the first word of "ldconfig", so it can be a program name with args.
2807 set dummy ldconfig; ac_word=$2
2808 echo "$as_me:2808: checking for $ac_word" >&5
2809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2811   echo $ECHO_N "(cached) $ECHO_C" >&6
2812 else
2813   case $LDCONFIG in
2814   [\\/]* | ?:[\\/]*)
2815   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2816   ;;
2817   *)
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$LDPATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   if $as_executable_p "$ac_dir/$ac_word"; then
2824    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2825    echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826    break
2827 fi
2828 done
2829
2830   ;;
2831 esac
2832 fi
2833 LDCONFIG=$ac_cv_path_LDCONFIG
2834
2835 if test -n "$LDCONFIG"; then
2836   echo "$as_me:2836: result: $LDCONFIG" >&5
2837 echo "${ECHO_T}$LDCONFIG" >&6
2838 else
2839   echo "$as_me:2839: result: no" >&5
2840 echo "${ECHO_T}no" >&6
2841 fi
2842
2843   ;;
2844 esac
2845 fi
2846
2847 echo "$as_me:2847: checking if you want to ensure bool is consistent with C++" >&5
2848 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx or --without-cxx was given.
2851 if test "${with_cxx+set}" = set; then
2852   withval="$with_cxx"
2853   cf_with_cxx=$withval
2854 else
2855   cf_with_cxx=yes
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx" >&5
2858 echo "${ECHO_T}$cf_with_cxx" >&6
2859 if test "X$cf_with_cxx" = Xno ; then
2860         CXX=""
2861         GXX=""
2862 else
2863         # with autoconf 2.13, we can change the error to a warning:
2864                 ac_ext=cc
2865 ac_cpp='$CXXCPP $CPPFLAGS'
2866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2869 ac_main_return=return
2870 if test -n "$ac_tool_prefix"; then
2871   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2872   do
2873     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2874 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2875 echo "$as_me:2875: checking for $ac_word" >&5
2876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2877 if test "${ac_cv_prog_CXX+set}" = set; then
2878   echo $ECHO_N "(cached) $ECHO_C" >&6
2879 else
2880   if test -n "$CXX"; then
2881   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2882 else
2883   ac_save_IFS=$IFS; IFS=$ac_path_separator
2884 ac_dummy="$PATH"
2885 for ac_dir in $ac_dummy; do
2886   IFS=$ac_save_IFS
2887   test -z "$ac_dir" && ac_dir=.
2888   $as_executable_p "$ac_dir/$ac_word" || continue
2889 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2890 echo "$as_me:2890: found $ac_dir/$ac_word" >&5
2891 break
2892 done
2893
2894 fi
2895 fi
2896 CXX=$ac_cv_prog_CXX
2897 if test -n "$CXX"; then
2898   echo "$as_me:2898: result: $CXX" >&5
2899 echo "${ECHO_T}$CXX" >&6
2900 else
2901   echo "$as_me:2901: result: no" >&5
2902 echo "${ECHO_T}no" >&6
2903 fi
2904
2905     test -n "$CXX" && break
2906   done
2907 fi
2908 if test -z "$CXX"; then
2909   ac_ct_CXX=$CXX
2910   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2911 do
2912   # Extract the first word of "$ac_prog", so it can be a program name with args.
2913 set dummy $ac_prog; ac_word=$2
2914 echo "$as_me:2914: checking for $ac_word" >&5
2915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2916 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   if test -n "$ac_ct_CXX"; then
2920   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2921 else
2922   ac_save_IFS=$IFS; IFS=$ac_path_separator
2923 ac_dummy="$PATH"
2924 for ac_dir in $ac_dummy; do
2925   IFS=$ac_save_IFS
2926   test -z "$ac_dir" && ac_dir=.
2927   $as_executable_p "$ac_dir/$ac_word" || continue
2928 ac_cv_prog_ac_ct_CXX="$ac_prog"
2929 echo "$as_me:2929: found $ac_dir/$ac_word" >&5
2930 break
2931 done
2932
2933 fi
2934 fi
2935 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2936 if test -n "$ac_ct_CXX"; then
2937   echo "$as_me:2937: result: $ac_ct_CXX" >&5
2938 echo "${ECHO_T}$ac_ct_CXX" >&6
2939 else
2940   echo "$as_me:2940: result: no" >&5
2941 echo "${ECHO_T}no" >&6
2942 fi
2943
2944   test -n "$ac_ct_CXX" && break
2945 done
2946 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2947
2948   CXX=$ac_ct_CXX
2949 fi
2950
2951 # Provide some information about the compiler.
2952 echo "$as_me:2952:" \
2953      "checking for C++ compiler version" >&5
2954 ac_compiler=`set X $ac_compile; echo $2`
2955 { (eval echo "$as_me:2955: \"$ac_compiler --version </dev/null >&5\"") >&5
2956   (eval $ac_compiler --version </dev/null >&5) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); }
2960 { (eval echo "$as_me:2960: \"$ac_compiler -v </dev/null >&5\"") >&5
2961   (eval $ac_compiler -v </dev/null >&5) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }
2965 { (eval echo "$as_me:2965: \"$ac_compiler -V </dev/null >&5\"") >&5
2966   (eval $ac_compiler -V </dev/null >&5) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }
2970
2971 echo "$as_me:2971: checking whether we are using the GNU C++ compiler" >&5
2972 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2973 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main ()
2982 {
2983 #ifndef __GNUC__
2984        choke me
2985 #endif
2986
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   ac_compiler_gnu=yes
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 ac_compiler_gnu=no
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3011
3012 fi
3013 echo "$as_me:3013: result: $ac_cv_cxx_compiler_gnu" >&5
3014 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3015 GXX=`test $ac_compiler_gnu = yes && echo yes`
3016 ac_test_CXXFLAGS=${CXXFLAGS+set}
3017 ac_save_CXXFLAGS=$CXXFLAGS
3018 CXXFLAGS="-g"
3019 echo "$as_me:3019: checking whether $CXX accepts -g" >&5
3020 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3021 if test "${ac_cv_prog_cxx_g+set}" = set; then
3022   echo $ECHO_N "(cached) $ECHO_C" >&6
3023 else
3024   cat >conftest.$ac_ext <<_ACEOF
3025 #line 3025 "configure"
3026 #include "confdefs.h"
3027
3028 int
3029 main ()
3030 {
3031
3032   ;
3033   return 0;
3034 }
3035 _ACEOF
3036 rm -f conftest.$ac_objext
3037 if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5
3038   (eval $ac_compile) 2>&5
3039   ac_status=$?
3040   echo "$as_me:3040: \$? = $ac_status" >&5
3041   (exit $ac_status); } &&
3042          { ac_try='test -s conftest.$ac_objext'
3043   { (eval echo "$as_me:3043: \"$ac_try\"") >&5
3044   (eval $ac_try) 2>&5
3045   ac_status=$?
3046   echo "$as_me:3046: \$? = $ac_status" >&5
3047   (exit $ac_status); }; }; then
3048   ac_cv_prog_cxx_g=yes
3049 else
3050   echo "$as_me: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 ac_cv_prog_cxx_g=no
3053 fi
3054 rm -f conftest.$ac_objext conftest.$ac_ext
3055 fi
3056 echo "$as_me:3056: result: $ac_cv_prog_cxx_g" >&5
3057 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3058 if test "$ac_test_CXXFLAGS" = set; then
3059   CXXFLAGS=$ac_save_CXXFLAGS
3060 elif test $ac_cv_prog_cxx_g = yes; then
3061   if test "$GXX" = yes; then
3062     CXXFLAGS="-g -O2"
3063   else
3064     CXXFLAGS="-g"
3065   fi
3066 else
3067   if test "$GXX" = yes; then
3068     CXXFLAGS="-O2"
3069   else
3070     CXXFLAGS=
3071   fi
3072 fi
3073 for ac_declaration in \
3074    ''\
3075    '#include <stdlib.h>' \
3076    'extern "C" void std::exit (int) throw (); using std::exit;' \
3077    'extern "C" void std::exit (int); using std::exit;' \
3078    'extern "C" void exit (int) throw ();' \
3079    'extern "C" void exit (int);' \
3080    'void exit (int);'
3081 do
3082   cat >conftest.$ac_ext <<_ACEOF
3083 #line 3083 "configure"
3084 #include "confdefs.h"
3085 #include <stdlib.h>
3086 $ac_declaration
3087 int
3088 main ()
3089 {
3090 exit (42);
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 rm -f conftest.$ac_objext
3096 if { (eval echo "$as_me:3096: \"$ac_compile\"") >&5
3097   (eval $ac_compile) 2>&5
3098   ac_status=$?
3099   echo "$as_me:3099: \$? = $ac_status" >&5
3100   (exit $ac_status); } &&
3101          { ac_try='test -s conftest.$ac_objext'
3102   { (eval echo "$as_me:3102: \"$ac_try\"") >&5
3103   (eval $ac_try) 2>&5
3104   ac_status=$?
3105   echo "$as_me:3105: \$? = $ac_status" >&5
3106   (exit $ac_status); }; }; then
3107   :
3108 else
3109   echo "$as_me: failed program was:" >&5
3110 cat conftest.$ac_ext >&5
3111 continue
3112 fi
3113 rm -f conftest.$ac_objext conftest.$ac_ext
3114   cat >conftest.$ac_ext <<_ACEOF
3115 #line 3115 "configure"
3116 #include "confdefs.h"
3117 $ac_declaration
3118 int
3119 main ()
3120 {
3121 exit (42);
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 rm -f conftest.$ac_objext
3127 if { (eval echo "$as_me:3127: \"$ac_compile\"") >&5
3128   (eval $ac_compile) 2>&5
3129   ac_status=$?
3130   echo "$as_me:3130: \$? = $ac_status" >&5
3131   (exit $ac_status); } &&
3132          { ac_try='test -s conftest.$ac_objext'
3133   { (eval echo "$as_me:3133: \"$ac_try\"") >&5
3134   (eval $ac_try) 2>&5
3135   ac_status=$?
3136   echo "$as_me:3136: \$? = $ac_status" >&5
3137   (exit $ac_status); }; }; then
3138   break
3139 else
3140   echo "$as_me: failed program was:" >&5
3141 cat conftest.$ac_ext >&5
3142 fi
3143 rm -f conftest.$ac_objext conftest.$ac_ext
3144 done
3145 rm -rf conftest*
3146 if test -n "$ac_declaration"; then
3147   echo '#ifdef __cplusplus' >>confdefs.h
3148   echo $ac_declaration      >>confdefs.h
3149   echo '#endif'             >>confdefs.h
3150 fi
3151
3152 ac_ext=c
3153 ac_cpp='$CPP $CPPFLAGS'
3154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3157 ac_main_return=return
3158
3159                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3160         if test "$CXX" = "g++" ; then
3161                 # Extract the first word of "g++", so it can be a program name with args.
3162 set dummy g++; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_path_CXX+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   case $CXX in
3169   [\\/]* | ?:[\\/]*)
3170   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3171   ;;
3172   *)
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   if $as_executable_p "$ac_dir/$ac_word"; then
3179    ac_cv_path_CXX="$ac_dir/$ac_word"
3180    echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181    break
3182 fi
3183 done
3184
3185   ;;
3186 esac
3187 fi
3188 CXX=$ac_cv_path_CXX
3189
3190 if test -n "$CXX"; then
3191   echo "$as_me:3191: result: $CXX" >&5
3192 echo "${ECHO_T}$CXX" >&6
3193 else
3194   echo "$as_me:3194: result: no" >&5
3195 echo "${ECHO_T}no" >&6
3196 fi
3197
3198         fi
3199         if test "$CXX" = "g++" ; then
3200                 { echo "$as_me:3200: WARNING: ignoring hardcoded g++" >&5
3201 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3202                 cf_with_cxx=no; CXX=""; GXX="";
3203         fi
3204 fi
3205
3206 GXX_VERSION=none
3207 if test "$GXX" = yes; then
3208         echo "$as_me:3208: checking version of g++" >&5
3209 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3210         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3211         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3212         echo "$as_me:3212: result: $GXX_VERSION" >&5
3213 echo "${ECHO_T}$GXX_VERSION" >&6
3214 fi
3215
3216 case $GXX_VERSION in
3217 1*|2.[0-6]*)
3218         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3219         # cf_cxx_library=no
3220         { echo "$as_me:3220: WARNING: templates do not work" >&5
3221 echo "$as_me: WARNING: templates do not work" >&2;}
3222         ;;
3223 esac
3224
3225 echo "$as_me:3225: checking if you want to build C++ binding and demo" >&5
3226 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3227
3228 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3229 if test "${with_cxx_binding+set}" = set; then
3230   withval="$with_cxx_binding"
3231   cf_with_cxx_binding=$withval
3232 else
3233   cf_with_cxx_binding=$cf_with_cxx
3234 fi;
3235 echo "$as_me:3235: result: $cf_with_cxx_binding" >&5
3236 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3237
3238 echo "$as_me:3238: checking if you want to build with Ada95" >&5
3239 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3240
3241 # Check whether --with-ada or --without-ada was given.
3242 if test "${with_ada+set}" = set; then
3243   withval="$with_ada"
3244   cf_with_ada=$withval
3245 else
3246   cf_with_ada=yes
3247 fi;
3248 echo "$as_me:3248: result: $cf_with_ada" >&5
3249 echo "${ECHO_T}$cf_with_ada" >&6
3250
3251 echo "$as_me:3251: checking if you want to install manpages" >&5
3252 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3253
3254 # Check whether --with-manpages or --without-manpages was given.
3255 if test "${with_manpages+set}" = set; then
3256   withval="$with_manpages"
3257   cf_with_manpages=$withval
3258 else
3259   cf_with_manpages=yes
3260 fi;
3261 echo "$as_me:3261: result: $cf_with_manpages" >&5
3262 echo "${ECHO_T}$cf_with_manpages" >&6
3263
3264 echo "$as_me:3264: checking if you want to build programs such as tic" >&5
3265 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3266
3267 # Check whether --with-progs or --without-progs was given.
3268 if test "${with_progs+set}" = set; then
3269   withval="$with_progs"
3270   cf_with_progs=$withval
3271 else
3272   cf_with_progs=yes
3273 fi;
3274 echo "$as_me:3274: result: $cf_with_progs" >&5
3275 echo "${ECHO_T}$cf_with_progs" >&6
3276
3277 echo "$as_me:3277: checking if you want to build test-programs" >&5
3278 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3279
3280 # Check whether --with-tests or --without-tests was given.
3281 if test "${with_tests+set}" = set; then
3282   withval="$with_tests"
3283   cf_with_tests=$withval
3284 else
3285   cf_with_tests=yes
3286 fi;
3287 echo "$as_me:3287: result: $cf_with_tests" >&5
3288 echo "${ECHO_T}$cf_with_tests" >&6
3289
3290 echo "$as_me:3290: checking if you wish to install curses.h" >&5
3291 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3292
3293 # Check whether --with-curses-h or --without-curses-h was given.
3294 if test "${with_curses_h+set}" = set; then
3295   withval="$with_curses_h"
3296   with_curses_h=$withval
3297 else
3298   with_curses_h=yes
3299 fi;
3300 echo "$as_me:3300: result: $with_curses_h" >&5
3301 echo "${ECHO_T}$with_curses_h" >&6
3302
3303 modules_to_build="ncurses"
3304 if test "X$cf_with_progs" != Xno ; then
3305 modules_to_build="$modules_to_build progs tack"
3306 fi
3307 modules_to_build="$modules_to_build panel menu form"
3308
3309 test "$program_prefix" != NONE &&
3310   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3311 # Use a double $ so make ignores it.
3312 test "$program_suffix" != NONE &&
3313   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3314 # Double any \ or $.  echo might interpret backslashes.
3315 # By default was `s,x,x', remove it if useless.
3316 cat <<\_ACEOF >conftest.sed
3317 s/[\\$]/&&/g;s/;s,x,x,$//
3318 _ACEOF
3319 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3320 rm conftest.sed
3321
3322 for ac_prog in mawk gawk nawk awk
3323 do
3324   # Extract the first word of "$ac_prog", so it can be a program name with args.
3325 set dummy $ac_prog; ac_word=$2
3326 echo "$as_me:3326: checking for $ac_word" >&5
3327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328 if test "${ac_cv_prog_AWK+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331   if test -n "$AWK"; then
3332   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3333 else
3334   ac_save_IFS=$IFS; IFS=$ac_path_separator
3335 ac_dummy="$PATH"
3336 for ac_dir in $ac_dummy; do
3337   IFS=$ac_save_IFS
3338   test -z "$ac_dir" && ac_dir=.
3339   $as_executable_p "$ac_dir/$ac_word" || continue
3340 ac_cv_prog_AWK="$ac_prog"
3341 echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342 break
3343 done
3344
3345 fi
3346 fi
3347 AWK=$ac_cv_prog_AWK
3348 if test -n "$AWK"; then
3349   echo "$as_me:3349: result: $AWK" >&5
3350 echo "${ECHO_T}$AWK" >&6
3351 else
3352   echo "$as_me:3352: result: no" >&5
3353 echo "${ECHO_T}no" >&6
3354 fi
3355
3356   test -n "$AWK" && break
3357 done
3358
3359 test -z "$AWK" && { { echo "$as_me:3359: error: No awk program found" >&5
3360 echo "$as_me: error: No awk program found" >&2;}
3361    { (exit 1); exit 1; }; }
3362
3363 echo "$as_me:3363: checking for egrep" >&5
3364 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3365 if test "${ac_cv_prog_egrep+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3369     then ac_cv_prog_egrep='grep -E'
3370     else ac_cv_prog_egrep='egrep'
3371     fi
3372 fi
3373 echo "$as_me:3373: result: $ac_cv_prog_egrep" >&5
3374 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3375  EGREP=$ac_cv_prog_egrep
3376
3377 test -z "$EGREP" && { { echo "$as_me:3377: error: No egrep program found" >&5
3378 echo "$as_me: error: No egrep program found" >&2;}
3379    { (exit 1); exit 1; }; }
3380
3381 # Find a good install program.  We prefer a C program (faster),
3382 # so one script is as good as another.  But avoid the broken or
3383 # incompatible versions:
3384 # SysV /etc/install, /usr/sbin/install
3385 # SunOS /usr/etc/install
3386 # IRIX /sbin/install
3387 # AIX /bin/install
3388 # AmigaOS /C/install, which installs bootblocks on floppy discs
3389 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3390 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3391 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3392 # ./install, which can be erroneously created by make from ./install.sh.
3393 echo "$as_me:3393: checking for a BSD compatible install" >&5
3394 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3395 if test -z "$INSTALL"; then
3396 if test "${ac_cv_path_install+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399     ac_save_IFS=$IFS; IFS=$ac_path_separator
3400   for ac_dir in $PATH; do
3401     IFS=$ac_save_IFS
3402     # Account for people who put trailing slashes in PATH elements.
3403     case $ac_dir/ in
3404     / | ./ | .// | /cC/* \
3405     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3406     | /usr/ucb/* ) ;;
3407     *)
3408       # OSF1 and SCO ODT 3.0 have their own names for install.
3409       # Don't use installbsd from OSF since it installs stuff as root
3410       # by default.
3411       for ac_prog in ginstall scoinst install; do
3412         if $as_executable_p "$ac_dir/$ac_prog"; then
3413           if test $ac_prog = install &&
3414             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3415             # AIX install.  It has an incompatible calling convention.
3416             :
3417           elif test $ac_prog = install &&
3418             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3419             # program-specific install script used by HP pwplus--don't use.
3420             :
3421           else
3422             ac_cv_path_install="$ac_dir/$ac_prog -c"
3423             break 2
3424           fi
3425         fi
3426       done
3427       ;;
3428     esac
3429   done
3430
3431 fi
3432   if test "${ac_cv_path_install+set}" = set; then
3433     INSTALL=$ac_cv_path_install
3434   else
3435     # As a last resort, use the slow shell script.  We don't cache a
3436     # path for INSTALL within a source directory, because that will
3437     # break other packages using the cache if that directory is
3438     # removed, or if the path is relative.
3439     INSTALL=$ac_install_sh
3440   fi
3441 fi
3442 echo "$as_me:3442: result: $INSTALL" >&5
3443 echo "${ECHO_T}$INSTALL" >&6
3444
3445 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3446 # It thinks the first close brace ends the variable substitution.
3447 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3448
3449 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3450
3451 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3452
3453 case $INSTALL in
3454 /*)
3455   ;;
3456 *)
3457   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3458   test -z "$cf_dir" && cf_dir=.
3459   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3460   ;;
3461 esac
3462
3463 for ac_prog in tdlint lint alint splint lclint
3464 do
3465   # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 echo "$as_me:3467: checking for $ac_word" >&5
3468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3469 if test "${ac_cv_prog_LINT+set}" = set; then
3470   echo $ECHO_N "(cached) $ECHO_C" >&6
3471 else
3472   if test -n "$LINT"; then
3473   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3474 else
3475   ac_save_IFS=$IFS; IFS=$ac_path_separator
3476 ac_dummy="$PATH"
3477 for ac_dir in $ac_dummy; do
3478   IFS=$ac_save_IFS
3479   test -z "$ac_dir" && ac_dir=.
3480   $as_executable_p "$ac_dir/$ac_word" || continue
3481 ac_cv_prog_LINT="$ac_prog"
3482 echo "$as_me:3482: found $ac_dir/$ac_word" >&5
3483 break
3484 done
3485
3486 fi
3487 fi
3488 LINT=$ac_cv_prog_LINT
3489 if test -n "$LINT"; then
3490   echo "$as_me:3490: result: $LINT" >&5
3491 echo "${ECHO_T}$LINT" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497   test -n "$LINT" && break
3498 done
3499
3500 echo "$as_me:3500: checking whether ln -s works" >&5
3501 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3502 LN_S=$as_ln_s
3503 if test "$LN_S" = "ln -s"; then
3504   echo "$as_me:3504: result: yes" >&5
3505 echo "${ECHO_T}yes" >&6
3506 else
3507   echo "$as_me:3507: result: no, using $LN_S" >&5
3508 echo "${ECHO_T}no, using $LN_S" >&6
3509 fi
3510
3511 echo "$as_me:3511: checking if $LN_S -f options work" >&5
3512 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3513
3514 rm -f conf$$.src conf$$dst
3515 echo >conf$$.dst
3516 echo first >conf$$.src
3517 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3518         cf_prog_ln_sf=yes
3519 else
3520         cf_prog_ln_sf=no
3521 fi
3522 rm -f conf$$.dst conf$$src
3523 echo "$as_me:3523: result: $cf_prog_ln_sf" >&5
3524 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3525
3526 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3527
3528 echo "$as_me:3528: checking for long file names" >&5
3529 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3530 if test "${ac_cv_sys_long_file_names+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   ac_cv_sys_long_file_names=yes
3534 # Test for long file names in all the places we know might matter:
3535 #      .                the current directory, where building will happen
3536 #      $prefix/lib      where we will be installing things
3537 #      $exec_prefix/lib likewise
3538 # eval it to expand exec_prefix.
3539 #      $TMPDIR          if set, where it might want to write temporary files
3540 # if $TMPDIR is not set:
3541 #      /tmp             where it might want to write temporary files
3542 #      /var/tmp         likewise
3543 #      /usr/tmp         likewise
3544 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3545   ac_tmpdirs=$TMPDIR
3546 else
3547   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3548 fi
3549 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3550   test -d $ac_dir || continue
3551   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3552   ac_xdir=$ac_dir/cf$$
3553   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3554   ac_tf1=$ac_xdir/conftest9012345
3555   ac_tf2=$ac_xdir/conftest9012346
3556   (echo 1 >$ac_tf1) 2>/dev/null
3557   (echo 2 >$ac_tf2) 2>/dev/null
3558   ac_val=`cat $ac_tf1 2>/dev/null`
3559   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3560     ac_cv_sys_long_file_names=no
3561     rm -rf $ac_xdir 2>/dev/null
3562     break
3563   fi
3564   rm -rf $ac_xdir 2>/dev/null
3565 done
3566 fi
3567 echo "$as_me:3567: result: $ac_cv_sys_long_file_names" >&5
3568 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3569 if test $ac_cv_sys_long_file_names = yes; then
3570
3571 cat >>confdefs.h <<\EOF
3572 #define HAVE_LONG_FILE_NAMES 1
3573 EOF
3574
3575 fi
3576
3577 # if we find pkg-config, check if we should install the ".pc" files.
3578
3579 echo "$as_me:3579: checking if you want to use pkg-config" >&5
3580 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3581
3582 # Check whether --with-pkg-config or --without-pkg-config was given.
3583 if test "${with_pkg_config+set}" = set; then
3584   withval="$with_pkg_config"
3585   cf_pkg_config=$withval
3586 else
3587   cf_pkg_config=yes
3588 fi;
3589 echo "$as_me:3589: result: $cf_pkg_config" >&5
3590 echo "${ECHO_T}$cf_pkg_config" >&6
3591
3592 case $cf_pkg_config in #(vi
3593 no) #(vi
3594         PKG_CONFIG=none
3595         ;;
3596 yes) #(vi
3597
3598 if test -n "$ac_tool_prefix"; then
3599   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3600 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3601 echo "$as_me:3601: checking for $ac_word" >&5
3602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3603 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3604   echo $ECHO_N "(cached) $ECHO_C" >&6
3605 else
3606   case $PKG_CONFIG in
3607   [\\/]* | ?:[\\/]*)
3608   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3609   ;;
3610   *)
3611   ac_save_IFS=$IFS; IFS=$ac_path_separator
3612 ac_dummy="$PATH"
3613 for ac_dir in $ac_dummy; do
3614   IFS=$ac_save_IFS
3615   test -z "$ac_dir" && ac_dir=.
3616   if $as_executable_p "$ac_dir/$ac_word"; then
3617    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3618    echo "$as_me:3618: found $ac_dir/$ac_word" >&5
3619    break
3620 fi
3621 done
3622
3623   ;;
3624 esac
3625 fi
3626 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3627
3628 if test -n "$PKG_CONFIG"; then
3629   echo "$as_me:3629: result: $PKG_CONFIG" >&5
3630 echo "${ECHO_T}$PKG_CONFIG" >&6
3631 else
3632   echo "$as_me:3632: result: no" >&5
3633 echo "${ECHO_T}no" >&6
3634 fi
3635
3636 fi
3637 if test -z "$ac_cv_path_PKG_CONFIG"; then
3638   ac_pt_PKG_CONFIG=$PKG_CONFIG
3639   # Extract the first word of "pkg-config", so it can be a program name with args.
3640 set dummy pkg-config; ac_word=$2
3641 echo "$as_me:3641: checking for $ac_word" >&5
3642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3644   echo $ECHO_N "(cached) $ECHO_C" >&6
3645 else
3646   case $ac_pt_PKG_CONFIG in
3647   [\\/]* | ?:[\\/]*)
3648   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3649   ;;
3650   *)
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   if $as_executable_p "$ac_dir/$ac_word"; then
3657    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3658    echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659    break
3660 fi
3661 done
3662
3663   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3664   ;;
3665 esac
3666 fi
3667 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3668
3669 if test -n "$ac_pt_PKG_CONFIG"; then
3670   echo "$as_me:3670: result: $ac_pt_PKG_CONFIG" >&5
3671 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   PKG_CONFIG=$ac_pt_PKG_CONFIG
3678 else
3679   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3680 fi
3681
3682         ;;
3683 *)
3684         PKG_CONFIG=$withval
3685         ;;
3686 esac
3687
3688 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3689 if test "$PKG_CONFIG" != none ; then
3690
3691 if test "x$prefix" != xNONE; then
3692   cf_path_syntax="$prefix"
3693 else
3694   cf_path_syntax="$ac_default_prefix"
3695 fi
3696
3697 case ".$PKG_CONFIG" in #(vi
3698 .\$\(*\)*|.\'*\'*) #(vi
3699   ;;
3700 ..|./*|.\\*) #(vi
3701   ;;
3702 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3703   ;;
3704 .\${*prefix}*) #(vi
3705   eval PKG_CONFIG="$PKG_CONFIG"
3706   case ".$PKG_CONFIG" in #(vi
3707   .NONE/*)
3708     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3709     ;;
3710   esac
3711   ;; #(vi
3712 .no|.NONE/*)
3713   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3714   ;;
3715 *)
3716   { { echo "$as_me:3716: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3717 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3718    { (exit 1); exit 1; }; }
3719   ;;
3720 esac
3721
3722 fi
3723
3724 if test "$PKG_CONFIG" != no ; then
3725         echo "$as_me:3725: checking if we should install .pc files for $PKG_CONFIG" >&5
3726 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3727
3728         # Leave this as something that can be overridden in the environment.
3729         if test -z "$PKG_CONFIG_LIBDIR" ; then
3730                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3731         fi
3732         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3733         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3734
3735 # Check whether --enable-pc-files or --disable-pc-files was given.
3736 if test "${enable_pc_files+set}" = set; then
3737   enableval="$enable_pc_files"
3738   enable_pc_files=$enableval
3739 else
3740   enable_pc_files=no
3741 fi;
3742                 echo "$as_me:3742: result: $enable_pc_files" >&5
3743 echo "${ECHO_T}$enable_pc_files" >&6
3744         else
3745                 echo "$as_me:3745: result: no" >&5
3746 echo "${ECHO_T}no" >&6
3747                 { echo "$as_me:3747: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3748 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3749                 enable_pc_files=no
3750         fi
3751 fi
3752
3753 echo "$as_me:3753: checking if we should assume mixed-case filenames" >&5
3754 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3755
3756 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3757 if test "${enable_mixed_case+set}" = set; then
3758   enableval="$enable_mixed_case"
3759   enable_mixedcase=$enableval
3760 else
3761   enable_mixedcase=auto
3762 fi;
3763 echo "$as_me:3763: result: $enable_mixedcase" >&5
3764 echo "${ECHO_T}$enable_mixedcase" >&6
3765 if test "$enable_mixedcase" = "auto" ; then
3766
3767 echo "$as_me:3767: checking if filesystem supports mixed-case filenames" >&5
3768 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3769 if test "${cf_cv_mixedcase+set}" = set; then
3770   echo $ECHO_N "(cached) $ECHO_C" >&6
3771 else
3772
3773 if test "$cross_compiling" = yes ; then
3774         case $target_alias in #(vi
3775         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3776                 cf_cv_mixedcase=no
3777                 ;;
3778         *)
3779                 cf_cv_mixedcase=yes
3780                 ;;
3781         esac
3782 else
3783         rm -f conftest CONFTEST
3784         echo test >conftest
3785         if test -f CONFTEST ; then
3786                 cf_cv_mixedcase=no
3787         else
3788                 cf_cv_mixedcase=yes
3789         fi
3790         rm -f conftest CONFTEST
3791 fi
3792
3793 fi
3794 echo "$as_me:3794: result: $cf_cv_mixedcase" >&5
3795 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3796 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3797 #define MIXEDCASE_FILENAMES 1
3798 EOF
3799
3800 else
3801     cf_cv_mixedcase=$enable_mixedcase
3802     if test "$enable_mixedcase" = "yes" ; then
3803         cat >>confdefs.h <<\EOF
3804 #define MIXEDCASE_FILENAMES 1
3805 EOF
3806
3807     fi
3808 fi
3809
3810 # do this after mixed-case option (tags/TAGS is not as important as tic).
3811 echo "$as_me:3811: checking whether ${MAKE-make} sets \${MAKE}" >&5
3812 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3813 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3814 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817   cat >conftest.make <<\EOF
3818 all:
3819         @echo 'ac_maketemp="${MAKE}"'
3820 EOF
3821 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3822 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3823 if test -n "$ac_maketemp"; then
3824   eval ac_cv_prog_make_${ac_make}_set=yes
3825 else
3826   eval ac_cv_prog_make_${ac_make}_set=no
3827 fi
3828 rm -f conftest.make
3829 fi
3830 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3831   echo "$as_me:3831: result: yes" >&5
3832 echo "${ECHO_T}yes" >&6
3833   SET_MAKE=
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837   SET_MAKE="MAKE=${MAKE-make}"
3838 fi
3839
3840 for ac_prog in exctags ctags
3841 do
3842   # Extract the first word of "$ac_prog", so it can be a program name with args.
3843 set dummy $ac_prog; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_CTAGS+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$CTAGS"; then
3850   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_CTAGS="$ac_prog"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863 fi
3864 fi
3865 CTAGS=$ac_cv_prog_CTAGS
3866 if test -n "$CTAGS"; then
3867   echo "$as_me:3867: result: $CTAGS" >&5
3868 echo "${ECHO_T}$CTAGS" >&6
3869 else
3870   echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3872 fi
3873
3874   test -n "$CTAGS" && break
3875 done
3876
3877 for ac_prog in exetags etags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_ETAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$ETAGS"; then
3887   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_ETAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 ETAGS=$ac_cv_prog_ETAGS
3903 if test -n "$ETAGS"; then
3904   echo "$as_me:3904: result: $ETAGS" >&5
3905 echo "${ECHO_T}$ETAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$ETAGS" && break
3912 done
3913
3914 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3915 set dummy ${CTAGS:-ctags}; ac_word=$2
3916 echo "$as_me:3916: checking for $ac_word" >&5
3917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3918 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3919   echo $ECHO_N "(cached) $ECHO_C" >&6
3920 else
3921   if test -n "$MAKE_LOWER_TAGS"; then
3922   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3923 else
3924   ac_save_IFS=$IFS; IFS=$ac_path_separator
3925 ac_dummy="$PATH"
3926 for ac_dir in $ac_dummy; do
3927   IFS=$ac_save_IFS
3928   test -z "$ac_dir" && ac_dir=.
3929   $as_executable_p "$ac_dir/$ac_word" || continue
3930 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3931 echo "$as_me:3931: found $ac_dir/$ac_word" >&5
3932 break
3933 done
3934
3935   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3936 fi
3937 fi
3938 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3939 if test -n "$MAKE_LOWER_TAGS"; then
3940   echo "$as_me:3940: result: $MAKE_LOWER_TAGS" >&5
3941 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3942 else
3943   echo "$as_me:3943: result: no" >&5
3944 echo "${ECHO_T}no" >&6
3945 fi
3946
3947 if test "$cf_cv_mixedcase" = yes ; then
3948         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3949 set dummy ${ETAGS:-etags}; ac_word=$2
3950 echo "$as_me:3950: checking for $ac_word" >&5
3951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3952 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3953   echo $ECHO_N "(cached) $ECHO_C" >&6
3954 else
3955   if test -n "$MAKE_UPPER_TAGS"; then
3956   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3957 else
3958   ac_save_IFS=$IFS; IFS=$ac_path_separator
3959 ac_dummy="$PATH"
3960 for ac_dir in $ac_dummy; do
3961   IFS=$ac_save_IFS
3962   test -z "$ac_dir" && ac_dir=.
3963   $as_executable_p "$ac_dir/$ac_word" || continue
3964 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3965 echo "$as_me:3965: found $ac_dir/$ac_word" >&5
3966 break
3967 done
3968
3969   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3970 fi
3971 fi
3972 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3973 if test -n "$MAKE_UPPER_TAGS"; then
3974   echo "$as_me:3974: result: $MAKE_UPPER_TAGS" >&5
3975 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3976 else
3977   echo "$as_me:3977: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3979 fi
3980
3981 else
3982         MAKE_UPPER_TAGS=no
3983 fi
3984
3985 if test "$MAKE_UPPER_TAGS" = yes ; then
3986         MAKE_UPPER_TAGS=
3987 else
3988         MAKE_UPPER_TAGS="#"
3989 fi
3990
3991 if test "$MAKE_LOWER_TAGS" = yes ; then
3992         MAKE_LOWER_TAGS=
3993 else
3994         MAKE_LOWER_TAGS="#"
3995 fi
3996
3997 echo "$as_me:3997: checking for makeflags variable" >&5
3998 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3999 if test "${cf_cv_makeflags+set}" = set; then
4000   echo $ECHO_N "(cached) $ECHO_C" >&6
4001 else
4002
4003         cf_cv_makeflags=''
4004         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4005         do
4006                 cat >cf_makeflags.tmp <<CF_EOF
4007 SHELL = /bin/sh
4008 all :
4009         @ echo '.$cf_option'
4010 CF_EOF
4011                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4012                 case "$cf_result" in
4013                 .*k)
4014                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4015                         case "$cf_result" in
4016                         .*CC=*) cf_cv_makeflags=
4017                                 ;;
4018                         *)      cf_cv_makeflags=$cf_option
4019                                 ;;
4020                         esac
4021                         break
4022                         ;;
4023                 .-)     ;;
4024                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4025                         ;;
4026                 esac
4027         done
4028         rm -f cf_makeflags.tmp
4029
4030 fi
4031 echo "$as_me:4031: result: $cf_cv_makeflags" >&5
4032 echo "${ECHO_T}$cf_cv_makeflags" >&6
4033
4034 if test -n "$ac_tool_prefix"; then
4035   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4036 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4037 echo "$as_me:4037: checking for $ac_word" >&5
4038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4039 if test "${ac_cv_prog_RANLIB+set}" = set; then
4040   echo $ECHO_N "(cached) $ECHO_C" >&6
4041 else
4042   if test -n "$RANLIB"; then
4043   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4044 else
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   $as_executable_p "$ac_dir/$ac_word" || continue
4051 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4052 echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053 break
4054 done
4055
4056 fi
4057 fi
4058 RANLIB=$ac_cv_prog_RANLIB
4059 if test -n "$RANLIB"; then
4060   echo "$as_me:4060: result: $RANLIB" >&5
4061 echo "${ECHO_T}$RANLIB" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067 fi
4068 if test -z "$ac_cv_prog_RANLIB"; then
4069   ac_ct_RANLIB=$RANLIB
4070   # Extract the first word of "ranlib", so it can be a program name with args.
4071 set dummy ranlib; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$ac_ct_RANLIB"; then
4078   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_ac_ct_RANLIB="ranlib"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4092 fi
4093 fi
4094 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4095 if test -n "$ac_ct_RANLIB"; then
4096   echo "$as_me:4096: result: $ac_ct_RANLIB" >&5
4097 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4098 else
4099   echo "$as_me:4099: result: no" >&5
4100 echo "${ECHO_T}no" >&6
4101 fi
4102
4103   RANLIB=$ac_ct_RANLIB
4104 else
4105   RANLIB="$ac_cv_prog_RANLIB"
4106 fi
4107
4108 if test -n "$ac_tool_prefix"; then
4109   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4110 set dummy ${ac_tool_prefix}ld; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_LD+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$LD"; then
4117   ac_cv_prog_LD="$LD" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_LD="${ac_tool_prefix}ld"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 LD=$ac_cv_prog_LD
4133 if test -n "$LD"; then
4134   echo "$as_me:4134: result: $LD" >&5
4135 echo "${ECHO_T}$LD" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141 fi
4142 if test -z "$ac_cv_prog_LD"; then
4143   ac_ct_LD=$LD
4144   # Extract the first word of "ld", so it can be a program name with args.
4145 set dummy ld; ac_word=$2
4146 echo "$as_me:4146: checking for $ac_word" >&5
4147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4148 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151   if test -n "$ac_ct_LD"; then
4152   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4153 else
4154   ac_save_IFS=$IFS; IFS=$ac_path_separator
4155 ac_dummy="$PATH"
4156 for ac_dir in $ac_dummy; do
4157   IFS=$ac_save_IFS
4158   test -z "$ac_dir" && ac_dir=.
4159   $as_executable_p "$ac_dir/$ac_word" || continue
4160 ac_cv_prog_ac_ct_LD="ld"
4161 echo "$as_me:4161: found $ac_dir/$ac_word" >&5
4162 break
4163 done
4164
4165   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4166 fi
4167 fi
4168 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4169 if test -n "$ac_ct_LD"; then
4170   echo "$as_me:4170: result: $ac_ct_LD" >&5
4171 echo "${ECHO_T}$ac_ct_LD" >&6
4172 else
4173   echo "$as_me:4173: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177   LD=$ac_ct_LD
4178 else
4179   LD="$ac_cv_prog_LD"
4180 fi
4181
4182 if test -n "$ac_tool_prefix"; then
4183   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4184 set dummy ${ac_tool_prefix}ar; ac_word=$2
4185 echo "$as_me:4185: checking for $ac_word" >&5
4186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4187 if test "${ac_cv_prog_AR+set}" = set; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190   if test -n "$AR"; then
4191   ac_cv_prog_AR="$AR" # Let the user override the test.
4192 else
4193   ac_save_IFS=$IFS; IFS=$ac_path_separator
4194 ac_dummy="$PATH"
4195 for ac_dir in $ac_dummy; do
4196   IFS=$ac_save_IFS
4197   test -z "$ac_dir" && ac_dir=.
4198   $as_executable_p "$ac_dir/$ac_word" || continue
4199 ac_cv_prog_AR="${ac_tool_prefix}ar"
4200 echo "$as_me:4200: found $ac_dir/$ac_word" >&5
4201 break
4202 done
4203
4204 fi
4205 fi
4206 AR=$ac_cv_prog_AR
4207 if test -n "$AR"; then
4208   echo "$as_me:4208: result: $AR" >&5
4209 echo "${ECHO_T}$AR" >&6
4210 else
4211   echo "$as_me:4211: result: no" >&5
4212 echo "${ECHO_T}no" >&6
4213 fi
4214
4215 fi
4216 if test -z "$ac_cv_prog_AR"; then
4217   ac_ct_AR=$AR
4218   # Extract the first word of "ar", so it can be a program name with args.
4219 set dummy ar; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ac_ct_AR"; then
4226   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ac_ct_AR="ar"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4240 fi
4241 fi
4242 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4243 if test -n "$ac_ct_AR"; then
4244   echo "$as_me:4244: result: $ac_ct_AR" >&5
4245 echo "${ECHO_T}$ac_ct_AR" >&6
4246 else
4247   echo "$as_me:4247: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251   AR=$ac_ct_AR
4252 else
4253   AR="$ac_cv_prog_AR"
4254 fi
4255
4256 if test -n "$ac_tool_prefix"; then
4257   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4258 set dummy ${ac_tool_prefix}ar; ac_word=$2
4259 echo "$as_me:4259: checking for $ac_word" >&5
4260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4261 if test "${ac_cv_prog_AR+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   if test -n "$AR"; then
4265   ac_cv_prog_AR="$AR" # Let the user override the test.
4266 else
4267   ac_save_IFS=$IFS; IFS=$ac_path_separator
4268 ac_dummy="$PATH"
4269 for ac_dir in $ac_dummy; do
4270   IFS=$ac_save_IFS
4271   test -z "$ac_dir" && ac_dir=.
4272   $as_executable_p "$ac_dir/$ac_word" || continue
4273 ac_cv_prog_AR="${ac_tool_prefix}ar"
4274 echo "$as_me:4274: found $ac_dir/$ac_word" >&5
4275 break
4276 done
4277
4278 fi
4279 fi
4280 AR=$ac_cv_prog_AR
4281 if test -n "$AR"; then
4282   echo "$as_me:4282: result: $AR" >&5
4283 echo "${ECHO_T}$AR" >&6
4284 else
4285   echo "$as_me:4285: result: no" >&5
4286 echo "${ECHO_T}no" >&6
4287 fi
4288
4289 fi
4290 if test -z "$ac_cv_prog_AR"; then
4291   ac_ct_AR=$AR
4292   # Extract the first word of "ar", so it can be a program name with args.
4293 set dummy ar; ac_word=$2
4294 echo "$as_me:4294: checking for $ac_word" >&5
4295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4296 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4297   echo $ECHO_N "(cached) $ECHO_C" >&6
4298 else
4299   if test -n "$ac_ct_AR"; then
4300   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4301 else
4302   ac_save_IFS=$IFS; IFS=$ac_path_separator
4303 ac_dummy="$PATH"
4304 for ac_dir in $ac_dummy; do
4305   IFS=$ac_save_IFS
4306   test -z "$ac_dir" && ac_dir=.
4307   $as_executable_p "$ac_dir/$ac_word" || continue
4308 ac_cv_prog_ac_ct_AR="ar"
4309 echo "$as_me:4309: found $ac_dir/$ac_word" >&5
4310 break
4311 done
4312
4313   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4314 fi
4315 fi
4316 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4317 if test -n "$ac_ct_AR"; then
4318   echo "$as_me:4318: result: $ac_ct_AR" >&5
4319 echo "${ECHO_T}$ac_ct_AR" >&6
4320 else
4321   echo "$as_me:4321: result: no" >&5
4322 echo "${ECHO_T}no" >&6
4323 fi
4324
4325   AR=$ac_ct_AR
4326 else
4327   AR="$ac_cv_prog_AR"
4328 fi
4329
4330 echo "$as_me:4330: checking for options to update archives" >&5
4331 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4332 if test "${cf_cv_ar_flags+set}" = set; then
4333   echo $ECHO_N "(cached) $ECHO_C" >&6
4334 else
4335
4336         cf_cv_ar_flags=unknown
4337         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4338         do
4339
4340                 # check if $ARFLAGS already contains this choice
4341                 if test "x$ARFLAGS" != "x" ; then
4342                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4343                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4344                                 cf_cv_ar_flags=
4345                                 break
4346                         fi
4347                 fi
4348
4349                 rm -f conftest.$ac_cv_objext
4350                 rm -f conftest.a
4351
4352                 cat >conftest.$ac_ext <<EOF
4353 #line 4353 "configure"
4354 int     testdata[3] = { 123, 456, 789 };
4355 EOF
4356                 if { (eval echo "$as_me:4356: \"$ac_compile\"") >&5
4357   (eval $ac_compile) 2>&5
4358   ac_status=$?
4359   echo "$as_me:4359: \$? = $ac_status" >&5
4360   (exit $ac_status); } ; then
4361                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4362                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4363                         if test -f conftest.a ; then
4364                                 cf_cv_ar_flags=$cf_ar_flags
4365                                 break
4366                         fi
4367                 else
4368                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4369
4370 echo "${as_me:-configure}:4370: testing cannot compile test-program ..." 1>&5
4371
4372                         break
4373                 fi
4374         done
4375         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4376
4377 fi
4378 echo "$as_me:4378: result: $cf_cv_ar_flags" >&5
4379 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4380
4381 if test -n "$ARFLAGS" ; then
4382         if test -n "$cf_cv_ar_flags" ; then
4383                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4384         fi
4385 else
4386         ARFLAGS=$cf_cv_ar_flags
4387 fi
4388
4389 echo "$as_me:4389: checking if you have specified an install-prefix" >&5
4390 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4391
4392 # Check whether --with-install-prefix or --without-install-prefix was given.
4393 if test "${with_install_prefix+set}" = set; then
4394   withval="$with_install_prefix"
4395   case "$withval" in #(vi
4396         yes|no) #(vi
4397                 ;;
4398         *)      DESTDIR="$withval"
4399                 ;;
4400         esac
4401 fi;
4402 echo "$as_me:4402: result: $DESTDIR" >&5
4403 echo "${ECHO_T}$DESTDIR" >&6
4404
4405 ###############################################################################
4406
4407 # If we're cross-compiling, allow the user to override the tools and their
4408 # options.  The configure script is oriented toward identifying the host
4409 # compiler, etc., but we need a build compiler to generate parts of the source.
4410
4411 if test "$cross_compiling" = yes ; then
4412
4413         # defaults that we might want to override
4414         : ${BUILD_CFLAGS:=''}
4415         : ${BUILD_CPPFLAGS:=''}
4416         : ${BUILD_LDFLAGS:=''}
4417         : ${BUILD_LIBS:=''}
4418         : ${BUILD_EXEEXT:='$x'}
4419         : ${BUILD_OBJEXT:='o'}
4420
4421 # Check whether --with-build-cc or --without-build-cc was given.
4422 if test "${with_build_cc+set}" = set; then
4423   withval="$with_build_cc"
4424   BUILD_CC="$withval"
4425 else
4426   for ac_prog in gcc cc cl
4427 do
4428   # Extract the first word of "$ac_prog", so it can be a program name with args.
4429 set dummy $ac_prog; ac_word=$2
4430 echo "$as_me:4430: checking for $ac_word" >&5
4431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4432 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4433   echo $ECHO_N "(cached) $ECHO_C" >&6
4434 else
4435   if test -n "$BUILD_CC"; then
4436   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4437 else
4438   ac_save_IFS=$IFS; IFS=$ac_path_separator
4439 ac_dummy="$PATH"
4440 for ac_dir in $ac_dummy; do
4441   IFS=$ac_save_IFS
4442   test -z "$ac_dir" && ac_dir=.
4443   $as_executable_p "$ac_dir/$ac_word" || continue
4444 ac_cv_prog_BUILD_CC="$ac_prog"
4445 echo "$as_me:4445: found $ac_dir/$ac_word" >&5
4446 break
4447 done
4448
4449 fi
4450 fi
4451 BUILD_CC=$ac_cv_prog_BUILD_CC
4452 if test -n "$BUILD_CC"; then
4453   echo "$as_me:4453: result: $BUILD_CC" >&5
4454 echo "${ECHO_T}$BUILD_CC" >&6
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458 fi
4459
4460   test -n "$BUILD_CC" && break
4461 done
4462
4463 fi;
4464         echo "$as_me:4464: checking for native build C compiler" >&5
4465 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4466         echo "$as_me:4466: result: $BUILD_CC" >&5
4467 echo "${ECHO_T}$BUILD_CC" >&6
4468
4469         echo "$as_me:4469: checking for native build C preprocessor" >&5
4470 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4471
4472 # Check whether --with-build-cpp or --without-build-cpp was given.
4473 if test "${with_build_cpp+set}" = set; then
4474   withval="$with_build_cpp"
4475   BUILD_CPP="$withval"
4476 else
4477   BUILD_CPP='${BUILD_CC} -E'
4478 fi;
4479         echo "$as_me:4479: result: $BUILD_CPP" >&5
4480 echo "${ECHO_T}$BUILD_CPP" >&6
4481
4482         echo "$as_me:4482: checking for native build C flags" >&5
4483 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4484
4485 # Check whether --with-build-cflags or --without-build-cflags was given.
4486 if test "${with_build_cflags+set}" = set; then
4487   withval="$with_build_cflags"
4488   BUILD_CFLAGS="$withval"
4489 fi;
4490         echo "$as_me:4490: result: $BUILD_CFLAGS" >&5
4491 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4492
4493         echo "$as_me:4493: checking for native build C preprocessor-flags" >&5
4494 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4495
4496 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4497 if test "${with_build_cppflags+set}" = set; then
4498   withval="$with_build_cppflags"
4499   BUILD_CPPFLAGS="$withval"
4500 fi;
4501         echo "$as_me:4501: result: $BUILD_CPPFLAGS" >&5
4502 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4503
4504         echo "$as_me:4504: checking for native build linker-flags" >&5
4505 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4506
4507 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4508 if test "${with_build_ldflags+set}" = set; then
4509   withval="$with_build_ldflags"
4510   BUILD_LDFLAGS="$withval"
4511 fi;
4512         echo "$as_me:4512: result: $BUILD_LDFLAGS" >&5
4513 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4514
4515         echo "$as_me:4515: checking for native build linker-libraries" >&5
4516 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4517
4518 # Check whether --with-build-libs or --without-build-libs was given.
4519 if test "${with_build_libs+set}" = set; then
4520   withval="$with_build_libs"
4521   BUILD_LIBS="$withval"
4522 fi;
4523         echo "$as_me:4523: result: $BUILD_LIBS" >&5
4524 echo "${ECHO_T}$BUILD_LIBS" >&6
4525
4526         # this assumes we're on Unix.
4527         BUILD_EXEEXT=
4528         BUILD_OBJEXT=o
4529
4530         : ${BUILD_CC:='${CC}'}
4531
4532         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4533                 { { echo "$as_me:4533: error: Cross-build requires two compilers.
4534 Use --with-build-cc to specify the native compiler." >&5
4535 echo "$as_me: error: Cross-build requires two compilers.
4536 Use --with-build-cc to specify the native compiler." >&2;}
4537    { (exit 1); exit 1; }; }
4538         fi
4539
4540 else
4541         : ${BUILD_CC:='${CC}'}
4542         : ${BUILD_CPP:='${CPP}'}
4543         : ${BUILD_CFLAGS:='${CFLAGS}'}
4544         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4545         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4546         : ${BUILD_LIBS:='${LIBS}'}
4547         : ${BUILD_EXEEXT:='$x'}
4548         : ${BUILD_OBJEXT:='o'}
4549 fi
4550
4551 ###############################################################################
4552
4553 ### Options to allow the user to specify the set of libraries which are used.
4554 ### Use "--without-normal --with-shared" to allow the default model to be
4555 ### shared, for example.
4556 cf_list_models=""
4557
4558 echo "$as_me:4558: checking if libtool -version-number should be used" >&5
4559 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4560
4561 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4562 if test "${enable_libtool_version+set}" = set; then
4563   enableval="$enable_libtool_version"
4564   test "$enableval" != no && enableval=yes
4565   if test "$enableval" != "yes" ; then
4566     cf_libtool_version=no
4567   else
4568     cf_libtool_version=yes
4569   fi
4570 else
4571   enableval=yes
4572   cf_libtool_version=yes
4573
4574 fi;
4575 echo "$as_me:4575: result: $cf_libtool_version" >&5
4576 echo "${ECHO_T}$cf_libtool_version" >&6
4577
4578 if test "$cf_libtool_version" = yes ; then
4579         LIBTOOL_VERSION="-version-number"
4580 else
4581         LIBTOOL_VERSION="-version-info"
4582 fi
4583
4584 LIBTOOL=
4585
4586 # common library maintenance symbols that are convenient for libtool scripts:
4587 LIB_CREATE='${AR} -cr'
4588 LIB_OBJECT='${OBJECTS}'
4589 LIB_SUFFIX=.a
4590 LIB_PREP="$RANLIB"
4591
4592 # symbols used to prop libtool up to enable it to determine what it should be
4593 # doing:
4594 LIB_CLEAN=
4595 LIB_COMPILE=
4596 LIB_LINK='${CC}'
4597 LIB_INSTALL=
4598 LIB_UNINSTALL=
4599
4600 echo "$as_me:4600: checking if you want to build libraries with libtool" >&5
4601 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4602
4603 # Check whether --with-libtool or --without-libtool was given.
4604 if test "${with_libtool+set}" = set; then
4605   withval="$with_libtool"
4606   with_libtool=$withval
4607 else
4608   with_libtool=no
4609 fi;
4610 echo "$as_me:4610: result: $with_libtool" >&5
4611 echo "${ECHO_T}$with_libtool" >&6
4612 if test "$with_libtool" != "no"; then
4613
4614         if test "$with_libtool" != "yes" ; then
4615
4616 if test "x$prefix" != xNONE; then
4617   cf_path_syntax="$prefix"
4618 else
4619   cf_path_syntax="$ac_default_prefix"
4620 fi
4621
4622 case ".$with_libtool" in #(vi
4623 .\$\(*\)*|.\'*\'*) #(vi
4624   ;;
4625 ..|./*|.\\*) #(vi
4626   ;;
4627 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4628   ;;
4629 .\${*prefix}*) #(vi
4630   eval with_libtool="$with_libtool"
4631   case ".$with_libtool" in #(vi
4632   .NONE/*)
4633     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4634     ;;
4635   esac
4636   ;; #(vi
4637 .no|.NONE/*)
4638   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4639   ;;
4640 *)
4641   { { echo "$as_me:4641: error: expected a pathname, not \"$with_libtool\"" >&5
4642 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4643    { (exit 1); exit 1; }; }
4644   ;;
4645 esac
4646
4647                 LIBTOOL=$with_libtool
4648         else
4649                 # Extract the first word of "libtool", so it can be a program name with args.
4650 set dummy libtool; ac_word=$2
4651 echo "$as_me:4651: checking for $ac_word" >&5
4652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4653 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4654   echo $ECHO_N "(cached) $ECHO_C" >&6
4655 else
4656   case $LIBTOOL in
4657   [\\/]* | ?:[\\/]*)
4658   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4659   ;;
4660   *)
4661   ac_save_IFS=$IFS; IFS=$ac_path_separator
4662 ac_dummy="$PATH"
4663 for ac_dir in $ac_dummy; do
4664   IFS=$ac_save_IFS
4665   test -z "$ac_dir" && ac_dir=.
4666   if $as_executable_p "$ac_dir/$ac_word"; then
4667    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4668    echo "$as_me:4668: found $ac_dir/$ac_word" >&5
4669    break
4670 fi
4671 done
4672
4673   ;;
4674 esac
4675 fi
4676 LIBTOOL=$ac_cv_path_LIBTOOL
4677
4678 if test -n "$LIBTOOL"; then
4679   echo "$as_me:4679: result: $LIBTOOL" >&5
4680 echo "${ECHO_T}$LIBTOOL" >&6
4681 else
4682   echo "$as_me:4682: result: no" >&5
4683 echo "${ECHO_T}no" >&6
4684 fi
4685
4686         fi
4687         if test -z "$LIBTOOL" ; then
4688                 { { echo "$as_me:4688: error: Cannot find libtool" >&5
4689 echo "$as_me: error: Cannot find libtool" >&2;}
4690    { (exit 1); exit 1; }; }
4691         fi
4692         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4693         LIB_OBJECT='${OBJECTS:.o=.lo}'
4694         LIB_SUFFIX=.la
4695         LIB_CLEAN='${LIBTOOL} --mode=clean'
4696         LIB_COMPILE='${LIBTOOL} --mode=compile'
4697         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4698         LIB_INSTALL='${LIBTOOL} --mode=install'
4699         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4700         LIB_PREP=:
4701
4702         # Show the version of libtool
4703         echo "$as_me:4703: checking version of libtool" >&5
4704 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4705
4706         # Save the version in a cache variable - this is not entirely a good
4707         # thing, but the version string from libtool is very ugly, and for
4708         # bug reports it might be useful to have the original string. "("
4709         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.].*//'`
4710         echo "$as_me:4710: result: $cf_cv_libtool_version" >&5
4711 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4712         if test -z "$cf_cv_libtool_version" ; then
4713                 { { echo "$as_me:4713: error: This is not GNU libtool" >&5
4714 echo "$as_me: error: This is not GNU libtool" >&2;}
4715    { (exit 1); exit 1; }; }
4716         fi
4717
4718         # special hack to add -no-undefined (which libtool should do for itself)
4719         LT_UNDEF=
4720         case "$cf_cv_system_name" in #(vi
4721         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4722                 LT_UNDEF=-no-undefined
4723                 ;;
4724         esac
4725
4726         # special hack to add --tag option for C++ compiler
4727         case $cf_cv_libtool_version in #(vi
4728         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4729                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4730                 LIBTOOL="$LIBTOOL --tag=CC"
4731                 ;;
4732         *)
4733                 LIBTOOL_CXX="$LIBTOOL"
4734                 ;;
4735         esac
4736 else
4737         LIBTOOL=""
4738         LIBTOOL_CXX=""
4739 fi
4740
4741 test -z "$LIBTOOL" && ECHO_LT=
4742
4743 if test "$with_libtool" != "no" ; then
4744
4745 cf_list_models="$cf_list_models libtool"
4746
4747 else
4748
4749 echo "$as_me:4749: checking if you want to build shared libraries" >&5
4750 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4751
4752 # Check whether --with-shared or --without-shared was given.
4753 if test "${with_shared+set}" = set; then
4754   withval="$with_shared"
4755   with_shared=$withval
4756 else
4757   with_shared=no
4758 fi;
4759 echo "$as_me:4759: result: $with_shared" >&5
4760 echo "${ECHO_T}$with_shared" >&6
4761 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4762
4763 echo "$as_me:4763: checking if you want to build static libraries" >&5
4764 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4765
4766 # Check whether --with-normal or --without-normal was given.
4767 if test "${with_normal+set}" = set; then
4768   withval="$with_normal"
4769   with_normal=$withval
4770 else
4771   with_normal=yes
4772 fi;
4773 echo "$as_me:4773: result: $with_normal" >&5
4774 echo "${ECHO_T}$with_normal" >&6
4775 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4776
4777 echo "$as_me:4777: checking if you want to build debug libraries" >&5
4778 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4779
4780 # Check whether --with-debug or --without-debug was given.
4781 if test "${with_debug+set}" = set; then
4782   withval="$with_debug"
4783   with_debug=$withval
4784 else
4785   with_debug=yes
4786 fi;
4787 echo "$as_me:4787: result: $with_debug" >&5
4788 echo "${ECHO_T}$with_debug" >&6
4789 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4790
4791 echo "$as_me:4791: checking if you want to build profiling libraries" >&5
4792 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4793
4794 # Check whether --with-profile or --without-profile was given.
4795 if test "${with_profile+set}" = set; then
4796   withval="$with_profile"
4797   with_profile=$withval
4798 else
4799   with_profile=no
4800 fi;
4801 echo "$as_me:4801: result: $with_profile" >&5
4802 echo "${ECHO_T}$with_profile" >&6
4803 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4804
4805 fi
4806
4807 ###############################################################################
4808
4809 echo "$as_me:4809: checking for specified models" >&5
4810 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4811 test -z "$cf_list_models" && cf_list_models=normal
4812 test "$with_libtool" != "no" && cf_list_models=libtool
4813 echo "$as_me:4813: result: $cf_list_models" >&5
4814 echo "${ECHO_T}$cf_list_models" >&6
4815
4816 ### Use the first model as the default, and save its suffix for use in building
4817 ### up test-applications.
4818 echo "$as_me:4818: checking for default model" >&5
4819 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4820 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4821 echo "$as_me:4821: result: $DFT_LWR_MODEL" >&5
4822 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4823
4824 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4825
4826 TICS_NAME=tic
4827
4828 TINFO_NAME=tinfo
4829
4830 LIB_NAME=ncurses
4831
4832 LIB_DIR=../lib
4833 LIB_2ND=../../lib
4834
4835         case $cf_cv_system_name in #(vi
4836         OS/2*|os2*) #(vi
4837         LIB_PREFIX=''
4838         ;;
4839         *)      LIB_PREFIX='lib'
4840         ;;
4841         esac
4842 cf_prefix=$LIB_PREFIX
4843
4844 LIB_PREFIX=$cf_prefix
4845
4846 LIB_SUFFIX=
4847
4848 ###############################################################################
4849
4850 echo "$as_me:4850: checking if you want to build a separate terminfo library" >&5
4851 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4852
4853 # Check whether --with-termlib or --without-termlib was given.
4854 if test "${with_termlib+set}" = set; then
4855   withval="$with_termlib"
4856   with_termlib=$withval
4857 else
4858   with_termlib=no
4859 fi;
4860 echo "$as_me:4860: result: $with_termlib" >&5
4861 echo "${ECHO_T}$with_termlib" >&6
4862
4863 echo "$as_me:4863: checking if you want to build a separate tic library" >&5
4864 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4865
4866 # Check whether --with-ticlib or --without-ticlib was given.
4867 if test "${with_ticlib+set}" = set; then
4868   withval="$with_ticlib"
4869   with_ticlib=$withval
4870 else
4871   with_ticlib=no
4872 fi;
4873 echo "$as_me:4873: result: $with_ticlib" >&5
4874 echo "${ECHO_T}$with_ticlib" >&6
4875
4876 ### Checks for special libraries, must be done up-front.
4877 SHLIB_LIST=""
4878
4879 echo "$as_me:4879: checking if you want to link with the GPM mouse library" >&5
4880 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4881
4882 # Check whether --with-gpm or --without-gpm was given.
4883 if test "${with_gpm+set}" = set; then
4884   withval="$with_gpm"
4885   with_gpm=$withval
4886 else
4887   with_gpm=maybe
4888 fi;
4889 echo "$as_me:4889: result: $with_gpm" >&5
4890 echo "${ECHO_T}$with_gpm" >&6
4891
4892 if test "$with_gpm" != no ; then
4893         echo "$as_me:4893: checking for gpm.h" >&5
4894 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4895 if test "${ac_cv_header_gpm_h+set}" = set; then
4896   echo $ECHO_N "(cached) $ECHO_C" >&6
4897 else
4898   cat >conftest.$ac_ext <<_ACEOF
4899 #line 4899 "configure"
4900 #include "confdefs.h"
4901 #include <gpm.h>
4902 _ACEOF
4903 if { (eval echo "$as_me:4903: \"$ac_cpp conftest.$ac_ext\"") >&5
4904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4905   ac_status=$?
4906   egrep -v '^ *\+' conftest.er1 >conftest.err
4907   rm -f conftest.er1
4908   cat conftest.err >&5
4909   echo "$as_me:4909: \$? = $ac_status" >&5
4910   (exit $ac_status); } >/dev/null; then
4911   if test -s conftest.err; then
4912     ac_cpp_err=$ac_c_preproc_warn_flag
4913   else
4914     ac_cpp_err=
4915   fi
4916 else
4917   ac_cpp_err=yes
4918 fi
4919 if test -z "$ac_cpp_err"; then
4920   ac_cv_header_gpm_h=yes
4921 else
4922   echo "$as_me: failed program was:" >&5
4923   cat conftest.$ac_ext >&5
4924   ac_cv_header_gpm_h=no
4925 fi
4926 rm -f conftest.err conftest.$ac_ext
4927 fi
4928 echo "$as_me:4928: result: $ac_cv_header_gpm_h" >&5
4929 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4930 if test $ac_cv_header_gpm_h = yes; then
4931
4932                 cat >>confdefs.h <<\EOF
4933 #define HAVE_GPM_H 1
4934 EOF
4935
4936                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4937                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4938
4939 echo "${as_me:-configure}:4939: testing assuming we really have GPM library ..." 1>&5
4940
4941                         cat >>confdefs.h <<\EOF
4942 #define HAVE_LIBGPM 1
4943 EOF
4944
4945                 else
4946                         echo "$as_me:4946: checking for Gpm_Open in -lgpm" >&5
4947 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4948 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   ac_check_lib_save_LIBS=$LIBS
4952 LIBS="-lgpm  $LIBS"
4953 cat >conftest.$ac_ext <<_ACEOF
4954 #line 4954 "configure"
4955 #include "confdefs.h"
4956
4957 /* Override any gcc2 internal prototype to avoid an error.  */
4958 #ifdef __cplusplus
4959 extern "C"
4960 #endif
4961 /* We use char because int might match the return type of a gcc2
4962    builtin and then its argument prototype would still apply.  */
4963 char Gpm_Open ();
4964 int
4965 main ()
4966 {
4967 Gpm_Open ();
4968   ;
4969   return 0;
4970 }
4971 _ACEOF
4972 rm -f conftest.$ac_objext conftest$ac_exeext
4973 if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
4974   (eval $ac_link) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); } &&
4978          { ac_try='test -s conftest$ac_exeext'
4979   { (eval echo "$as_me:4979: \"$ac_try\"") >&5
4980   (eval $ac_try) 2>&5
4981   ac_status=$?
4982   echo "$as_me:4982: \$? = $ac_status" >&5
4983   (exit $ac_status); }; }; then
4984   ac_cv_lib_gpm_Gpm_Open=yes
4985 else
4986   echo "$as_me: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 ac_cv_lib_gpm_Gpm_Open=no
4989 fi
4990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4991 LIBS=$ac_check_lib_save_LIBS
4992 fi
4993 echo "$as_me:4993: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4994 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4995 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4996   :
4997 else
4998
4999                                 { { echo "$as_me:4999: error: Cannot link with GPM library" >&5
5000 echo "$as_me: error: Cannot link with GPM library" >&2;}
5001    { (exit 1); exit 1; }; }
5002                 fi
5003                 with_gpm=yes
5004
5005 fi
5006
5007 else
5008
5009                 test "$with_gpm" != maybe && { echo "$as_me:5009: WARNING: Cannot find GPM header" >&5
5010 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5011                 with_gpm=no
5012
5013 fi
5014
5015 fi
5016
5017 if test "$with_gpm" != no ; then
5018         echo "$as_me:5018: checking if you want to load GPM dynamically" >&5
5019 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5020
5021 # Check whether --with-dlsym or --without-dlsym was given.
5022 if test "${with_dlsym+set}" = set; then
5023   withval="$with_dlsym"
5024   with_dlsym=$withval
5025 else
5026   with_dlsym=yes
5027 fi;
5028         echo "$as_me:5028: result: $with_dlsym" >&5
5029 echo "${ECHO_T}$with_dlsym" >&6
5030         if test "$with_dlsym" = yes ; then
5031
5032 cf_have_dlsym=no
5033 echo "$as_me:5033: checking for dlsym" >&5
5034 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5035 if test "${ac_cv_func_dlsym+set}" = set; then
5036   echo $ECHO_N "(cached) $ECHO_C" >&6
5037 else
5038   cat >conftest.$ac_ext <<_ACEOF
5039 #line 5039 "configure"
5040 #include "confdefs.h"
5041 /* System header to define __stub macros and hopefully few prototypes,
5042     which can conflict with char dlsym (); below.  */
5043 #include <assert.h>
5044 /* Override any gcc2 internal prototype to avoid an error.  */
5045 #ifdef __cplusplus
5046 extern "C"
5047 #endif
5048 /* We use char because int might match the return type of a gcc2
5049    builtin and then its argument prototype would still apply.  */
5050 char dlsym ();
5051 char (*f) ();
5052
5053 int
5054 main ()
5055 {
5056 /* The GNU C library defines this for functions which it implements
5057     to always fail with ENOSYS.  Some functions are actually named
5058     something starting with __ and the normal name is an alias.  */
5059 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5060 choke me
5061 #else
5062 f = dlsym;
5063 #endif
5064
5065   ;
5066   return 0;
5067 }
5068 _ACEOF
5069 rm -f conftest.$ac_objext conftest$ac_exeext
5070 if { (eval echo "$as_me:5070: \"$ac_link\"") >&5
5071   (eval $ac_link) 2>&5
5072   ac_status=$?
5073   echo "$as_me:5073: \$? = $ac_status" >&5
5074   (exit $ac_status); } &&
5075          { ac_try='test -s conftest$ac_exeext'
5076   { (eval echo "$as_me:5076: \"$ac_try\"") >&5
5077   (eval $ac_try) 2>&5
5078   ac_status=$?
5079   echo "$as_me:5079: \$? = $ac_status" >&5
5080   (exit $ac_status); }; }; then
5081   ac_cv_func_dlsym=yes
5082 else
5083   echo "$as_me: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5085 ac_cv_func_dlsym=no
5086 fi
5087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5088 fi
5089 echo "$as_me:5089: result: $ac_cv_func_dlsym" >&5
5090 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5091 if test $ac_cv_func_dlsym = yes; then
5092   cf_have_dlsym=yes
5093 else
5094
5095 cf_have_libdl=no
5096 echo "$as_me:5096: checking for dlsym in -ldl" >&5
5097 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5098 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101   ac_check_lib_save_LIBS=$LIBS
5102 LIBS="-ldl  $LIBS"
5103 cat >conftest.$ac_ext <<_ACEOF
5104 #line 5104 "configure"
5105 #include "confdefs.h"
5106
5107 /* Override any gcc2 internal prototype to avoid an error.  */
5108 #ifdef __cplusplus
5109 extern "C"
5110 #endif
5111 /* We use char because int might match the return type of a gcc2
5112    builtin and then its argument prototype would still apply.  */
5113 char dlsym ();
5114 int
5115 main ()
5116 {
5117 dlsym ();
5118   ;
5119   return 0;
5120 }
5121 _ACEOF
5122 rm -f conftest.$ac_objext conftest$ac_exeext
5123 if { (eval echo "$as_me:5123: \"$ac_link\"") >&5
5124   (eval $ac_link) 2>&5
5125   ac_status=$?
5126   echo "$as_me:5126: \$? = $ac_status" >&5
5127   (exit $ac_status); } &&
5128          { ac_try='test -s conftest$ac_exeext'
5129   { (eval echo "$as_me:5129: \"$ac_try\"") >&5
5130   (eval $ac_try) 2>&5
5131   ac_status=$?
5132   echo "$as_me:5132: \$? = $ac_status" >&5
5133   (exit $ac_status); }; }; then
5134   ac_cv_lib_dl_dlsym=yes
5135 else
5136   echo "$as_me: failed program was:" >&5
5137 cat conftest.$ac_ext >&5
5138 ac_cv_lib_dl_dlsym=no
5139 fi
5140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5141 LIBS=$ac_check_lib_save_LIBS
5142 fi
5143 echo "$as_me:5143: result: $ac_cv_lib_dl_dlsym" >&5
5144 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5145 if test $ac_cv_lib_dl_dlsym = yes; then
5146
5147         cf_have_dlsym=yes
5148         cf_have_libdl=yes
5149 fi
5150
5151 fi
5152
5153 if test "$cf_have_dlsym" = yes ; then
5154         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5155
5156         echo "$as_me:5156: checking whether able to link to dl*() functions" >&5
5157 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5158         cat >conftest.$ac_ext <<_ACEOF
5159 #line 5159 "configure"
5160 #include "confdefs.h"
5161 #include <dlfcn.h>
5162 int
5163 main ()
5164 {
5165
5166                 void *obj;
5167                 if ((obj = dlopen("filename", 0)) != 0) {
5168                         if (dlsym(obj, "symbolname") == 0) {
5169                         dlclose(obj);
5170                         }
5171                 }
5172   ;
5173   return 0;
5174 }
5175 _ACEOF
5176 rm -f conftest.$ac_objext conftest$ac_exeext
5177 if { (eval echo "$as_me:5177: \"$ac_link\"") >&5
5178   (eval $ac_link) 2>&5
5179   ac_status=$?
5180   echo "$as_me:5180: \$? = $ac_status" >&5
5181   (exit $ac_status); } &&
5182          { ac_try='test -s conftest$ac_exeext'
5183   { (eval echo "$as_me:5183: \"$ac_try\"") >&5
5184   (eval $ac_try) 2>&5
5185   ac_status=$?
5186   echo "$as_me:5186: \$? = $ac_status" >&5
5187   (exit $ac_status); }; }; then
5188
5189                 cat >>confdefs.h <<\EOF
5190 #define HAVE_LIBDL 1
5191 EOF
5192
5193 else
5194   echo "$as_me: failed program was:" >&5
5195 cat conftest.$ac_ext >&5
5196
5197                 { { echo "$as_me:5197: error: Cannot link test program for libdl" >&5
5198 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5199    { (exit 1); exit 1; }; }
5200 fi
5201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5202         echo "$as_me:5202: result: ok" >&5
5203 echo "${ECHO_T}ok" >&6
5204 else
5205         { { echo "$as_me:5205: error: Cannot find dlsym function" >&5
5206 echo "$as_me: error: Cannot find dlsym function" >&2;}
5207    { (exit 1); exit 1; }; }
5208 fi
5209
5210                 if test "$with_gpm" != yes ; then
5211                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5212
5213 echo "${as_me:-configure}:5213: testing assuming soname for gpm is $with_gpm ..." 1>&5
5214
5215                         cf_cv_gpm_soname="$with_gpm"
5216                 else
5217
5218 echo "$as_me:5218: checking for soname of gpm library" >&5
5219 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5220 if test "${cf_cv_gpm_soname+set}" = set; then
5221   echo $ECHO_N "(cached) $ECHO_C" >&6
5222 else
5223
5224 cf_cv_gpm_soname=unknown
5225 if test "$cross_compiling" != yes ; then
5226 cat >conftest.$ac_ext <<CF_EOF
5227 #include <gpm.h>
5228 int main()
5229 {
5230 if (Gpm_Open(0,0)) Gpm_Close();
5231         ${cf_cv_main_return:-return}(0);
5232 }
5233 CF_EOF
5234 cf_save_LIBS="$LIBS"
5235         LIBS="-lgpm $LIBS"
5236         if { (eval echo "$as_me:5236: \"$ac_compile\"") >&5
5237   (eval $ac_compile) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } ; then
5241                 if { (eval echo "$as_me:5241: \"$ac_link\"") >&5
5242   (eval $ac_link) 2>&5
5243   ac_status=$?
5244   echo "$as_me:5244: \$? = $ac_status" >&5
5245   (exit $ac_status); } ; then
5246                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5247                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5248                 fi
5249         fi
5250 rm -rf conftest*
5251 LIBS="$cf_save_LIBS"
5252 fi
5253
5254 fi
5255 echo "$as_me:5255: result: $cf_cv_gpm_soname" >&5
5256 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5257
5258                 fi
5259                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5260 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5261 EOF
5262
5263                 SHLIB_LIST="-ldl $SHLIB_LIST"
5264         else
5265                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5266                 TEST_LIBS="-lgpm $TEST_LIBS"
5267         fi
5268         cat >>confdefs.h <<\EOF
5269 #define HAVE_LIBGPM 1
5270 EOF
5271
5272 echo "$as_me:5272: checking for Gpm_Wgetch in -lgpm" >&5
5273 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5274 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   ac_check_lib_save_LIBS=$LIBS
5278 LIBS="-lgpm  $LIBS"
5279 cat >conftest.$ac_ext <<_ACEOF
5280 #line 5280 "configure"
5281 #include "confdefs.h"
5282
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 #ifdef __cplusplus
5285 extern "C"
5286 #endif
5287 /* We use char because int might match the return type of a gcc2
5288    builtin and then its argument prototype would still apply.  */
5289 char Gpm_Wgetch ();
5290 int
5291 main ()
5292 {
5293 Gpm_Wgetch ();
5294   ;
5295   return 0;
5296 }
5297 _ACEOF
5298 rm -f conftest.$ac_objext conftest$ac_exeext
5299 if { (eval echo "$as_me:5299: \"$ac_link\"") >&5
5300   (eval $ac_link) 2>&5
5301   ac_status=$?
5302   echo "$as_me:5302: \$? = $ac_status" >&5
5303   (exit $ac_status); } &&
5304          { ac_try='test -s conftest$ac_exeext'
5305   { (eval echo "$as_me:5305: \"$ac_try\"") >&5
5306   (eval $ac_try) 2>&5
5307   ac_status=$?
5308   echo "$as_me:5308: \$? = $ac_status" >&5
5309   (exit $ac_status); }; }; then
5310   ac_cv_lib_gpm_Gpm_Wgetch=yes
5311 else
5312   echo "$as_me: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 ac_cv_lib_gpm_Gpm_Wgetch=no
5315 fi
5316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5317 LIBS=$ac_check_lib_save_LIBS
5318 fi
5319 echo "$as_me:5319: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5320 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5321 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5322
5323 echo "$as_me:5323: checking if GPM is weakly bound to curses library" >&5
5324 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5325 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5326   echo $ECHO_N "(cached) $ECHO_C" >&6
5327 else
5328
5329 cf_cv_check_gpm_wgetch=unknown
5330 if test "$cross_compiling" != yes ; then
5331
5332 cat >conftest.$ac_ext <<CF_EOF
5333 #include <gpm.h>
5334 int main()
5335 {
5336         Gpm_Wgetch();
5337         ${cf_cv_main_return:-return}(0);
5338 }
5339 CF_EOF
5340
5341         cf_save_LIBS="$LIBS"
5342         # This only works if we can look at the symbol table.  If a shared
5343         # library is stripped for install, we cannot use that.  So we're forced
5344         # to rely on the static library, noting that some packagers may not
5345         # include it.
5346         LIBS="-static -lgpm -dynamic $LIBS"
5347         if { (eval echo "$as_me:5347: \"$ac_compile\"") >&5
5348   (eval $ac_compile) 2>&5
5349   ac_status=$?
5350   echo "$as_me:5350: \$? = $ac_status" >&5
5351   (exit $ac_status); } ; then
5352                 if { (eval echo "$as_me:5352: \"$ac_link\"") >&5
5353   (eval $ac_link) 2>&5
5354   ac_status=$?
5355   echo "$as_me:5355: \$? = $ac_status" >&5
5356   (exit $ac_status); } ; then
5357                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5358                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5359                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5360                 fi
5361         fi
5362         rm -rf conftest*
5363         LIBS="$cf_save_LIBS"
5364 fi
5365
5366 fi
5367 echo "$as_me:5367: result: $cf_cv_check_gpm_wgetch" >&5
5368 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5369
5370 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5371         { echo "$as_me:5371: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5372 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5373 fi
5374
5375 fi
5376
5377 fi
5378
5379 # not everyone has "test -c"
5380 if test -c /dev/sysmouse 2>/dev/null ; then
5381 echo "$as_me:5381: checking if you want to use sysmouse" >&5
5382 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5383
5384 # Check whether --with-sysmouse or --without-sysmouse was given.
5385 if test "${with_sysmouse+set}" = set; then
5386   withval="$with_sysmouse"
5387   cf_with_sysmouse=$withval
5388 else
5389   cf_with_sysmouse=maybe
5390 fi;
5391         if test "$cf_with_sysmouse" != no ; then
5392         cat >conftest.$ac_ext <<_ACEOF
5393 #line 5393 "configure"
5394 #include "confdefs.h"
5395
5396 #include <osreldate.h>
5397 #if (__FreeBSD_version >= 400017)
5398 #include <sys/consio.h>
5399 #include <sys/fbio.h>
5400 #else
5401 #include <machine/console.h>
5402 #endif
5403
5404 int
5405 main ()
5406 {
5407
5408         struct mouse_info the_mouse;
5409         ioctl(0, CONS_MOUSECTL, &the_mouse);
5410
5411   ;
5412   return 0;
5413 }
5414 _ACEOF
5415 rm -f conftest.$ac_objext
5416 if { (eval echo "$as_me:5416: \"$ac_compile\"") >&5
5417   (eval $ac_compile) 2>&5
5418   ac_status=$?
5419   echo "$as_me:5419: \$? = $ac_status" >&5
5420   (exit $ac_status); } &&
5421          { ac_try='test -s conftest.$ac_objext'
5422   { (eval echo "$as_me:5422: \"$ac_try\"") >&5
5423   (eval $ac_try) 2>&5
5424   ac_status=$?
5425   echo "$as_me:5425: \$? = $ac_status" >&5
5426   (exit $ac_status); }; }; then
5427   cf_with_sysmouse=yes
5428 else
5429   echo "$as_me: failed program was:" >&5
5430 cat conftest.$ac_ext >&5
5431 cf_with_sysmouse=no
5432 fi
5433 rm -f conftest.$ac_objext conftest.$ac_ext
5434         fi
5435 echo "$as_me:5435: result: $cf_with_sysmouse" >&5
5436 echo "${ECHO_T}$cf_with_sysmouse" >&6
5437 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5438 #define USE_SYSMOUSE 1
5439 EOF
5440
5441 fi
5442
5443 if test X"$CC_G_OPT" = X"" ; then
5444         CC_G_OPT='-g'
5445         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5446 fi
5447
5448 if test X"$CXX_G_OPT" = X"" ; then
5449         CXX_G_OPT='-g'
5450         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5451 fi
5452
5453 echo "$as_me:5453: checking for default loader flags" >&5
5454 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5455 case $DFT_LWR_MODEL in
5456 libtool) LD_MODEL=''   ;;
5457 normal)  LD_MODEL=''   ;;
5458 debug)   LD_MODEL=$CC_G_OPT ;;
5459 profile) LD_MODEL='-pg';;
5460 shared)  LD_MODEL=''   ;;
5461 esac
5462 echo "$as_me:5462: result: $LD_MODEL" >&5
5463 echo "${ECHO_T}$LD_MODEL" >&6
5464
5465 case $DFT_LWR_MODEL in
5466 shared)
5467
5468 echo "$as_me:5468: checking if rpath option should be used" >&5
5469 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5470
5471 # Check whether --enable-rpath or --disable-rpath was given.
5472 if test "${enable_rpath+set}" = set; then
5473   enableval="$enable_rpath"
5474   cf_cv_enable_rpath=$enableval
5475 else
5476   cf_cv_enable_rpath=no
5477 fi;
5478 echo "$as_me:5478: result: $cf_cv_enable_rpath" >&5
5479 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5480
5481 echo "$as_me:5481: checking if shared libraries should be relinked during install" >&5
5482 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5483
5484 # Check whether --enable-relink or --disable-relink was given.
5485 if test "${enable_relink+set}" = set; then
5486   enableval="$enable_relink"
5487   cf_cv_do_relink=$enableval
5488 else
5489   cf_cv_do_relink=yes
5490 fi;
5491 echo "$as_me:5491: result: $cf_cv_do_relink" >&5
5492 echo "${ECHO_T}$cf_cv_do_relink" >&6
5493         ;;
5494 esac
5495
5496 LD_RPATH_OPT=
5497 echo "$as_me:5497: checking for an rpath option" >&5
5498 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5499 case $cf_cv_system_name in #(vi
5500 irix*) #(vi
5501         if test "$GCC" = yes; then
5502                 LD_RPATH_OPT="-Wl,-rpath,"
5503         else
5504                 LD_RPATH_OPT="-rpath "
5505         fi
5506         ;;
5507 linux*|gnu*|k*bsd*-gnu) #(vi
5508         LD_RPATH_OPT="-Wl,-rpath,"
5509         ;;
5510 openbsd[2-9].*|mirbsd*) #(vi
5511         LD_RPATH_OPT="-Wl,-rpath,"
5512         ;;
5513 freebsd*) #(vi
5514         LD_RPATH_OPT="-rpath "
5515         ;;
5516 netbsd*) #(vi
5517         LD_RPATH_OPT="-Wl,-rpath,"
5518         ;;
5519 osf*|mls+*) #(vi
5520         LD_RPATH_OPT="-rpath "
5521         ;;
5522 solaris2*) #(vi
5523         LD_RPATH_OPT="-R"
5524         ;;
5525 *)
5526         ;;
5527 esac
5528 echo "$as_me:5528: result: $LD_RPATH_OPT" >&5
5529 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5530
5531 case "x$LD_RPATH_OPT" in #(vi
5532 x-R*)
5533         echo "$as_me:5533: checking if we need a space after rpath option" >&5
5534 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5535         cf_save_LIBS="$LIBS"
5536         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5537         cat >conftest.$ac_ext <<_ACEOF
5538 #line 5538 "configure"
5539 #include "confdefs.h"
5540
5541 int
5542 main ()
5543 {
5544
5545   ;
5546   return 0;
5547 }
5548 _ACEOF
5549 rm -f conftest.$ac_objext conftest$ac_exeext
5550 if { (eval echo "$as_me:5550: \"$ac_link\"") >&5
5551   (eval $ac_link) 2>&5
5552   ac_status=$?
5553   echo "$as_me:5553: \$? = $ac_status" >&5
5554   (exit $ac_status); } &&
5555          { ac_try='test -s conftest$ac_exeext'
5556   { (eval echo "$as_me:5556: \"$ac_try\"") >&5
5557   (eval $ac_try) 2>&5
5558   ac_status=$?
5559   echo "$as_me:5559: \$? = $ac_status" >&5
5560   (exit $ac_status); }; }; then
5561   cf_rpath_space=no
5562 else
5563   echo "$as_me: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5565 cf_rpath_space=yes
5566 fi
5567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5568         LIBS="$cf_save_LIBS"
5569         echo "$as_me:5569: result: $cf_rpath_space" >&5
5570 echo "${ECHO_T}$cf_rpath_space" >&6
5571         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5572         ;;
5573 esac
5574
5575         LOCAL_LDFLAGS=
5576         LOCAL_LDFLAGS2=
5577         LD_SHARED_OPTS=
5578         INSTALL_LIB="-m 644"
5579
5580         cf_cv_do_symlinks=no
5581         cf_ld_rpath_opt=
5582         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5583
5584         echo "$as_me:5584: checking if release/abi version should be used for shared libs" >&5
5585 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5586
5587 # Check whether --with-shlib-version or --without-shlib-version was given.
5588 if test "${with_shlib_version+set}" = set; then
5589   withval="$with_shlib_version"
5590   test -z "$withval" && withval=auto
5591         case $withval in #(vi
5592         yes) #(vi
5593                 cf_cv_shlib_version=auto
5594                 ;;
5595         rel|abi|auto|no) #(vi
5596                 cf_cv_shlib_version=$withval
5597                 ;;
5598         *)
5599                 { { echo "$as_me:5599: error: option value must be one of: rel, abi, auto or no" >&5
5600 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5601    { (exit 1); exit 1; }; }
5602                 ;;
5603         esac
5604
5605 else
5606   cf_cv_shlib_version=auto
5607 fi;
5608         echo "$as_me:5608: result: $cf_cv_shlib_version" >&5
5609 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5610
5611         cf_cv_rm_so_locs=no
5612
5613         # Some less-capable ports of gcc support only -fpic
5614         CC_SHARED_OPTS=
5615         if test "$GCC" = yes
5616         then
5617                 echo "$as_me:5617: checking which $CC option to use" >&5
5618 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5619                 cf_save_CFLAGS="$CFLAGS"
5620                 for CC_SHARED_OPTS in -fPIC -fpic ''
5621                 do
5622                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5623                         cat >conftest.$ac_ext <<_ACEOF
5624 #line 5624 "configure"
5625 #include "confdefs.h"
5626 #include <stdio.h>
5627 int
5628 main ()
5629 {
5630 int x = 1
5631   ;
5632   return 0;
5633 }
5634 _ACEOF
5635 rm -f conftest.$ac_objext
5636 if { (eval echo "$as_me:5636: \"$ac_compile\"") >&5
5637   (eval $ac_compile) 2>&5
5638   ac_status=$?
5639   echo "$as_me:5639: \$? = $ac_status" >&5
5640   (exit $ac_status); } &&
5641          { ac_try='test -s conftest.$ac_objext'
5642   { (eval echo "$as_me:5642: \"$ac_try\"") >&5
5643   (eval $ac_try) 2>&5
5644   ac_status=$?
5645   echo "$as_me:5645: \$? = $ac_status" >&5
5646   (exit $ac_status); }; }; then
5647   break
5648 else
5649   echo "$as_me: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 fi
5652 rm -f conftest.$ac_objext conftest.$ac_ext
5653                 done
5654                 echo "$as_me:5654: result: $CC_SHARED_OPTS" >&5
5655 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5656                 CFLAGS="$cf_save_CFLAGS"
5657         fi
5658
5659         cf_cv_shlib_version_infix=no
5660
5661         case $cf_cv_system_name in #(vi
5662         aix4.3-9*|aix[5-7]*) #(vi
5663                 if test "$GCC" = yes; then
5664                         CC_SHARED_OPTS=
5665                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
5666                 else
5667                         # CC_SHARED_OPTS='-qpic=large -G'
5668                         # perhaps "-bM:SRE -bnoentry -bexpall"
5669                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
5670                 fi
5671                 ;;
5672         beos*) #(vi
5673                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5674                 ;;
5675         cygwin*) #(vi
5676                 CC_SHARED_OPTS=
5677                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5678                 cf_cv_shlib_version=cygdll
5679                 cf_cv_shlib_version_infix=cygdll
5680                 cat >mk_shared_lib.sh <<-CF_EOF
5681                 #!/bin/sh
5682                 SHARED_LIB=\$1
5683                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5684                 shift
5685                 cat <<-EOF
5686                 Linking shared library
5687                 ** SHARED_LIB \$SHARED_LIB
5688                 ** IMPORT_LIB \$IMPORT_LIB
5689 EOF
5690                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5691 CF_EOF
5692                 chmod +x mk_shared_lib.sh
5693                 ;;
5694         darwin*) #(vi
5695                 EXTRA_CFLAGS="-no-cpp-precomp"
5696                 CC_SHARED_OPTS="-dynamic"
5697                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5698                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5699                 cf_cv_shlib_version_infix=yes
5700                 echo "$as_me:5700: checking if ld -search_paths_first works" >&5
5701 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5702 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5703   echo $ECHO_N "(cached) $ECHO_C" >&6
5704 else
5705
5706                         cf_save_LDFLAGS=$LDFLAGS
5707                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5708                         cat >conftest.$ac_ext <<_ACEOF
5709 #line 5709 "configure"
5710 #include "confdefs.h"
5711
5712 int
5713 main ()
5714 {
5715 int i;
5716   ;
5717   return 0;
5718 }
5719 _ACEOF
5720 rm -f conftest.$ac_objext conftest$ac_exeext
5721 if { (eval echo "$as_me:5721: \"$ac_link\"") >&5
5722   (eval $ac_link) 2>&5
5723   ac_status=$?
5724   echo "$as_me:5724: \$? = $ac_status" >&5
5725   (exit $ac_status); } &&
5726          { ac_try='test -s conftest$ac_exeext'
5727   { (eval echo "$as_me:5727: \"$ac_try\"") >&5
5728   (eval $ac_try) 2>&5
5729   ac_status=$?
5730   echo "$as_me:5730: \$? = $ac_status" >&5
5731   (exit $ac_status); }; }; then
5732   cf_cv_ldflags_search_paths_first=yes
5733 else
5734   echo "$as_me: failed program was:" >&5
5735 cat conftest.$ac_ext >&5
5736 cf_cv_ldflags_search_paths_first=no
5737 fi
5738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5739                                 LDFLAGS=$cf_save_LDFLAGS
5740 fi
5741 echo "$as_me:5741: result: $cf_cv_ldflags_search_paths_first" >&5
5742 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5743                 if test $cf_cv_ldflags_search_paths_first = yes; then
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                 fi
5746                 ;;
5747         hpux*) #(vi
5748                 # (tested with gcc 2.7.2 -- I don't have c89)
5749                 if test "$GCC" = yes; then
5750                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5751                 else
5752                         CC_SHARED_OPTS='+Z'
5753                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5754                 fi
5755                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5756                 # HP-UX shared libraries must be executable, and should be
5757                 # readonly to exploit a quirk in the memory manager.
5758                 INSTALL_LIB="-m 555"
5759                 ;;
5760         interix*)
5761                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5762                 if test "$cf_cv_shlib_version" = rel; then
5763                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5764                 else
5765                         cf_shared_soname='`basename `'
5766                 fi
5767                 CC_SHARED_OPTS=
5768                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o '
5769                 ;;
5770         irix*) #(vi
5771                 if test "$cf_cv_enable_rpath" = yes ; then
5772                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5773                 fi
5774                 # tested with IRIX 5.2 and 'cc'.
5775                 if test "$GCC" != yes; then
5776                         CC_SHARED_OPTS='-KPIC'
5777                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5778                 else
5779                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5780                 fi
5781                 cf_cv_rm_so_locs=yes
5782                 ;;
5783         linux*|gnu*|k*bsd*-gnu) #(vi
5784                 if test "$DFT_LWR_MODEL" = "shared" ; then
5785                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5786                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5787                 fi
5788                 if test "$cf_cv_enable_rpath" = yes ; then
5789                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5790                 fi
5791
5792         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5793         if test "$cf_cv_shlib_version" = rel; then
5794                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5795         else
5796                 cf_cv_shared_soname='`basename $@`'
5797         fi
5798
5799                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5800                 ;;
5801         openbsd[2-9].*|mirbsd*) #(vi
5802                 if test "$DFT_LWR_MODEL" = "shared" ; then
5803                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5804                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5805                 fi
5806                 if test "$cf_cv_enable_rpath" = yes ; then
5807                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5808                 fi
5809                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5810
5811         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5812         if test "$cf_cv_shlib_version" = rel; then
5813                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5814         else
5815                 cf_cv_shared_soname='`basename $@`'
5816         fi
5817
5818                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5819                 ;;
5820         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5821                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5822                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5823                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5824                 ;;
5825         freebsd*) #(vi
5826                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5827                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5828                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5829                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5830                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5831                 fi
5832
5833         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5834         if test "$cf_cv_shlib_version" = rel; then
5835                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5836         else
5837                 cf_cv_shared_soname='`basename $@`'
5838         fi
5839
5840                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5841                 ;;
5842         netbsd*) #(vi
5843                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5844                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5845                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5846                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5847                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5848                         if test "$cf_cv_shlib_version" = auto; then
5849                         if test -f /usr/libexec/ld.elf_so; then
5850                                 cf_cv_shlib_version=abi
5851                         else
5852                                 cf_cv_shlib_version=rel
5853                         fi
5854                         fi
5855
5856         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5857         if test "$cf_cv_shlib_version" = rel; then
5858                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5859         else
5860                 cf_cv_shared_soname='`basename $@`'
5861         fi
5862
5863                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5864                 else
5865                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5866                 fi
5867                 ;;
5868         osf*|mls+*) #(vi
5869                 # tested with OSF/1 V3.2 and 'cc'
5870                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5871                 # link with shared libs).
5872                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5873                 case $host_os in #(vi
5874                 osf4*)
5875                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5876                         ;;
5877                 esac
5878                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5879                 if test "$DFT_LWR_MODEL" = "shared" ; then
5880                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5881                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5882                 fi
5883                 cf_cv_rm_so_locs=yes
5884                 ;;
5885         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5886                 # tested with osr5.0.5
5887                 if test "$GCC" != yes; then
5888                         CC_SHARED_OPTS='-belf -KPIC'
5889                 fi
5890                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5891                 if test "$cf_cv_enable_rpath" = yes ; then
5892                         # only way is to set LD_RUN_PATH but no switch for it
5893                         RUN_PATH=$libdir
5894                 fi
5895                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5896                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5897                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5898                 ;;
5899         sunos4*) #(vi
5900                 # tested with SunOS 4.1.1 and gcc 2.7.0
5901                 if test "$GCC" != yes; then
5902                         CC_SHARED_OPTS='-KPIC'
5903                 fi
5904                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5905                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5906                 ;;
5907         solaris2*) #(vi
5908                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5909                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5910                 if test "$DFT_LWR_MODEL" = "shared" ; then
5911                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5912                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5913                 fi
5914                 if test "$cf_cv_enable_rpath" = yes ; then
5915                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5916                 fi
5917
5918         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5919         if test "$cf_cv_shlib_version" = rel; then
5920                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5921         else
5922                 cf_cv_shared_soname='`basename $@`'
5923         fi
5924
5925                 if test "$GCC" != yes; then
5926                         cf_save_CFLAGS="$CFLAGS"
5927                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5928                         do
5929                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5930                                 cat >conftest.$ac_ext <<_ACEOF
5931 #line 5931 "configure"
5932 #include "confdefs.h"
5933 #include <stdio.h>
5934 int
5935 main ()
5936 {
5937 printf("Hello\n");
5938   ;
5939   return 0;
5940 }
5941 _ACEOF
5942 rm -f conftest.$ac_objext
5943 if { (eval echo "$as_me:5943: \"$ac_compile\"") >&5
5944   (eval $ac_compile) 2>&5
5945   ac_status=$?
5946   echo "$as_me:5946: \$? = $ac_status" >&5
5947   (exit $ac_status); } &&
5948          { ac_try='test -s conftest.$ac_objext'
5949   { (eval echo "$as_me:5949: \"$ac_try\"") >&5
5950   (eval $ac_try) 2>&5
5951   ac_status=$?
5952   echo "$as_me:5952: \$? = $ac_status" >&5
5953   (exit $ac_status); }; }; then
5954   break
5955 else
5956   echo "$as_me: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
5958 fi
5959 rm -f conftest.$ac_objext conftest.$ac_ext
5960                         done
5961                         CFLAGS="$cf_save_CFLAGS"
5962                         CC_SHARED_OPTS=$cf_shared_opts
5963                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5964                 else
5965                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5966                 fi
5967                 ;;
5968         sysv5uw7*|unix_sv*) #(vi
5969                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5970                 if test "$GCC" != yes; then
5971                         CC_SHARED_OPTS='-KPIC'
5972                 fi
5973                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5974                 ;;
5975         *)
5976                 CC_SHARED_OPTS='unknown'
5977                 MK_SHARED_LIB='echo unknown'
5978                 ;;
5979         esac
5980
5981         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5982         case "$cf_cv_shlib_version" in #(vi
5983         rel|abi)
5984                 case "$MK_SHARED_LIB" in #(vi
5985                 *'-o $@') #(vi
5986                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5987                         ;;
5988                 *)
5989                         { echo "$as_me:5989: WARNING: ignored --with-shlib-version" >&5
5990 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5991                         ;;
5992                 esac
5993                 ;;
5994         esac
5995
5996         if test -n "$cf_ld_rpath_opt" ; then
5997                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5998         fi
5999
6000 if test "$CC_SHARED_OPTS" = "unknown"; then
6001         for model in $cf_list_models; do
6002                 if test "$model" = "shared"; then
6003                         { { echo "$as_me:6003: error: Shared libraries are not supported in this version" >&5
6004 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6005    { (exit 1); exit 1; }; }
6006                 fi
6007         done
6008 fi
6009
6010 ### If we're building with rpath, try to link non-standard libs that way too.
6011 if test "$DFT_LWR_MODEL" = "shared"; then
6012
6013 echo "$as_me:6013: checking if rpath-hack should be disabled" >&5
6014 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6015
6016 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6017 if test "${enable_rpath_hack+set}" = set; then
6018   enableval="$enable_rpath_hack"
6019   test "$enableval" != no && enableval=yes
6020   if test "$enableval" != "yes" ; then
6021     cf_disable_rpath_hack=yes
6022   else
6023     cf_disable_rpath_hack=no
6024   fi
6025 else
6026   enableval=yes
6027   cf_disable_rpath_hack=no
6028
6029 fi;
6030 echo "$as_me:6030: result: $cf_disable_rpath_hack" >&5
6031 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6032 if test "$cf_disable_rpath_hack" = no ; then
6033
6034 echo "$as_me:6034: checking for updated LDFLAGS" >&5
6035 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6036 if test -n "$LD_RPATH_OPT" ; then
6037         echo "$as_me:6037: result: maybe" >&5
6038 echo "${ECHO_T}maybe" >&6
6039
6040         for ac_prog in ldd
6041 do
6042   # Extract the first word of "$ac_prog", so it can be a program name with args.
6043 set dummy $ac_prog; ac_word=$2
6044 echo "$as_me:6044: checking for $ac_word" >&5
6045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6046 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6047   echo $ECHO_N "(cached) $ECHO_C" >&6
6048 else
6049   if test -n "$cf_ldd_prog"; then
6050   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6051 else
6052   ac_save_IFS=$IFS; IFS=$ac_path_separator
6053 ac_dummy="$PATH"
6054 for ac_dir in $ac_dummy; do
6055   IFS=$ac_save_IFS
6056   test -z "$ac_dir" && ac_dir=.
6057   $as_executable_p "$ac_dir/$ac_word" || continue
6058 ac_cv_prog_cf_ldd_prog="$ac_prog"
6059 echo "$as_me:6059: found $ac_dir/$ac_word" >&5
6060 break
6061 done
6062
6063 fi
6064 fi
6065 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6066 if test -n "$cf_ldd_prog"; then
6067   echo "$as_me:6067: result: $cf_ldd_prog" >&5
6068 echo "${ECHO_T}$cf_ldd_prog" >&6
6069 else
6070   echo "$as_me:6070: result: no" >&5
6071 echo "${ECHO_T}no" >&6
6072 fi
6073
6074   test -n "$cf_ldd_prog" && break
6075 done
6076 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6077
6078         cf_rpath_list="/usr/lib /lib"
6079         if test "$cf_ldd_prog" != no
6080         then
6081                 cf_rpath_oops=
6082
6083 cat >conftest.$ac_ext <<_ACEOF
6084 #line 6084 "configure"
6085 #include "confdefs.h"
6086 #include <stdio.h>
6087 int
6088 main ()
6089 {
6090 printf("Hello");
6091   ;
6092   return 0;
6093 }
6094 _ACEOF
6095 rm -f conftest.$ac_objext conftest$ac_exeext
6096 if { (eval echo "$as_me:6096: \"$ac_link\"") >&5
6097   (eval $ac_link) 2>&5
6098   ac_status=$?
6099   echo "$as_me:6099: \$? = $ac_status" >&5
6100   (exit $ac_status); } &&
6101          { ac_try='test -s conftest$ac_exeext'
6102   { (eval echo "$as_me:6102: \"$ac_try\"") >&5
6103   (eval $ac_try) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); }; }; then
6107   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6108                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6109 else
6110   echo "$as_me: failed program was:" >&5
6111 cat conftest.$ac_ext >&5
6112 fi
6113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6114
6115                 # If we passed the link-test, but get a "not found" on a given library,
6116                 # this could be due to inept reconfiguration of gcc to make it only
6117                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6118                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6119                 # /usr/local libraries.
6120                 if test -n "$cf_rpath_oops"
6121                 then
6122                         for cf_rpath_src in $cf_rpath_oops
6123                         do
6124                                 for cf_rpath_dir in \
6125                                         /usr/local \
6126                                         /usr/pkg \
6127                                         /opt/sfw
6128                                 do
6129                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6130                                         then
6131                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6132
6133 echo "${as_me:-configure}:6133: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6134
6135                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6136                                                 break
6137                                         fi
6138                                 done
6139                         done
6140                 fi
6141         fi
6142
6143         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6144
6145 echo "${as_me:-configure}:6145: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6146
6147 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6148
6149 echo "${as_me:-configure}:6149: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6150
6151 cf_rpath_dst=
6152 for cf_rpath_src in $LDFLAGS
6153 do
6154         case $cf_rpath_src in #(vi
6155         -L*) #(vi
6156
6157                 # check if this refers to a directory which we will ignore
6158                 cf_rpath_skip=no
6159                 if test -n "$cf_rpath_list"
6160                 then
6161                         for cf_rpath_item in $cf_rpath_list
6162                         do
6163                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6164                                 then
6165                                         cf_rpath_skip=yes
6166                                         break
6167                                 fi
6168                         done
6169                 fi
6170
6171                 if test "$cf_rpath_skip" = no
6172                 then
6173                         # transform the option
6174                         if test "$LD_RPATH_OPT" = "-R " ; then
6175                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6176                         else
6177                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6178                         fi
6179
6180                         # if we have not already added this, add it now
6181                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6182                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6183                         then
6184                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6187
6188                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6189                         fi
6190                 fi
6191                 ;;
6192         esac
6193         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6194 done
6195 LDFLAGS=$cf_rpath_dst
6196
6197 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6198
6199 echo "${as_me:-configure}:6199: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6200
6201 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6202
6203 echo "${as_me:-configure}:6203: testing ...checking LIBS $LIBS ..." 1>&5
6204
6205 cf_rpath_dst=
6206 for cf_rpath_src in $LIBS
6207 do
6208         case $cf_rpath_src in #(vi
6209         -L*) #(vi
6210
6211                 # check if this refers to a directory which we will ignore
6212                 cf_rpath_skip=no
6213                 if test -n "$cf_rpath_list"
6214                 then
6215                         for cf_rpath_item in $cf_rpath_list
6216                         do
6217                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6218                                 then
6219                                         cf_rpath_skip=yes
6220                                         break
6221                                 fi
6222                         done
6223                 fi
6224
6225                 if test "$cf_rpath_skip" = no
6226                 then
6227                         # transform the option
6228                         if test "$LD_RPATH_OPT" = "-R " ; then
6229                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6230                         else
6231                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6232                         fi
6233
6234                         # if we have not already added this, add it now
6235                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6236                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6237                         then
6238                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6241
6242                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6243                         fi
6244                 fi
6245                 ;;
6246         esac
6247         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6248 done
6249 LIBS=$cf_rpath_dst
6250
6251 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6252
6253 echo "${as_me:-configure}:6253: testing ...checked LIBS $LIBS ..." 1>&5
6254
6255         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6256
6257 echo "${as_me:-configure}:6257: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6258
6259 fi
6260
6261 fi
6262
6263 fi
6264
6265 ###############################################################################
6266
6267 ###     use option --disable-overwrite to leave out the link to -lcurses
6268 echo "$as_me:6268: checking if you wish to install ncurses overwriting curses" >&5
6269 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6270
6271 # Check whether --enable-overwrite or --disable-overwrite was given.
6272 if test "${enable_overwrite+set}" = set; then
6273   enableval="$enable_overwrite"
6274   with_overwrite=$enableval
6275 else
6276   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6277 fi;
6278 echo "$as_me:6278: result: $with_overwrite" >&5
6279 echo "${ECHO_T}$with_overwrite" >&6
6280
6281 echo "$as_me:6281: checking if external terminfo-database is used" >&5
6282 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6283
6284 # Check whether --enable-database or --disable-database was given.
6285 if test "${enable_database+set}" = set; then
6286   enableval="$enable_database"
6287   use_database=$enableval
6288 else
6289   use_database=yes
6290 fi;
6291 echo "$as_me:6291: result: $use_database" >&5
6292 echo "${ECHO_T}$use_database" >&6
6293
6294 case $host_os in #(vi
6295 os2*) #(vi
6296         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6297         ;;
6298 *) #(vi
6299         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6300         ;;
6301 esac
6302
6303         case $cf_cv_system_name in
6304         os2*)   PATH_SEPARATOR=';'  ;;
6305         *)      PATH_SEPARATOR=':'  ;;
6306         esac
6307
6308 if test "$use_database" != no ; then
6309         cat >>confdefs.h <<\EOF
6310 #define USE_DATABASE 1
6311 EOF
6312
6313         echo "$as_me:6313: checking which terminfo source-file will be installed" >&5
6314 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6315
6316 # Check whether --with-database or --without-database was given.
6317 if test "${with_database+set}" = set; then
6318   withval="$with_database"
6319   TERMINFO_SRC=$withval
6320 fi;
6321         echo "$as_me:6321: result: $TERMINFO_SRC" >&5
6322 echo "${ECHO_T}$TERMINFO_SRC" >&6
6323
6324         echo "$as_me:6324: checking whether to use hashed database instead of directory/tree" >&5
6325 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6326
6327 # Check whether --with-hashed-db or --without-hashed-db was given.
6328 if test "${with_hashed_db+set}" = set; then
6329   withval="$with_hashed_db"
6330
6331 else
6332   with_hashed_db=no
6333 fi;
6334         echo "$as_me:6334: result: $with_hashed_db" >&5
6335 echo "${ECHO_T}$with_hashed_db" >&6
6336 else
6337         with_hashed_db=no
6338 fi
6339
6340 echo "$as_me:6340: checking for list of fallback descriptions" >&5
6341 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6342
6343 # Check whether --with-fallbacks or --without-fallbacks was given.
6344 if test "${with_fallbacks+set}" = set; then
6345   withval="$with_fallbacks"
6346   with_fallback=$withval
6347 else
6348   with_fallback=
6349 fi;
6350 echo "$as_me:6350: result: $with_fallback" >&5
6351 echo "${ECHO_T}$with_fallback" >&6
6352 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6353
6354 echo "$as_me:6354: checking if you want modern xterm or antique" >&5
6355 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6356
6357 # Check whether --with-xterm-new or --without-xterm-new was given.
6358 if test "${with_xterm_new+set}" = set; then
6359   withval="$with_xterm_new"
6360   with_xterm_new=$withval
6361 else
6362   with_xterm_new=yes
6363 fi;
6364 case $with_xterm_new in
6365 no)     with_xterm_new=xterm-old;;
6366 *)      with_xterm_new=xterm-new;;
6367 esac
6368 echo "$as_me:6368: result: $with_xterm_new" >&5
6369 echo "${ECHO_T}$with_xterm_new" >&6
6370 WHICH_XTERM=$with_xterm_new
6371
6372 MAKE_TERMINFO=
6373 if test "$use_database" = no ; then
6374         TERMINFO="${datadir}/terminfo"
6375         MAKE_TERMINFO="#"
6376 else
6377
6378 echo "$as_me:6378: checking for list of terminfo directories" >&5
6379 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6380
6381 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6382 if test "${with_terminfo_dirs+set}" = set; then
6383   withval="$with_terminfo_dirs"
6384
6385 else
6386   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6387 fi;
6388 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6389 cf_dst_path=
6390 for cf_src_path in $withval
6391 do
6392
6393 if test "x$prefix" != xNONE; then
6394   cf_path_syntax="$prefix"
6395 else
6396   cf_path_syntax="$ac_default_prefix"
6397 fi
6398
6399 case ".$cf_src_path" in #(vi
6400 .\$\(*\)*|.\'*\'*) #(vi
6401   ;;
6402 ..|./*|.\\*) #(vi
6403   ;;
6404 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6405   ;;
6406 .\${*prefix}*) #(vi
6407   eval cf_src_path="$cf_src_path"
6408   case ".$cf_src_path" in #(vi
6409   .NONE/*)
6410     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6411     ;;
6412   esac
6413   ;; #(vi
6414 .no|.NONE/*)
6415   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6416   ;;
6417 *)
6418   { { echo "$as_me:6418: error: expected a pathname, not \"$cf_src_path\"" >&5
6419 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6420    { (exit 1); exit 1; }; }
6421   ;;
6422 esac
6423
6424   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6425   cf_dst_path="${cf_dst_path}${cf_src_path}"
6426 done
6427 IFS="$ac_save_ifs"
6428
6429 eval 'TERMINFO_DIRS="$cf_dst_path"'
6430
6431 echo "$as_me:6431: result: $TERMINFO_DIRS" >&5
6432 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6433 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6434 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6435 EOF
6436
6437 echo "$as_me:6437: checking for default terminfo directory" >&5
6438 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6439
6440 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6441 if test "${with_default_terminfo_dir+set}" = set; then
6442   withval="$with_default_terminfo_dir"
6443
6444 else
6445   withval="${TERMINFO:-${datadir}/terminfo}"
6446 fi; if test -n "${datadir}/terminfo" ; then
6447
6448 if test "x$prefix" != xNONE; then
6449   cf_path_syntax="$prefix"
6450 else
6451   cf_path_syntax="$ac_default_prefix"
6452 fi
6453
6454 case ".$withval" in #(vi
6455 .\$\(*\)*|.\'*\'*) #(vi
6456   ;;
6457 ..|./*|.\\*) #(vi
6458   ;;
6459 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6460   ;;
6461 .\${*prefix}*) #(vi
6462   eval withval="$withval"
6463   case ".$withval" in #(vi
6464   .NONE/*)
6465     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6466     ;;
6467   esac
6468   ;; #(vi
6469 .no|.NONE/*)
6470   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6471   ;;
6472 *)
6473   { { echo "$as_me:6473: error: expected a pathname, not \"$withval\"" >&5
6474 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6475    { (exit 1); exit 1; }; }
6476   ;;
6477 esac
6478
6479 fi
6480 TERMINFO="$withval"
6481
6482 echo "$as_me:6482: result: $TERMINFO" >&5
6483 echo "${ECHO_T}$TERMINFO" >&6
6484 cat >>confdefs.h <<EOF
6485 #define TERMINFO "$TERMINFO"
6486 EOF
6487
6488 fi
6489
6490 ###     use option --disable-big-core to make tic run on small machines
6491 ###     We need 4Mb, check if we can allocate 50% more than that.
6492 echo "$as_me:6492: checking if big-core option selected" >&5
6493 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6494
6495 # Check whether --enable-big-core or --disable-big-core was given.
6496 if test "${enable_big_core+set}" = set; then
6497   enableval="$enable_big_core"
6498   with_big_core=$enableval
6499 else
6500   if test "$cross_compiling" = yes; then
6501   with_big_core=no
6502 else
6503   cat >conftest.$ac_ext <<_ACEOF
6504 #line 6504 "configure"
6505 #include "confdefs.h"
6506
6507 #include <stdlib.h>
6508 #include <string.h>
6509 int main() {
6510         unsigned long n = 6000000L;
6511         char *s = malloc(n);
6512         if (s != 0)
6513                 s[0] = s[n-1] = 0;
6514         ${cf_cv_main_return:-return}(s == 0);
6515 }
6516 _ACEOF
6517 rm -f conftest$ac_exeext
6518 if { (eval echo "$as_me:6518: \"$ac_link\"") >&5
6519   (eval $ac_link) 2>&5
6520   ac_status=$?
6521   echo "$as_me:6521: \$? = $ac_status" >&5
6522   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6523   { (eval echo "$as_me:6523: \"$ac_try\"") >&5
6524   (eval $ac_try) 2>&5
6525   ac_status=$?
6526   echo "$as_me:6526: \$? = $ac_status" >&5
6527   (exit $ac_status); }; }; then
6528   with_big_core=yes
6529 else
6530   echo "$as_me: program exited with status $ac_status" >&5
6531 echo "$as_me: failed program was:" >&5
6532 cat conftest.$ac_ext >&5
6533 with_big_core=no
6534 fi
6535 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6536 fi
6537 fi;
6538 echo "$as_me:6538: result: $with_big_core" >&5
6539 echo "${ECHO_T}$with_big_core" >&6
6540 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6541 #define HAVE_BIG_CORE 1
6542 EOF
6543
6544 ### ISO C only guarantees 512-char strings, we have tables which load faster
6545 ### when constructed using "big" strings.  More than the C compiler, the awk
6546 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6547 echo "$as_me:6547: checking if big-strings option selected" >&5
6548 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6549
6550 # Check whether --enable-big-strings or --disable-big-strings was given.
6551 if test "${enable_big_strings+set}" = set; then
6552   enableval="$enable_big_strings"
6553   with_big_strings=$enableval
6554 else
6555
6556         case x$AWK in #(vi
6557         x)
6558                 eval with_big_strings=no
6559                 ;;
6560         *) #(vi
6561                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6562                         | $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
6563                         eval with_big_strings=yes
6564                 else
6565                         eval with_big_strings=no
6566                 fi
6567                 ;;
6568         esac
6569
6570 fi;
6571 echo "$as_me:6571: result: $with_big_strings" >&5
6572 echo "${ECHO_T}$with_big_strings" >&6
6573
6574 USE_BIG_STRINGS=0
6575 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6576
6577 ###     use option --enable-termcap to compile in the termcap fallback support
6578 echo "$as_me:6578: checking if you want termcap-fallback support" >&5
6579 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6580
6581 # Check whether --enable-termcap or --disable-termcap was given.
6582 if test "${enable_termcap+set}" = set; then
6583   enableval="$enable_termcap"
6584   with_termcap=$enableval
6585 else
6586   with_termcap=no
6587 fi;
6588 echo "$as_me:6588: result: $with_termcap" >&5
6589 echo "${ECHO_T}$with_termcap" >&6
6590
6591 if test "$with_termcap" != "yes" ; then
6592         if test "$use_database" = no ; then
6593                 if test -z "$with_fallback" ; then
6594                         { { echo "$as_me:6594: error: You have disabled the database w/o specifying fallbacks" >&5
6595 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6596    { (exit 1); exit 1; }; }
6597                 fi
6598         fi
6599         cat >>confdefs.h <<\EOF
6600 #define PURE_TERMINFO 1
6601 EOF
6602
6603 else
6604
6605 if test "$with_ticlib" != no ; then
6606         { { echo "$as_me:6606: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6607 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6608    { (exit 1); exit 1; }; }
6609 fi
6610
6611 cat >>confdefs.h <<\EOF
6612 #define USE_TERMCAP 1
6613 EOF
6614
6615 echo "$as_me:6615: checking for list of termcap files" >&5
6616 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6617
6618 # Check whether --with-termpath or --without-termpath was given.
6619 if test "${with_termpath+set}" = set; then
6620   withval="$with_termpath"
6621
6622 else
6623   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6624 fi;
6625 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6626 cf_dst_path=
6627 for cf_src_path in $withval
6628 do
6629
6630 if test "x$prefix" != xNONE; then
6631   cf_path_syntax="$prefix"
6632 else
6633   cf_path_syntax="$ac_default_prefix"
6634 fi
6635
6636 case ".$cf_src_path" in #(vi
6637 .\$\(*\)*|.\'*\'*) #(vi
6638   ;;
6639 ..|./*|.\\*) #(vi
6640   ;;
6641 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6642   ;;
6643 .\${*prefix}*) #(vi
6644   eval cf_src_path="$cf_src_path"
6645   case ".$cf_src_path" in #(vi
6646   .NONE/*)
6647     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6648     ;;
6649   esac
6650   ;; #(vi
6651 .no|.NONE/*)
6652   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6653   ;;
6654 *)
6655   { { echo "$as_me:6655: error: expected a pathname, not \"$cf_src_path\"" >&5
6656 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6657    { (exit 1); exit 1; }; }
6658   ;;
6659 esac
6660
6661   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6662   cf_dst_path="${cf_dst_path}${cf_src_path}"
6663 done
6664 IFS="$ac_save_ifs"
6665
6666 eval 'TERMPATH="$cf_dst_path"'
6667
6668 echo "$as_me:6668: result: $TERMPATH" >&5
6669 echo "${ECHO_T}$TERMPATH" >&6
6670 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6671 #define TERMPATH "$TERMPATH"
6672 EOF
6673
6674 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6675 echo "$as_me:6675: checking if fast termcap-loader is needed" >&5
6676 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6677
6678 # Check whether --enable-getcap or --disable-getcap was given.
6679 if test "${enable_getcap+set}" = set; then
6680   enableval="$enable_getcap"
6681   with_getcap=$enableval
6682 else
6683   with_getcap=no
6684 fi;
6685 echo "$as_me:6685: result: $with_getcap" >&5
6686 echo "${ECHO_T}$with_getcap" >&6
6687 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6688 #define USE_GETCAP 1
6689 EOF
6690
6691 echo "$as_me:6691: checking if translated termcaps will be cached in ~/.terminfo" >&5
6692 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6693
6694 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6695 if test "${enable_getcap_cache+set}" = set; then
6696   enableval="$enable_getcap_cache"
6697   with_getcap_cache=$enableval
6698 else
6699   with_getcap_cache=no
6700 fi;
6701 echo "$as_me:6701: result: $with_getcap_cache" >&5
6702 echo "${ECHO_T}$with_getcap_cache" >&6
6703 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6704 #define USE_GETCAP_CACHE 1
6705 EOF
6706
6707 fi
6708
6709 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6710 echo "$as_me:6710: checking if ~/.terminfo is wanted" >&5
6711 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6712
6713 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6714 if test "${enable_home_terminfo+set}" = set; then
6715   enableval="$enable_home_terminfo"
6716   with_home_terminfo=$enableval
6717 else
6718   with_home_terminfo=yes
6719 fi;
6720 echo "$as_me:6720: result: $with_home_terminfo" >&5
6721 echo "${ECHO_T}$with_home_terminfo" >&6
6722 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6723 #define USE_HOME_TERMINFO 1
6724 EOF
6725
6726 echo "$as_me:6726: checking if you want to use restricted environment when running as root" >&5
6727 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6728
6729 # Check whether --enable-root-environ or --disable-root-environ was given.
6730 if test "${enable_root_environ+set}" = set; then
6731   enableval="$enable_root_environ"
6732   with_root_environ=$enableval
6733 else
6734   with_root_environ=yes
6735 fi;
6736 echo "$as_me:6736: result: $with_root_environ" >&5
6737 echo "${ECHO_T}$with_root_environ" >&6
6738 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6739 #define USE_ROOT_ENVIRON 1
6740 EOF
6741
6742 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6743 ###   to reduce storage requirements for the terminfo database.
6744
6745 for ac_func in \
6746         remove \
6747         unlink
6748 do
6749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6750 echo "$as_me:6750: checking for $ac_func" >&5
6751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6752 if eval "test \"\${$as_ac_var+set}\" = set"; then
6753   echo $ECHO_N "(cached) $ECHO_C" >&6
6754 else
6755   cat >conftest.$ac_ext <<_ACEOF
6756 #line 6756 "configure"
6757 #include "confdefs.h"
6758 /* System header to define __stub macros and hopefully few prototypes,
6759     which can conflict with char $ac_func (); below.  */
6760 #include <assert.h>
6761 /* Override any gcc2 internal prototype to avoid an error.  */
6762 #ifdef __cplusplus
6763 extern "C"
6764 #endif
6765 /* We use char because int might match the return type of a gcc2
6766    builtin and then its argument prototype would still apply.  */
6767 char $ac_func ();
6768 char (*f) ();
6769
6770 int
6771 main ()
6772 {
6773 /* The GNU C library defines this for functions which it implements
6774     to always fail with ENOSYS.  Some functions are actually named
6775     something starting with __ and the normal name is an alias.  */
6776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6777 choke me
6778 #else
6779 f = $ac_func;
6780 #endif
6781
6782   ;
6783   return 0;
6784 }
6785 _ACEOF
6786 rm -f conftest.$ac_objext conftest$ac_exeext
6787 if { (eval echo "$as_me:6787: \"$ac_link\"") >&5
6788   (eval $ac_link) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); } &&
6792          { ac_try='test -s conftest$ac_exeext'
6793   { (eval echo "$as_me:6793: \"$ac_try\"") >&5
6794   (eval $ac_try) 2>&5
6795   ac_status=$?
6796   echo "$as_me:6796: \$? = $ac_status" >&5
6797   (exit $ac_status); }; }; then
6798   eval "$as_ac_var=yes"
6799 else
6800   echo "$as_me: failed program was:" >&5
6801 cat conftest.$ac_ext >&5
6802 eval "$as_ac_var=no"
6803 fi
6804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6805 fi
6806 echo "$as_me:6806: result: `eval echo '${'$as_ac_var'}'`" >&5
6807 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6808 if test `eval echo '${'$as_ac_var'}'` = yes; then
6809   cat >>confdefs.h <<EOF
6810 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6811 EOF
6812
6813 fi
6814 done
6815
6816 if test "$cross_compiling" = yes ; then
6817
6818 for ac_func in \
6819                 link \
6820                 symlink
6821 do
6822 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6823 echo "$as_me:6823: checking for $ac_func" >&5
6824 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6825 if eval "test \"\${$as_ac_var+set}\" = set"; then
6826   echo $ECHO_N "(cached) $ECHO_C" >&6
6827 else
6828   cat >conftest.$ac_ext <<_ACEOF
6829 #line 6829 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832     which can conflict with char $ac_func (); below.  */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 #ifdef __cplusplus
6836 extern "C"
6837 #endif
6838 /* We use char because int might match the return type of a gcc2
6839    builtin and then its argument prototype would still apply.  */
6840 char $ac_func ();
6841 char (*f) ();
6842
6843 int
6844 main ()
6845 {
6846 /* The GNU C library defines this for functions which it implements
6847     to always fail with ENOSYS.  Some functions are actually named
6848     something starting with __ and the normal name is an alias.  */
6849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6850 choke me
6851 #else
6852 f = $ac_func;
6853 #endif
6854
6855   ;
6856   return 0;
6857 }
6858 _ACEOF
6859 rm -f conftest.$ac_objext conftest$ac_exeext
6860 if { (eval echo "$as_me:6860: \"$ac_link\"") >&5
6861   (eval $ac_link) 2>&5
6862   ac_status=$?
6863   echo "$as_me:6863: \$? = $ac_status" >&5
6864   (exit $ac_status); } &&
6865          { ac_try='test -s conftest$ac_exeext'
6866   { (eval echo "$as_me:6866: \"$ac_try\"") >&5
6867   (eval $ac_try) 2>&5
6868   ac_status=$?
6869   echo "$as_me:6869: \$? = $ac_status" >&5
6870   (exit $ac_status); }; }; then
6871   eval "$as_ac_var=yes"
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 eval "$as_ac_var=no"
6876 fi
6877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6878 fi
6879 echo "$as_me:6879: result: `eval echo '${'$as_ac_var'}'`" >&5
6880 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6881 if test `eval echo '${'$as_ac_var'}'` = yes; then
6882   cat >>confdefs.h <<EOF
6883 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6884 EOF
6885
6886 fi
6887 done
6888
6889 else
6890         echo "$as_me:6890: checking if link/symlink functions work" >&5
6891 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6892 if test "${cf_cv_link_funcs+set}" = set; then
6893   echo $ECHO_N "(cached) $ECHO_C" >&6
6894 else
6895
6896                 cf_cv_link_funcs=
6897                 for cf_func in link symlink ; do
6898                         if test "$cross_compiling" = yes; then
6899
6900                         eval 'ac_cv_func_'$cf_func'=error'
6901 else
6902   cat >conftest.$ac_ext <<_ACEOF
6903 #line 6903 "configure"
6904 #include "confdefs.h"
6905
6906 #include <sys/types.h>
6907 #include <sys/stat.h>
6908 #ifdef HAVE_UNISTD_H
6909 #include <unistd.h>
6910 #endif
6911 int main()
6912 {
6913         int fail = 0;
6914         char *src = "config.log";
6915         char *dst = "conftest.chk";
6916         struct stat src_sb;
6917         struct stat dst_sb;
6918
6919         stat(src, &src_sb);
6920         fail = ($cf_func("config.log", "conftest.chk") < 0)
6921             || (stat(dst, &dst_sb) < 0)
6922             || (dst_sb.st_mtime != src_sb.st_mtime);
6923 #ifdef HAVE_UNLINK
6924         unlink(dst);
6925 #else
6926         remove(dst);
6927 #endif
6928         ${cf_cv_main_return:-return} (fail);
6929 }
6930
6931 _ACEOF
6932 rm -f conftest$ac_exeext
6933 if { (eval echo "$as_me:6933: \"$ac_link\"") >&5
6934   (eval $ac_link) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit $ac_status); }; }; then
6943
6944                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6945                         eval 'ac_cv_func_'$cf_func'=yes'
6946 else
6947   echo "$as_me: program exited with status $ac_status" >&5
6948 echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950
6951                         eval 'ac_cv_func_'$cf_func'=no'
6952 fi
6953 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6954 fi
6955                 done
6956                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6957
6958 fi
6959 echo "$as_me:6959: result: $cf_cv_link_funcs" >&5
6960 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6961         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6962 #define HAVE_LINK 1
6963 EOF
6964
6965         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6966 #define HAVE_SYMLINK 1
6967 EOF
6968
6969 fi
6970
6971 with_links=no
6972 with_symlinks=no
6973
6974 # soft links (symbolic links) are useful for some systems where hard links do
6975 # not work, or to make it simpler to copy terminfo trees around.
6976 if test "$ac_cv_func_symlink" = yes ; then
6977     echo "$as_me:6977: checking if tic should use symbolic links" >&5
6978 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6979
6980 # Check whether --enable-symlinks or --disable-symlinks was given.
6981 if test "${enable_symlinks+set}" = set; then
6982   enableval="$enable_symlinks"
6983   with_symlinks=$enableval
6984 else
6985   with_symlinks=no
6986 fi;
6987     echo "$as_me:6987: result: $with_symlinks" >&5
6988 echo "${ECHO_T}$with_symlinks" >&6
6989 fi
6990
6991 # If we have hard links and did not choose to use soft links instead, there is
6992 # no reason to make this choice optional - use the hard links.
6993 if test "$with_symlinks" = no ; then
6994     echo "$as_me:6994: checking if tic should use hard links" >&5
6995 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6996     if test "$ac_cv_func_link" = yes ; then
6997         with_links=yes
6998     else
6999         with_links=no
7000     fi
7001     echo "$as_me:7001: result: $with_links" >&5
7002 echo "${ECHO_T}$with_links" >&6
7003 fi
7004
7005 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7006 #define USE_LINKS 1
7007 EOF
7008
7009 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7010 #define USE_SYMLINKS 1
7011 EOF
7012
7013 ###   use option --enable-broken-linker to force on use of broken-linker support
7014 echo "$as_me:7014: checking if you want broken-linker support code" >&5
7015 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7016
7017 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7018 if test "${enable_broken_linker+set}" = set; then
7019   enableval="$enable_broken_linker"
7020   with_broken_linker=$enableval
7021 else
7022   with_broken_linker=${BROKEN_LINKER:-no}
7023 fi;
7024 echo "$as_me:7024: result: $with_broken_linker" >&5
7025 echo "${ECHO_T}$with_broken_linker" >&6
7026
7027 BROKEN_LINKER=0
7028 if test "$with_broken_linker" = yes ; then
7029         cat >>confdefs.h <<\EOF
7030 #define BROKEN_LINKER 1
7031 EOF
7032
7033         BROKEN_LINKER=1
7034 elif test "$DFT_LWR_MODEL" = shared ; then
7035         case $cf_cv_system_name in #(vi
7036         cygwin*)
7037                 cat >>confdefs.h <<\EOF
7038 #define BROKEN_LINKER 1
7039 EOF
7040
7041                 BROKEN_LINKER=1
7042                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7043
7044 echo "${as_me:-configure}:7044: testing cygwin linker is broken anyway ..." 1>&5
7045
7046                 ;;
7047         esac
7048 fi
7049
7050 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7051 echo "$as_me:7051: checking if tputs should process BSD-style prefix padding" >&5
7052 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7053
7054 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7055 if test "${enable_bsdpad+set}" = set; then
7056   enableval="$enable_bsdpad"
7057   with_bsdpad=$enableval
7058 else
7059   with_bsdpad=no
7060 fi;
7061 echo "$as_me:7061: result: $with_bsdpad" >&5
7062 echo "${ECHO_T}$with_bsdpad" >&6
7063 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7064 #define BSD_TPUTS 1
7065 EOF
7066
7067 ###   use option --enable-widec to turn on use of wide-character support
7068 NCURSES_CH_T=chtype
7069 NCURSES_LIBUTF8=0
7070
7071 NEED_WCHAR_H=0
7072 NCURSES_MBSTATE_T=0
7073 NCURSES_WCHAR_T=0
7074 NCURSES_WINT_T=0
7075
7076 # Check to define _XOPEN_SOURCE "automatically"
7077
7078 cf_XOPEN_SOURCE=500
7079 cf_POSIX_C_SOURCE=199506L
7080 cf_xopen_source=
7081
7082 case $host_os in #(vi
7083 aix[4-7]*) #(vi
7084         cf_xopen_source="-D_ALL_SOURCE"
7085         ;;
7086 cygwin) #(vi
7087         cf_XOPEN_SOURCE=600
7088         ;;
7089 darwin[0-8].*) #(vi
7090         cf_xopen_source="-D_APPLE_C_SOURCE"
7091         ;;
7092 darwin*) #(vi
7093         cf_xopen_source="-D_DARWIN_C_SOURCE"
7094         ;;
7095 freebsd*|dragonfly*) #(vi
7096         # 5.x headers associate
7097         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7098         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7099         cf_POSIX_C_SOURCE=200112L
7100         cf_XOPEN_SOURCE=600
7101         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7102         ;;
7103 hpux11*) #(vi
7104         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7105         ;;
7106 hpux*) #(vi
7107         cf_xopen_source="-D_HPUX_SOURCE"
7108         ;;
7109 irix[56].*) #(vi
7110         cf_xopen_source="-D_SGI_SOURCE"
7111         ;;
7112 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7113
7114 echo "$as_me:7114: checking if we must define _GNU_SOURCE" >&5
7115 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7116 if test "${cf_cv_gnu_source+set}" = set; then
7117   echo $ECHO_N "(cached) $ECHO_C" >&6
7118 else
7119
7120 cat >conftest.$ac_ext <<_ACEOF
7121 #line 7121 "configure"
7122 #include "confdefs.h"
7123 #include <sys/types.h>
7124 int
7125 main ()
7126 {
7127
7128 #ifndef _XOPEN_SOURCE
7129 make an error
7130 #endif
7131   ;
7132   return 0;
7133 }
7134 _ACEOF
7135 rm -f conftest.$ac_objext
7136 if { (eval echo "$as_me:7136: \"$ac_compile\"") >&5
7137   (eval $ac_compile) 2>&5
7138   ac_status=$?
7139   echo "$as_me:7139: \$? = $ac_status" >&5
7140   (exit $ac_status); } &&
7141          { ac_try='test -s conftest.$ac_objext'
7142   { (eval echo "$as_me:7142: \"$ac_try\"") >&5
7143   (eval $ac_try) 2>&5
7144   ac_status=$?
7145   echo "$as_me:7145: \$? = $ac_status" >&5
7146   (exit $ac_status); }; }; then
7147   cf_cv_gnu_source=no
7148 else
7149   echo "$as_me: failed program was:" >&5
7150 cat conftest.$ac_ext >&5
7151 cf_save="$CPPFLAGS"
7152          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7153          cat >conftest.$ac_ext <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156 #include <sys/types.h>
7157 int
7158 main ()
7159 {
7160
7161 #ifdef _XOPEN_SOURCE
7162 make an error
7163 #endif
7164   ;
7165   return 0;
7166 }
7167 _ACEOF
7168 rm -f conftest.$ac_objext
7169 if { (eval echo "$as_me:7169: \"$ac_compile\"") >&5
7170   (eval $ac_compile) 2>&5
7171   ac_status=$?
7172   echo "$as_me:7172: \$? = $ac_status" >&5
7173   (exit $ac_status); } &&
7174          { ac_try='test -s conftest.$ac_objext'
7175   { (eval echo "$as_me:7175: \"$ac_try\"") >&5
7176   (eval $ac_try) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit $ac_status); }; }; then
7180   cf_cv_gnu_source=no
7181 else
7182   echo "$as_me: failed program was:" >&5
7183 cat conftest.$ac_ext >&5
7184 cf_cv_gnu_source=yes
7185 fi
7186 rm -f conftest.$ac_objext conftest.$ac_ext
7187         CPPFLAGS="$cf_save"
7188
7189 fi
7190 rm -f conftest.$ac_objext conftest.$ac_ext
7191
7192 fi
7193 echo "$as_me:7193: result: $cf_cv_gnu_source" >&5
7194 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7195 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7196
7197         ;;
7198 mirbsd*) #(vi
7199         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7200         ;;
7201 netbsd*) #(vi
7202         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7203         ;;
7204 openbsd*) #(vi
7205         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7206         ;;
7207 osf[45]*) #(vi
7208         cf_xopen_source="-D_OSF_SOURCE"
7209         ;;
7210 nto-qnx*) #(vi
7211         cf_xopen_source="-D_QNX_SOURCE"
7212         ;;
7213 sco*) #(vi
7214         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7215         ;;
7216 solaris2.1[0-9]) #(vi
7217         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7218         ;;
7219 solaris2.[1-9]) #(vi
7220         cf_xopen_source="-D__EXTENSIONS__"
7221         ;;
7222 *)
7223         echo "$as_me:7223: checking if we should define _XOPEN_SOURCE" >&5
7224 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7225 if test "${cf_cv_xopen_source+set}" = set; then
7226   echo $ECHO_N "(cached) $ECHO_C" >&6
7227 else
7228
7229         cat >conftest.$ac_ext <<_ACEOF
7230 #line 7230 "configure"
7231 #include "confdefs.h"
7232 #include <sys/types.h>
7233 int
7234 main ()
7235 {
7236
7237 #ifndef _XOPEN_SOURCE
7238 make an error
7239 #endif
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f conftest.$ac_objext
7245 if { (eval echo "$as_me:7245: \"$ac_compile\"") >&5
7246   (eval $ac_compile) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit $ac_status); } &&
7250          { ac_try='test -s conftest.$ac_objext'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit $ac_status); }; }; then
7256   cf_cv_xopen_source=no
7257 else
7258   echo "$as_me: failed program was:" >&5
7259 cat conftest.$ac_ext >&5
7260 cf_save="$CPPFLAGS"
7261          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7262          cat >conftest.$ac_ext <<_ACEOF
7263 #line 7263 "configure"
7264 #include "confdefs.h"
7265 #include <sys/types.h>
7266 int
7267 main ()
7268 {
7269
7270 #ifdef _XOPEN_SOURCE
7271 make an error
7272 #endif
7273   ;
7274   return 0;
7275 }
7276 _ACEOF
7277 rm -f conftest.$ac_objext
7278 if { (eval echo "$as_me:7278: \"$ac_compile\"") >&5
7279   (eval $ac_compile) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -s conftest.$ac_objext'
7284   { (eval echo "$as_me:7284: \"$ac_try\"") >&5
7285   (eval $ac_try) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); }; }; then
7289   cf_cv_xopen_source=no
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7294 fi
7295 rm -f conftest.$ac_objext conftest.$ac_ext
7296         CPPFLAGS="$cf_save"
7297
7298 fi
7299 rm -f conftest.$ac_objext conftest.$ac_ext
7300
7301 fi
7302 echo "$as_me:7302: result: $cf_cv_xopen_source" >&5
7303 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7304         if test "$cf_cv_xopen_source" != no ; then
7305
7306 CFLAGS=`echo "$CFLAGS" | \
7307         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7308                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7309
7310 CPPFLAGS=`echo "$CPPFLAGS" | \
7311         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7312                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7313
7314                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7315
7316 cf_fix_cppflags=no
7317 cf_new_cflags=
7318 cf_new_cppflags=
7319 cf_new_extra_cppflags=
7320
7321 for cf_add_cflags in $cf_temp_xopen_source
7322 do
7323 case $cf_fix_cppflags in
7324 no)
7325         case $cf_add_cflags in #(vi
7326         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7327                 case $cf_add_cflags in
7328                 -D*)
7329                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7330
7331                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7332                                 && test -z "${cf_tst_cflags}" \
7333                                 && cf_fix_cppflags=yes
7334
7335                         if test $cf_fix_cppflags = yes ; then
7336                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7337                                 continue
7338                         elif test "${cf_tst_cflags}" = "\"'" ; then
7339                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7340                                 continue
7341                         fi
7342                         ;;
7343                 esac
7344                 case "$CPPFLAGS" in
7345                 *$cf_add_cflags) #(vi
7346                         ;;
7347                 *) #(vi
7348                         case $cf_add_cflags in #(vi
7349                         -D*)
7350                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7351
7352 CPPFLAGS=`echo "$CPPFLAGS" | \
7353         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7354                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7355
7356                                 ;;
7357                         esac
7358                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7359                         ;;
7360                 esac
7361                 ;;
7362         *)
7363                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7364                 ;;
7365         esac
7366         ;;
7367 yes)
7368         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7369
7370         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7371
7372         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7373                 && test -z "${cf_tst_cflags}" \
7374                 && cf_fix_cppflags=no
7375         ;;
7376 esac
7377 done
7378
7379 if test -n "$cf_new_cflags" ; then
7380
7381         CFLAGS="$CFLAGS $cf_new_cflags"
7382 fi
7383
7384 if test -n "$cf_new_cppflags" ; then
7385
7386         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7387 fi
7388
7389 if test -n "$cf_new_extra_cppflags" ; then
7390
7391         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7392 fi
7393
7394         fi
7395
7396 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7397
7398 cf_save_CFLAGS="$CFLAGS"
7399 cf_save_CPPFLAGS="$CPPFLAGS"
7400
7401 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7402         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7403                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7404
7405 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7406         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7407                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7408
7409 echo "$as_me:7409: checking if we should define _POSIX_C_SOURCE" >&5
7410 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7411 if test "${cf_cv_posix_c_source+set}" = set; then
7412   echo $ECHO_N "(cached) $ECHO_C" >&6
7413 else
7414
7415 echo "${as_me:-configure}:7415: testing if the symbol is already defined go no further ..." 1>&5
7416
7417         cat >conftest.$ac_ext <<_ACEOF
7418 #line 7418 "configure"
7419 #include "confdefs.h"
7420 #include <sys/types.h>
7421 int
7422 main ()
7423 {
7424
7425 #ifndef _POSIX_C_SOURCE
7426 make an error
7427 #endif
7428   ;
7429   return 0;
7430 }
7431 _ACEOF
7432 rm -f conftest.$ac_objext
7433 if { (eval echo "$as_me:7433: \"$ac_compile\"") >&5
7434   (eval $ac_compile) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); } &&
7438          { ac_try='test -s conftest.$ac_objext'
7439   { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); }; }; then
7444   cf_cv_posix_c_source=no
7445 else
7446   echo "$as_me: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 cf_want_posix_source=no
7449          case .$cf_POSIX_C_SOURCE in #(vi
7450          .[12]??*) #(vi
7451                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7452                 ;;
7453          .2) #(vi
7454                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7455                 cf_want_posix_source=yes
7456                 ;;
7457          .*)
7458                 cf_want_posix_source=yes
7459                 ;;
7460          esac
7461          if test "$cf_want_posix_source" = yes ; then
7462                 cat >conftest.$ac_ext <<_ACEOF
7463 #line 7463 "configure"
7464 #include "confdefs.h"
7465 #include <sys/types.h>
7466 int
7467 main ()
7468 {
7469
7470 #ifdef _POSIX_SOURCE
7471 make an error
7472 #endif
7473   ;
7474   return 0;
7475 }
7476 _ACEOF
7477 rm -f conftest.$ac_objext
7478 if { (eval echo "$as_me:7478: \"$ac_compile\"") >&5
7479   (eval $ac_compile) 2>&5
7480   ac_status=$?
7481   echo "$as_me:7481: \$? = $ac_status" >&5
7482   (exit $ac_status); } &&
7483          { ac_try='test -s conftest.$ac_objext'
7484   { (eval echo "$as_me:7484: \"$ac_try\"") >&5
7485   (eval $ac_try) 2>&5
7486   ac_status=$?
7487   echo "$as_me:7487: \$? = $ac_status" >&5
7488   (exit $ac_status); }; }; then
7489   :
7490 else
7491   echo "$as_me: failed program was:" >&5
7492 cat conftest.$ac_ext >&5
7493 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7494 fi
7495 rm -f conftest.$ac_objext conftest.$ac_ext
7496          fi
7497
7498 echo "${as_me:-configure}:7498: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7499
7500          CFLAGS="$cf_trim_CFLAGS"
7501          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7502
7503 echo "${as_me:-configure}:7503: testing if the second compile does not leave our definition intact error ..." 1>&5
7504
7505          cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508 #include <sys/types.h>
7509 int
7510 main ()
7511 {
7512
7513 #ifndef _POSIX_C_SOURCE
7514 make an error
7515 #endif
7516   ;
7517   return 0;
7518 }
7519 _ACEOF
7520 rm -f conftest.$ac_objext
7521 if { (eval echo "$as_me:7521: \"$ac_compile\"") >&5
7522   (eval $ac_compile) 2>&5
7523   ac_status=$?
7524   echo "$as_me:7524: \$? = $ac_status" >&5
7525   (exit $ac_status); } &&
7526          { ac_try='test -s conftest.$ac_objext'
7527   { (eval echo "$as_me:7527: \"$ac_try\"") >&5
7528   (eval $ac_try) 2>&5
7529   ac_status=$?
7530   echo "$as_me:7530: \$? = $ac_status" >&5
7531   (exit $ac_status); }; }; then
7532   :
7533 else
7534   echo "$as_me: failed program was:" >&5
7535 cat conftest.$ac_ext >&5
7536 cf_cv_posix_c_source=no
7537 fi
7538 rm -f conftest.$ac_objext conftest.$ac_ext
7539          CFLAGS="$cf_save_CFLAGS"
7540          CPPFLAGS="$cf_save_CPPFLAGS"
7541
7542 fi
7543 rm -f conftest.$ac_objext conftest.$ac_ext
7544
7545 fi
7546 echo "$as_me:7546: result: $cf_cv_posix_c_source" >&5
7547 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7548
7549 if test "$cf_cv_posix_c_source" != no ; then
7550         CFLAGS="$cf_trim_CFLAGS"
7551         CPPFLAGS="$cf_trim_CPPFLAGS"
7552
7553 cf_fix_cppflags=no
7554 cf_new_cflags=
7555 cf_new_cppflags=
7556 cf_new_extra_cppflags=
7557
7558 for cf_add_cflags in $cf_cv_posix_c_source
7559 do
7560 case $cf_fix_cppflags in
7561 no)
7562         case $cf_add_cflags in #(vi
7563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7564                 case $cf_add_cflags in
7565                 -D*)
7566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7567
7568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7569                                 && test -z "${cf_tst_cflags}" \
7570                                 && cf_fix_cppflags=yes
7571
7572                         if test $cf_fix_cppflags = yes ; then
7573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7574                                 continue
7575                         elif test "${cf_tst_cflags}" = "\"'" ; then
7576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7577                                 continue
7578                         fi
7579                         ;;
7580                 esac
7581                 case "$CPPFLAGS" in
7582                 *$cf_add_cflags) #(vi
7583                         ;;
7584                 *) #(vi
7585                         case $cf_add_cflags in #(vi
7586                         -D*)
7587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7588
7589 CPPFLAGS=`echo "$CPPFLAGS" | \
7590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7592
7593                                 ;;
7594                         esac
7595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7596                         ;;
7597                 esac
7598                 ;;
7599         *)
7600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7601                 ;;
7602         esac
7603         ;;
7604 yes)
7605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7606
7607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7608
7609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7610                 && test -z "${cf_tst_cflags}" \
7611                 && cf_fix_cppflags=no
7612         ;;
7613 esac
7614 done
7615
7616 if test -n "$cf_new_cflags" ; then
7617
7618         CFLAGS="$CFLAGS $cf_new_cflags"
7619 fi
7620
7621 if test -n "$cf_new_cppflags" ; then
7622
7623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7624 fi
7625
7626 if test -n "$cf_new_extra_cppflags" ; then
7627
7628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7629 fi
7630
7631 fi
7632
7633         ;;
7634 esac
7635
7636 if test -n "$cf_xopen_source" ; then
7637
7638 cf_fix_cppflags=no
7639 cf_new_cflags=
7640 cf_new_cppflags=
7641 cf_new_extra_cppflags=
7642
7643 for cf_add_cflags in $cf_xopen_source
7644 do
7645 case $cf_fix_cppflags in
7646 no)
7647         case $cf_add_cflags in #(vi
7648         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7649                 case $cf_add_cflags in
7650                 -D*)
7651                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7652
7653                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7654                                 && test -z "${cf_tst_cflags}" \
7655                                 && cf_fix_cppflags=yes
7656
7657                         if test $cf_fix_cppflags = yes ; then
7658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7659                                 continue
7660                         elif test "${cf_tst_cflags}" = "\"'" ; then
7661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7662                                 continue
7663                         fi
7664                         ;;
7665                 esac
7666                 case "$CPPFLAGS" in
7667                 *$cf_add_cflags) #(vi
7668                         ;;
7669                 *) #(vi
7670                         case $cf_add_cflags in #(vi
7671                         -D*)
7672                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7673
7674 CPPFLAGS=`echo "$CPPFLAGS" | \
7675         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7676                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7677
7678                                 ;;
7679                         esac
7680                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7681                         ;;
7682                 esac
7683                 ;;
7684         *)
7685                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7686                 ;;
7687         esac
7688         ;;
7689 yes)
7690         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7691
7692         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7693
7694         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7695                 && test -z "${cf_tst_cflags}" \
7696                 && cf_fix_cppflags=no
7697         ;;
7698 esac
7699 done
7700
7701 if test -n "$cf_new_cflags" ; then
7702
7703         CFLAGS="$CFLAGS $cf_new_cflags"
7704 fi
7705
7706 if test -n "$cf_new_cppflags" ; then
7707
7708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7709 fi
7710
7711 if test -n "$cf_new_extra_cppflags" ; then
7712
7713         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7714 fi
7715
7716 fi
7717
7718 # Work around breakage on OS X
7719
7720 echo "$as_me:7720: checking if SIGWINCH is defined" >&5
7721 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7722 if test "${cf_cv_define_sigwinch+set}" = set; then
7723   echo $ECHO_N "(cached) $ECHO_C" >&6
7724 else
7725
7726         cat >conftest.$ac_ext <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7729
7730 #include <sys/types.h>
7731 #include <sys/signal.h>
7732
7733 int
7734 main ()
7735 {
7736 int x = SIGWINCH
7737   ;
7738   return 0;
7739 }
7740 _ACEOF
7741 rm -f conftest.$ac_objext
7742 if { (eval echo "$as_me:7742: \"$ac_compile\"") >&5
7743   (eval $ac_compile) 2>&5
7744   ac_status=$?
7745   echo "$as_me:7745: \$? = $ac_status" >&5
7746   (exit $ac_status); } &&
7747          { ac_try='test -s conftest.$ac_objext'
7748   { (eval echo "$as_me:7748: \"$ac_try\"") >&5
7749   (eval $ac_try) 2>&5
7750   ac_status=$?
7751   echo "$as_me:7751: \$? = $ac_status" >&5
7752   (exit $ac_status); }; }; then
7753   cf_cv_define_sigwinch=yes
7754 else
7755   echo "$as_me: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 cat >conftest.$ac_ext <<_ACEOF
7758 #line 7758 "configure"
7759 #include "confdefs.h"
7760
7761 #undef _XOPEN_SOURCE
7762 #undef _POSIX_SOURCE
7763 #undef _POSIX_C_SOURCE
7764 #include <sys/types.h>
7765 #include <sys/signal.h>
7766
7767 int
7768 main ()
7769 {
7770 int x = SIGWINCH
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f conftest.$ac_objext
7776 if { (eval echo "$as_me:7776: \"$ac_compile\"") >&5
7777   (eval $ac_compile) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit $ac_status); } &&
7781          { ac_try='test -s conftest.$ac_objext'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit $ac_status); }; }; then
7787   cf_cv_define_sigwinch=maybe
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat conftest.$ac_ext >&5
7791 cf_cv_define_sigwinch=no
7792 fi
7793 rm -f conftest.$ac_objext conftest.$ac_ext
7794
7795 fi
7796 rm -f conftest.$ac_objext conftest.$ac_ext
7797
7798 fi
7799 echo "$as_me:7799: result: $cf_cv_define_sigwinch" >&5
7800 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7801
7802 if test "$cf_cv_define_sigwinch" = maybe ; then
7803 echo "$as_me:7803: checking for actual SIGWINCH definition" >&5
7804 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7805 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7806   echo $ECHO_N "(cached) $ECHO_C" >&6
7807 else
7808
7809 cf_cv_fixup_sigwinch=unknown
7810 cf_sigwinch=32
7811 while test $cf_sigwinch != 1
7812 do
7813         cat >conftest.$ac_ext <<_ACEOF
7814 #line 7814 "configure"
7815 #include "confdefs.h"
7816
7817 #undef _XOPEN_SOURCE
7818 #undef _POSIX_SOURCE
7819 #undef _POSIX_C_SOURCE
7820 #include <sys/types.h>
7821 #include <sys/signal.h>
7822
7823 int
7824 main ()
7825 {
7826
7827 #if SIGWINCH != $cf_sigwinch
7828 make an error
7829 #endif
7830 int x = SIGWINCH
7831   ;
7832   return 0;
7833 }
7834 _ACEOF
7835 rm -f conftest.$ac_objext
7836 if { (eval echo "$as_me:7836: \"$ac_compile\"") >&5
7837   (eval $ac_compile) 2>&5
7838   ac_status=$?
7839   echo "$as_me:7839: \$? = $ac_status" >&5
7840   (exit $ac_status); } &&
7841          { ac_try='test -s conftest.$ac_objext'
7842   { (eval echo "$as_me:7842: \"$ac_try\"") >&5
7843   (eval $ac_try) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit $ac_status); }; }; then
7847   cf_cv_fixup_sigwinch=$cf_sigwinch
7848          break
7849 else
7850   echo "$as_me: failed program was:" >&5
7851 cat conftest.$ac_ext >&5
7852 fi
7853 rm -f conftest.$ac_objext conftest.$ac_ext
7854
7855 cf_sigwinch=`expr $cf_sigwinch - 1`
7856 done
7857
7858 fi
7859 echo "$as_me:7859: result: $cf_cv_fixup_sigwinch" >&5
7860 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7861
7862         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7863                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7864         fi
7865 fi
7866
7867 # Checks for CODESET support.
7868
7869   echo "$as_me:7869: checking for nl_langinfo and CODESET" >&5
7870 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7871 if test "${am_cv_langinfo_codeset+set}" = set; then
7872   echo $ECHO_N "(cached) $ECHO_C" >&6
7873 else
7874   cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7877 #include <langinfo.h>
7878 int
7879 main ()
7880 {
7881 char* cs = nl_langinfo(CODESET);
7882   ;
7883   return 0;
7884 }
7885 _ACEOF
7886 rm -f conftest.$ac_objext conftest$ac_exeext
7887 if { (eval echo "$as_me:7887: \"$ac_link\"") >&5
7888   (eval $ac_link) 2>&5
7889   ac_status=$?
7890   echo "$as_me:7890: \$? = $ac_status" >&5
7891   (exit $ac_status); } &&
7892          { ac_try='test -s conftest$ac_exeext'
7893   { (eval echo "$as_me:7893: \"$ac_try\"") >&5
7894   (eval $ac_try) 2>&5
7895   ac_status=$?
7896   echo "$as_me:7896: \$? = $ac_status" >&5
7897   (exit $ac_status); }; }; then
7898   am_cv_langinfo_codeset=yes
7899 else
7900   echo "$as_me: failed program was:" >&5
7901 cat conftest.$ac_ext >&5
7902 am_cv_langinfo_codeset=no
7903 fi
7904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7905
7906 fi
7907 echo "$as_me:7907: result: $am_cv_langinfo_codeset" >&5
7908 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7909   if test $am_cv_langinfo_codeset = yes; then
7910
7911 cat >>confdefs.h <<\EOF
7912 #define HAVE_LANGINFO_CODESET 1
7913 EOF
7914
7915   fi
7916
7917 # use these variables to work around a defect in gcc's fixincludes.
7918 NCURSES_OK_WCHAR_T=
7919 NCURSES_OK_WINT_T=
7920
7921 echo "$as_me:7921: checking if you want wide-character code" >&5
7922 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7923
7924 # Check whether --enable-widec or --disable-widec was given.
7925 if test "${enable_widec+set}" = set; then
7926   enableval="$enable_widec"
7927   with_widec=$enableval
7928 else
7929   with_widec=no
7930 fi;
7931 echo "$as_me:7931: result: $with_widec" >&5
7932 echo "${ECHO_T}$with_widec" >&6
7933 if test "$with_widec" = yes ; then
7934         LIB_SUFFIX="w${LIB_SUFFIX}"
7935         cat >>confdefs.h <<\EOF
7936 #define USE_WIDEC_SUPPORT 1
7937 EOF
7938
7939         case "$CFLAGS $CPPFLAGS" in #(vi
7940         *-D_XOPEN_SOURCE=500) #(vi
7941                 ;;
7942         *)
7943
7944 echo "$as_me:7944: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7945 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7946 cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949 #include <sys/types.h>
7950
7951 int
7952 main ()
7953 {
7954
7955 #ifndef _XOPEN_SOURCE_EXTENDED
7956 make an error
7957 #endif
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f conftest.$ac_objext
7963 if { (eval echo "$as_me:7963: \"$ac_compile\"") >&5
7964   (eval $ac_compile) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -s conftest.$ac_objext'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit $ac_status); }; }; then
7974   cf_result=no
7975 else
7976   echo "$as_me: failed program was:" >&5
7977 cat conftest.$ac_ext >&5
7978 cf_result=yes
7979 fi
7980 rm -f conftest.$ac_objext conftest.$ac_ext
7981 echo "$as_me:7981: result: $cf_result" >&5
7982 echo "${ECHO_T}$cf_result" >&6
7983
7984 if test "$cf_result" = yes ; then
7985         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7986 elif test "x" != "x" ; then
7987         echo "$as_me:7987: checking checking for compatible value versus " >&5
7988 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7989         cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992 #include <sys/types.h>
7993
7994 int
7995 main ()
7996 {
7997
7998 #if _XOPEN_SOURCE_EXTENDED- < 0
7999 make an error
8000 #endif
8001   ;
8002   return 0;
8003 }
8004 _ACEOF
8005 rm -f conftest.$ac_objext
8006 if { (eval echo "$as_me:8006: \"$ac_compile\"") >&5
8007   (eval $ac_compile) 2>&5
8008   ac_status=$?
8009   echo "$as_me:8009: \$? = $ac_status" >&5
8010   (exit $ac_status); } &&
8011          { ac_try='test -s conftest.$ac_objext'
8012   { (eval echo "$as_me:8012: \"$ac_try\"") >&5
8013   (eval $ac_try) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit $ac_status); }; }; then
8017   cf_result=yes
8018 else
8019   echo "$as_me: failed program was:" >&5
8020 cat conftest.$ac_ext >&5
8021 cf_result=no
8022 fi
8023 rm -f conftest.$ac_objext conftest.$ac_ext
8024         echo "$as_me:8024: result: $cf_result" >&5
8025 echo "${ECHO_T}$cf_result" >&6
8026         if test "$cf_result" = no ; then
8027                 # perhaps we can override it - try...
8028                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8029         fi
8030 fi
8031
8032                 ;;
8033         esac
8034
8035         # with_overwrite=no
8036         NCURSES_CH_T=cchar_t
8037
8038 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8039 do
8040 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8041 echo "$as_me:8041: checking for $ac_func" >&5
8042 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8043 if eval "test \"\${$as_ac_var+set}\" = set"; then
8044   echo $ECHO_N "(cached) $ECHO_C" >&6
8045 else
8046   cat >conftest.$ac_ext <<_ACEOF
8047 #line 8047 "configure"
8048 #include "confdefs.h"
8049 /* System header to define __stub macros and hopefully few prototypes,
8050     which can conflict with char $ac_func (); below.  */
8051 #include <assert.h>
8052 /* Override any gcc2 internal prototype to avoid an error.  */
8053 #ifdef __cplusplus
8054 extern "C"
8055 #endif
8056 /* We use char because int might match the return type of a gcc2
8057    builtin and then its argument prototype would still apply.  */
8058 char $ac_func ();
8059 char (*f) ();
8060
8061 int
8062 main ()
8063 {
8064 /* The GNU C library defines this for functions which it implements
8065     to always fail with ENOSYS.  Some functions are actually named
8066     something starting with __ and the normal name is an alias.  */
8067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8068 choke me
8069 #else
8070 f = $ac_func;
8071 #endif
8072
8073   ;
8074   return 0;
8075 }
8076 _ACEOF
8077 rm -f conftest.$ac_objext conftest$ac_exeext
8078 if { (eval echo "$as_me:8078: \"$ac_link\"") >&5
8079   (eval $ac_link) 2>&5
8080   ac_status=$?
8081   echo "$as_me:8081: \$? = $ac_status" >&5
8082   (exit $ac_status); } &&
8083          { ac_try='test -s conftest$ac_exeext'
8084   { (eval echo "$as_me:8084: \"$ac_try\"") >&5
8085   (eval $ac_try) 2>&5
8086   ac_status=$?
8087   echo "$as_me:8087: \$? = $ac_status" >&5
8088   (exit $ac_status); }; }; then
8089   eval "$as_ac_var=yes"
8090 else
8091   echo "$as_me: failed program was:" >&5
8092 cat conftest.$ac_ext >&5
8093 eval "$as_ac_var=no"
8094 fi
8095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8096 fi
8097 echo "$as_me:8097: result: `eval echo '${'$as_ac_var'}'`" >&5
8098 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8099 if test `eval echo '${'$as_ac_var'}'` = yes; then
8100   cat >>confdefs.h <<EOF
8101 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8102 EOF
8103
8104 fi
8105 done
8106
8107         if test "$ac_cv_func_putwc" != yes ; then
8108
8109 echo "$as_me:8109: checking for multibyte character support" >&5
8110 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8111 if test "${cf_cv_utf8_lib+set}" = set; then
8112   echo $ECHO_N "(cached) $ECHO_C" >&6
8113 else
8114
8115         cf_save_LIBS="$LIBS"
8116         cat >conftest.$ac_ext <<_ACEOF
8117 #line 8117 "configure"
8118 #include "confdefs.h"
8119
8120 #include <stdlib.h>
8121 int
8122 main ()
8123 {
8124 putwc(0,0);
8125   ;
8126   return 0;
8127 }
8128 _ACEOF
8129 rm -f conftest.$ac_objext conftest$ac_exeext
8130 if { (eval echo "$as_me:8130: \"$ac_link\"") >&5
8131   (eval $ac_link) 2>&5
8132   ac_status=$?
8133   echo "$as_me:8133: \$? = $ac_status" >&5
8134   (exit $ac_status); } &&
8135          { ac_try='test -s conftest$ac_exeext'
8136   { (eval echo "$as_me:8136: \"$ac_try\"") >&5
8137   (eval $ac_try) 2>&5
8138   ac_status=$?
8139   echo "$as_me:8139: \$? = $ac_status" >&5
8140   (exit $ac_status); }; }; then
8141   cf_cv_utf8_lib=yes
8142 else
8143   echo "$as_me: failed program was:" >&5
8144 cat conftest.$ac_ext >&5
8145
8146 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8147 # will be set on completion of the AC_TRY_LINK below.
8148 cf_cv_header_path_utf8=
8149 cf_cv_library_path_utf8=
8150
8151 echo "${as_me:-configure}:8151: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8152
8153 cf_save_LIBS="$LIBS"
8154
8155 cat >conftest.$ac_ext <<_ACEOF
8156 #line 8156 "configure"
8157 #include "confdefs.h"
8158
8159 #include <libutf8.h>
8160 int
8161 main ()
8162 {
8163 putwc(0,0);
8164   ;
8165   return 0;
8166 }
8167 _ACEOF
8168 rm -f conftest.$ac_objext conftest$ac_exeext
8169 if { (eval echo "$as_me:8169: \"$ac_link\"") >&5
8170   (eval $ac_link) 2>&5
8171   ac_status=$?
8172   echo "$as_me:8172: \$? = $ac_status" >&5
8173   (exit $ac_status); } &&
8174          { ac_try='test -s conftest$ac_exeext'
8175   { (eval echo "$as_me:8175: \"$ac_try\"") >&5
8176   (eval $ac_try) 2>&5
8177   ac_status=$?
8178   echo "$as_me:8178: \$? = $ac_status" >&5
8179   (exit $ac_status); }; }; then
8180
8181         cf_cv_find_linkage_utf8=yes
8182         cf_cv_header_path_utf8=/usr/include
8183         cf_cv_library_path_utf8=/usr/lib
8184
8185 else
8186   echo "$as_me: failed program was:" >&5
8187 cat conftest.$ac_ext >&5
8188
8189 LIBS="-lutf8  $cf_save_LIBS"
8190
8191 cat >conftest.$ac_ext <<_ACEOF
8192 #line 8192 "configure"
8193 #include "confdefs.h"
8194
8195 #include <libutf8.h>
8196 int
8197 main ()
8198 {
8199 putwc(0,0);
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 rm -f conftest.$ac_objext conftest$ac_exeext
8205 if { (eval echo "$as_me:8205: \"$ac_link\"") >&5
8206   (eval $ac_link) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); } &&
8210          { ac_try='test -s conftest$ac_exeext'
8211   { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212   (eval $ac_try) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); }; }; then
8216
8217         cf_cv_find_linkage_utf8=yes
8218         cf_cv_header_path_utf8=/usr/include
8219         cf_cv_library_path_utf8=/usr/lib
8220         cf_cv_library_file_utf8="-lutf8"
8221
8222 else
8223   echo "$as_me: failed program was:" >&5
8224 cat conftest.$ac_ext >&5
8225
8226         cf_cv_find_linkage_utf8=no
8227         LIBS="$cf_save_LIBS"
8228
8229     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8230
8231 echo "${as_me:-configure}:8231: testing find linkage for utf8 library ..." 1>&5
8232
8233 echo "${as_me:-configure}:8233: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8234
8235     cf_save_CPPFLAGS="$CPPFLAGS"
8236     cf_test_CPPFLAGS="$CPPFLAGS"
8237
8238 cf_search=
8239
8240 # collect the current set of include-directories from compiler flags
8241 cf_header_path_list=""
8242 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8243         for cf_header_path in $CPPFLAGS $CFLAGS
8244         do
8245                 case $cf_header_path in #(vi
8246                 -I*)
8247                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8248
8249 test "$cf_header_path" != "NONE" && \
8250 test -d "$cf_header_path" && \
8251  {
8252         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8253         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8254         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8255         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8256         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8257         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8258 }
8259
8260                         cf_header_path_list="$cf_header_path_list $cf_search"
8261                         ;;
8262                 esac
8263         done
8264 fi
8265
8266 # add the variations for the package we are looking for
8267
8268 cf_search=
8269
8270 test "/usr" != "$prefix" && \
8271 test -d "/usr" && \
8272 (test $prefix = NONE || test "/usr" != "$prefix") && {
8273         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8274         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8275         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8276         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8277         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8278         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8279 }
8280
8281 test "$prefix" != "NONE" && \
8282 test -d "$prefix" && \
8283  {
8284         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8285         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8286         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8287         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8288         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8289         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8290 }
8291
8292 test "/usr/local" != "$prefix" && \
8293 test -d "/usr/local" && \
8294 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8295         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8296         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8297         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8298         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8299         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8300         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8301 }
8302
8303 test "/opt" != "$prefix" && \
8304 test -d "/opt" && \
8305 (test $prefix = NONE || test "/opt" != "$prefix") && {
8306         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8307         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8308         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8309         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8310         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8311         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8312 }
8313
8314 test "$HOME" != "$prefix" && \
8315 test -d "$HOME" && \
8316 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8317         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8318         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8319         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8320         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8321         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8322         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8323 }
8324
8325 test "$includedir" != NONE && \
8326 test "$includedir" != "/usr/include" && \
8327 test -d "$includedir" && {
8328         test -d $includedir &&    cf_search="$cf_search $includedir"
8329         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8330 }
8331
8332 test "$oldincludedir" != NONE && \
8333 test "$oldincludedir" != "/usr/include" && \
8334 test -d "$oldincludedir" && {
8335         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8336         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8337 }
8338
8339 cf_search="$cf_search $cf_header_path_list"
8340
8341     for cf_cv_header_path_utf8 in $cf_search
8342     do
8343       if test -d $cf_cv_header_path_utf8 ; then
8344         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8345
8346 echo "${as_me:-configure}:8346: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8347
8348         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8349         cat >conftest.$ac_ext <<_ACEOF
8350 #line 8350 "configure"
8351 #include "confdefs.h"
8352
8353 #include <libutf8.h>
8354 int
8355 main ()
8356 {
8357 putwc(0,0);
8358   ;
8359   return 0;
8360 }
8361 _ACEOF
8362 rm -f conftest.$ac_objext
8363 if { (eval echo "$as_me:8363: \"$ac_compile\"") >&5
8364   (eval $ac_compile) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); } &&
8368          { ac_try='test -s conftest.$ac_objext'
8369   { (eval echo "$as_me:8369: \"$ac_try\"") >&5
8370   (eval $ac_try) 2>&5
8371   ac_status=$?
8372   echo "$as_me:8372: \$? = $ac_status" >&5
8373   (exit $ac_status); }; }; then
8374
8375             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8376
8377 echo "${as_me:-configure}:8377: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8378
8379             cf_cv_find_linkage_utf8=maybe
8380             cf_test_CPPFLAGS="$CPPFLAGS"
8381             break
8382 else
8383   echo "$as_me: failed program was:" >&5
8384 cat conftest.$ac_ext >&5
8385
8386             CPPFLAGS="$cf_save_CPPFLAGS"
8387
8388 fi
8389 rm -f conftest.$ac_objext conftest.$ac_ext
8390       fi
8391     done
8392
8393     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8394
8395 echo "${as_me:-configure}:8395: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8396
8397       cf_save_LIBS="$LIBS"
8398       cf_save_LDFLAGS="$LDFLAGS"
8399
8400       if test "$cf_cv_find_linkage_utf8" != yes ; then
8401
8402 cf_search=
8403 cf_library_path_list=""
8404 if test -n "${LDFLAGS}${LIBS}" ; then
8405         for cf_library_path in $LDFLAGS $LIBS
8406         do
8407                 case $cf_library_path in #(vi
8408                 -L*)
8409                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8410
8411 test "$cf_library_path" != "NONE" && \
8412 test -d "$cf_library_path" && \
8413  {
8414         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8415         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8416         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8417         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8418         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8419         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8420 }
8421
8422                         cf_library_path_list="$cf_library_path_list $cf_search"
8423                         ;;
8424                 esac
8425         done
8426 fi
8427
8428 cf_search=
8429
8430 test "/usr" != "$prefix" && \
8431 test -d "/usr" && \
8432 (test $prefix = NONE || test "/usr" != "$prefix") && {
8433         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8434         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8435         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8436         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8437         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8438         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8439 }
8440
8441 test "$prefix" != "NONE" && \
8442 test -d "$prefix" && \
8443  {
8444         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8445         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8446         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8447         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8448         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8449         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8450 }
8451
8452 test "/usr/local" != "$prefix" && \
8453 test -d "/usr/local" && \
8454 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8455         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8456         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8457         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8458         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8459         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8460         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8461 }
8462
8463 test "/opt" != "$prefix" && \
8464 test -d "/opt" && \
8465 (test $prefix = NONE || test "/opt" != "$prefix") && {
8466         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8467         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8468         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8469         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8470         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8471         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8472 }
8473
8474 test "$HOME" != "$prefix" && \
8475 test -d "$HOME" && \
8476 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8477         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8478         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8479         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8480         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8481         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8482         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8483 }
8484
8485 cf_search="$cf_library_path_list $cf_search"
8486
8487         for cf_cv_library_path_utf8 in $cf_search
8488         do
8489           if test -d $cf_cv_library_path_utf8 ; then
8490             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8491
8492 echo "${as_me:-configure}:8492: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8493
8494             CPPFLAGS="$cf_test_CPPFLAGS"
8495             LIBS="-lutf8  $cf_save_LIBS"
8496             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8497             cat >conftest.$ac_ext <<_ACEOF
8498 #line 8498 "configure"
8499 #include "confdefs.h"
8500
8501 #include <libutf8.h>
8502 int
8503 main ()
8504 {
8505 putwc(0,0);
8506   ;
8507   return 0;
8508 }
8509 _ACEOF
8510 rm -f conftest.$ac_objext conftest$ac_exeext
8511 if { (eval echo "$as_me:8511: \"$ac_link\"") >&5
8512   (eval $ac_link) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); } &&
8516          { ac_try='test -s conftest$ac_exeext'
8517   { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8518   (eval $ac_try) 2>&5
8519   ac_status=$?
8520   echo "$as_me:8520: \$? = $ac_status" >&5
8521   (exit $ac_status); }; }; then
8522
8523                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8524
8525 echo "${as_me:-configure}:8525: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8526
8527                 cf_cv_find_linkage_utf8=yes
8528                 cf_cv_library_file_utf8="-lutf8"
8529                 break
8530 else
8531   echo "$as_me: failed program was:" >&5
8532 cat conftest.$ac_ext >&5
8533
8534                 CPPFLAGS="$cf_save_CPPFLAGS"
8535                 LIBS="$cf_save_LIBS"
8536                 LDFLAGS="$cf_save_LDFLAGS"
8537
8538 fi
8539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8540           fi
8541         done
8542         CPPFLAGS="$cf_save_CPPFLAGS"
8543         LDFLAGS="$cf_save_LDFLAGS"
8544       fi
8545
8546     else
8547       cf_cv_find_linkage_utf8=no
8548     fi
8549
8550 fi
8551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8552
8553 fi
8554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8555
8556 LIBS="$cf_save_LIBS"
8557
8558 if test "$cf_cv_find_linkage_utf8" = yes ; then
8559 cf_cv_utf8_lib=add-on
8560 else
8561 cf_cv_utf8_lib=no
8562 fi
8563
8564 fi
8565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8566 fi
8567 echo "$as_me:8567: result: $cf_cv_utf8_lib" >&5
8568 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8569
8570 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8571 # ncurses/ncursesw:
8572 if test "$cf_cv_utf8_lib" = "add-on" ; then
8573         cat >>confdefs.h <<\EOF
8574 #define HAVE_LIBUTF8_H 1
8575 EOF
8576
8577 if test -n "$cf_cv_header_path_utf8" ; then
8578   for cf_add_incdir in $cf_cv_header_path_utf8
8579   do
8580         while test $cf_add_incdir != /usr/include
8581         do
8582           if test -d $cf_add_incdir
8583           then
8584                 cf_have_incdir=no
8585                 if test -n "$CFLAGS$CPPFLAGS" ; then
8586                   # a loop is needed to ensure we can add subdirs of existing dirs
8587                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8588                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8589                           cf_have_incdir=yes; break
8590                         fi
8591                   done
8592                 fi
8593
8594                 if test "$cf_have_incdir" = no ; then
8595                   if test "$cf_add_incdir" = /usr/local/include ; then
8596                         if test "$GCC" = yes
8597                         then
8598                           cf_save_CPPFLAGS=$CPPFLAGS
8599                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8600                           cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603 #include <stdio.h>
8604 int
8605 main ()
8606 {
8607 printf("Hello")
8608   ;
8609   return 0;
8610 }
8611 _ACEOF
8612 rm -f conftest.$ac_objext
8613 if { (eval echo "$as_me:8613: \"$ac_compile\"") >&5
8614   (eval $ac_compile) 2>&5
8615   ac_status=$?
8616   echo "$as_me:8616: \$? = $ac_status" >&5
8617   (exit $ac_status); } &&
8618          { ac_try='test -s conftest.$ac_objext'
8619   { (eval echo "$as_me:8619: \"$ac_try\"") >&5
8620   (eval $ac_try) 2>&5
8621   ac_status=$?
8622   echo "$as_me:8622: \$? = $ac_status" >&5
8623   (exit $ac_status); }; }; then
8624   :
8625 else
8626   echo "$as_me: failed program was:" >&5
8627 cat conftest.$ac_ext >&5
8628 cf_have_incdir=yes
8629 fi
8630 rm -f conftest.$ac_objext conftest.$ac_ext
8631                           CPPFLAGS=$cf_save_CPPFLAGS
8632                         fi
8633                   fi
8634                 fi
8635
8636                 if test "$cf_have_incdir" = no ; then
8637                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8638
8639 echo "${as_me:-configure}:8639: testing adding $cf_add_incdir to include-path ..." 1>&5
8640
8641                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8642
8643                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8644                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8645                   cf_add_incdir="$cf_top_incdir"
8646                 else
8647                   break
8648                 fi
8649           fi
8650         done
8651   done
8652 fi
8653
8654 if test -n "$cf_cv_library_path_utf8" ; then
8655   for cf_add_libdir in $cf_cv_library_path_utf8
8656   do
8657     if test $cf_add_libdir = /usr/lib ; then
8658       :
8659     elif test -d $cf_add_libdir
8660     then
8661       cf_have_libdir=no
8662       if test -n "$LDFLAGS$LIBS" ; then
8663         # a loop is needed to ensure we can add subdirs of existing dirs
8664         for cf_test_libdir in $LDFLAGS $LIBS ; do
8665           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8666             cf_have_libdir=yes; break
8667           fi
8668         done
8669       fi
8670       if test "$cf_have_libdir" = no ; then
8671         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8672
8673 echo "${as_me:-configure}:8673: testing adding $cf_add_libdir to library-path ..." 1>&5
8674
8675         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8676       fi
8677     fi
8678   done
8679 fi
8680
8681         LIBS="$cf_cv_library_file_utf8 $LIBS"
8682 fi
8683
8684                 if test "$cf_cv_utf8_lib" != no ; then
8685                         NCURSES_LIBUTF8=1
8686                 fi
8687         fi
8688
8689 # This is needed on Tru64 5.0 to declare mbstate_t
8690 echo "$as_me:8690: checking if we must include wchar.h to declare mbstate_t" >&5
8691 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8692 if test "${cf_cv_mbstate_t+set}" = set; then
8693   echo $ECHO_N "(cached) $ECHO_C" >&6
8694 else
8695
8696 cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699
8700 #include <stdlib.h>
8701 #include <stdarg.h>
8702 #include <stdio.h>
8703 #ifdef HAVE_LIBUTF8_H
8704 #include <libutf8.h>
8705 #endif
8706 int
8707 main ()
8708 {
8709 mbstate_t state
8710   ;
8711   return 0;
8712 }
8713 _ACEOF
8714 rm -f conftest.$ac_objext
8715 if { (eval echo "$as_me:8715: \"$ac_compile\"") >&5
8716   (eval $ac_compile) 2>&5
8717   ac_status=$?
8718   echo "$as_me:8718: \$? = $ac_status" >&5
8719   (exit $ac_status); } &&
8720          { ac_try='test -s conftest.$ac_objext'
8721   { (eval echo "$as_me:8721: \"$ac_try\"") >&5
8722   (eval $ac_try) 2>&5
8723   ac_status=$?
8724   echo "$as_me:8724: \$? = $ac_status" >&5
8725   (exit $ac_status); }; }; then
8726   cf_cv_mbstate_t=no
8727 else
8728   echo "$as_me: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8730 cat >conftest.$ac_ext <<_ACEOF
8731 #line 8731 "configure"
8732 #include "confdefs.h"
8733
8734 #include <stdlib.h>
8735 #include <stdarg.h>
8736 #include <stdio.h>
8737 #include <wchar.h>
8738 #ifdef HAVE_LIBUTF8_H
8739 #include <libutf8.h>
8740 #endif
8741 int
8742 main ()
8743 {
8744 mbstate_t value
8745   ;
8746   return 0;
8747 }
8748 _ACEOF
8749 rm -f conftest.$ac_objext
8750 if { (eval echo "$as_me:8750: \"$ac_compile\"") >&5
8751   (eval $ac_compile) 2>&5
8752   ac_status=$?
8753   echo "$as_me:8753: \$? = $ac_status" >&5
8754   (exit $ac_status); } &&
8755          { ac_try='test -s conftest.$ac_objext'
8756   { (eval echo "$as_me:8756: \"$ac_try\"") >&5
8757   (eval $ac_try) 2>&5
8758   ac_status=$?
8759   echo "$as_me:8759: \$? = $ac_status" >&5
8760   (exit $ac_status); }; }; then
8761   cf_cv_mbstate_t=yes
8762 else
8763   echo "$as_me: failed program was:" >&5
8764 cat conftest.$ac_ext >&5
8765 cf_cv_mbstate_t=unknown
8766 fi
8767 rm -f conftest.$ac_objext conftest.$ac_ext
8768 fi
8769 rm -f conftest.$ac_objext conftest.$ac_ext
8770 fi
8771 echo "$as_me:8771: result: $cf_cv_mbstate_t" >&5
8772 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8773
8774 if test "$cf_cv_mbstate_t" = yes ; then
8775         cat >>confdefs.h <<\EOF
8776 #define NEED_WCHAR_H 1
8777 EOF
8778
8779         NEED_WCHAR_H=1
8780 fi
8781
8782 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8783 if test "$cf_cv_mbstate_t" = unknown ; then
8784         NCURSES_MBSTATE_T=1
8785 fi
8786
8787 # This is needed on Tru64 5.0 to declare wchar_t
8788 echo "$as_me:8788: checking if we must include wchar.h to declare wchar_t" >&5
8789 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8790 if test "${cf_cv_wchar_t+set}" = set; then
8791   echo $ECHO_N "(cached) $ECHO_C" >&6
8792 else
8793
8794 cat >conftest.$ac_ext <<_ACEOF
8795 #line 8795 "configure"
8796 #include "confdefs.h"
8797
8798 #include <stdlib.h>
8799 #include <stdarg.h>
8800 #include <stdio.h>
8801 #ifdef HAVE_LIBUTF8_H
8802 #include <libutf8.h>
8803 #endif
8804 int
8805 main ()
8806 {
8807 wchar_t state
8808   ;
8809   return 0;
8810 }
8811 _ACEOF
8812 rm -f conftest.$ac_objext
8813 if { (eval echo "$as_me:8813: \"$ac_compile\"") >&5
8814   (eval $ac_compile) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); } &&
8818          { ac_try='test -s conftest.$ac_objext'
8819   { (eval echo "$as_me:8819: \"$ac_try\"") >&5
8820   (eval $ac_try) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); }; }; then
8824   cf_cv_wchar_t=no
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 cat >conftest.$ac_ext <<_ACEOF
8829 #line 8829 "configure"
8830 #include "confdefs.h"
8831
8832 #include <stdlib.h>
8833 #include <stdarg.h>
8834 #include <stdio.h>
8835 #include <wchar.h>
8836 #ifdef HAVE_LIBUTF8_H
8837 #include <libutf8.h>
8838 #endif
8839 int
8840 main ()
8841 {
8842 wchar_t value
8843   ;
8844   return 0;
8845 }
8846 _ACEOF
8847 rm -f conftest.$ac_objext
8848 if { (eval echo "$as_me:8848: \"$ac_compile\"") >&5
8849   (eval $ac_compile) 2>&5
8850   ac_status=$?
8851   echo "$as_me:8851: \$? = $ac_status" >&5
8852   (exit $ac_status); } &&
8853          { ac_try='test -s conftest.$ac_objext'
8854   { (eval echo "$as_me:8854: \"$ac_try\"") >&5
8855   (eval $ac_try) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); }; }; then
8859   cf_cv_wchar_t=yes
8860 else
8861   echo "$as_me: failed program was:" >&5
8862 cat conftest.$ac_ext >&5
8863 cf_cv_wchar_t=unknown
8864 fi
8865 rm -f conftest.$ac_objext conftest.$ac_ext
8866 fi
8867 rm -f conftest.$ac_objext conftest.$ac_ext
8868 fi
8869 echo "$as_me:8869: result: $cf_cv_wchar_t" >&5
8870 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8871
8872 if test "$cf_cv_wchar_t" = yes ; then
8873         cat >>confdefs.h <<\EOF
8874 #define NEED_WCHAR_H 1
8875 EOF
8876
8877         NEED_WCHAR_H=1
8878 fi
8879
8880 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8881 if test "$cf_cv_wchar_t" = unknown ; then
8882         NCURSES_WCHAR_T=1
8883 fi
8884
8885 # if we find wchar_t in either place, use substitution to provide a fallback.
8886 if test "$cf_cv_wchar_t" != unknown ; then
8887         NCURSES_OK_WCHAR_T=1
8888 fi
8889
8890 # This is needed on Tru64 5.0 to declare wint_t
8891 echo "$as_me:8891: checking if we must include wchar.h to declare wint_t" >&5
8892 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8893 if test "${cf_cv_wint_t+set}" = set; then
8894   echo $ECHO_N "(cached) $ECHO_C" >&6
8895 else
8896
8897 cat >conftest.$ac_ext <<_ACEOF
8898 #line 8898 "configure"
8899 #include "confdefs.h"
8900
8901 #include <stdlib.h>
8902 #include <stdarg.h>
8903 #include <stdio.h>
8904 #ifdef HAVE_LIBUTF8_H
8905 #include <libutf8.h>
8906 #endif
8907 int
8908 main ()
8909 {
8910 wint_t state
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 rm -f conftest.$ac_objext
8916 if { (eval echo "$as_me:8916: \"$ac_compile\"") >&5
8917   (eval $ac_compile) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); } &&
8921          { ac_try='test -s conftest.$ac_objext'
8922   { (eval echo "$as_me:8922: \"$ac_try\"") >&5
8923   (eval $ac_try) 2>&5
8924   ac_status=$?
8925   echo "$as_me:8925: \$? = $ac_status" >&5
8926   (exit $ac_status); }; }; then
8927   cf_cv_wint_t=no
8928 else
8929   echo "$as_me: failed program was:" >&5
8930 cat conftest.$ac_ext >&5
8931 cat >conftest.$ac_ext <<_ACEOF
8932 #line 8932 "configure"
8933 #include "confdefs.h"
8934
8935 #include <stdlib.h>
8936 #include <stdarg.h>
8937 #include <stdio.h>
8938 #include <wchar.h>
8939 #ifdef HAVE_LIBUTF8_H
8940 #include <libutf8.h>
8941 #endif
8942 int
8943 main ()
8944 {
8945 wint_t value
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   cf_cv_wint_t=yes
8963 else
8964   echo "$as_me: failed program was:" >&5
8965 cat conftest.$ac_ext >&5
8966 cf_cv_wint_t=unknown
8967 fi
8968 rm -f conftest.$ac_objext conftest.$ac_ext
8969 fi
8970 rm -f conftest.$ac_objext conftest.$ac_ext
8971 fi
8972 echo "$as_me:8972: result: $cf_cv_wint_t" >&5
8973 echo "${ECHO_T}$cf_cv_wint_t" >&6
8974
8975 if test "$cf_cv_wint_t" = yes ; then
8976         cat >>confdefs.h <<\EOF
8977 #define NEED_WCHAR_H 1
8978 EOF
8979
8980         NEED_WCHAR_H=1
8981 fi
8982
8983 # if we do not find wint_t in either place, use substitution to provide a fallback.
8984 if test "$cf_cv_wint_t" = unknown ; then
8985         NCURSES_WINT_T=1
8986 fi
8987
8988 # if we find wint_t in either place, use substitution to provide a fallback.
8989 if test "$cf_cv_wint_t" != unknown ; then
8990         NCURSES_OK_WINT_T=1
8991 fi
8992
8993         if test "$NCURSES_MBSTATE_T" != 0; then
8994                 cat >>confdefs.h <<\EOF
8995 #define NEED_MBSTATE_T_DEF 1
8996 EOF
8997
8998         fi
8999 fi
9000
9001 ###   use option --disable-lp64 to allow long chtype
9002 case $cf_cv_abi_version in
9003 [345]*)
9004         default_with_lp64=no
9005         ;;
9006 *)
9007         default_with_lp64=yes
9008         ;;
9009 esac
9010
9011 echo "$as_me:9011: checking whether to enable _LP64 definition in curses.h" >&5
9012 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9013
9014 # Check whether --enable-lp64 or --disable-lp64 was given.
9015 if test "${enable_lp64+set}" = set; then
9016   enableval="$enable_lp64"
9017   with_lp64=$enableval
9018 else
9019   with_lp64=$default_with_lp64
9020 fi;
9021 echo "$as_me:9021: result: $with_lp64" >&5
9022 echo "${ECHO_T}$with_lp64" >&6
9023
9024 if test "$with_lp64" = yes ; then
9025         cf_cv_enable_lp64=1
9026 else
9027         cf_cv_enable_lp64=0
9028 fi
9029
9030 # Check whether --enable-largefile or --disable-largefile was given.
9031 if test "${enable_largefile+set}" = set; then
9032   enableval="$enable_largefile"
9033
9034 fi;
9035 if test "$enable_largefile" != no; then
9036
9037   echo "$as_me:9037: checking for special C compiler options needed for large files" >&5
9038 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9039 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9040   echo $ECHO_N "(cached) $ECHO_C" >&6
9041 else
9042   ac_cv_sys_largefile_CC=no
9043      if test "$GCC" != yes; then
9044        ac_save_CC=$CC
9045        while :; do
9046          # IRIX 6.2 and later do not support large files by default,
9047          # so use the C compiler's -n32 option if that helps.
9048          cat >conftest.$ac_ext <<_ACEOF
9049 #line 9049 "configure"
9050 #include "confdefs.h"
9051 #include <sys/types.h>
9052  /* Check that off_t can represent 2**63 - 1 correctly.
9053     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9054     since some C++ compilers masquerading as C compilers
9055     incorrectly reject 9223372036854775807.  */
9056 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9057   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9058                        && LARGE_OFF_T % 2147483647 == 1)
9059                       ? 1 : -1];
9060 int
9061 main ()
9062 {
9063
9064   ;
9065   return 0;
9066 }
9067 _ACEOF
9068          rm -f conftest.$ac_objext
9069 if { (eval echo "$as_me:9069: \"$ac_compile\"") >&5
9070   (eval $ac_compile) 2>&5
9071   ac_status=$?
9072   echo "$as_me:9072: \$? = $ac_status" >&5
9073   (exit $ac_status); } &&
9074          { ac_try='test -s conftest.$ac_objext'
9075   { (eval echo "$as_me:9075: \"$ac_try\"") >&5
9076   (eval $ac_try) 2>&5
9077   ac_status=$?
9078   echo "$as_me:9078: \$? = $ac_status" >&5
9079   (exit $ac_status); }; }; then
9080   break
9081 else
9082   echo "$as_me: failed program was:" >&5
9083 cat conftest.$ac_ext >&5
9084 fi
9085 rm -f conftest.$ac_objext
9086          CC="$CC -n32"
9087          rm -f conftest.$ac_objext
9088 if { (eval echo "$as_me:9088: \"$ac_compile\"") >&5
9089   (eval $ac_compile) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); } &&
9093          { ac_try='test -s conftest.$ac_objext'
9094   { (eval echo "$as_me:9094: \"$ac_try\"") >&5
9095   (eval $ac_try) 2>&5
9096   ac_status=$?
9097   echo "$as_me:9097: \$? = $ac_status" >&5
9098   (exit $ac_status); }; }; then
9099   ac_cv_sys_largefile_CC=' -n32'; break
9100 else
9101   echo "$as_me: failed program was:" >&5
9102 cat conftest.$ac_ext >&5
9103 fi
9104 rm -f conftest.$ac_objext
9105          break
9106        done
9107        CC=$ac_save_CC
9108        rm -f conftest.$ac_ext
9109     fi
9110 fi
9111 echo "$as_me:9111: result: $ac_cv_sys_largefile_CC" >&5
9112 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9113   if test "$ac_cv_sys_largefile_CC" != no; then
9114     CC=$CC$ac_cv_sys_largefile_CC
9115   fi
9116
9117   echo "$as_me:9117: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9118 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9119 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9120   echo $ECHO_N "(cached) $ECHO_C" >&6
9121 else
9122   while :; do
9123   ac_cv_sys_file_offset_bits=no
9124   cat >conftest.$ac_ext <<_ACEOF
9125 #line 9125 "configure"
9126 #include "confdefs.h"
9127 #include <sys/types.h>
9128  /* Check that off_t can represent 2**63 - 1 correctly.
9129     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9130     since some C++ compilers masquerading as C compilers
9131     incorrectly reject 9223372036854775807.  */
9132 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9133   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9134                        && LARGE_OFF_T % 2147483647 == 1)
9135                       ? 1 : -1];
9136 int
9137 main ()
9138 {
9139
9140   ;
9141   return 0;
9142 }
9143 _ACEOF
9144 rm -f conftest.$ac_objext
9145 if { (eval echo "$as_me:9145: \"$ac_compile\"") >&5
9146   (eval $ac_compile) 2>&5
9147   ac_status=$?
9148   echo "$as_me:9148: \$? = $ac_status" >&5
9149   (exit $ac_status); } &&
9150          { ac_try='test -s conftest.$ac_objext'
9151   { (eval echo "$as_me:9151: \"$ac_try\"") >&5
9152   (eval $ac_try) 2>&5
9153   ac_status=$?
9154   echo "$as_me:9154: \$? = $ac_status" >&5
9155   (exit $ac_status); }; }; then
9156   break
9157 else
9158   echo "$as_me: failed program was:" >&5
9159 cat conftest.$ac_ext >&5
9160 fi
9161 rm -f conftest.$ac_objext conftest.$ac_ext
9162   cat >conftest.$ac_ext <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165 #define _FILE_OFFSET_BITS 64
9166 #include <sys/types.h>
9167  /* Check that off_t can represent 2**63 - 1 correctly.
9168     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9169     since some C++ compilers masquerading as C compilers
9170     incorrectly reject 9223372036854775807.  */
9171 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9172   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9173                        && LARGE_OFF_T % 2147483647 == 1)
9174                       ? 1 : -1];
9175 int
9176 main ()
9177 {
9178
9179   ;
9180   return 0;
9181 }
9182 _ACEOF
9183 rm -f conftest.$ac_objext
9184 if { (eval echo "$as_me:9184: \"$ac_compile\"") >&5
9185   (eval $ac_compile) 2>&5
9186   ac_status=$?
9187   echo "$as_me:9187: \$? = $ac_status" >&5
9188   (exit $ac_status); } &&
9189          { ac_try='test -s conftest.$ac_objext'
9190   { (eval echo "$as_me:9190: \"$ac_try\"") >&5
9191   (eval $ac_try) 2>&5
9192   ac_status=$?
9193   echo "$as_me:9193: \$? = $ac_status" >&5
9194   (exit $ac_status); }; }; then
9195   ac_cv_sys_file_offset_bits=64; break
9196 else
9197   echo "$as_me: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9199 fi
9200 rm -f conftest.$ac_objext conftest.$ac_ext
9201   break
9202 done
9203 fi
9204 echo "$as_me:9204: result: $ac_cv_sys_file_offset_bits" >&5
9205 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9206 if test "$ac_cv_sys_file_offset_bits" != no; then
9207
9208 cat >>confdefs.h <<EOF
9209 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9210 EOF
9211
9212 fi
9213 rm -rf conftest*
9214   echo "$as_me:9214: checking for _LARGE_FILES value needed for large files" >&5
9215 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9216 if test "${ac_cv_sys_large_files+set}" = set; then
9217   echo $ECHO_N "(cached) $ECHO_C" >&6
9218 else
9219   while :; do
9220   ac_cv_sys_large_files=no
9221   cat >conftest.$ac_ext <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9224 #include <sys/types.h>
9225  /* Check that off_t can represent 2**63 - 1 correctly.
9226     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9227     since some C++ compilers masquerading as C compilers
9228     incorrectly reject 9223372036854775807.  */
9229 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9230   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9231                        && LARGE_OFF_T % 2147483647 == 1)
9232                       ? 1 : -1];
9233 int
9234 main ()
9235 {
9236
9237   ;
9238   return 0;
9239 }
9240 _ACEOF
9241 rm -f conftest.$ac_objext
9242 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243   (eval $ac_compile) 2>&5
9244   ac_status=$?
9245   echo "$as_me:9245: \$? = $ac_status" >&5
9246   (exit $ac_status); } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   break
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 fi
9258 rm -f conftest.$ac_objext conftest.$ac_ext
9259   cat >conftest.$ac_ext <<_ACEOF
9260 #line 9260 "configure"
9261 #include "confdefs.h"
9262 #define _LARGE_FILES 1
9263 #include <sys/types.h>
9264  /* Check that off_t can represent 2**63 - 1 correctly.
9265     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9266     since some C++ compilers masquerading as C compilers
9267     incorrectly reject 9223372036854775807.  */
9268 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9269   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9270                        && LARGE_OFF_T % 2147483647 == 1)
9271                       ? 1 : -1];
9272 int
9273 main ()
9274 {
9275
9276   ;
9277   return 0;
9278 }
9279 _ACEOF
9280 rm -f conftest.$ac_objext
9281 if { (eval echo "$as_me:9281: \"$ac_compile\"") >&5
9282   (eval $ac_compile) 2>&5
9283   ac_status=$?
9284   echo "$as_me:9284: \$? = $ac_status" >&5
9285   (exit $ac_status); } &&
9286          { ac_try='test -s conftest.$ac_objext'
9287   { (eval echo "$as_me:9287: \"$ac_try\"") >&5
9288   (eval $ac_try) 2>&5
9289   ac_status=$?
9290   echo "$as_me:9290: \$? = $ac_status" >&5
9291   (exit $ac_status); }; }; then
9292   ac_cv_sys_large_files=1; break
9293 else
9294   echo "$as_me: failed program was:" >&5
9295 cat conftest.$ac_ext >&5
9296 fi
9297 rm -f conftest.$ac_objext conftest.$ac_ext
9298   break
9299 done
9300 fi
9301 echo "$as_me:9301: result: $ac_cv_sys_large_files" >&5
9302 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9303 if test "$ac_cv_sys_large_files" != no; then
9304
9305 cat >>confdefs.h <<EOF
9306 #define _LARGE_FILES $ac_cv_sys_large_files
9307 EOF
9308
9309 fi
9310 rm -rf conftest*
9311 fi
9312
9313     if test "$enable_largefile" != no ; then
9314         echo "$as_me:9314: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9315 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9316 if test "${ac_cv_sys_largefile_source+set}" = set; then
9317   echo $ECHO_N "(cached) $ECHO_C" >&6
9318 else
9319   while :; do
9320   ac_cv_sys_largefile_source=no
9321   cat >conftest.$ac_ext <<_ACEOF
9322 #line 9322 "configure"
9323 #include "confdefs.h"
9324 #include <stdio.h>
9325 int
9326 main ()
9327 {
9328 return !fseeko;
9329   ;
9330   return 0;
9331 }
9332 _ACEOF
9333 rm -f conftest.$ac_objext
9334 if { (eval echo "$as_me:9334: \"$ac_compile\"") >&5
9335   (eval $ac_compile) 2>&5
9336   ac_status=$?
9337   echo "$as_me:9337: \$? = $ac_status" >&5
9338   (exit $ac_status); } &&
9339          { ac_try='test -s conftest.$ac_objext'
9340   { (eval echo "$as_me:9340: \"$ac_try\"") >&5
9341   (eval $ac_try) 2>&5
9342   ac_status=$?
9343   echo "$as_me:9343: \$? = $ac_status" >&5
9344   (exit $ac_status); }; }; then
9345   break
9346 else
9347   echo "$as_me: failed program was:" >&5
9348 cat conftest.$ac_ext >&5
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351   cat >conftest.$ac_ext <<_ACEOF
9352 #line 9352 "configure"
9353 #include "confdefs.h"
9354 #define _LARGEFILE_SOURCE 1
9355 #include <stdio.h>
9356 int
9357 main ()
9358 {
9359 return !fseeko;
9360   ;
9361   return 0;
9362 }
9363 _ACEOF
9364 rm -f conftest.$ac_objext
9365 if { (eval echo "$as_me:9365: \"$ac_compile\"") >&5
9366   (eval $ac_compile) 2>&5
9367   ac_status=$?
9368   echo "$as_me:9368: \$? = $ac_status" >&5
9369   (exit $ac_status); } &&
9370          { ac_try='test -s conftest.$ac_objext'
9371   { (eval echo "$as_me:9371: \"$ac_try\"") >&5
9372   (eval $ac_try) 2>&5
9373   ac_status=$?
9374   echo "$as_me:9374: \$? = $ac_status" >&5
9375   (exit $ac_status); }; }; then
9376   ac_cv_sys_largefile_source=1; break
9377 else
9378   echo "$as_me: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 fi
9381 rm -f conftest.$ac_objext conftest.$ac_ext
9382   break
9383 done
9384 fi
9385 echo "$as_me:9385: result: $ac_cv_sys_largefile_source" >&5
9386 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9387 if test "$ac_cv_sys_largefile_source" != no; then
9388
9389 cat >>confdefs.h <<EOF
9390 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9391 EOF
9392
9393 fi
9394 rm -rf conftest*
9395
9396 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9397 # in glibc 2.1.3, but that breaks too many other things.
9398 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9399 echo "$as_me:9399: checking for fseeko" >&5
9400 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9401 if test "${ac_cv_func_fseeko+set}" = set; then
9402   echo $ECHO_N "(cached) $ECHO_C" >&6
9403 else
9404   cat >conftest.$ac_ext <<_ACEOF
9405 #line 9405 "configure"
9406 #include "confdefs.h"
9407 #include <stdio.h>
9408 int
9409 main ()
9410 {
9411 return fseeko && fseeko (stdin, 0, 0);
9412   ;
9413   return 0;
9414 }
9415 _ACEOF
9416 rm -f conftest.$ac_objext conftest$ac_exeext
9417 if { (eval echo "$as_me:9417: \"$ac_link\"") >&5
9418   (eval $ac_link) 2>&5
9419   ac_status=$?
9420   echo "$as_me:9420: \$? = $ac_status" >&5
9421   (exit $ac_status); } &&
9422          { ac_try='test -s conftest$ac_exeext'
9423   { (eval echo "$as_me:9423: \"$ac_try\"") >&5
9424   (eval $ac_try) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); }; }; then
9428   ac_cv_func_fseeko=yes
9429 else
9430   echo "$as_me: failed program was:" >&5
9431 cat conftest.$ac_ext >&5
9432 ac_cv_func_fseeko=no
9433 fi
9434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9435 fi
9436 echo "$as_me:9436: result: $ac_cv_func_fseeko" >&5
9437 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9438 if test $ac_cv_func_fseeko = yes; then
9439
9440 cat >>confdefs.h <<\EOF
9441 #define HAVE_FSEEKO 1
9442 EOF
9443
9444 fi
9445
9446         # Normally we would collect these definitions in the config.h,
9447         # but (like _XOPEN_SOURCE), some environments rely on having these
9448         # defined before any of the system headers are included.  Another
9449         # case comes up with C++, e.g., on AIX the compiler compiles the
9450         # header files by themselves before looking at the body files it is
9451         # told to compile.  For ncurses, those header files do not include
9452         # the config.h
9453         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9454         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9455         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9456
9457         echo "$as_me:9457: checking whether to use struct dirent64" >&5
9458 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9459 if test "${cf_cv_struct_dirent64+set}" = set; then
9460   echo $ECHO_N "(cached) $ECHO_C" >&6
9461 else
9462
9463                 cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9466
9467 #include <sys/types.h>
9468 #include <dirent.h>
9469
9470 int
9471 main ()
9472 {
9473
9474                 /* if transitional largefile support is setup, this is true */
9475                 extern struct dirent64 * readdir(DIR *);
9476                 struct dirent64 *x = readdir((DIR *)0);
9477                 struct dirent *y = readdir((DIR *)0);
9478                 int z = x - y;
9479
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext
9485 if { (eval echo "$as_me:9485: \"$ac_compile\"") >&5
9486   (eval $ac_compile) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); } &&
9490          { ac_try='test -s conftest.$ac_objext'
9491   { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9492   (eval $ac_try) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; }; then
9496   cf_cv_struct_dirent64=yes
9497 else
9498   echo "$as_me: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9500 cf_cv_struct_dirent64=no
9501 fi
9502 rm -f conftest.$ac_objext conftest.$ac_ext
9503
9504 fi
9505 echo "$as_me:9505: result: $cf_cv_struct_dirent64" >&5
9506 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9507         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9508 #define HAVE_STRUCT_DIRENT64 1
9509 EOF
9510
9511     fi
9512
9513 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9514 echo "$as_me:9514: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9515 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9516
9517 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9518 if test "${enable_tparm_varargs+set}" = set; then
9519   enableval="$enable_tparm_varargs"
9520   with_tparm_varargs=$enableval
9521 else
9522   with_tparm_varargs=yes
9523 fi;
9524 echo "$as_me:9524: result: $with_tparm_varargs" >&5
9525 echo "${ECHO_T}$with_tparm_varargs" >&6
9526 NCURSES_TPARM_VARARGS=0
9527 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9528
9529 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9530 if test "$with_ticlib" != no ; then
9531 echo "$as_me:9531: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9532 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9533
9534 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9535 if test "${enable_tic_depends+set}" = set; then
9536   enableval="$enable_tic_depends"
9537   with_tic_depends=$enableval
9538 else
9539   with_tic_depends=yes
9540 fi;
9541 echo "$as_me:9541: result: $with_tic_depends" >&5
9542 echo "${ECHO_T}$with_tic_depends" >&6
9543 else
9544         with_tic_depends=no
9545 fi
9546
9547 ###   use option --with-bool to override bool's type
9548 echo "$as_me:9548: checking for type of bool" >&5
9549 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9550
9551 # Check whether --with-bool or --without-bool was given.
9552 if test "${with_bool+set}" = set; then
9553   withval="$with_bool"
9554   NCURSES_BOOL="$withval"
9555 else
9556   NCURSES_BOOL=auto
9557 fi;
9558 echo "$as_me:9558: result: $NCURSES_BOOL" >&5
9559 echo "${ECHO_T}$NCURSES_BOOL" >&6
9560
9561 echo "$as_me:9561: checking for alternate terminal capabilities file" >&5
9562 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9563
9564 # Check whether --with-caps or --without-caps was given.
9565 if test "${with_caps+set}" = set; then
9566   withval="$with_caps"
9567   TERMINFO_CAPS=Caps.$withval
9568 else
9569   TERMINFO_CAPS=Caps
9570 fi;
9571 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9572 echo "$as_me:9572: result: $TERMINFO_CAPS" >&5
9573 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9574
9575 ###   use option --with-chtype to override chtype's type
9576 echo "$as_me:9576: checking for type of chtype" >&5
9577 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9578
9579 # Check whether --with-chtype or --without-chtype was given.
9580 if test "${with_chtype+set}" = set; then
9581   withval="$with_chtype"
9582   NCURSES_CHTYPE="$withval"
9583 else
9584   NCURSES_CHTYPE=auto
9585 fi;
9586 echo "$as_me:9586: result: $NCURSES_CHTYPE" >&5
9587 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9588
9589 ###   use option --with-ospeed to override ospeed's type
9590 echo "$as_me:9590: checking for type of ospeed" >&5
9591 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9592
9593 # Check whether --with-ospeed or --without-ospeed was given.
9594 if test "${with_ospeed+set}" = set; then
9595   withval="$with_ospeed"
9596   NCURSES_OSPEED="$withval"
9597 else
9598   NCURSES_OSPEED=short
9599 fi;
9600 echo "$as_me:9600: result: $NCURSES_OSPEED" >&5
9601 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9602
9603 ###   use option --with-mmask-t to override mmask_t's type
9604 echo "$as_me:9604: checking for type of mmask_t" >&5
9605 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9606
9607 # Check whether --with-mmask-t or --without-mmask-t was given.
9608 if test "${with_mmask_t+set}" = set; then
9609   withval="$with_mmask_t"
9610   NCURSES_MMASK_T="$withval"
9611 else
9612   NCURSES_MMASK_T=auto
9613 fi;
9614 echo "$as_me:9614: result: $NCURSES_MMASK_T" >&5
9615 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9616
9617 ###   use option --with-ccharw-max to override CCHARW_MAX size
9618 echo "$as_me:9618: checking for size CCHARW_MAX" >&5
9619 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9620
9621 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9622 if test "${with_ccharw_max+set}" = set; then
9623   withval="$with_ccharw_max"
9624   NCURSES_CCHARW_MAX="$withval"
9625 else
9626   NCURSES_CCHARW_MAX=5
9627 fi;
9628 echo "$as_me:9628: result: $NCURSES_CCHARW_MAX" >&5
9629 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9630
9631 ### Enable compiling-in rcs id's
9632 echo "$as_me:9632: checking if RCS identifiers should be compiled-in" >&5
9633 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9634
9635 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9636 if test "${with_rcs_ids+set}" = set; then
9637   withval="$with_rcs_ids"
9638   with_rcs_ids=$withval
9639 else
9640   with_rcs_ids=no
9641 fi;
9642 echo "$as_me:9642: result: $with_rcs_ids" >&5
9643 echo "${ECHO_T}$with_rcs_ids" >&6
9644 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9645 #define USE_RCS_IDS 1
9646 EOF
9647
9648 ###############################################################################
9649
9650 echo "$as_me:9650: checking format of man-pages" >&5
9651 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9652
9653 # Check whether --with-manpage-format or --without-manpage-format was given.
9654 if test "${with_manpage_format+set}" = set; then
9655   withval="$with_manpage_format"
9656   MANPAGE_FORMAT=$withval
9657 else
9658   MANPAGE_FORMAT=unknown
9659 fi;
9660
9661 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9662 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9663
9664 cf_unknown=
9665
9666 case $MANPAGE_FORMAT in
9667 unknown)
9668   if test -z "$MANPATH" ; then
9669     MANPATH="/usr/man:/usr/share/man"
9670   fi
9671
9672   # look for the 'date' man-page (it's most likely to be installed!)
9673   MANPAGE_FORMAT=
9674   cf_preform=no
9675   cf_catonly=yes
9676   cf_example=date
9677
9678   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9679   for cf_dir in $MANPATH; do
9680     test -z "$cf_dir" && cf_dir=/usr/man
9681     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
9682     do
9683       cf_test=`echo $cf_name | sed -e 's/*//'`
9684       if test "x$cf_test" = "x$cf_name" ; then
9685
9686         case "$cf_name" in
9687         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9688         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9689         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9690         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9691         esac
9692
9693         case "$cf_name" in
9694         $cf_dir/man*)
9695           cf_catonly=no
9696           ;;
9697         $cf_dir/cat*)
9698           cf_preform=yes
9699           ;;
9700         esac
9701         break
9702       fi
9703
9704       # if we found a match in either man* or cat*, stop looking
9705       if test -n "$MANPAGE_FORMAT" ; then
9706         cf_found=no
9707         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9708         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9709         case "$cf_name" in
9710         $cf_dir/cat*)
9711           cf_found=yes
9712           ;;
9713         esac
9714         test $cf_found=yes && break
9715       fi
9716     done
9717     # only check the first directory in $MANPATH where we find manpages
9718     if test -n "$MANPAGE_FORMAT" ; then
9719        break
9720     fi
9721   done
9722   # if we did not find the example, just assume it is normal
9723   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9724   IFS="$ac_save_ifs"
9725   ;;
9726 *)
9727   for cf_option in $MANPAGE_FORMAT; do
9728      case $cf_option in #(vi
9729      gzip|compress|BSDI|normal|formatted|catonly)
9730        ;;
9731      *)
9732        cf_unknown="$cf_unknown $cf_option"
9733        ;;
9734      esac
9735   done
9736   ;;
9737 esac
9738
9739 echo "$as_me:9739: result: $MANPAGE_FORMAT" >&5
9740 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9741 if test -n "$cf_unknown" ; then
9742   { echo "$as_me:9742: WARNING: Unexpected manpage-format $cf_unknown" >&5
9743 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9744 fi
9745
9746 echo "$as_me:9746: checking for manpage renaming" >&5
9747 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9748
9749 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9750 if test "${with_manpage_renames+set}" = set; then
9751   withval="$with_manpage_renames"
9752   MANPAGE_RENAMES=$withval
9753 else
9754   MANPAGE_RENAMES=yes
9755 fi;
9756
9757 case ".$MANPAGE_RENAMES" in #(vi
9758 .no) #(vi
9759   ;;
9760 .|.yes)
9761   # Debian 'man' program?
9762   if test -f /etc/debian_version ; then
9763     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9764   else
9765     MANPAGE_RENAMES=no
9766   fi
9767   ;;
9768 esac
9769
9770 if test "$MANPAGE_RENAMES" != no ; then
9771   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9772     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9773   elif test ! -f $MANPAGE_RENAMES ; then
9774     { { echo "$as_me:9774: error: not a filename: $MANPAGE_RENAMES" >&5
9775 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9776    { (exit 1); exit 1; }; }
9777   fi
9778
9779   test ! -d man && mkdir man
9780
9781   # Construct a sed-script to perform renaming within man-pages
9782   if test -n "$MANPAGE_RENAMES" ; then
9783     test ! -d man && mkdir man
9784     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9785   fi
9786 fi
9787
9788 echo "$as_me:9788: result: $MANPAGE_RENAMES" >&5
9789 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9790
9791 echo "$as_me:9791: checking if manpage aliases will be installed" >&5
9792 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9793
9794 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9795 if test "${with_manpage_aliases+set}" = set; then
9796   withval="$with_manpage_aliases"
9797   MANPAGE_ALIASES=$withval
9798 else
9799   MANPAGE_ALIASES=yes
9800 fi;
9801
9802 echo "$as_me:9802: result: $MANPAGE_ALIASES" >&5
9803 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9804
9805 case "x$LN_S" in #(vi
9806 xln*) #(vi
9807         cf_use_symlinks=yes
9808         ;;
9809 *)
9810         cf_use_symlinks=no
9811         ;;
9812 esac
9813
9814 MANPAGE_SYMLINKS=no
9815 if test "$MANPAGE_ALIASES" = yes ; then
9816 echo "$as_me:9816: checking if manpage symlinks should be used" >&5
9817 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9818
9819 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9820 if test "${with_manpage_symlinks+set}" = set; then
9821   withval="$with_manpage_symlinks"
9822   MANPAGE_SYMLINKS=$withval
9823 else
9824   MANPAGE_SYMLINKS=$cf_use_symlinks
9825 fi;
9826
9827 if test "$$cf_use_symlinks" = no; then
9828 if test "$MANPAGE_SYMLINKS" = yes ; then
9829         { echo "$as_me:9829: WARNING: cannot make symlinks" >&5
9830 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9831         MANPAGE_SYMLINKS=no
9832 fi
9833 fi
9834
9835 echo "$as_me:9835: result: $MANPAGE_SYMLINKS" >&5
9836 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9837 fi
9838
9839 echo "$as_me:9839: checking for manpage tbl" >&5
9840 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9841
9842 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9843 if test "${with_manpage_tbl+set}" = set; then
9844   withval="$with_manpage_tbl"
9845   MANPAGE_TBL=$withval
9846 else
9847   MANPAGE_TBL=no
9848 fi;
9849
9850 echo "$as_me:9850: result: $MANPAGE_TBL" >&5
9851 echo "${ECHO_T}$MANPAGE_TBL" >&6
9852
9853   if test "$prefix" = "NONE" ; then
9854      cf_prefix="$ac_default_prefix"
9855   else
9856      cf_prefix="$prefix"
9857   fi
9858
9859   case "$MANPAGE_FORMAT" in # (vi
9860   *catonly*) # (vi
9861     cf_format=yes
9862     cf_inboth=no
9863     ;;
9864   *formatted*) # (vi
9865     cf_format=yes
9866     cf_inboth=yes
9867     ;;
9868   *)
9869     cf_format=no
9870     cf_inboth=no
9871     ;;
9872   esac
9873
9874 test ! -d man && mkdir man
9875
9876 cf_so_strip=
9877 cf_compress=
9878 case "$MANPAGE_FORMAT" in #(vi
9879 *compress*) #(vi
9880         cf_so_strip="Z"
9881         cf_compress=compress
9882   ;;
9883 *gzip*)
9884         cf_so_strip="gz"
9885         cf_compress=gzip
9886   ;;
9887 esac
9888
9889 cf_edit_man=./edit_man.sh
9890 cf_man_alias=`pwd`/man_alias.sed
9891
9892 cat >$cf_edit_man <<CF_EOF
9893 #! /bin/sh
9894 # this script is generated by the configure-script CF_MAN_PAGES macro.
9895
9896 prefix="$cf_prefix"
9897 datadir="$datadir"
9898
9899 NCURSES_MAJOR="$NCURSES_MAJOR"
9900 NCURSES_MINOR="$NCURSES_MINOR"
9901 NCURSES_PATCH="$NCURSES_PATCH"
9902
9903 NCURSES_OSPEED="$NCURSES_OSPEED"
9904 TERMINFO="$TERMINFO"
9905
9906 INSTALL="$INSTALL"
9907 INSTALL_DATA="$INSTALL_DATA"
9908
9909 transform="$program_transform_name"
9910
9911 TMP=\${TMPDIR:=/tmp}/man\$\$
9912 trap "rm -f \$TMP" 0 1 2 5 15
9913
9914 form=\$1
9915 shift || exit 1
9916
9917 verb=\$1
9918 shift || exit 1
9919
9920 mandir=\$1
9921 shift || exit 1
9922
9923 srcdir=\$1
9924 top_srcdir=\$srcdir/..
9925 shift || exit 1
9926
9927 if test "\$form" = normal ; then
9928         if test "$cf_format" = yes ; then
9929         if test "$cf_inboth" = no ; then
9930                 sh \$0 format \$verb \$mandir \$srcdir \$*
9931                 exit $?
9932         fi
9933         fi
9934         cf_subdir=\$mandir/man
9935         cf_tables=$MANPAGE_TBL
9936 else
9937         cf_subdir=\$mandir/cat
9938         cf_tables=yes
9939 fi
9940
9941 # process the list of source-files
9942 for i in \$* ; do
9943 case \$i in #(vi
9944 *.orig|*.rej) ;; #(vi
9945 *.[0-9]*)
9946         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9947         if test \$verb = installing ; then
9948         if test ! -d \$cf_subdir\${section} ; then
9949                 mkdir -p \$cf_subdir\$section
9950         fi
9951         fi
9952
9953         # replace variables in man page
9954         if test ! -f $cf_man_alias ; then
9955 cat >>$cf_man_alias <<-CF_EOF2
9956                 s,@DATADIR@,\$datadir,g
9957                 s,@TERMINFO@,\$TERMINFO,g
9958                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9959                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9960                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9961                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9962 CF_EOF
9963
9964         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9965         do
9966                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9967                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9968 cat >>$cf_edit_man <<-CF_EOF
9969                 s,@$cf_NAME@,$cf_name,g
9970 CF_EOF
9971         done
9972
9973 cat >>$cf_edit_man <<CF_EOF
9974 CF_EOF2
9975                 echo "...made $cf_man_alias"
9976         fi
9977
9978         aliases=
9979         cf_source=\`basename \$i\`
9980         inalias=\$cf_source
9981         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9982         if test ! -f \$inalias ; then
9983                 echo .. skipped \$cf_source
9984                 continue
9985         fi
9986 CF_EOF
9987
9988 if test "$MANPAGE_ALIASES" != no ; then
9989 cat >>$cf_edit_man <<CF_EOF
9990         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9991 CF_EOF
9992 fi
9993
9994 if test "$MANPAGE_RENAMES" = no ; then
9995 cat >>$cf_edit_man <<CF_EOF
9996         # perform program transformations for section 1 man pages
9997         if test \$section = 1 ; then
9998                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9999         else
10000                 cf_target=\$cf_subdir\${section}/\$cf_source
10001         fi
10002 CF_EOF
10003 else
10004 cat >>$cf_edit_man <<CF_EOF
10005         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10006         if test -z "\$cf_target" ; then
10007                 echo '? missing rename for '\$cf_source
10008                 cf_target="\$cf_source"
10009         fi
10010         cf_target="\$cf_subdir\${section}/\${cf_target}"
10011
10012 CF_EOF
10013 fi
10014
10015 cat >>$cf_edit_man <<CF_EOF
10016         sed     -f $cf_man_alias \\
10017 CF_EOF
10018
10019 if test -f $MANPAGE_RENAMES ; then
10020 cat >>$cf_edit_man <<CF_EOF
10021                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10022 CF_EOF
10023 else
10024 cat >>$cf_edit_man <<CF_EOF
10025                 < \$i >\$TMP
10026 CF_EOF
10027 fi
10028
10029 cat >>$cf_edit_man <<CF_EOF
10030 if test \$cf_tables = yes ; then
10031         tbl \$TMP >\$TMP.out
10032         mv \$TMP.out \$TMP
10033 fi
10034 CF_EOF
10035
10036 if test $with_curses_h != yes ; then
10037 cat >>$cf_edit_man <<CF_EOF
10038         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10039         mv \$TMP.out \$TMP
10040 CF_EOF
10041 fi
10042
10043 cat >>$cf_edit_man <<CF_EOF
10044         if test \$form = format ; then
10045                 nroff -man \$TMP >\$TMP.out
10046                 mv \$TMP.out \$TMP
10047         fi
10048 CF_EOF
10049
10050 if test -n "$cf_compress" ; then
10051 cat >>$cf_edit_man <<CF_EOF
10052         if test \$verb = installing ; then
10053         if ( $cf_compress -f \$TMP )
10054         then
10055                 mv \$TMP.$cf_so_strip \$TMP
10056         fi
10057         fi
10058         cf_target="\$cf_target.$cf_so_strip"
10059 CF_EOF
10060 fi
10061
10062 case "$MANPAGE_FORMAT" in #(vi
10063 *BSDI*)
10064 cat >>$cf_edit_man <<CF_EOF
10065         if test \$form = format ; then
10066                 # BSDI installs only .0 suffixes in the cat directories
10067                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10068         fi
10069 CF_EOF
10070   ;;
10071 esac
10072
10073 cat >>$cf_edit_man <<CF_EOF
10074         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10075         if test \$verb = installing ; then
10076                 echo \$verb \$cf_target
10077                 \$INSTALL_DATA \$TMP \$cf_target
10078                 test -d \$cf_subdir\${section} &&
10079                 test -n "\$aliases" && (
10080                         cd \$cf_subdir\${section} && (
10081                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10082                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10083                                 cf_target=\`basename \$cf_target\`
10084                                 for cf_alias in \$aliases
10085                                 do
10086                                         if test \$section = 1 ; then
10087                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10088                                         fi
10089
10090                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10091                                                 if test -f \$cf_alias\${suffix} ; then
10092                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10093                                                         then
10094                                                                 continue
10095                                                         fi
10096                                                 fi
10097                                                 echo .. \$verb alias \$cf_alias\${suffix}
10098 CF_EOF
10099 case "x$LN_S" in #(vi
10100 *-f) #(vi
10101 cat >>$cf_edit_man <<CF_EOF
10102                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10103 CF_EOF
10104         ;;
10105 *)
10106 cat >>$cf_edit_man <<CF_EOF
10107                                                 rm -f \$cf_alias\${suffix}
10108                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10109 CF_EOF
10110         ;;
10111 esac
10112 cat >>$cf_edit_man <<CF_EOF
10113                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10114                                                 echo ".so \$cf_source" >\$TMP
10115 CF_EOF
10116 if test -n "$cf_compress" ; then
10117 cat >>$cf_edit_man <<CF_EOF
10118                                                 if test -n "$cf_so_strip" ; then
10119                                                         $cf_compress -f \$TMP
10120                                                         mv \$TMP.$cf_so_strip \$TMP
10121                                                 fi
10122 CF_EOF
10123 fi
10124 cat >>$cf_edit_man <<CF_EOF
10125                                                 echo .. \$verb alias \$cf_alias\${suffix}
10126                                                 rm -f \$cf_alias\${suffix}
10127                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10128                                         fi
10129                                 done
10130                         )
10131                 )
10132         elif test \$verb = removing ; then
10133                 test -f \$cf_target && (
10134                         echo \$verb \$cf_target
10135                         rm -f \$cf_target
10136                 )
10137                 test -d \$cf_subdir\${section} &&
10138                 test -n "\$aliases" && (
10139                         cd \$cf_subdir\${section} && (
10140                                 for cf_alias in \$aliases
10141                                 do
10142                                         if test \$section = 1 ; then
10143                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10144                                         fi
10145
10146                                         echo .. \$verb alias \$cf_alias\${suffix}
10147                                         rm -f \$cf_alias\${suffix}
10148                                 done
10149                         )
10150                 )
10151         else
10152 #               echo ".hy 0"
10153                 cat \$TMP
10154         fi
10155         ;;
10156 esac
10157 done
10158
10159 if test $cf_inboth = yes ; then
10160 if test \$form != format ; then
10161         sh \$0 format \$verb \$mandir \$srcdir \$*
10162 fi
10163 fi
10164
10165 exit 0
10166 CF_EOF
10167 chmod 755 $cf_edit_man
10168
10169 ###############################################################################
10170
10171 ### Note that some functions (such as const) are normally disabled anyway.
10172 echo "$as_me:10172: checking if you want to build with function extensions" >&5
10173 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10174
10175 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10176 if test "${enable_ext_funcs+set}" = set; then
10177   enableval="$enable_ext_funcs"
10178   with_ext_funcs=$enableval
10179 else
10180   with_ext_funcs=yes
10181 fi;
10182 echo "$as_me:10182: result: $with_ext_funcs" >&5
10183 echo "${ECHO_T}$with_ext_funcs" >&6
10184 if test "$with_ext_funcs" = yes ; then
10185         NCURSES_EXT_FUNCS=1
10186         cat >>confdefs.h <<\EOF
10187 #define HAVE_ASSUME_DEFAULT_COLORS 1
10188 EOF
10189
10190         cat >>confdefs.h <<\EOF
10191 #define HAVE_CURSES_VERSION 1
10192 EOF
10193
10194         cat >>confdefs.h <<\EOF
10195 #define HAVE_HAS_KEY 1
10196 EOF
10197
10198         cat >>confdefs.h <<\EOF
10199 #define HAVE_RESIZETERM 1
10200 EOF
10201
10202         cat >>confdefs.h <<\EOF
10203 #define HAVE_RESIZE_TERM 1
10204 EOF
10205
10206         cat >>confdefs.h <<\EOF
10207 #define HAVE_TERM_ENTRY_H 1
10208 EOF
10209
10210         cat >>confdefs.h <<\EOF
10211 #define HAVE_USE_DEFAULT_COLORS 1
10212 EOF
10213
10214         cat >>confdefs.h <<\EOF
10215 #define HAVE_USE_SCREEN 1
10216 EOF
10217
10218         cat >>confdefs.h <<\EOF
10219 #define HAVE_USE_WINDOW 1
10220 EOF
10221
10222         cat >>confdefs.h <<\EOF
10223 #define HAVE_WRESIZE 1
10224 EOF
10225
10226         cat >>confdefs.h <<\EOF
10227 #define NCURSES_EXT_FUNCS 1
10228 EOF
10229
10230         GENERATED_EXT_FUNCS=generated
10231 else
10232         NCURSES_EXT_FUNCS=0
10233         GENERATED_EXT_FUNCS=
10234 fi
10235
10236 echo "$as_me:10236: checking if you want to build with experimental SCREEN extensions" >&5
10237 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10238
10239 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10240 if test "${enable_sp_funcs+set}" = set; then
10241   enableval="$enable_sp_funcs"
10242   with_sp_funcs=$enableval
10243 else
10244   with_sp_funcs=no
10245 fi;
10246 echo "$as_me:10246: result: $with_sp_funcs" >&5
10247 echo "${ECHO_T}$with_sp_funcs" >&6
10248 if test "$with_sp_funcs" = yes ; then
10249         NCURSES_SP_FUNCS=1
10250         cat >>confdefs.h <<\EOF
10251 #define NCURSES_SP_FUNCS 1
10252 EOF
10253
10254         GENERATED_SP_FUNCS=generated
10255 else
10256         NCURSES_SP_FUNCS=0
10257         GENERATED_SP_FUNCS=
10258 fi
10259
10260 echo "$as_me:10260: checking if you want to build with experimental terminal-driver" >&5
10261 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10262
10263 # Check whether --enable-term-driver or --disable-term-driver was given.
10264 if test "${enable_term_driver+set}" = set; then
10265   enableval="$enable_term_driver"
10266   with_term_driver=$enableval
10267 else
10268   with_term_driver=no
10269 fi;
10270 echo "$as_me:10270: result: $with_term_driver" >&5
10271 echo "${ECHO_T}$with_term_driver" >&6
10272 if test "$with_term_driver" = yes ; then
10273         cat >>confdefs.h <<\EOF
10274 #define USE_TERM_DRIVER 1
10275 EOF
10276
10277         if test "$with_sp_funcs" != yes ; then
10278                 { { echo "$as_me:10278: error: The term-driver option relies upon sp-funcs" >&5
10279 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10280    { (exit 1); exit 1; }; }
10281         fi
10282 fi
10283
10284 ###   use option --enable-const to turn on use of const beyond that in XSI.
10285 echo "$as_me:10285: checking for extended use of const keyword" >&5
10286 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10287
10288 # Check whether --enable-const or --disable-const was given.
10289 if test "${enable_const+set}" = set; then
10290   enableval="$enable_const"
10291   with_ext_const=$enableval
10292 else
10293   with_ext_const=no
10294 fi;
10295 echo "$as_me:10295: result: $with_ext_const" >&5
10296 echo "${ECHO_T}$with_ext_const" >&6
10297 NCURSES_CONST='/*nothing*/'
10298 if test "$with_ext_const" = yes ; then
10299         NCURSES_CONST=const
10300 fi
10301
10302 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10303 echo "$as_me:10303: checking if you want to use extended colors" >&5
10304 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10305
10306 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10307 if test "${enable_ext_colors+set}" = set; then
10308   enableval="$enable_ext_colors"
10309   with_ext_colors=$enableval
10310 else
10311   with_ext_colors=no
10312 fi;
10313 echo "$as_me:10313: result: $with_ext_colors" >&5
10314 echo "${ECHO_T}$with_ext_colors" >&6
10315 NCURSES_EXT_COLORS=0
10316 if test "$with_ext_colors" = yes ; then
10317         if test "$with_widec" != yes ; then
10318                 { { echo "$as_me:10318: error: This option applies only to wide-character library" >&5
10319 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10320    { (exit 1); exit 1; }; }
10321         else
10322                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10323
10324 if test "${with_abi_version+set}" != set; then
10325         case $cf_cv_rel_version in
10326         5.*)
10327                 cf_cv_rel_version=6.0
10328                 cf_cv_abi_version=6
10329                 { echo "$as_me:10329: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10330 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10331                 ;;
10332         esac
10333 fi
10334
10335         fi
10336         NCURSES_EXT_COLORS=1
10337         cat >>confdefs.h <<\EOF
10338 #define NCURSES_EXT_COLORS 1
10339 EOF
10340
10341 fi
10342
10343 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10344 echo "$as_me:10344: checking if you want to use extended mouse encoding" >&5
10345 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10346
10347 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10348 if test "${enable_ext_mouse+set}" = set; then
10349   enableval="$enable_ext_mouse"
10350   with_ext_mouse=$enableval
10351 else
10352   with_ext_mouse=no
10353 fi;
10354 echo "$as_me:10354: result: $with_ext_mouse" >&5
10355 echo "${ECHO_T}$with_ext_mouse" >&6
10356 NCURSES_MOUSE_VERSION=1
10357 if test "$with_ext_mouse" = yes ; then
10358         NCURSES_MOUSE_VERSION=2
10359
10360 if test "${with_abi_version+set}" != set; then
10361         case $cf_cv_rel_version in
10362         5.*)
10363                 cf_cv_rel_version=6.0
10364                 cf_cv_abi_version=6
10365                 { echo "$as_me:10365: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10366 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10367                 ;;
10368         esac
10369 fi
10370
10371 fi
10372
10373 echo "$as_me:10373: checking if you want \$NCURSES_NO_PADDING code" >&5
10374 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10375
10376 # Check whether --enable-no-padding or --disable-no-padding was given.
10377 if test "${enable_no_padding+set}" = set; then
10378   enableval="$enable_no_padding"
10379   with_no_padding=$enableval
10380 else
10381   with_no_padding=$with_ext_funcs
10382 fi;
10383 echo "$as_me:10383: result: $with_no_padding" >&5
10384 echo "${ECHO_T}$with_no_padding" >&6
10385 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10386 #define NCURSES_NO_PADDING 1
10387 EOF
10388
10389 echo "$as_me:10389: checking for ANSI C header files" >&5
10390 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10391 if test "${ac_cv_header_stdc+set}" = set; then
10392   echo $ECHO_N "(cached) $ECHO_C" >&6
10393 else
10394   cat >conftest.$ac_ext <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397 #include <stdlib.h>
10398 #include <stdarg.h>
10399 #include <string.h>
10400 #include <float.h>
10401
10402 _ACEOF
10403 if { (eval echo "$as_me:10403: \"$ac_cpp conftest.$ac_ext\"") >&5
10404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10405   ac_status=$?
10406   egrep -v '^ *\+' conftest.er1 >conftest.err
10407   rm -f conftest.er1
10408   cat conftest.err >&5
10409   echo "$as_me:10409: \$? = $ac_status" >&5
10410   (exit $ac_status); } >/dev/null; then
10411   if test -s conftest.err; then
10412     ac_cpp_err=$ac_c_preproc_warn_flag
10413   else
10414     ac_cpp_err=
10415   fi
10416 else
10417   ac_cpp_err=yes
10418 fi
10419 if test -z "$ac_cpp_err"; then
10420   ac_cv_header_stdc=yes
10421 else
10422   echo "$as_me: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   ac_cv_header_stdc=no
10425 fi
10426 rm -f conftest.err conftest.$ac_ext
10427
10428 if test $ac_cv_header_stdc = yes; then
10429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10430   cat >conftest.$ac_ext <<_ACEOF
10431 #line 10431 "configure"
10432 #include "confdefs.h"
10433 #include <string.h>
10434
10435 _ACEOF
10436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10437   egrep "memchr" >/dev/null 2>&1; then
10438   :
10439 else
10440   ac_cv_header_stdc=no
10441 fi
10442 rm -rf conftest*
10443
10444 fi
10445
10446 if test $ac_cv_header_stdc = yes; then
10447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10448   cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451 #include <stdlib.h>
10452
10453 _ACEOF
10454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10455   egrep "free" >/dev/null 2>&1; then
10456   :
10457 else
10458   ac_cv_header_stdc=no
10459 fi
10460 rm -rf conftest*
10461
10462 fi
10463
10464 if test $ac_cv_header_stdc = yes; then
10465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10466   if test "$cross_compiling" = yes; then
10467   :
10468 else
10469   cat >conftest.$ac_ext <<_ACEOF
10470 #line 10470 "configure"
10471 #include "confdefs.h"
10472 #include <ctype.h>
10473 #if ((' ' & 0x0FF) == 0x020)
10474 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10475 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10476 #else
10477 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10478                      || ('j' <= (c) && (c) <= 'r') \
10479                      || ('s' <= (c) && (c) <= 'z'))
10480 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10481 #endif
10482
10483 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10484 int
10485 main ()
10486 {
10487   int i;
10488   for (i = 0; i < 256; i++)
10489     if (XOR (islower (i), ISLOWER (i))
10490         || toupper (i) != TOUPPER (i))
10491       $ac_main_return(2);
10492   $ac_main_return (0);
10493 }
10494 _ACEOF
10495 rm -f conftest$ac_exeext
10496 if { (eval echo "$as_me:10496: \"$ac_link\"") >&5
10497   (eval $ac_link) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10501   { (eval echo "$as_me:10501: \"$ac_try\"") >&5
10502   (eval $ac_try) 2>&5
10503   ac_status=$?
10504   echo "$as_me:10504: \$? = $ac_status" >&5
10505   (exit $ac_status); }; }; then
10506   :
10507 else
10508   echo "$as_me: program exited with status $ac_status" >&5
10509 echo "$as_me: failed program was:" >&5
10510 cat conftest.$ac_ext >&5
10511 ac_cv_header_stdc=no
10512 fi
10513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10514 fi
10515 fi
10516 fi
10517 echo "$as_me:10517: result: $ac_cv_header_stdc" >&5
10518 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10519 if test $ac_cv_header_stdc = yes; then
10520
10521 cat >>confdefs.h <<\EOF
10522 #define STDC_HEADERS 1
10523 EOF
10524
10525 fi
10526
10527 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10528
10529 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10530                   inttypes.h stdint.h unistd.h
10531 do
10532 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10533 echo "$as_me:10533: checking for $ac_header" >&5
10534 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10535 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10536   echo $ECHO_N "(cached) $ECHO_C" >&6
10537 else
10538   cat >conftest.$ac_ext <<_ACEOF
10539 #line 10539 "configure"
10540 #include "confdefs.h"
10541 $ac_includes_default
10542 #include <$ac_header>
10543 _ACEOF
10544 rm -f conftest.$ac_objext
10545 if { (eval echo "$as_me:10545: \"$ac_compile\"") >&5
10546   (eval $ac_compile) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit $ac_status); } &&
10550          { ac_try='test -s conftest.$ac_objext'
10551   { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552   (eval $ac_try) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit $ac_status); }; }; then
10556   eval "$as_ac_Header=yes"
10557 else
10558   echo "$as_me: failed program was:" >&5
10559 cat conftest.$ac_ext >&5
10560 eval "$as_ac_Header=no"
10561 fi
10562 rm -f conftest.$ac_objext conftest.$ac_ext
10563 fi
10564 echo "$as_me:10564: result: `eval echo '${'$as_ac_Header'}'`" >&5
10565 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10566 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10567   cat >>confdefs.h <<EOF
10568 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10569 EOF
10570
10571 fi
10572 done
10573
10574 echo "$as_me:10574: checking for signed char" >&5
10575 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10576 if test "${ac_cv_type_signed_char+set}" = set; then
10577   echo $ECHO_N "(cached) $ECHO_C" >&6
10578 else
10579   cat >conftest.$ac_ext <<_ACEOF
10580 #line 10580 "configure"
10581 #include "confdefs.h"
10582 $ac_includes_default
10583 int
10584 main ()
10585 {
10586 if ((signed char *) 0)
10587   return 0;
10588 if (sizeof (signed char))
10589   return 0;
10590   ;
10591   return 0;
10592 }
10593 _ACEOF
10594 rm -f conftest.$ac_objext
10595 if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5
10596   (eval $ac_compile) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); } &&
10600          { ac_try='test -s conftest.$ac_objext'
10601   { (eval echo "$as_me:10601: \"$ac_try\"") >&5
10602   (eval $ac_try) 2>&5
10603   ac_status=$?
10604   echo "$as_me:10604: \$? = $ac_status" >&5
10605   (exit $ac_status); }; }; then
10606   ac_cv_type_signed_char=yes
10607 else
10608   echo "$as_me: failed program was:" >&5
10609 cat conftest.$ac_ext >&5
10610 ac_cv_type_signed_char=no
10611 fi
10612 rm -f conftest.$ac_objext conftest.$ac_ext
10613 fi
10614 echo "$as_me:10614: result: $ac_cv_type_signed_char" >&5
10615 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10616
10617 echo "$as_me:10617: checking size of signed char" >&5
10618 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10619 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10620   echo $ECHO_N "(cached) $ECHO_C" >&6
10621 else
10622   if test "$ac_cv_type_signed_char" = yes; then
10623   if test "$cross_compiling" = yes; then
10624   # Depending upon the size, compute the lo and hi bounds.
10625 cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628 $ac_includes_default
10629 int
10630 main ()
10631 {
10632 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10633   ;
10634   return 0;
10635 }
10636 _ACEOF
10637 rm -f conftest.$ac_objext
10638 if { (eval echo "$as_me:10638: \"$ac_compile\"") >&5
10639   (eval $ac_compile) 2>&5
10640   ac_status=$?
10641   echo "$as_me:10641: \$? = $ac_status" >&5
10642   (exit $ac_status); } &&
10643          { ac_try='test -s conftest.$ac_objext'
10644   { (eval echo "$as_me:10644: \"$ac_try\"") >&5
10645   (eval $ac_try) 2>&5
10646   ac_status=$?
10647   echo "$as_me:10647: \$? = $ac_status" >&5
10648   (exit $ac_status); }; }; then
10649   ac_lo=0 ac_mid=0
10650   while :; do
10651     cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10654 $ac_includes_default
10655 int
10656 main ()
10657 {
10658 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 rm -f conftest.$ac_objext
10664 if { (eval echo "$as_me:10664: \"$ac_compile\"") >&5
10665   (eval $ac_compile) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); } &&
10669          { ac_try='test -s conftest.$ac_objext'
10670   { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671   (eval $ac_try) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); }; }; then
10675   ac_hi=$ac_mid; break
10676 else
10677   echo "$as_me: failed program was:" >&5
10678 cat conftest.$ac_ext >&5
10679 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10680 fi
10681 rm -f conftest.$ac_objext conftest.$ac_ext
10682   done
10683 else
10684   echo "$as_me: failed program was:" >&5
10685 cat conftest.$ac_ext >&5
10686 ac_hi=-1 ac_mid=-1
10687   while :; do
10688     cat >conftest.$ac_ext <<_ACEOF
10689 #line 10689 "configure"
10690 #include "confdefs.h"
10691 $ac_includes_default
10692 int
10693 main ()
10694 {
10695 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10696   ;
10697   return 0;
10698 }
10699 _ACEOF
10700 rm -f conftest.$ac_objext
10701 if { (eval echo "$as_me:10701: \"$ac_compile\"") >&5
10702   (eval $ac_compile) 2>&5
10703   ac_status=$?
10704   echo "$as_me:10704: \$? = $ac_status" >&5
10705   (exit $ac_status); } &&
10706          { ac_try='test -s conftest.$ac_objext'
10707   { (eval echo "$as_me:10707: \"$ac_try\"") >&5
10708   (eval $ac_try) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); }; }; then
10712   ac_lo=$ac_mid; break
10713 else
10714   echo "$as_me: failed program was:" >&5
10715 cat conftest.$ac_ext >&5
10716 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10717 fi
10718 rm -f conftest.$ac_objext conftest.$ac_ext
10719   done
10720 fi
10721 rm -f conftest.$ac_objext conftest.$ac_ext
10722 # Binary search between lo and hi bounds.
10723 while test "x$ac_lo" != "x$ac_hi"; do
10724   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10725   cat >conftest.$ac_ext <<_ACEOF
10726 #line 10726 "configure"
10727 #include "confdefs.h"
10728 $ac_includes_default
10729 int
10730 main ()
10731 {
10732 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -f conftest.$ac_objext
10738 if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
10739   (eval $ac_compile) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit $ac_status); } &&
10743          { ac_try='test -s conftest.$ac_objext'
10744   { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745   (eval $ac_try) 2>&5
10746   ac_status=$?
10747   echo "$as_me:10747: \$? = $ac_status" >&5
10748   (exit $ac_status); }; }; then
10749   ac_hi=$ac_mid
10750 else
10751   echo "$as_me: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 ac_lo=`expr $ac_mid + 1`
10754 fi
10755 rm -f conftest.$ac_objext conftest.$ac_ext
10756 done
10757 ac_cv_sizeof_signed_char=$ac_lo
10758 else
10759   if test "$cross_compiling" = yes; then
10760   { { echo "$as_me:10760: error: cannot run test program while cross compiling" >&5
10761 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10762    { (exit 1); exit 1; }; }
10763 else
10764   cat >conftest.$ac_ext <<_ACEOF
10765 #line 10765 "configure"
10766 #include "confdefs.h"
10767 $ac_includes_default
10768 int
10769 main ()
10770 {
10771 FILE *f = fopen ("conftest.val", "w");
10772 if (!f)
10773   $ac_main_return (1);
10774 fprintf (f, "%d", (sizeof (signed char)));
10775 fclose (f);
10776   ;
10777   return 0;
10778 }
10779 _ACEOF
10780 rm -f conftest$ac_exeext
10781 if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
10782   (eval $ac_link) 2>&5
10783   ac_status=$?
10784   echo "$as_me:10784: \$? = $ac_status" >&5
10785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10786   { (eval echo "$as_me:10786: \"$ac_try\"") >&5
10787   (eval $ac_try) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); }; }; then
10791   ac_cv_sizeof_signed_char=`cat conftest.val`
10792 else
10793   echo "$as_me: program exited with status $ac_status" >&5
10794 echo "$as_me: failed program was:" >&5
10795 cat conftest.$ac_ext >&5
10796 fi
10797 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10798 fi
10799 fi
10800 rm -f conftest.val
10801 else
10802   ac_cv_sizeof_signed_char=0
10803 fi
10804 fi
10805 echo "$as_me:10805: result: $ac_cv_sizeof_signed_char" >&5
10806 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10807 cat >>confdefs.h <<EOF
10808 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10809 EOF
10810
10811 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10812         NCURSES_SBOOL="signed char"
10813 else
10814         NCURSES_SBOOL="char"
10815 fi
10816 echo "$as_me:10816: checking if you want to use signed Boolean array in term.h" >&5
10817 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10818
10819 # Check whether --enable-signed-char or --disable-signed-char was given.
10820 if test "${enable_signed_char+set}" = set; then
10821   enableval="$enable_signed_char"
10822   with_signed_char=$enableval
10823 else
10824   with_signed_char=no
10825 fi;
10826 echo "$as_me:10826: result: $with_signed_char" >&5
10827 echo "${ECHO_T}$with_signed_char" >&6
10828 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10829
10830 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10831 echo "$as_me:10831: checking if you want SIGWINCH handler" >&5
10832 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10833
10834 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10835 if test "${enable_sigwinch+set}" = set; then
10836   enableval="$enable_sigwinch"
10837   with_sigwinch=$enableval
10838 else
10839   with_sigwinch=$with_ext_funcs
10840 fi;
10841 echo "$as_me:10841: result: $with_sigwinch" >&5
10842 echo "${ECHO_T}$with_sigwinch" >&6
10843 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10844 #define USE_SIGWINCH 1
10845 EOF
10846
10847 ###   use option --enable-tcap-names to allow user to define new capabilities
10848 echo "$as_me:10848: checking if you want user-definable terminal capabilities like termcap" >&5
10849 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10850
10851 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10852 if test "${enable_tcap_names+set}" = set; then
10853   enableval="$enable_tcap_names"
10854   with_tcap_names=$enableval
10855 else
10856   with_tcap_names=$with_ext_funcs
10857 fi;
10858 echo "$as_me:10858: result: $with_tcap_names" >&5
10859 echo "${ECHO_T}$with_tcap_names" >&6
10860 NCURSES_XNAMES=0
10861 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10862
10863 ###############################################################################
10864 # These options are relatively safe to experiment with.
10865
10866 echo "$as_me:10866: checking if you want all development code" >&5
10867 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10868
10869 # Check whether --with-develop or --without-develop was given.
10870 if test "${with_develop+set}" = set; then
10871   withval="$with_develop"
10872   with_develop=$withval
10873 else
10874   with_develop=no
10875 fi;
10876 echo "$as_me:10876: result: $with_develop" >&5
10877 echo "${ECHO_T}$with_develop" >&6
10878
10879 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10880 echo "$as_me:10880: checking if you want hard-tabs code" >&5
10881 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10882
10883 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10884 if test "${enable_hard_tabs+set}" = set; then
10885   enableval="$enable_hard_tabs"
10886
10887 else
10888   enable_hard_tabs=$with_develop
10889 fi;
10890 echo "$as_me:10890: result: $enable_hard_tabs" >&5
10891 echo "${ECHO_T}$enable_hard_tabs" >&6
10892 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10893 #define USE_HARD_TABS 1
10894 EOF
10895
10896 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10897 echo "$as_me:10897: checking if you want limited support for xmc" >&5
10898 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10899
10900 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10901 if test "${enable_xmc_glitch+set}" = set; then
10902   enableval="$enable_xmc_glitch"
10903
10904 else
10905   enable_xmc_glitch=$with_develop
10906 fi;
10907 echo "$as_me:10907: result: $enable_xmc_glitch" >&5
10908 echo "${ECHO_T}$enable_xmc_glitch" >&6
10909 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10910 #define USE_XMC_SUPPORT 1
10911 EOF
10912
10913 ###############################################################################
10914 # These are just experimental, probably should not be in a package:
10915
10916 echo "$as_me:10916: checking if you do not want to assume colors are white-on-black" >&5
10917 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10918
10919 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10920 if test "${enable_assumed_color+set}" = set; then
10921   enableval="$enable_assumed_color"
10922   with_assumed_color=$enableval
10923 else
10924   with_assumed_color=yes
10925 fi;
10926 echo "$as_me:10926: result: $with_assumed_color" >&5
10927 echo "${ECHO_T}$with_assumed_color" >&6
10928 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10929 #define USE_ASSUMED_COLOR 1
10930 EOF
10931
10932 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10933 echo "$as_me:10933: checking if you want hashmap scrolling-optimization code" >&5
10934 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10935
10936 # Check whether --enable-hashmap or --disable-hashmap was given.
10937 if test "${enable_hashmap+set}" = set; then
10938   enableval="$enable_hashmap"
10939   with_hashmap=$enableval
10940 else
10941   with_hashmap=yes
10942 fi;
10943 echo "$as_me:10943: result: $with_hashmap" >&5
10944 echo "${ECHO_T}$with_hashmap" >&6
10945 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10946 #define USE_HASHMAP 1
10947 EOF
10948
10949 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10950 echo "$as_me:10950: checking if you want colorfgbg code" >&5
10951 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10952
10953 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10954 if test "${enable_colorfgbg+set}" = set; then
10955   enableval="$enable_colorfgbg"
10956   with_colorfgbg=$enableval
10957 else
10958   with_colorfgbg=no
10959 fi;
10960 echo "$as_me:10960: result: $with_colorfgbg" >&5
10961 echo "${ECHO_T}$with_colorfgbg" >&6
10962 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10963 #define USE_COLORFGBG 1
10964 EOF
10965
10966 ###   use option --enable-interop to turn on use of bindings used for interop
10967 echo "$as_me:10967: checking if you want interop bindings" >&5
10968 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10969
10970 # Check whether --enable-interop or --disable-interop was given.
10971 if test "${enable_interop+set}" = set; then
10972   enableval="$enable_interop"
10973   with_exp_interop=$enableval
10974 else
10975   with_exp_interop=no
10976 fi;
10977 echo "$as_me:10977: result: $with_exp_interop" >&5
10978 echo "${ECHO_T}$with_exp_interop" >&6
10979
10980 NCURSES_INTEROP_FUNCS=0
10981 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10982
10983 # This is still experimental (20080329), but should ultimately be moved to
10984 # the script-block --with-normal, etc.
10985
10986 echo "$as_me:10986: checking if you want to link with the pthread library" >&5
10987 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10988
10989 # Check whether --with-pthread or --without-pthread was given.
10990 if test "${with_pthread+set}" = set; then
10991   withval="$with_pthread"
10992   with_pthread=$withval
10993 else
10994   with_pthread=no
10995 fi;
10996 echo "$as_me:10996: result: $with_pthread" >&5
10997 echo "${ECHO_T}$with_pthread" >&6
10998
10999 if test "$with_pthread" != no ; then
11000     echo "$as_me:11000: checking for pthread.h" >&5
11001 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11002 if test "${ac_cv_header_pthread_h+set}" = set; then
11003   echo $ECHO_N "(cached) $ECHO_C" >&6
11004 else
11005   cat >conftest.$ac_ext <<_ACEOF
11006 #line 11006 "configure"
11007 #include "confdefs.h"
11008 #include <pthread.h>
11009 _ACEOF
11010 if { (eval echo "$as_me:11010: \"$ac_cpp conftest.$ac_ext\"") >&5
11011   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11012   ac_status=$?
11013   egrep -v '^ *\+' conftest.er1 >conftest.err
11014   rm -f conftest.er1
11015   cat conftest.err >&5
11016   echo "$as_me:11016: \$? = $ac_status" >&5
11017   (exit $ac_status); } >/dev/null; then
11018   if test -s conftest.err; then
11019     ac_cpp_err=$ac_c_preproc_warn_flag
11020   else
11021     ac_cpp_err=
11022   fi
11023 else
11024   ac_cpp_err=yes
11025 fi
11026 if test -z "$ac_cpp_err"; then
11027   ac_cv_header_pthread_h=yes
11028 else
11029   echo "$as_me: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   ac_cv_header_pthread_h=no
11032 fi
11033 rm -f conftest.err conftest.$ac_ext
11034 fi
11035 echo "$as_me:11035: result: $ac_cv_header_pthread_h" >&5
11036 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11037 if test $ac_cv_header_pthread_h = yes; then
11038
11039         cat >>confdefs.h <<\EOF
11040 #define HAVE_PTHREADS_H 1
11041 EOF
11042
11043         echo "$as_me:11043: checking if we can link with the pthread library" >&5
11044 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
11045         cf_save_LIBS="$LIBS"
11046         LIBS="-lpthread $LIBS"
11047         cat >conftest.$ac_ext <<_ACEOF
11048 #line 11048 "configure"
11049 #include "confdefs.h"
11050
11051 #include <pthread.h>
11052
11053 int
11054 main ()
11055 {
11056
11057         int rc = pthread_create(0,0,0,0);
11058
11059   ;
11060   return 0;
11061 }
11062 _ACEOF
11063 rm -f conftest.$ac_objext conftest$ac_exeext
11064 if { (eval echo "$as_me:11064: \"$ac_link\"") >&5
11065   (eval $ac_link) 2>&5
11066   ac_status=$?
11067   echo "$as_me:11067: \$? = $ac_status" >&5
11068   (exit $ac_status); } &&
11069          { ac_try='test -s conftest$ac_exeext'
11070   { (eval echo "$as_me:11070: \"$ac_try\"") >&5
11071   (eval $ac_try) 2>&5
11072   ac_status=$?
11073   echo "$as_me:11073: \$? = $ac_status" >&5
11074   (exit $ac_status); }; }; then
11075   with_pthread=yes
11076 else
11077   echo "$as_me: failed program was:" >&5
11078 cat conftest.$ac_ext >&5
11079 with_pthread=no
11080 fi
11081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11082         LIBS="$cf_save_LIBS"
11083         echo "$as_me:11083: result: $with_pthread" >&5
11084 echo "${ECHO_T}$with_pthread" >&6
11085
11086         if test "$with_pthread" = yes ; then
11087             LIBS="-lpthread $LIBS"
11088             cat >>confdefs.h <<\EOF
11089 #define HAVE_LIBPTHREADS 1
11090 EOF
11091
11092         else
11093             { { echo "$as_me:11093: error: Cannot link with pthread library" >&5
11094 echo "$as_me: error: Cannot link with pthread library" >&2;}
11095    { (exit 1); exit 1; }; }
11096         fi
11097
11098 fi
11099
11100 fi
11101
11102 if test "x$with_pthread" != xno; then
11103         echo "$as_me:11103: checking for pthread_kill" >&5
11104 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11105 if test "${ac_cv_func_pthread_kill+set}" = set; then
11106   echo $ECHO_N "(cached) $ECHO_C" >&6
11107 else
11108   cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111 /* System header to define __stub macros and hopefully few prototypes,
11112     which can conflict with char pthread_kill (); below.  */
11113 #include <assert.h>
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 #ifdef __cplusplus
11116 extern "C"
11117 #endif
11118 /* We use char because int might match the return type of a gcc2
11119    builtin and then its argument prototype would still apply.  */
11120 char pthread_kill ();
11121 char (*f) ();
11122
11123 int
11124 main ()
11125 {
11126 /* The GNU C library defines this for functions which it implements
11127     to always fail with ENOSYS.  Some functions are actually named
11128     something starting with __ and the normal name is an alias.  */
11129 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11130 choke me
11131 #else
11132 f = pthread_kill;
11133 #endif
11134
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 rm -f conftest.$ac_objext conftest$ac_exeext
11140 if { (eval echo "$as_me:11140: \"$ac_link\"") >&5
11141   (eval $ac_link) 2>&5
11142   ac_status=$?
11143   echo "$as_me:11143: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -s conftest$ac_exeext'
11146   { (eval echo "$as_me:11146: \"$ac_try\"") >&5
11147   (eval $ac_try) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); }; }; then
11151   ac_cv_func_pthread_kill=yes
11152 else
11153   echo "$as_me: failed program was:" >&5
11154 cat conftest.$ac_ext >&5
11155 ac_cv_func_pthread_kill=no
11156 fi
11157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11158 fi
11159 echo "$as_me:11159: result: $ac_cv_func_pthread_kill" >&5
11160 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11161 if test $ac_cv_func_pthread_kill = yes; then
11162
11163                 echo "$as_me:11163: checking if you want to allow EINTR in wgetch with pthreads" >&5
11164 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11165
11166 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11167 if test "${enable_pthreads_eintr+set}" = set; then
11168   enableval="$enable_pthreads_eintr"
11169   use_pthreads_eintr=$enableval
11170 else
11171   use_pthreads_eintr=no
11172 fi;
11173                 echo "$as_me:11173: result: $use_pthreads_eintr" >&5
11174 echo "${ECHO_T}$use_pthreads_eintr" >&6
11175                 if test $use_pthreads_eintr = yes ; then
11176                         cat >>confdefs.h <<\EOF
11177 #define USE_PTHREADS_EINTR 1
11178 EOF
11179
11180                 fi
11181 fi
11182
11183         echo "$as_me:11183: checking if you want to use weak-symbols for pthreads" >&5
11184 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11185
11186 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11187 if test "${enable_weak_symbols+set}" = set; then
11188   enableval="$enable_weak_symbols"
11189   use_weak_symbols=$enableval
11190 else
11191   use_weak_symbols=no
11192 fi;
11193         echo "$as_me:11193: result: $use_weak_symbols" >&5
11194 echo "${ECHO_T}$use_weak_symbols" >&6
11195         if test "$use_weak_symbols" = yes ; then
11196
11197 echo "$as_me:11197: checking if $CC supports weak symbols" >&5
11198 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11199 if test "${cf_cv_weak_symbols+set}" = set; then
11200   echo $ECHO_N "(cached) $ECHO_C" >&6
11201 else
11202
11203 cat >conftest.$ac_ext <<_ACEOF
11204 #line 11204 "configure"
11205 #include "confdefs.h"
11206
11207 #include <stdio.h>
11208 int
11209 main ()
11210 {
11211
11212 #if defined(__GNUC__)
11213 #  if defined __USE_ISOC99
11214 #    define _cat_pragma(exp)    _Pragma(#exp)
11215 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11216 #  else
11217 #    define _weak_pragma(exp)
11218 #  endif
11219 #  define _declare(name)        __extension__ extern __typeof__(name) name
11220 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11221 #endif
11222
11223 weak_symbol(fopen);
11224
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 rm -f conftest.$ac_objext
11230 if { (eval echo "$as_me:11230: \"$ac_compile\"") >&5
11231   (eval $ac_compile) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); } &&
11235          { ac_try='test -s conftest.$ac_objext'
11236   { (eval echo "$as_me:11236: \"$ac_try\"") >&5
11237   (eval $ac_try) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); }; }; then
11241   cf_cv_weak_symbols=yes
11242 else
11243   echo "$as_me: failed program was:" >&5
11244 cat conftest.$ac_ext >&5
11245 cf_cv_weak_symbols=no
11246 fi
11247 rm -f conftest.$ac_objext conftest.$ac_ext
11248
11249 fi
11250 echo "$as_me:11250: result: $cf_cv_weak_symbols" >&5
11251 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11252
11253         else
11254                 cf_cv_weak_symbols=no
11255         fi
11256
11257         if test $cf_cv_weak_symbols = yes ; then
11258                 cat >>confdefs.h <<\EOF
11259 #define USE_WEAK_SYMBOLS 1
11260 EOF
11261
11262         fi
11263 fi
11264
11265 PTHREAD=
11266 if test "$with_pthread" = "yes" ; then
11267     cat >>confdefs.h <<\EOF
11268 #define USE_PTHREADS 1
11269 EOF
11270
11271     enable_reentrant=yes
11272     if test $cf_cv_weak_symbols = yes ; then
11273         PTHREAD=-lpthread
11274     fi
11275 fi
11276
11277 # Reentrant code has to be opaque; there's little advantage to making ncurses
11278 # opaque outside of that, so there is no --enable-opaque option.  We can use
11279 # this option without --with-pthreads, but this will be always set for
11280 # pthreads.
11281 echo "$as_me:11281: checking if you want experimental reentrant code" >&5
11282 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11283
11284 # Check whether --enable-reentrant or --disable-reentrant was given.
11285 if test "${enable_reentrant+set}" = set; then
11286   enableval="$enable_reentrant"
11287   with_reentrant=$enableval
11288 else
11289   with_reentrant=no
11290 fi;
11291 echo "$as_me:11291: result: $with_reentrant" >&5
11292 echo "${ECHO_T}$with_reentrant" >&6
11293 if test "$with_reentrant" = yes ; then
11294         cf_cv_enable_reentrant=1
11295         cf_cv_enable_opaque="NCURSES_INTERNALS"
11296         NCURSES_OPAQUE=1
11297         NCURSES_SIZE_T=int
11298         if test $cf_cv_weak_symbols = yes ; then
11299
11300 # remove pthread library from $LIBS
11301 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11302
11303                 TEST_LIBS="-lpthread $TEST_LIBS"
11304                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11305         else
11306                 LIB_SUFFIX="t${LIB_SUFFIX}"
11307         fi
11308         cat >>confdefs.h <<\EOF
11309 #define USE_REENTRANT 1
11310 EOF
11311
11312 if test "${with_abi_version+set}" != set; then
11313         case $cf_cv_rel_version in
11314         5.*)
11315                 cf_cv_rel_version=6.0
11316                 cf_cv_abi_version=6
11317                 { echo "$as_me:11317: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11318 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11319                 ;;
11320         esac
11321 fi
11322
11323 else
11324         cf_cv_enable_reentrant=0
11325         cf_cv_enable_opaque="NCURSES_OPAQUE"
11326         NCURSES_OPAQUE=0
11327         NCURSES_SIZE_T=short
11328 fi
11329
11330 ### Allow using a different wrap-prefix
11331 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11332         echo "$as_me:11332: checking for prefix used to wrap public variables" >&5
11333 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11334
11335 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11336 if test "${with_wrap_prefix+set}" = set; then
11337   withval="$with_wrap_prefix"
11338   NCURSES_WRAP_PREFIX=$withval
11339 else
11340   NCURSES_WRAP_PREFIX=_nc_
11341 fi;
11342         echo "$as_me:11342: result: $NCURSES_WRAP_PREFIX" >&5
11343 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11344 else
11345         NCURSES_WRAP_PREFIX=_nc_
11346 fi
11347
11348 cat >>confdefs.h <<EOF
11349 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11350 EOF
11351
11352 echo "$as_me:11352: checking if you want experimental safe-sprintf code" >&5
11353 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11354
11355 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11356 if test "${enable_safe_sprintf+set}" = set; then
11357   enableval="$enable_safe_sprintf"
11358   with_safe_sprintf=$enableval
11359 else
11360   with_safe_sprintf=no
11361 fi;
11362 echo "$as_me:11362: result: $with_safe_sprintf" >&5
11363 echo "${ECHO_T}$with_safe_sprintf" >&6
11364 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11365 #define USE_SAFE_SPRINTF 1
11366 EOF
11367
11368 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11369 # when hashmap is used scroll hints are useless
11370 if test "$with_hashmap" = no ; then
11371 echo "$as_me:11371: checking if you want to experiment without scrolling-hints code" >&5
11372 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11373
11374 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11375 if test "${enable_scroll_hints+set}" = set; then
11376   enableval="$enable_scroll_hints"
11377   with_scroll_hints=$enableval
11378 else
11379   with_scroll_hints=yes
11380 fi;
11381 echo "$as_me:11381: result: $with_scroll_hints" >&5
11382 echo "${ECHO_T}$with_scroll_hints" >&6
11383 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11384 #define USE_SCROLL_HINTS 1
11385 EOF
11386
11387 fi
11388
11389 echo "$as_me:11389: checking if you want experimental wgetch-events code" >&5
11390 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11391
11392 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11393 if test "${enable_wgetch_events+set}" = set; then
11394   enableval="$enable_wgetch_events"
11395   with_wgetch_events=$enableval
11396 else
11397   with_wgetch_events=no
11398 fi;
11399 echo "$as_me:11399: result: $with_wgetch_events" >&5
11400 echo "${ECHO_T}$with_wgetch_events" >&6
11401 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11402 #define NCURSES_WGETCH_EVENTS 1
11403 EOF
11404
11405 ###############################################################################
11406
11407 ###     use option --disable-echo to suppress full display compiling commands
11408 echo "$as_me:11408: checking if you want to display full commands during build" >&5
11409 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11410
11411 # Check whether --enable-echo or --disable-echo was given.
11412 if test "${enable_echo+set}" = set; then
11413   enableval="$enable_echo"
11414   with_echo=$enableval
11415 else
11416   with_echo=yes
11417 fi;
11418 if test "$with_echo" = yes; then
11419         ECHO_LINK=
11420 else
11421         ECHO_LINK='@ echo linking $@ ... ;'
11422         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11423         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11424 fi
11425 echo "$as_me:11425: result: $with_echo" >&5
11426 echo "${ECHO_T}$with_echo" >&6
11427
11428 ###     use option --enable-warnings to turn on all gcc warnings
11429 echo "$as_me:11429: checking if you want to see compiler warnings" >&5
11430 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11431
11432 # Check whether --enable-warnings or --disable-warnings was given.
11433 if test "${enable_warnings+set}" = set; then
11434   enableval="$enable_warnings"
11435   with_warnings=$enableval
11436 fi;
11437 echo "$as_me:11437: result: $with_warnings" >&5
11438 echo "${ECHO_T}$with_warnings" >&6
11439
11440 if test "x$with_warnings" = "xyes"; then
11441
11442         ADAFLAGS="$ADAFLAGS -gnatg"
11443
11444 INTEL_COMPILER=no
11445
11446 if test "$GCC" = yes ; then
11447         case $host_os in
11448         linux*|gnu*)
11449                 echo "$as_me:11449: checking if this is really Intel C compiler" >&5
11450 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11451                 cf_save_CFLAGS="$CFLAGS"
11452                 CFLAGS="$CFLAGS -no-gcc"
11453                 cat >conftest.$ac_ext <<_ACEOF
11454 #line 11454 "configure"
11455 #include "confdefs.h"
11456
11457 int
11458 main ()
11459 {
11460
11461 #ifdef __INTEL_COMPILER
11462 #else
11463 make an error
11464 #endif
11465
11466   ;
11467   return 0;
11468 }
11469 _ACEOF
11470 rm -f conftest.$ac_objext
11471 if { (eval echo "$as_me:11471: \"$ac_compile\"") >&5
11472   (eval $ac_compile) 2>&5
11473   ac_status=$?
11474   echo "$as_me:11474: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -s conftest.$ac_objext'
11477   { (eval echo "$as_me:11477: \"$ac_try\"") >&5
11478   (eval $ac_try) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); }; }; then
11482   INTEL_COMPILER=yes
11483 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11484
11485 else
11486   echo "$as_me: failed program was:" >&5
11487 cat conftest.$ac_ext >&5
11488 fi
11489 rm -f conftest.$ac_objext conftest.$ac_ext
11490                 CFLAGS="$cf_save_CFLAGS"
11491                 echo "$as_me:11491: result: $INTEL_COMPILER" >&5
11492 echo "${ECHO_T}$INTEL_COMPILER" >&6
11493                 ;;
11494         esac
11495 fi
11496
11497 cat > conftest.$ac_ext <<EOF
11498 #line 11498 "${as_me:-configure}"
11499 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11500 EOF
11501
11502 if test "$INTEL_COMPILER" = yes
11503 then
11504 # The "-wdXXX" options suppress warnings:
11505 # remark #1419: external declaration in primary source file
11506 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11507 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11508 # remark #193: zero used for undefined preprocessing identifier
11509 # remark #593: variable "curs_sb_left_arrow" was set but never used
11510 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11511 # remark #869: parameter "tw" was never referenced
11512 # remark #981: operands are evaluated in unspecified order
11513 # warning #279: controlling expression is constant
11514
11515         { echo "$as_me:11515: checking for $CC warning options..." >&5
11516 echo "$as_me: checking for $CC warning options..." >&6;}
11517         cf_save_CFLAGS="$CFLAGS"
11518         EXTRA_CFLAGS="-Wall"
11519         for cf_opt in \
11520                 wd1419 \
11521                 wd1683 \
11522                 wd1684 \
11523                 wd193 \
11524                 wd593 \
11525                 wd279 \
11526                 wd810 \
11527                 wd869 \
11528                 wd981
11529         do
11530                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11531                 if { (eval echo "$as_me:11531: \"$ac_compile\"") >&5
11532   (eval $ac_compile) 2>&5
11533   ac_status=$?
11534   echo "$as_me:11534: \$? = $ac_status" >&5
11535   (exit $ac_status); }; then
11536                         test -n "$verbose" && echo "$as_me:11536: result: ... -$cf_opt" >&5
11537 echo "${ECHO_T}... -$cf_opt" >&6
11538                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11539                 fi
11540         done
11541         CFLAGS="$cf_save_CFLAGS"
11542
11543 elif test "$GCC" = yes
11544 then
11545         { echo "$as_me:11545: checking for $CC warning options..." >&5
11546 echo "$as_me: checking for $CC warning options..." >&6;}
11547         cf_save_CFLAGS="$CFLAGS"
11548         EXTRA_CFLAGS=
11549         cf_warn_CONST=""
11550         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11551         for cf_opt in W Wall \
11552                 Wbad-function-cast \
11553                 Wcast-align \
11554                 Wcast-qual \
11555                 Winline \
11556                 Wmissing-declarations \
11557                 Wmissing-prototypes \
11558                 Wnested-externs \
11559                 Wpointer-arith \
11560                 Wshadow \
11561                 Wstrict-prototypes \
11562                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11563         do
11564                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11565                 if { (eval echo "$as_me:11565: \"$ac_compile\"") >&5
11566   (eval $ac_compile) 2>&5
11567   ac_status=$?
11568   echo "$as_me:11568: \$? = $ac_status" >&5
11569   (exit $ac_status); }; then
11570                         test -n "$verbose" && echo "$as_me:11570: result: ... -$cf_opt" >&5
11571 echo "${ECHO_T}... -$cf_opt" >&6
11572                         case $cf_opt in #(vi
11573                         Wcast-qual) #(vi
11574                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11575                                 ;;
11576                         Winline) #(vi
11577                                 case $GCC_VERSION in
11578                                 [34].*)
11579                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11580
11581 echo "${as_me:-configure}:11581: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11582
11583                                         continue;;
11584                                 esac
11585                                 ;;
11586                         esac
11587                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11588                 fi
11589         done
11590         CFLAGS="$cf_save_CFLAGS"
11591 fi
11592 rm -rf conftest*
11593
11594         if test "$cf_with_cxx" = yes ; then
11595
11596 INTEL_CPLUSPLUS=no
11597
11598 if test "$GCC" = yes ; then
11599         case $host_os in
11600         linux*|gnu*)
11601                 echo "$as_me:11601: checking if this is really Intel C++ compiler" >&5
11602 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11603                 cf_save_CFLAGS="$CXXFLAGS"
11604                 CXXFLAGS="$CXXFLAGS -no-gcc"
11605                 cat >conftest.$ac_ext <<_ACEOF
11606 #line 11606 "configure"
11607 #include "confdefs.h"
11608
11609 int
11610 main ()
11611 {
11612
11613 #ifdef __INTEL_COMPILER
11614 #else
11615 make an error
11616 #endif
11617
11618   ;
11619   return 0;
11620 }
11621 _ACEOF
11622 rm -f conftest.$ac_objext
11623 if { (eval echo "$as_me:11623: \"$ac_compile\"") >&5
11624   (eval $ac_compile) 2>&5
11625   ac_status=$?
11626   echo "$as_me:11626: \$? = $ac_status" >&5
11627   (exit $ac_status); } &&
11628          { ac_try='test -s conftest.$ac_objext'
11629   { (eval echo "$as_me:11629: \"$ac_try\"") >&5
11630   (eval $ac_try) 2>&5
11631   ac_status=$?
11632   echo "$as_me:11632: \$? = $ac_status" >&5
11633   (exit $ac_status); }; }; then
11634   INTEL_CPLUSPLUS=yes
11635 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11636
11637 else
11638   echo "$as_me: failed program was:" >&5
11639 cat conftest.$ac_ext >&5
11640 fi
11641 rm -f conftest.$ac_objext conftest.$ac_ext
11642                 CXXFLAGS="$cf_save_CFLAGS"
11643                 echo "$as_me:11643: result: $INTEL_CPLUSPLUS" >&5
11644 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11645                 ;;
11646         esac
11647 fi
11648
11649 ac_ext=cc
11650 ac_cpp='$CXXCPP $CPPFLAGS'
11651 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11652 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11653 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11654 ac_main_return=return
11655
11656 cat > conftest.$ac_ext <<EOF
11657 #line 11657 "configure"
11658 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11659 EOF
11660
11661 if test "$INTEL_CPLUSPLUS" = yes
11662 then
11663 # The "-wdXXX" options suppress warnings:
11664 # remark #1419: external declaration in primary source file
11665 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11666 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11667 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11668 # remark #193: zero used for undefined preprocessing identifier
11669 # remark #593: variable "curs_sb_left_arrow" was set but never used
11670 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11671 # remark #869: parameter "tw" was never referenced
11672 # remark #981: operands are evaluated in unspecified order
11673 # warning #269: invalid format string conversion
11674
11675         { echo "$as_me:11675: checking for $CC warning options..." >&5
11676 echo "$as_me: checking for $CC warning options..." >&6;}
11677         cf_save_CXXFLAGS="$CXXFLAGS"
11678         EXTRA_CXXFLAGS="-Wall"
11679         for cf_opt in \
11680                 wd1419 \
11681                 wd1682 \
11682                 wd1683 \
11683                 wd1684 \
11684                 wd193 \
11685                 wd279 \
11686                 wd593 \
11687                 wd810 \
11688                 wd869 \
11689                 wd981
11690         do
11691                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11692                 if { (eval echo "$as_me:11692: \"$ac_compile\"") >&5
11693   (eval $ac_compile) 2>&5
11694   ac_status=$?
11695   echo "$as_me:11695: \$? = $ac_status" >&5
11696   (exit $ac_status); }; then
11697                         test -n "$verbose" && echo "$as_me:11697: result: ... -$cf_opt" >&5
11698 echo "${ECHO_T}... -$cf_opt" >&6
11699                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11700                 fi
11701         done
11702         CXXFLAGS="$cf_save_CXXFLAGS"
11703
11704 elif test "$GXX" = yes
11705 then
11706         { echo "$as_me:11706: checking for $CXX warning options..." >&5
11707 echo "$as_me: checking for $CXX warning options..." >&6;}
11708         cf_save_CXXFLAGS="$CXXFLAGS"
11709         EXTRA_CXXFLAGS="-W -Wall"
11710         cf_gxx_extra_warnings=""
11711         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11712         case "$GCC_VERSION" in
11713         [1-2].*)
11714                 ;;
11715         *)
11716                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11717                 ;;
11718         esac
11719         for cf_opt in \
11720                 Wabi \
11721                 fabi-version=0 \
11722                 Woverloaded-virtual \
11723                 Wsign-promo \
11724                 Wsynth \
11725                 Wold-style-cast \
11726                 Wcast-align \
11727                 Wcast-qual \
11728                 Wmissing-prototypes \
11729                 Wpointer-arith \
11730                 Wshadow \
11731                 Wstrict-prototypes \
11732                 Wundef $cf_gxx_extra_warnings Wno-unused
11733         do
11734                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11735                 if { (eval echo "$as_me:11735: \"$ac_compile\"") >&5
11736   (eval $ac_compile) 2>&5
11737   ac_status=$?
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit $ac_status); }; then
11740                         test -n "$verbose" && echo "$as_me:11740: result: ... -$cf_opt" >&5
11741 echo "${ECHO_T}... -$cf_opt" >&6
11742                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11743                 else
11744                         test -n "$verbose" && echo "$as_me:11744: result: ... no -$cf_opt" >&5
11745 echo "${ECHO_T}... no -$cf_opt" >&6
11746                 fi
11747         done
11748         CXXFLAGS="$cf_save_CXXFLAGS"
11749 fi
11750
11751 rm -rf conftest*
11752 ac_ext=c
11753 ac_cpp='$CPP $CPPFLAGS'
11754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11757 ac_main_return=return
11758
11759         fi
11760 fi
11761
11762 if test "$GCC" = yes
11763 then
11764 cat > conftest.i <<EOF
11765 #ifndef GCC_PRINTF
11766 #define GCC_PRINTF 0
11767 #endif
11768 #ifndef GCC_SCANF
11769 #define GCC_SCANF 0
11770 #endif
11771 #ifndef GCC_NORETURN
11772 #define GCC_NORETURN /* nothing */
11773 #endif
11774 #ifndef GCC_UNUSED
11775 #define GCC_UNUSED /* nothing */
11776 #endif
11777 EOF
11778 if test "$GCC" = yes
11779 then
11780         { echo "$as_me:11780: checking for $CC __attribute__ directives..." >&5
11781 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11783 "${as_me:-configure}"
11784 #include "confdefs.h"
11785 #include "conftest.h"
11786 #include "conftest.i"
11787 #if     GCC_PRINTF
11788 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11789 #else
11790 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11791 #endif
11792 #if     GCC_SCANF
11793 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11794 #else
11795 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11796 #endif
11797 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11798 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11799 extern void foo(void) GCC_NORETURN;
11800 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11801 EOF
11802         cf_printf_attribute=no
11803         cf_scanf_attribute=no
11804         for cf_attribute in scanf printf unused noreturn
11805         do
11806
11807 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11808
11809                 cf_directive="__attribute__(($cf_attribute))"
11810                 echo "checking for $CC $cf_directive" 1>&5
11811
11812                 case $cf_attribute in #(vi
11813                 printf) #(vi
11814                         cf_printf_attribute=yes
11815                         cat >conftest.h <<EOF
11816 #define GCC_$cf_ATTRIBUTE 1
11817 EOF
11818                         ;;
11819                 scanf) #(vi
11820                         cf_scanf_attribute=yes
11821                         cat >conftest.h <<EOF
11822 #define GCC_$cf_ATTRIBUTE 1
11823 EOF
11824                         ;;
11825                 *) #(vi
11826                         cat >conftest.h <<EOF
11827 #define GCC_$cf_ATTRIBUTE $cf_directive
11828 EOF
11829                         ;;
11830                 esac
11831
11832                 if { (eval echo "$as_me:11832: \"$ac_compile\"") >&5
11833   (eval $ac_compile) 2>&5
11834   ac_status=$?
11835   echo "$as_me:11835: \$? = $ac_status" >&5
11836   (exit $ac_status); }; then
11837                         test -n "$verbose" && echo "$as_me:11837: result: ... $cf_attribute" >&5
11838 echo "${ECHO_T}... $cf_attribute" >&6
11839                         cat conftest.h >>confdefs.h
11840                         case $cf_attribute in #(vi
11841                         printf) #(vi
11842                                 if test "$cf_printf_attribute" = no ; then
11843                                         cat >>confdefs.h <<EOF
11844 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11845 EOF
11846                                 else
11847                                         cat >>confdefs.h <<EOF
11848 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11849 EOF
11850                                 fi
11851                                 ;;
11852                         scanf) #(vi
11853                                 if test "$cf_scanf_attribute" = no ; then
11854                                         cat >>confdefs.h <<EOF
11855 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11856 EOF
11857                                 else
11858                                         cat >>confdefs.h <<EOF
11859 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11860 EOF
11861                                 fi
11862                                 ;;
11863                         esac
11864                 fi
11865         done
11866 else
11867         fgrep define conftest.i >>confdefs.h
11868 fi
11869 rm -rf conftest*
11870 fi
11871
11872 ###     use option --enable-assertions to turn on generation of assertion code
11873 echo "$as_me:11873: checking if you want to enable runtime assertions" >&5
11874 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11875
11876 # Check whether --enable-assertions or --disable-assertions was given.
11877 if test "${enable_assertions+set}" = set; then
11878   enableval="$enable_assertions"
11879   with_assertions=$enableval
11880 else
11881   with_assertions=no
11882 fi;
11883 echo "$as_me:11883: result: $with_assertions" >&5
11884 echo "${ECHO_T}$with_assertions" >&6
11885 if test -n "$GCC"
11886 then
11887         if test "$with_assertions" = no
11888         then
11889                 cat >>confdefs.h <<\EOF
11890 #define NDEBUG 1
11891 EOF
11892
11893                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11894         else
11895
11896         ADAFLAGS="$ADAFLAGS -gnata"
11897
11898         fi
11899 fi
11900
11901 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11902
11903 echo "$as_me:11903: checking if you want to use dmalloc for testing" >&5
11904 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11905
11906 # Check whether --with-dmalloc or --without-dmalloc was given.
11907 if test "${with_dmalloc+set}" = set; then
11908   withval="$with_dmalloc"
11909   cat >>confdefs.h <<\EOF
11910 #define USE_DMALLOC 1
11911 EOF
11912
11913         : ${with_cflags:=-g}
11914         : ${with_no_leaks:=yes}
11915          with_dmalloc=yes
11916 else
11917   with_dmalloc=
11918 fi;
11919 echo "$as_me:11919: result: ${with_dmalloc:-no}" >&5
11920 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11921
11922 case .$with_cflags in #(vi
11923 .*-g*)
11924         case .$CFLAGS in #(vi
11925         .*-g*) #(vi
11926                 ;;
11927         *)
11928
11929 cf_fix_cppflags=no
11930 cf_new_cflags=
11931 cf_new_cppflags=
11932 cf_new_extra_cppflags=
11933
11934 for cf_add_cflags in -g
11935 do
11936 case $cf_fix_cppflags in
11937 no)
11938         case $cf_add_cflags in #(vi
11939         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11940                 case $cf_add_cflags in
11941                 -D*)
11942                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11943
11944                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11945                                 && test -z "${cf_tst_cflags}" \
11946                                 && cf_fix_cppflags=yes
11947
11948                         if test $cf_fix_cppflags = yes ; then
11949                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11950                                 continue
11951                         elif test "${cf_tst_cflags}" = "\"'" ; then
11952                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11953                                 continue
11954                         fi
11955                         ;;
11956                 esac
11957                 case "$CPPFLAGS" in
11958                 *$cf_add_cflags) #(vi
11959                         ;;
11960                 *) #(vi
11961                         case $cf_add_cflags in #(vi
11962                         -D*)
11963                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11964
11965 CPPFLAGS=`echo "$CPPFLAGS" | \
11966         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11967                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11968
11969                                 ;;
11970                         esac
11971                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11972                         ;;
11973                 esac
11974                 ;;
11975         *)
11976                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11977                 ;;
11978         esac
11979         ;;
11980 yes)
11981         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11982
11983         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11984
11985         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11986                 && test -z "${cf_tst_cflags}" \
11987                 && cf_fix_cppflags=no
11988         ;;
11989 esac
11990 done
11991
11992 if test -n "$cf_new_cflags" ; then
11993
11994         CFLAGS="$CFLAGS $cf_new_cflags"
11995 fi
11996
11997 if test -n "$cf_new_cppflags" ; then
11998
11999         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12000 fi
12001
12002 if test -n "$cf_new_extra_cppflags" ; then
12003
12004         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12005 fi
12006
12007                 ;;
12008         esac
12009         ;;
12010 esac
12011
12012 if test "$with_dmalloc" = yes ; then
12013         echo "$as_me:12013: checking for dmalloc.h" >&5
12014 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12015 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018   cat >conftest.$ac_ext <<_ACEOF
12019 #line 12019 "configure"
12020 #include "confdefs.h"
12021 #include <dmalloc.h>
12022 _ACEOF
12023 if { (eval echo "$as_me:12023: \"$ac_cpp conftest.$ac_ext\"") >&5
12024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12025   ac_status=$?
12026   egrep -v '^ *\+' conftest.er1 >conftest.err
12027   rm -f conftest.er1
12028   cat conftest.err >&5
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); } >/dev/null; then
12031   if test -s conftest.err; then
12032     ac_cpp_err=$ac_c_preproc_warn_flag
12033   else
12034     ac_cpp_err=
12035   fi
12036 else
12037   ac_cpp_err=yes
12038 fi
12039 if test -z "$ac_cpp_err"; then
12040   ac_cv_header_dmalloc_h=yes
12041 else
12042   echo "$as_me: failed program was:" >&5
12043   cat conftest.$ac_ext >&5
12044   ac_cv_header_dmalloc_h=no
12045 fi
12046 rm -f conftest.err conftest.$ac_ext
12047 fi
12048 echo "$as_me:12048: result: $ac_cv_header_dmalloc_h" >&5
12049 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12050 if test $ac_cv_header_dmalloc_h = yes; then
12051
12052 echo "$as_me:12052: checking for dmalloc_debug in -ldmalloc" >&5
12053 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12054 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12055   echo $ECHO_N "(cached) $ECHO_C" >&6
12056 else
12057   ac_check_lib_save_LIBS=$LIBS
12058 LIBS="-ldmalloc  $LIBS"
12059 cat >conftest.$ac_ext <<_ACEOF
12060 #line 12060 "configure"
12061 #include "confdefs.h"
12062
12063 /* Override any gcc2 internal prototype to avoid an error.  */
12064 #ifdef __cplusplus
12065 extern "C"
12066 #endif
12067 /* We use char because int might match the return type of a gcc2
12068    builtin and then its argument prototype would still apply.  */
12069 char dmalloc_debug ();
12070 int
12071 main ()
12072 {
12073 dmalloc_debug ();
12074   ;
12075   return 0;
12076 }
12077 _ACEOF
12078 rm -f conftest.$ac_objext conftest$ac_exeext
12079 if { (eval echo "$as_me:12079: \"$ac_link\"") >&5
12080   (eval $ac_link) 2>&5
12081   ac_status=$?
12082   echo "$as_me:12082: \$? = $ac_status" >&5
12083   (exit $ac_status); } &&
12084          { ac_try='test -s conftest$ac_exeext'
12085   { (eval echo "$as_me:12085: \"$ac_try\"") >&5
12086   (eval $ac_try) 2>&5
12087   ac_status=$?
12088   echo "$as_me:12088: \$? = $ac_status" >&5
12089   (exit $ac_status); }; }; then
12090   ac_cv_lib_dmalloc_dmalloc_debug=yes
12091 else
12092   echo "$as_me: failed program was:" >&5
12093 cat conftest.$ac_ext >&5
12094 ac_cv_lib_dmalloc_dmalloc_debug=no
12095 fi
12096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12097 LIBS=$ac_check_lib_save_LIBS
12098 fi
12099 echo "$as_me:12099: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12100 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12101 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12102   cat >>confdefs.h <<EOF
12103 #define HAVE_LIBDMALLOC 1
12104 EOF
12105
12106   LIBS="-ldmalloc $LIBS"
12107
12108 fi
12109
12110 fi
12111
12112 fi
12113
12114 echo "$as_me:12114: checking if you want to use dbmalloc for testing" >&5
12115 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12116
12117 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12118 if test "${with_dbmalloc+set}" = set; then
12119   withval="$with_dbmalloc"
12120   cat >>confdefs.h <<\EOF
12121 #define USE_DBMALLOC 1
12122 EOF
12123
12124         : ${with_cflags:=-g}
12125         : ${with_no_leaks:=yes}
12126          with_dbmalloc=yes
12127 else
12128   with_dbmalloc=
12129 fi;
12130 echo "$as_me:12130: result: ${with_dbmalloc:-no}" >&5
12131 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12132
12133 case .$with_cflags in #(vi
12134 .*-g*)
12135         case .$CFLAGS in #(vi
12136         .*-g*) #(vi
12137                 ;;
12138         *)
12139
12140 cf_fix_cppflags=no
12141 cf_new_cflags=
12142 cf_new_cppflags=
12143 cf_new_extra_cppflags=
12144
12145 for cf_add_cflags in -g
12146 do
12147 case $cf_fix_cppflags in
12148 no)
12149         case $cf_add_cflags in #(vi
12150         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12151                 case $cf_add_cflags in
12152                 -D*)
12153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12154
12155                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12156                                 && test -z "${cf_tst_cflags}" \
12157                                 && cf_fix_cppflags=yes
12158
12159                         if test $cf_fix_cppflags = yes ; then
12160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12161                                 continue
12162                         elif test "${cf_tst_cflags}" = "\"'" ; then
12163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12164                                 continue
12165                         fi
12166                         ;;
12167                 esac
12168                 case "$CPPFLAGS" in
12169                 *$cf_add_cflags) #(vi
12170                         ;;
12171                 *) #(vi
12172                         case $cf_add_cflags in #(vi
12173                         -D*)
12174                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12175
12176 CPPFLAGS=`echo "$CPPFLAGS" | \
12177         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12178                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12179
12180                                 ;;
12181                         esac
12182                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12183                         ;;
12184                 esac
12185                 ;;
12186         *)
12187                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12188                 ;;
12189         esac
12190         ;;
12191 yes)
12192         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12193
12194         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12195
12196         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12197                 && test -z "${cf_tst_cflags}" \
12198                 && cf_fix_cppflags=no
12199         ;;
12200 esac
12201 done
12202
12203 if test -n "$cf_new_cflags" ; then
12204
12205         CFLAGS="$CFLAGS $cf_new_cflags"
12206 fi
12207
12208 if test -n "$cf_new_cppflags" ; then
12209
12210         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12211 fi
12212
12213 if test -n "$cf_new_extra_cppflags" ; then
12214
12215         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12216 fi
12217
12218                 ;;
12219         esac
12220         ;;
12221 esac
12222
12223 if test "$with_dbmalloc" = yes ; then
12224         echo "$as_me:12224: checking for dbmalloc.h" >&5
12225 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12226 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12227   echo $ECHO_N "(cached) $ECHO_C" >&6
12228 else
12229   cat >conftest.$ac_ext <<_ACEOF
12230 #line 12230 "configure"
12231 #include "confdefs.h"
12232 #include <dbmalloc.h>
12233 _ACEOF
12234 if { (eval echo "$as_me:12234: \"$ac_cpp conftest.$ac_ext\"") >&5
12235   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12236   ac_status=$?
12237   egrep -v '^ *\+' conftest.er1 >conftest.err
12238   rm -f conftest.er1
12239   cat conftest.err >&5
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit $ac_status); } >/dev/null; then
12242   if test -s conftest.err; then
12243     ac_cpp_err=$ac_c_preproc_warn_flag
12244   else
12245     ac_cpp_err=
12246   fi
12247 else
12248   ac_cpp_err=yes
12249 fi
12250 if test -z "$ac_cpp_err"; then
12251   ac_cv_header_dbmalloc_h=yes
12252 else
12253   echo "$as_me: failed program was:" >&5
12254   cat conftest.$ac_ext >&5
12255   ac_cv_header_dbmalloc_h=no
12256 fi
12257 rm -f conftest.err conftest.$ac_ext
12258 fi
12259 echo "$as_me:12259: result: $ac_cv_header_dbmalloc_h" >&5
12260 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12261 if test $ac_cv_header_dbmalloc_h = yes; then
12262
12263 echo "$as_me:12263: checking for debug_malloc in -ldbmalloc" >&5
12264 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12265 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12266   echo $ECHO_N "(cached) $ECHO_C" >&6
12267 else
12268   ac_check_lib_save_LIBS=$LIBS
12269 LIBS="-ldbmalloc  $LIBS"
12270 cat >conftest.$ac_ext <<_ACEOF
12271 #line 12271 "configure"
12272 #include "confdefs.h"
12273
12274 /* Override any gcc2 internal prototype to avoid an error.  */
12275 #ifdef __cplusplus
12276 extern "C"
12277 #endif
12278 /* We use char because int might match the return type of a gcc2
12279    builtin and then its argument prototype would still apply.  */
12280 char debug_malloc ();
12281 int
12282 main ()
12283 {
12284 debug_malloc ();
12285   ;
12286   return 0;
12287 }
12288 _ACEOF
12289 rm -f conftest.$ac_objext conftest$ac_exeext
12290 if { (eval echo "$as_me:12290: \"$ac_link\"") >&5
12291   (eval $ac_link) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit $ac_status); } &&
12295          { ac_try='test -s conftest$ac_exeext'
12296   { (eval echo "$as_me:12296: \"$ac_try\"") >&5
12297   (eval $ac_try) 2>&5
12298   ac_status=$?
12299   echo "$as_me:12299: \$? = $ac_status" >&5
12300   (exit $ac_status); }; }; then
12301   ac_cv_lib_dbmalloc_debug_malloc=yes
12302 else
12303   echo "$as_me: failed program was:" >&5
12304 cat conftest.$ac_ext >&5
12305 ac_cv_lib_dbmalloc_debug_malloc=no
12306 fi
12307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12308 LIBS=$ac_check_lib_save_LIBS
12309 fi
12310 echo "$as_me:12310: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12311 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12312 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12313   cat >>confdefs.h <<EOF
12314 #define HAVE_LIBDBMALLOC 1
12315 EOF
12316
12317   LIBS="-ldbmalloc $LIBS"
12318
12319 fi
12320
12321 fi
12322
12323 fi
12324
12325 echo "$as_me:12325: checking if you want to use valgrind for testing" >&5
12326 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12327
12328 # Check whether --with-valgrind or --without-valgrind was given.
12329 if test "${with_valgrind+set}" = set; then
12330   withval="$with_valgrind"
12331   cat >>confdefs.h <<\EOF
12332 #define USE_VALGRIND 1
12333 EOF
12334
12335         : ${with_cflags:=-g}
12336         : ${with_no_leaks:=yes}
12337          with_valgrind=yes
12338 else
12339   with_valgrind=
12340 fi;
12341 echo "$as_me:12341: result: ${with_valgrind:-no}" >&5
12342 echo "${ECHO_T}${with_valgrind:-no}" >&6
12343
12344 case .$with_cflags in #(vi
12345 .*-g*)
12346         case .$CFLAGS in #(vi
12347         .*-g*) #(vi
12348                 ;;
12349         *)
12350
12351 cf_fix_cppflags=no
12352 cf_new_cflags=
12353 cf_new_cppflags=
12354 cf_new_extra_cppflags=
12355
12356 for cf_add_cflags in -g
12357 do
12358 case $cf_fix_cppflags in
12359 no)
12360         case $cf_add_cflags in #(vi
12361         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12362                 case $cf_add_cflags in
12363                 -D*)
12364                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12365
12366                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12367                                 && test -z "${cf_tst_cflags}" \
12368                                 && cf_fix_cppflags=yes
12369
12370                         if test $cf_fix_cppflags = yes ; then
12371                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12372                                 continue
12373                         elif test "${cf_tst_cflags}" = "\"'" ; then
12374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12375                                 continue
12376                         fi
12377                         ;;
12378                 esac
12379                 case "$CPPFLAGS" in
12380                 *$cf_add_cflags) #(vi
12381                         ;;
12382                 *) #(vi
12383                         case $cf_add_cflags in #(vi
12384                         -D*)
12385                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12386
12387 CPPFLAGS=`echo "$CPPFLAGS" | \
12388         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12389                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12390
12391                                 ;;
12392                         esac
12393                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12394                         ;;
12395                 esac
12396                 ;;
12397         *)
12398                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12399                 ;;
12400         esac
12401         ;;
12402 yes)
12403         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12404
12405         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12406
12407         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12408                 && test -z "${cf_tst_cflags}" \
12409                 && cf_fix_cppflags=no
12410         ;;
12411 esac
12412 done
12413
12414 if test -n "$cf_new_cflags" ; then
12415
12416         CFLAGS="$CFLAGS $cf_new_cflags"
12417 fi
12418
12419 if test -n "$cf_new_cppflags" ; then
12420
12421         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12422 fi
12423
12424 if test -n "$cf_new_extra_cppflags" ; then
12425
12426         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12427 fi
12428
12429                 ;;
12430         esac
12431         ;;
12432 esac
12433
12434 echo "$as_me:12434: checking if you want to perform memory-leak testing" >&5
12435 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12436
12437 # Check whether --enable-leaks or --disable-leaks was given.
12438 if test "${enable_leaks+set}" = set; then
12439   enableval="$enable_leaks"
12440   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12441 else
12442   : ${with_no_leaks:=no}
12443 fi;
12444 echo "$as_me:12444: result: $with_no_leaks" >&5
12445 echo "${ECHO_T}$with_no_leaks" >&6
12446
12447 if test "$with_no_leaks" = yes ; then
12448         cat >>confdefs.h <<\EOF
12449 #define NO_LEAKS 1
12450 EOF
12451
12452         cat >>confdefs.h <<\EOF
12453 #define YY_NO_LEAKS 1
12454 EOF
12455
12456 fi
12457
12458 cat >>confdefs.h <<\EOF
12459 #define HAVE_NC_ALLOC_H 1
12460 EOF
12461
12462 ###     use option --enable-expanded to generate certain macros as functions
12463
12464 # Check whether --enable-expanded or --disable-expanded was given.
12465 if test "${enable_expanded+set}" = set; then
12466   enableval="$enable_expanded"
12467   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12468 #define NCURSES_EXPANDED 1
12469 EOF
12470
12471 fi;
12472
12473 ###     use option --disable-macros to suppress macros in favor of functions
12474
12475 # Check whether --enable-macros or --disable-macros was given.
12476 if test "${enable_macros+set}" = set; then
12477   enableval="$enable_macros"
12478   test "$enableval" = no && cat >>confdefs.h <<\EOF
12479 #define NCURSES_NOMACROS 1
12480 EOF
12481
12482 fi;
12483
12484 # Normally we only add trace() to the debug-library.  Allow this to be
12485 # extended to all models of the ncurses library:
12486 cf_all_traces=no
12487 case "$CFLAGS $CPPFLAGS" in
12488 *-DTRACE*)
12489         cf_all_traces=yes
12490         ;;
12491 esac
12492
12493 echo "$as_me:12493: checking whether to add trace feature to all models" >&5
12494 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12495
12496 # Check whether --with-trace or --without-trace was given.
12497 if test "${with_trace+set}" = set; then
12498   withval="$with_trace"
12499   cf_with_trace=$withval
12500 else
12501   cf_with_trace=$cf_all_traces
12502 fi;
12503 echo "$as_me:12503: result: $cf_with_trace" >&5
12504 echo "${ECHO_T}$cf_with_trace" >&6
12505
12506 if test "$cf_with_trace" = yes ; then
12507         LIB_TRACING=all
12508         ADA_TRACE=TRUE
12509
12510 cf_fix_cppflags=no
12511 cf_new_cflags=
12512 cf_new_cppflags=
12513 cf_new_extra_cppflags=
12514
12515 for cf_add_cflags in -DTRACE
12516 do
12517 case $cf_fix_cppflags in
12518 no)
12519         case $cf_add_cflags in #(vi
12520         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12521                 case $cf_add_cflags in
12522                 -D*)
12523                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12524
12525                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12526                                 && test -z "${cf_tst_cflags}" \
12527                                 && cf_fix_cppflags=yes
12528
12529                         if test $cf_fix_cppflags = yes ; then
12530                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12531                                 continue
12532                         elif test "${cf_tst_cflags}" = "\"'" ; then
12533                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12534                                 continue
12535                         fi
12536                         ;;
12537                 esac
12538                 case "$CPPFLAGS" in
12539                 *$cf_add_cflags) #(vi
12540                         ;;
12541                 *) #(vi
12542                         case $cf_add_cflags in #(vi
12543                         -D*)
12544                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12545
12546 CPPFLAGS=`echo "$CPPFLAGS" | \
12547         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12548                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12549
12550                                 ;;
12551                         esac
12552                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12553                         ;;
12554                 esac
12555                 ;;
12556         *)
12557                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12558                 ;;
12559         esac
12560         ;;
12561 yes)
12562         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12563
12564         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12565
12566         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12567                 && test -z "${cf_tst_cflags}" \
12568                 && cf_fix_cppflags=no
12569         ;;
12570 esac
12571 done
12572
12573 if test -n "$cf_new_cflags" ; then
12574
12575         CFLAGS="$CFLAGS $cf_new_cflags"
12576 fi
12577
12578 if test -n "$cf_new_cppflags" ; then
12579
12580         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12581 fi
12582
12583 if test -n "$cf_new_extra_cppflags" ; then
12584
12585         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12586 fi
12587
12588 else
12589         LIB_TRACING=DEBUG
12590         ADA_TRACE=FALSE
12591 fi
12592
12593 ###     Checks for libraries.
12594 case $cf_cv_system_name in #(vi
12595 *mingw32*) #(vi
12596         ;;
12597 *)
12598 echo "$as_me:12598: checking for gettimeofday" >&5
12599 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12600 if test "${ac_cv_func_gettimeofday+set}" = set; then
12601   echo $ECHO_N "(cached) $ECHO_C" >&6
12602 else
12603   cat >conftest.$ac_ext <<_ACEOF
12604 #line 12604 "configure"
12605 #include "confdefs.h"
12606 /* System header to define __stub macros and hopefully few prototypes,
12607     which can conflict with char gettimeofday (); below.  */
12608 #include <assert.h>
12609 /* Override any gcc2 internal prototype to avoid an error.  */
12610 #ifdef __cplusplus
12611 extern "C"
12612 #endif
12613 /* We use char because int might match the return type of a gcc2
12614    builtin and then its argument prototype would still apply.  */
12615 char gettimeofday ();
12616 char (*f) ();
12617
12618 int
12619 main ()
12620 {
12621 /* The GNU C library defines this for functions which it implements
12622     to always fail with ENOSYS.  Some functions are actually named
12623     something starting with __ and the normal name is an alias.  */
12624 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12625 choke me
12626 #else
12627 f = gettimeofday;
12628 #endif
12629
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext conftest$ac_exeext
12635 if { (eval echo "$as_me:12635: \"$ac_link\"") >&5
12636   (eval $ac_link) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit $ac_status); } &&
12640          { ac_try='test -s conftest$ac_exeext'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   ac_cv_func_gettimeofday=yes
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 cat conftest.$ac_ext >&5
12650 ac_cv_func_gettimeofday=no
12651 fi
12652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12653 fi
12654 echo "$as_me:12654: result: $ac_cv_func_gettimeofday" >&5
12655 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12656 if test $ac_cv_func_gettimeofday = yes; then
12657   cat >>confdefs.h <<\EOF
12658 #define HAVE_GETTIMEOFDAY 1
12659 EOF
12660
12661 else
12662
12663 echo "$as_me:12663: checking for gettimeofday in -lbsd" >&5
12664 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12665 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12666   echo $ECHO_N "(cached) $ECHO_C" >&6
12667 else
12668   ac_check_lib_save_LIBS=$LIBS
12669 LIBS="-lbsd  $LIBS"
12670 cat >conftest.$ac_ext <<_ACEOF
12671 #line 12671 "configure"
12672 #include "confdefs.h"
12673
12674 /* Override any gcc2 internal prototype to avoid an error.  */
12675 #ifdef __cplusplus
12676 extern "C"
12677 #endif
12678 /* We use char because int might match the return type of a gcc2
12679    builtin and then its argument prototype would still apply.  */
12680 char gettimeofday ();
12681 int
12682 main ()
12683 {
12684 gettimeofday ();
12685   ;
12686   return 0;
12687 }
12688 _ACEOF
12689 rm -f conftest.$ac_objext conftest$ac_exeext
12690 if { (eval echo "$as_me:12690: \"$ac_link\"") >&5
12691   (eval $ac_link) 2>&5
12692   ac_status=$?
12693   echo "$as_me:12693: \$? = $ac_status" >&5
12694   (exit $ac_status); } &&
12695          { ac_try='test -s conftest$ac_exeext'
12696   { (eval echo "$as_me:12696: \"$ac_try\"") >&5
12697   (eval $ac_try) 2>&5
12698   ac_status=$?
12699   echo "$as_me:12699: \$? = $ac_status" >&5
12700   (exit $ac_status); }; }; then
12701   ac_cv_lib_bsd_gettimeofday=yes
12702 else
12703   echo "$as_me: failed program was:" >&5
12704 cat conftest.$ac_ext >&5
12705 ac_cv_lib_bsd_gettimeofday=no
12706 fi
12707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12708 LIBS=$ac_check_lib_save_LIBS
12709 fi
12710 echo "$as_me:12710: result: $ac_cv_lib_bsd_gettimeofday" >&5
12711 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12712 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12713   cat >>confdefs.h <<\EOF
12714 #define HAVE_GETTIMEOFDAY 1
12715 EOF
12716
12717         LIBS="-lbsd $LIBS"
12718 fi
12719
12720 fi
12721         ;;
12722 esac
12723
12724 echo "$as_me:12724: checking if -lm needed for math functions" >&5
12725 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12726 if test "${cf_cv_need_libm+set}" = set; then
12727   echo $ECHO_N "(cached) $ECHO_C" >&6
12728 else
12729
12730         cat >conftest.$ac_ext <<_ACEOF
12731 #line 12731 "configure"
12732 #include "confdefs.h"
12733
12734         #include <stdio.h>
12735         #include <math.h>
12736
12737 int
12738 main ()
12739 {
12740 double x = rand(); printf("result = %g\n", sin(x))
12741   ;
12742   return 0;
12743 }
12744 _ACEOF
12745 rm -f conftest.$ac_objext conftest$ac_exeext
12746 if { (eval echo "$as_me:12746: \"$ac_link\"") >&5
12747   (eval $ac_link) 2>&5
12748   ac_status=$?
12749   echo "$as_me:12749: \$? = $ac_status" >&5
12750   (exit $ac_status); } &&
12751          { ac_try='test -s conftest$ac_exeext'
12752   { (eval echo "$as_me:12752: \"$ac_try\"") >&5
12753   (eval $ac_try) 2>&5
12754   ac_status=$?
12755   echo "$as_me:12755: \$? = $ac_status" >&5
12756   (exit $ac_status); }; }; then
12757   cf_cv_need_libm=no
12758 else
12759   echo "$as_me: failed program was:" >&5
12760 cat conftest.$ac_ext >&5
12761 cf_cv_need_libm=yes
12762 fi
12763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12764 fi
12765 echo "$as_me:12765: result: $cf_cv_need_libm" >&5
12766 echo "${ECHO_T}$cf_cv_need_libm" >&6
12767 if test "$cf_cv_need_libm" = yes
12768 then
12769 MATH_LIB=-lm
12770 fi
12771
12772 ###     Checks for header files.
12773 echo "$as_me:12773: checking for ANSI C header files" >&5
12774 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12775 if test "${ac_cv_header_stdc+set}" = set; then
12776   echo $ECHO_N "(cached) $ECHO_C" >&6
12777 else
12778   cat >conftest.$ac_ext <<_ACEOF
12779 #line 12779 "configure"
12780 #include "confdefs.h"
12781 #include <stdlib.h>
12782 #include <stdarg.h>
12783 #include <string.h>
12784 #include <float.h>
12785
12786 _ACEOF
12787 if { (eval echo "$as_me:12787: \"$ac_cpp conftest.$ac_ext\"") >&5
12788   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12789   ac_status=$?
12790   egrep -v '^ *\+' conftest.er1 >conftest.err
12791   rm -f conftest.er1
12792   cat conftest.err >&5
12793   echo "$as_me:12793: \$? = $ac_status" >&5
12794   (exit $ac_status); } >/dev/null; then
12795   if test -s conftest.err; then
12796     ac_cpp_err=$ac_c_preproc_warn_flag
12797   else
12798     ac_cpp_err=
12799   fi
12800 else
12801   ac_cpp_err=yes
12802 fi
12803 if test -z "$ac_cpp_err"; then
12804   ac_cv_header_stdc=yes
12805 else
12806   echo "$as_me: failed program was:" >&5
12807   cat conftest.$ac_ext >&5
12808   ac_cv_header_stdc=no
12809 fi
12810 rm -f conftest.err conftest.$ac_ext
12811
12812 if test $ac_cv_header_stdc = yes; then
12813   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12814   cat >conftest.$ac_ext <<_ACEOF
12815 #line 12815 "configure"
12816 #include "confdefs.h"
12817 #include <string.h>
12818
12819 _ACEOF
12820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12821   egrep "memchr" >/dev/null 2>&1; then
12822   :
12823 else
12824   ac_cv_header_stdc=no
12825 fi
12826 rm -rf conftest*
12827
12828 fi
12829
12830 if test $ac_cv_header_stdc = yes; then
12831   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12832   cat >conftest.$ac_ext <<_ACEOF
12833 #line 12833 "configure"
12834 #include "confdefs.h"
12835 #include <stdlib.h>
12836
12837 _ACEOF
12838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12839   egrep "free" >/dev/null 2>&1; then
12840   :
12841 else
12842   ac_cv_header_stdc=no
12843 fi
12844 rm -rf conftest*
12845
12846 fi
12847
12848 if test $ac_cv_header_stdc = yes; then
12849   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12850   if test "$cross_compiling" = yes; then
12851   :
12852 else
12853   cat >conftest.$ac_ext <<_ACEOF
12854 #line 12854 "configure"
12855 #include "confdefs.h"
12856 #include <ctype.h>
12857 #if ((' ' & 0x0FF) == 0x020)
12858 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12859 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12860 #else
12861 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12862                      || ('j' <= (c) && (c) <= 'r') \
12863                      || ('s' <= (c) && (c) <= 'z'))
12864 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12865 #endif
12866
12867 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12868 int
12869 main ()
12870 {
12871   int i;
12872   for (i = 0; i < 256; i++)
12873     if (XOR (islower (i), ISLOWER (i))
12874         || toupper (i) != TOUPPER (i))
12875       $ac_main_return(2);
12876   $ac_main_return (0);
12877 }
12878 _ACEOF
12879 rm -f conftest$ac_exeext
12880 if { (eval echo "$as_me:12880: \"$ac_link\"") >&5
12881   (eval $ac_link) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12885   { (eval echo "$as_me:12885: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:12888: \$? = $ac_status" >&5
12889   (exit $ac_status); }; }; then
12890   :
12891 else
12892   echo "$as_me: program exited with status $ac_status" >&5
12893 echo "$as_me: failed program was:" >&5
12894 cat conftest.$ac_ext >&5
12895 ac_cv_header_stdc=no
12896 fi
12897 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12898 fi
12899 fi
12900 fi
12901 echo "$as_me:12901: result: $ac_cv_header_stdc" >&5
12902 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12903 if test $ac_cv_header_stdc = yes; then
12904
12905 cat >>confdefs.h <<\EOF
12906 #define STDC_HEADERS 1
12907 EOF
12908
12909 fi
12910
12911 ac_header_dirent=no
12912 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12913   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12914 echo "$as_me:12914: checking for $ac_hdr that defines DIR" >&5
12915 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12917   echo $ECHO_N "(cached) $ECHO_C" >&6
12918 else
12919   cat >conftest.$ac_ext <<_ACEOF
12920 #line 12920 "configure"
12921 #include "confdefs.h"
12922 #include <sys/types.h>
12923 #include <$ac_hdr>
12924
12925 int
12926 main ()
12927 {
12928 if ((DIR *) 0)
12929 return 0;
12930   ;
12931   return 0;
12932 }
12933 _ACEOF
12934 rm -f conftest.$ac_objext
12935 if { (eval echo "$as_me:12935: \"$ac_compile\"") >&5
12936   (eval $ac_compile) 2>&5
12937   ac_status=$?
12938   echo "$as_me:12938: \$? = $ac_status" >&5
12939   (exit $ac_status); } &&
12940          { ac_try='test -s conftest.$ac_objext'
12941   { (eval echo "$as_me:12941: \"$ac_try\"") >&5
12942   (eval $ac_try) 2>&5
12943   ac_status=$?
12944   echo "$as_me:12944: \$? = $ac_status" >&5
12945   (exit $ac_status); }; }; then
12946   eval "$as_ac_Header=yes"
12947 else
12948   echo "$as_me: failed program was:" >&5
12949 cat conftest.$ac_ext >&5
12950 eval "$as_ac_Header=no"
12951 fi
12952 rm -f conftest.$ac_objext conftest.$ac_ext
12953 fi
12954 echo "$as_me:12954: result: `eval echo '${'$as_ac_Header'}'`" >&5
12955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12956 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12957   cat >>confdefs.h <<EOF
12958 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12959 EOF
12960
12961 ac_header_dirent=$ac_hdr; break
12962 fi
12963
12964 done
12965 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12966 if test $ac_header_dirent = dirent.h; then
12967   echo "$as_me:12967: checking for opendir in -ldir" >&5
12968 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12969 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972   ac_check_lib_save_LIBS=$LIBS
12973 LIBS="-ldir  $LIBS"
12974 cat >conftest.$ac_ext <<_ACEOF
12975 #line 12975 "configure"
12976 #include "confdefs.h"
12977
12978 /* Override any gcc2 internal prototype to avoid an error.  */
12979 #ifdef __cplusplus
12980 extern "C"
12981 #endif
12982 /* We use char because int might match the return type of a gcc2
12983    builtin and then its argument prototype would still apply.  */
12984 char opendir ();
12985 int
12986 main ()
12987 {
12988 opendir ();
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f conftest.$ac_objext conftest$ac_exeext
12994 if { (eval echo "$as_me:12994: \"$ac_link\"") >&5
12995   (eval $ac_link) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); } &&
12999          { ac_try='test -s conftest$ac_exeext'
13000   { (eval echo "$as_me:13000: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   ac_cv_lib_dir_opendir=yes
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 cat conftest.$ac_ext >&5
13009 ac_cv_lib_dir_opendir=no
13010 fi
13011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13012 LIBS=$ac_check_lib_save_LIBS
13013 fi
13014 echo "$as_me:13014: result: $ac_cv_lib_dir_opendir" >&5
13015 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13016 if test $ac_cv_lib_dir_opendir = yes; then
13017   LIBS="$LIBS -ldir"
13018 fi
13019
13020 else
13021   echo "$as_me:13021: checking for opendir in -lx" >&5
13022 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13023 if test "${ac_cv_lib_x_opendir+set}" = set; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026   ac_check_lib_save_LIBS=$LIBS
13027 LIBS="-lx  $LIBS"
13028 cat >conftest.$ac_ext <<_ACEOF
13029 #line 13029 "configure"
13030 #include "confdefs.h"
13031
13032 /* Override any gcc2 internal prototype to avoid an error.  */
13033 #ifdef __cplusplus
13034 extern "C"
13035 #endif
13036 /* We use char because int might match the return type of a gcc2
13037    builtin and then its argument prototype would still apply.  */
13038 char opendir ();
13039 int
13040 main ()
13041 {
13042 opendir ();
13043   ;
13044   return 0;
13045 }
13046 _ACEOF
13047 rm -f conftest.$ac_objext conftest$ac_exeext
13048 if { (eval echo "$as_me:13048: \"$ac_link\"") >&5
13049   (eval $ac_link) 2>&5
13050   ac_status=$?
13051   echo "$as_me:13051: \$? = $ac_status" >&5
13052   (exit $ac_status); } &&
13053          { ac_try='test -s conftest$ac_exeext'
13054   { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055   (eval $ac_try) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit $ac_status); }; }; then
13059   ac_cv_lib_x_opendir=yes
13060 else
13061   echo "$as_me: failed program was:" >&5
13062 cat conftest.$ac_ext >&5
13063 ac_cv_lib_x_opendir=no
13064 fi
13065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13066 LIBS=$ac_check_lib_save_LIBS
13067 fi
13068 echo "$as_me:13068: result: $ac_cv_lib_x_opendir" >&5
13069 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13070 if test $ac_cv_lib_x_opendir = yes; then
13071   LIBS="$LIBS -lx"
13072 fi
13073
13074 fi
13075
13076 echo "$as_me:13076: checking whether time.h and sys/time.h may both be included" >&5
13077 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13078 if test "${ac_cv_header_time+set}" = set; then
13079   echo $ECHO_N "(cached) $ECHO_C" >&6
13080 else
13081   cat >conftest.$ac_ext <<_ACEOF
13082 #line 13082 "configure"
13083 #include "confdefs.h"
13084 #include <sys/types.h>
13085 #include <sys/time.h>
13086 #include <time.h>
13087
13088 int
13089 main ()
13090 {
13091 if ((struct tm *) 0)
13092 return 0;
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 rm -f conftest.$ac_objext
13098 if { (eval echo "$as_me:13098: \"$ac_compile\"") >&5
13099   (eval $ac_compile) 2>&5
13100   ac_status=$?
13101   echo "$as_me:13101: \$? = $ac_status" >&5
13102   (exit $ac_status); } &&
13103          { ac_try='test -s conftest.$ac_objext'
13104   { (eval echo "$as_me:13104: \"$ac_try\"") >&5
13105   (eval $ac_try) 2>&5
13106   ac_status=$?
13107   echo "$as_me:13107: \$? = $ac_status" >&5
13108   (exit $ac_status); }; }; then
13109   ac_cv_header_time=yes
13110 else
13111   echo "$as_me: failed program was:" >&5
13112 cat conftest.$ac_ext >&5
13113 ac_cv_header_time=no
13114 fi
13115 rm -f conftest.$ac_objext conftest.$ac_ext
13116 fi
13117 echo "$as_me:13117: result: $ac_cv_header_time" >&5
13118 echo "${ECHO_T}$ac_cv_header_time" >&6
13119 if test $ac_cv_header_time = yes; then
13120
13121 cat >>confdefs.h <<\EOF
13122 #define TIME_WITH_SYS_TIME 1
13123 EOF
13124
13125 fi
13126
13127 cf_regex_func=no
13128
13129 cf_regex_libs="regex re"
13130 case $host_os in #(vi
13131 mingw*)
13132         cf_regex_libs="regex.dll $cf_regex_libs"
13133         ;;
13134 esac
13135
13136 echo "$as_me:13136: checking for regcomp" >&5
13137 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13138 if test "${ac_cv_func_regcomp+set}" = set; then
13139   echo $ECHO_N "(cached) $ECHO_C" >&6
13140 else
13141   cat >conftest.$ac_ext <<_ACEOF
13142 #line 13142 "configure"
13143 #include "confdefs.h"
13144 /* System header to define __stub macros and hopefully few prototypes,
13145     which can conflict with char regcomp (); below.  */
13146 #include <assert.h>
13147 /* Override any gcc2 internal prototype to avoid an error.  */
13148 #ifdef __cplusplus
13149 extern "C"
13150 #endif
13151 /* We use char because int might match the return type of a gcc2
13152    builtin and then its argument prototype would still apply.  */
13153 char regcomp ();
13154 char (*f) ();
13155
13156 int
13157 main ()
13158 {
13159 /* The GNU C library defines this for functions which it implements
13160     to always fail with ENOSYS.  Some functions are actually named
13161     something starting with __ and the normal name is an alias.  */
13162 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13163 choke me
13164 #else
13165 f = regcomp;
13166 #endif
13167
13168   ;
13169   return 0;
13170 }
13171 _ACEOF
13172 rm -f conftest.$ac_objext conftest$ac_exeext
13173 if { (eval echo "$as_me:13173: \"$ac_link\"") >&5
13174   (eval $ac_link) 2>&5
13175   ac_status=$?
13176   echo "$as_me:13176: \$? = $ac_status" >&5
13177   (exit $ac_status); } &&
13178          { ac_try='test -s conftest$ac_exeext'
13179   { (eval echo "$as_me:13179: \"$ac_try\"") >&5
13180   (eval $ac_try) 2>&5
13181   ac_status=$?
13182   echo "$as_me:13182: \$? = $ac_status" >&5
13183   (exit $ac_status); }; }; then
13184   ac_cv_func_regcomp=yes
13185 else
13186   echo "$as_me: failed program was:" >&5
13187 cat conftest.$ac_ext >&5
13188 ac_cv_func_regcomp=no
13189 fi
13190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13191 fi
13192 echo "$as_me:13192: result: $ac_cv_func_regcomp" >&5
13193 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13194 if test $ac_cv_func_regcomp = yes; then
13195   cf_regex_func=regcomp
13196 else
13197
13198         for cf_regex_lib in $cf_regex_libs
13199         do
13200                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13201 echo "$as_me:13201: checking for regcomp in -l$cf_regex_lib" >&5
13202 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13203 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13204   echo $ECHO_N "(cached) $ECHO_C" >&6
13205 else
13206   ac_check_lib_save_LIBS=$LIBS
13207 LIBS="-l$cf_regex_lib  $LIBS"
13208 cat >conftest.$ac_ext <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13211
13212 /* Override any gcc2 internal prototype to avoid an error.  */
13213 #ifdef __cplusplus
13214 extern "C"
13215 #endif
13216 /* We use char because int might match the return type of a gcc2
13217    builtin and then its argument prototype would still apply.  */
13218 char regcomp ();
13219 int
13220 main ()
13221 {
13222 regcomp ();
13223   ;
13224   return 0;
13225 }
13226 _ACEOF
13227 rm -f conftest.$ac_objext conftest$ac_exeext
13228 if { (eval echo "$as_me:13228: \"$ac_link\"") >&5
13229   (eval $ac_link) 2>&5
13230   ac_status=$?
13231   echo "$as_me:13231: \$? = $ac_status" >&5
13232   (exit $ac_status); } &&
13233          { ac_try='test -s conftest$ac_exeext'
13234   { (eval echo "$as_me:13234: \"$ac_try\"") >&5
13235   (eval $ac_try) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); }; }; then
13239   eval "$as_ac_Lib=yes"
13240 else
13241   echo "$as_me: failed program was:" >&5
13242 cat conftest.$ac_ext >&5
13243 eval "$as_ac_Lib=no"
13244 fi
13245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13246 LIBS=$ac_check_lib_save_LIBS
13247 fi
13248 echo "$as_me:13248: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13249 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13250 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13251
13252                                 LIBS="-l$cf_regex_lib $LIBS"
13253                                 cf_regex_func=regcomp
13254                                 break
13255 fi
13256
13257         done
13258
13259 fi
13260
13261 if test "$cf_regex_func" = no ; then
13262         echo "$as_me:13262: checking for compile" >&5
13263 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13264 if test "${ac_cv_func_compile+set}" = set; then
13265   echo $ECHO_N "(cached) $ECHO_C" >&6
13266 else
13267   cat >conftest.$ac_ext <<_ACEOF
13268 #line 13268 "configure"
13269 #include "confdefs.h"
13270 /* System header to define __stub macros and hopefully few prototypes,
13271     which can conflict with char compile (); below.  */
13272 #include <assert.h>
13273 /* Override any gcc2 internal prototype to avoid an error.  */
13274 #ifdef __cplusplus
13275 extern "C"
13276 #endif
13277 /* We use char because int might match the return type of a gcc2
13278    builtin and then its argument prototype would still apply.  */
13279 char compile ();
13280 char (*f) ();
13281
13282 int
13283 main ()
13284 {
13285 /* The GNU C library defines this for functions which it implements
13286     to always fail with ENOSYS.  Some functions are actually named
13287     something starting with __ and the normal name is an alias.  */
13288 #if defined (__stub_compile) || defined (__stub___compile)
13289 choke me
13290 #else
13291 f = compile;
13292 #endif
13293
13294   ;
13295   return 0;
13296 }
13297 _ACEOF
13298 rm -f conftest.$ac_objext conftest$ac_exeext
13299 if { (eval echo "$as_me:13299: \"$ac_link\"") >&5
13300   (eval $ac_link) 2>&5
13301   ac_status=$?
13302   echo "$as_me:13302: \$? = $ac_status" >&5
13303   (exit $ac_status); } &&
13304          { ac_try='test -s conftest$ac_exeext'
13305   { (eval echo "$as_me:13305: \"$ac_try\"") >&5
13306   (eval $ac_try) 2>&5
13307   ac_status=$?
13308   echo "$as_me:13308: \$? = $ac_status" >&5
13309   (exit $ac_status); }; }; then
13310   ac_cv_func_compile=yes
13311 else
13312   echo "$as_me: failed program was:" >&5
13313 cat conftest.$ac_ext >&5
13314 ac_cv_func_compile=no
13315 fi
13316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13317 fi
13318 echo "$as_me:13318: result: $ac_cv_func_compile" >&5
13319 echo "${ECHO_T}$ac_cv_func_compile" >&6
13320 if test $ac_cv_func_compile = yes; then
13321   cf_regex_func=compile
13322 else
13323
13324                 echo "$as_me:13324: checking for compile in -lgen" >&5
13325 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13326 if test "${ac_cv_lib_gen_compile+set}" = set; then
13327   echo $ECHO_N "(cached) $ECHO_C" >&6
13328 else
13329   ac_check_lib_save_LIBS=$LIBS
13330 LIBS="-lgen  $LIBS"
13331 cat >conftest.$ac_ext <<_ACEOF
13332 #line 13332 "configure"
13333 #include "confdefs.h"
13334
13335 /* Override any gcc2 internal prototype to avoid an error.  */
13336 #ifdef __cplusplus
13337 extern "C"
13338 #endif
13339 /* We use char because int might match the return type of a gcc2
13340    builtin and then its argument prototype would still apply.  */
13341 char compile ();
13342 int
13343 main ()
13344 {
13345 compile ();
13346   ;
13347   return 0;
13348 }
13349 _ACEOF
13350 rm -f conftest.$ac_objext conftest$ac_exeext
13351 if { (eval echo "$as_me:13351: \"$ac_link\"") >&5
13352   (eval $ac_link) 2>&5
13353   ac_status=$?
13354   echo "$as_me:13354: \$? = $ac_status" >&5
13355   (exit $ac_status); } &&
13356          { ac_try='test -s conftest$ac_exeext'
13357   { (eval echo "$as_me:13357: \"$ac_try\"") >&5
13358   (eval $ac_try) 2>&5
13359   ac_status=$?
13360   echo "$as_me:13360: \$? = $ac_status" >&5
13361   (exit $ac_status); }; }; then
13362   ac_cv_lib_gen_compile=yes
13363 else
13364   echo "$as_me: failed program was:" >&5
13365 cat conftest.$ac_ext >&5
13366 ac_cv_lib_gen_compile=no
13367 fi
13368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13369 LIBS=$ac_check_lib_save_LIBS
13370 fi
13371 echo "$as_me:13371: result: $ac_cv_lib_gen_compile" >&5
13372 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13373 if test $ac_cv_lib_gen_compile = yes; then
13374
13375                                 LIBS="-lgen $LIBS"
13376                                 cf_regex_func=compile
13377 fi
13378
13379 fi
13380
13381 fi
13382
13383 if test "$cf_regex_func" = no ; then
13384         { echo "$as_me:13384: WARNING: cannot find regular expression library" >&5
13385 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13386 fi
13387
13388 echo "$as_me:13388: checking for regular-expression headers" >&5
13389 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13390 if test "${cf_cv_regex_hdrs+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393
13394 cf_cv_regex_hdrs=no
13395 case $cf_regex_func in #(vi
13396 compile) #(vi
13397         for cf_regex_hdr in regexp.h regexpr.h
13398         do
13399                 cat >conftest.$ac_ext <<_ACEOF
13400 #line 13400 "configure"
13401 #include "confdefs.h"
13402 #include <$cf_regex_hdr>
13403 int
13404 main ()
13405 {
13406
13407                         char *p = compile("", "", "", 0);
13408                         int x = step("", "");
13409
13410   ;
13411   return 0;
13412 }
13413 _ACEOF
13414 rm -f conftest.$ac_objext conftest$ac_exeext
13415 if { (eval echo "$as_me:13415: \"$ac_link\"") >&5
13416   (eval $ac_link) 2>&5
13417   ac_status=$?
13418   echo "$as_me:13418: \$? = $ac_status" >&5
13419   (exit $ac_status); } &&
13420          { ac_try='test -s conftest$ac_exeext'
13421   { (eval echo "$as_me:13421: \"$ac_try\"") >&5
13422   (eval $ac_try) 2>&5
13423   ac_status=$?
13424   echo "$as_me:13424: \$? = $ac_status" >&5
13425   (exit $ac_status); }; }; then
13426
13427                         cf_cv_regex_hdrs=$cf_regex_hdr
13428                         break
13429
13430 else
13431   echo "$as_me: failed program was:" >&5
13432 cat conftest.$ac_ext >&5
13433 fi
13434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13435         done
13436         ;;
13437 *)
13438         for cf_regex_hdr in regex.h
13439         do
13440                 cat >conftest.$ac_ext <<_ACEOF
13441 #line 13441 "configure"
13442 #include "confdefs.h"
13443 #include <sys/types.h>
13444 #include <$cf_regex_hdr>
13445 int
13446 main ()
13447 {
13448
13449                         regex_t *p;
13450                         int x = regcomp(p, "", 0);
13451                         int y = regexec(p, "", 0, 0, 0);
13452                         regfree(p);
13453
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 rm -f conftest.$ac_objext conftest$ac_exeext
13459 if { (eval echo "$as_me:13459: \"$ac_link\"") >&5
13460   (eval $ac_link) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); } &&
13464          { ac_try='test -s conftest$ac_exeext'
13465   { (eval echo "$as_me:13465: \"$ac_try\"") >&5
13466   (eval $ac_try) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); }; }; then
13470
13471                         cf_cv_regex_hdrs=$cf_regex_hdr
13472                         break
13473
13474 else
13475   echo "$as_me: failed program was:" >&5
13476 cat conftest.$ac_ext >&5
13477 fi
13478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13479         done
13480         ;;
13481 esac
13482
13483 fi
13484 echo "$as_me:13484: result: $cf_cv_regex_hdrs" >&5
13485 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13486
13487 case $cf_cv_regex_hdrs in #(vi
13488     no)        { echo "$as_me:13488: WARNING: no regular expression header found" >&5
13489 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13490     regex.h)   cat >>confdefs.h <<\EOF
13491 #define HAVE_REGEX_H_FUNCS 1
13492 EOF
13493  ;; #(vi
13494     regexp.h)  cat >>confdefs.h <<\EOF
13495 #define HAVE_REGEXP_H_FUNCS 1
13496 EOF
13497  ;; #(vi
13498     regexpr.h) cat >>confdefs.h <<\EOF
13499 #define HAVE_REGEXPR_H_FUNCS 1
13500 EOF
13501  ;;
13502 esac
13503
13504 for ac_header in \
13505 fcntl.h \
13506 getopt.h \
13507 limits.h \
13508 locale.h \
13509 math.h \
13510 poll.h \
13511 sys/bsdtypes.h \
13512 sys/ioctl.h \
13513 sys/param.h \
13514 sys/poll.h \
13515 sys/select.h \
13516 sys/time.h \
13517 sys/times.h \
13518 ttyent.h \
13519 unistd.h \
13520 wctype.h \
13521
13522 do
13523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13524 echo "$as_me:13524: checking for $ac_header" >&5
13525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13527   echo $ECHO_N "(cached) $ECHO_C" >&6
13528 else
13529   cat >conftest.$ac_ext <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532 #include <$ac_header>
13533 _ACEOF
13534 if { (eval echo "$as_me:13534: \"$ac_cpp conftest.$ac_ext\"") >&5
13535   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13536   ac_status=$?
13537   egrep -v '^ *\+' conftest.er1 >conftest.err
13538   rm -f conftest.er1
13539   cat conftest.err >&5
13540   echo "$as_me:13540: \$? = $ac_status" >&5
13541   (exit $ac_status); } >/dev/null; then
13542   if test -s conftest.err; then
13543     ac_cpp_err=$ac_c_preproc_warn_flag
13544   else
13545     ac_cpp_err=
13546   fi
13547 else
13548   ac_cpp_err=yes
13549 fi
13550 if test -z "$ac_cpp_err"; then
13551   eval "$as_ac_Header=yes"
13552 else
13553   echo "$as_me: failed program was:" >&5
13554   cat conftest.$ac_ext >&5
13555   eval "$as_ac_Header=no"
13556 fi
13557 rm -f conftest.err conftest.$ac_ext
13558 fi
13559 echo "$as_me:13559: result: `eval echo '${'$as_ac_Header'}'`" >&5
13560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13562   cat >>confdefs.h <<EOF
13563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13564 EOF
13565
13566 fi
13567 done
13568
13569 for ac_header in unistd.h getopt.h
13570 do
13571 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13572 echo "$as_me:13572: checking for $ac_header" >&5
13573 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13575   echo $ECHO_N "(cached) $ECHO_C" >&6
13576 else
13577   cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 #include <$ac_header>
13581 _ACEOF
13582 if { (eval echo "$as_me:13582: \"$ac_cpp conftest.$ac_ext\"") >&5
13583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13584   ac_status=$?
13585   egrep -v '^ *\+' conftest.er1 >conftest.err
13586   rm -f conftest.er1
13587   cat conftest.err >&5
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); } >/dev/null; then
13590   if test -s conftest.err; then
13591     ac_cpp_err=$ac_c_preproc_warn_flag
13592   else
13593     ac_cpp_err=
13594   fi
13595 else
13596   ac_cpp_err=yes
13597 fi
13598 if test -z "$ac_cpp_err"; then
13599   eval "$as_ac_Header=yes"
13600 else
13601   echo "$as_me: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   eval "$as_ac_Header=no"
13604 fi
13605 rm -f conftest.err conftest.$ac_ext
13606 fi
13607 echo "$as_me:13607: result: `eval echo '${'$as_ac_Header'}'`" >&5
13608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13609 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13610   cat >>confdefs.h <<EOF
13611 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13612 EOF
13613
13614 fi
13615 done
13616
13617 echo "$as_me:13617: checking for header declaring getopt variables" >&5
13618 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13619 if test "${cf_cv_getopt_header+set}" = set; then
13620   echo $ECHO_N "(cached) $ECHO_C" >&6
13621 else
13622
13623 cf_cv_getopt_header=none
13624 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13625 do
13626 cat >conftest.$ac_ext <<_ACEOF
13627 #line 13627 "configure"
13628 #include "confdefs.h"
13629
13630 #include <$cf_header>
13631 int
13632 main ()
13633 {
13634 int x = optind; char *y = optarg
13635   ;
13636   return 0;
13637 }
13638 _ACEOF
13639 rm -f conftest.$ac_objext
13640 if { (eval echo "$as_me:13640: \"$ac_compile\"") >&5
13641   (eval $ac_compile) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); } &&
13645          { ac_try='test -s conftest.$ac_objext'
13646   { (eval echo "$as_me:13646: \"$ac_try\"") >&5
13647   (eval $ac_try) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit $ac_status); }; }; then
13651   cf_cv_getopt_header=$cf_header
13652  break
13653 else
13654   echo "$as_me: failed program was:" >&5
13655 cat conftest.$ac_ext >&5
13656 fi
13657 rm -f conftest.$ac_objext conftest.$ac_ext
13658 done
13659
13660 fi
13661 echo "$as_me:13661: result: $cf_cv_getopt_header" >&5
13662 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13663 if test $cf_cv_getopt_header != none ; then
13664         cat >>confdefs.h <<\EOF
13665 #define HAVE_GETOPT_HEADER 1
13666 EOF
13667
13668 fi
13669
13670 # check for ISC (this may also define _POSIX_SOURCE)
13671 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13672 if test "$ISC" = yes ; then
13673
13674 echo "$as_me:13674: checking for main in -lcposix" >&5
13675 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13676 if test "${ac_cv_lib_cposix_main+set}" = set; then
13677   echo $ECHO_N "(cached) $ECHO_C" >&6
13678 else
13679   ac_check_lib_save_LIBS=$LIBS
13680 LIBS="-lcposix  $LIBS"
13681 cat >conftest.$ac_ext <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684
13685 int
13686 main ()
13687 {
13688 main ();
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -f conftest.$ac_objext conftest$ac_exeext
13694 if { (eval echo "$as_me:13694: \"$ac_link\"") >&5
13695   (eval $ac_link) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit $ac_status); } &&
13699          { ac_try='test -s conftest$ac_exeext'
13700   { (eval echo "$as_me:13700: \"$ac_try\"") >&5
13701   (eval $ac_try) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); }; }; then
13705   ac_cv_lib_cposix_main=yes
13706 else
13707   echo "$as_me: failed program was:" >&5
13708 cat conftest.$ac_ext >&5
13709 ac_cv_lib_cposix_main=no
13710 fi
13711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13712 LIBS=$ac_check_lib_save_LIBS
13713 fi
13714 echo "$as_me:13714: result: $ac_cv_lib_cposix_main" >&5
13715 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13716 if test $ac_cv_lib_cposix_main = yes; then
13717   cat >>confdefs.h <<EOF
13718 #define HAVE_LIBCPOSIX 1
13719 EOF
13720
13721   LIBS="-lcposix $LIBS"
13722
13723 fi
13724
13725         echo "$as_me:13725: checking for bzero in -linet" >&5
13726 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13727 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13728   echo $ECHO_N "(cached) $ECHO_C" >&6
13729 else
13730   ac_check_lib_save_LIBS=$LIBS
13731 LIBS="-linet  $LIBS"
13732 cat >conftest.$ac_ext <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735
13736 /* Override any gcc2 internal prototype to avoid an error.  */
13737 #ifdef __cplusplus
13738 extern "C"
13739 #endif
13740 /* We use char because int might match the return type of a gcc2
13741    builtin and then its argument prototype would still apply.  */
13742 char bzero ();
13743 int
13744 main ()
13745 {
13746 bzero ();
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 rm -f conftest.$ac_objext conftest$ac_exeext
13752 if { (eval echo "$as_me:13752: \"$ac_link\"") >&5
13753   (eval $ac_link) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); } &&
13757          { ac_try='test -s conftest$ac_exeext'
13758   { (eval echo "$as_me:13758: \"$ac_try\"") >&5
13759   (eval $ac_try) 2>&5
13760   ac_status=$?
13761   echo "$as_me:13761: \$? = $ac_status" >&5
13762   (exit $ac_status); }; }; then
13763   ac_cv_lib_inet_bzero=yes
13764 else
13765   echo "$as_me: failed program was:" >&5
13766 cat conftest.$ac_ext >&5
13767 ac_cv_lib_inet_bzero=no
13768 fi
13769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13770 LIBS=$ac_check_lib_save_LIBS
13771 fi
13772 echo "$as_me:13772: result: $ac_cv_lib_inet_bzero" >&5
13773 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13774 if test $ac_cv_lib_inet_bzero = yes; then
13775   LIBS="-linet $LIBS"
13776 fi
13777 fi
13778
13779 echo "$as_me:13779: checking if sys/time.h works with sys/select.h" >&5
13780 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13781 if test "${cf_cv_sys_time_select+set}" = set; then
13782   echo $ECHO_N "(cached) $ECHO_C" >&6
13783 else
13784
13785 cat >conftest.$ac_ext <<_ACEOF
13786 #line 13786 "configure"
13787 #include "confdefs.h"
13788
13789 #include <sys/types.h>
13790 #ifdef HAVE_SYS_TIME_H
13791 #include <sys/time.h>
13792 #endif
13793 #ifdef HAVE_SYS_SELECT_H
13794 #include <sys/select.h>
13795 #endif
13796
13797 int
13798 main ()
13799 {
13800
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 rm -f conftest.$ac_objext
13806 if { (eval echo "$as_me:13806: \"$ac_compile\"") >&5
13807   (eval $ac_compile) 2>&5
13808   ac_status=$?
13809   echo "$as_me:13809: \$? = $ac_status" >&5
13810   (exit $ac_status); } &&
13811          { ac_try='test -s conftest.$ac_objext'
13812   { (eval echo "$as_me:13812: \"$ac_try\"") >&5
13813   (eval $ac_try) 2>&5
13814   ac_status=$?
13815   echo "$as_me:13815: \$? = $ac_status" >&5
13816   (exit $ac_status); }; }; then
13817   cf_cv_sys_time_select=yes
13818 else
13819   echo "$as_me: failed program was:" >&5
13820 cat conftest.$ac_ext >&5
13821 cf_cv_sys_time_select=no
13822 fi
13823 rm -f conftest.$ac_objext conftest.$ac_ext
13824
13825 fi
13826
13827 echo "$as_me:13827: result: $cf_cv_sys_time_select" >&5
13828 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13829 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13830 #define HAVE_SYS_TIME_SELECT 1
13831 EOF
13832
13833 ###     checks for compiler characteristics
13834 ac_ext=c
13835 ac_cpp='$CPP $CPPFLAGS'
13836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13839 ac_main_return=return
13840
13841 echo "$as_me:13841: checking for $CC option to accept ANSI C" >&5
13842 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13843 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13844   echo $ECHO_N "(cached) $ECHO_C" >&6
13845 else
13846   ac_cv_prog_cc_stdc=no
13847 ac_save_CC=$CC
13848 cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 #include <stdarg.h>
13852 #include <stdio.h>
13853 #include <sys/types.h>
13854 #include <sys/stat.h>
13855 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13856 struct buf { int x; };
13857 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13858 static char *e (p, i)
13859      char **p;
13860      int i;
13861 {
13862   return p[i];
13863 }
13864 static char *f (char * (*g) (char **, int), char **p, ...)
13865 {
13866   char *s;
13867   va_list v;
13868   va_start (v,p);
13869   s = g (p, va_arg (v,int));
13870   va_end (v);
13871   return s;
13872 }
13873 int test (int i, double x);
13874 struct s1 {int (*f) (int a);};
13875 struct s2 {int (*f) (double a);};
13876 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13877 int argc;
13878 char **argv;
13879 int
13880 main ()
13881 {
13882 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13883   ;
13884   return 0;
13885 }
13886 _ACEOF
13887 # Don't try gcc -ansi; that turns off useful extensions and
13888 # breaks some systems' header files.
13889 # AIX                   -qlanglvl=ansi
13890 # Ultrix and OSF/1      -std1
13891 # HP-UX 10.20 and later -Ae
13892 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13893 # SVR4                  -Xc -D__EXTENSIONS__
13894 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13895 do
13896   CC="$ac_save_CC $ac_arg"
13897   rm -f conftest.$ac_objext
13898 if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); } &&
13903          { ac_try='test -s conftest.$ac_objext'
13904   { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905   (eval $ac_try) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); }; }; then
13909   ac_cv_prog_cc_stdc=$ac_arg
13910 break
13911 else
13912   echo "$as_me: failed program was:" >&5
13913 cat conftest.$ac_ext >&5
13914 fi
13915 rm -f conftest.$ac_objext
13916 done
13917 rm -f conftest.$ac_ext conftest.$ac_objext
13918 CC=$ac_save_CC
13919
13920 fi
13921
13922 case "x$ac_cv_prog_cc_stdc" in
13923   x|xno)
13924     echo "$as_me:13924: result: none needed" >&5
13925 echo "${ECHO_T}none needed" >&6 ;;
13926   *)
13927     echo "$as_me:13927: result: $ac_cv_prog_cc_stdc" >&5
13928 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13929     CC="$CC $ac_cv_prog_cc_stdc" ;;
13930 esac
13931
13932 echo "$as_me:13932: checking for an ANSI C-conforming const" >&5
13933 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13934 if test "${ac_cv_c_const+set}" = set; then
13935   echo $ECHO_N "(cached) $ECHO_C" >&6
13936 else
13937   cat >conftest.$ac_ext <<_ACEOF
13938 #line 13938 "configure"
13939 #include "confdefs.h"
13940
13941 int
13942 main ()
13943 {
13944 /* FIXME: Include the comments suggested by Paul. */
13945 #ifndef __cplusplus
13946   /* Ultrix mips cc rejects this.  */
13947   typedef int charset[2];
13948   const charset x;
13949   /* SunOS 4.1.1 cc rejects this.  */
13950   char const *const *ccp;
13951   char **p;
13952   /* NEC SVR4.0.2 mips cc rejects this.  */
13953   struct point {int x, y;};
13954   static struct point const zero = {0,0};
13955   /* AIX XL C 1.02.0.0 rejects this.
13956      It does not let you subtract one const X* pointer from another in
13957      an arm of an if-expression whose if-part is not a constant
13958      expression */
13959   const char *g = "string";
13960   ccp = &g + (g ? g-g : 0);
13961   /* HPUX 7.0 cc rejects these. */
13962   ++ccp;
13963   p = (char**) ccp;
13964   ccp = (char const *const *) p;
13965   { /* SCO 3.2v4 cc rejects this.  */
13966     char *t;
13967     char const *s = 0 ? (char *) 0 : (char const *) 0;
13968
13969     *t++ = 0;
13970   }
13971   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13972     int x[] = {25, 17};
13973     const int *foo = &x[0];
13974     ++foo;
13975   }
13976   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13977     typedef const int *iptr;
13978     iptr p = 0;
13979     ++p;
13980   }
13981   { /* AIX XL C 1.02.0.0 rejects this saying
13982        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13983     struct s { int j; const int *ap[3]; };
13984     struct s *b; b->j = 5;
13985   }
13986   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13987     const int foo = 10;
13988   }
13989 #endif
13990
13991   ;
13992   return 0;
13993 }
13994 _ACEOF
13995 rm -f conftest.$ac_objext
13996 if { (eval echo "$as_me:13996: \"$ac_compile\"") >&5
13997   (eval $ac_compile) 2>&5
13998   ac_status=$?
13999   echo "$as_me:13999: \$? = $ac_status" >&5
14000   (exit $ac_status); } &&
14001          { ac_try='test -s conftest.$ac_objext'
14002   { (eval echo "$as_me:14002: \"$ac_try\"") >&5
14003   (eval $ac_try) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); }; }; then
14007   ac_cv_c_const=yes
14008 else
14009   echo "$as_me: failed program was:" >&5
14010 cat conftest.$ac_ext >&5
14011 ac_cv_c_const=no
14012 fi
14013 rm -f conftest.$ac_objext conftest.$ac_ext
14014 fi
14015 echo "$as_me:14015: result: $ac_cv_c_const" >&5
14016 echo "${ECHO_T}$ac_cv_c_const" >&6
14017 if test $ac_cv_c_const = no; then
14018
14019 cat >>confdefs.h <<\EOF
14020 #define const
14021 EOF
14022
14023 fi
14024
14025 echo "$as_me:14025: checking for inline" >&5
14026 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14027 if test "${ac_cv_c_inline+set}" = set; then
14028   echo $ECHO_N "(cached) $ECHO_C" >&6
14029 else
14030   ac_cv_c_inline=no
14031 for ac_kw in inline __inline__ __inline; do
14032   cat >conftest.$ac_ext <<_ACEOF
14033 #line 14033 "configure"
14034 #include "confdefs.h"
14035 #ifndef __cplusplus
14036 static $ac_kw int static_foo () {return 0; }
14037 $ac_kw int foo () {return 0; }
14038 #endif
14039
14040 _ACEOF
14041 rm -f conftest.$ac_objext
14042 if { (eval echo "$as_me:14042: \"$ac_compile\"") >&5
14043   (eval $ac_compile) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -s conftest.$ac_objext'
14048   { (eval echo "$as_me:14048: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); }; }; then
14053   ac_cv_c_inline=$ac_kw; break
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14057 fi
14058 rm -f conftest.$ac_objext conftest.$ac_ext
14059 done
14060
14061 fi
14062 echo "$as_me:14062: result: $ac_cv_c_inline" >&5
14063 echo "${ECHO_T}$ac_cv_c_inline" >&6
14064 case $ac_cv_c_inline in
14065   inline | yes) ;;
14066   no)
14067 cat >>confdefs.h <<\EOF
14068 #define inline
14069 EOF
14070  ;;
14071   *)  cat >>confdefs.h <<EOF
14072 #define inline $ac_cv_c_inline
14073 EOF
14074  ;;
14075 esac
14076
14077 NCURSES_INLINE=
14078 if test "$ac_cv_c_inline" != no ; then
14079   NCURSES_INLINE=inline
14080   if test "$INTEL_COMPILER" = yes
14081   then
14082     :
14083   elif test "$GCC" = yes
14084   then
14085     echo "$as_me:14085: checking if $CC supports options to tune inlining" >&5
14086 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14087 if test "${cf_cv_gcc_inline+set}" = set; then
14088   echo $ECHO_N "(cached) $ECHO_C" >&6
14089 else
14090
14091       cf_save_CFLAGS=$CFLAGS
14092       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14093       cat >conftest.$ac_ext <<_ACEOF
14094 #line 14094 "configure"
14095 #include "confdefs.h"
14096 inline int foo(void) { return 1; }
14097 int
14098 main ()
14099 {
14100 ${cf_cv_main_return:-return} foo()
14101   ;
14102   return 0;
14103 }
14104 _ACEOF
14105 rm -f conftest.$ac_objext
14106 if { (eval echo "$as_me:14106: \"$ac_compile\"") >&5
14107   (eval $ac_compile) 2>&5
14108   ac_status=$?
14109   echo "$as_me:14109: \$? = $ac_status" >&5
14110   (exit $ac_status); } &&
14111          { ac_try='test -s conftest.$ac_objext'
14112   { (eval echo "$as_me:14112: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit $ac_status); }; }; then
14117   cf_cv_gcc_inline=yes
14118 else
14119   echo "$as_me: failed program was:" >&5
14120 cat conftest.$ac_ext >&5
14121 cf_cv_gcc_inline=no
14122 fi
14123 rm -f conftest.$ac_objext conftest.$ac_ext
14124       CFLAGS=$cf_save_CFLAGS
14125
14126 fi
14127 echo "$as_me:14127: result: $cf_cv_gcc_inline" >&5
14128 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14129     if test "$cf_cv_gcc_inline" = yes ; then
14130
14131 cf_fix_cppflags=no
14132 cf_new_cflags=
14133 cf_new_cppflags=
14134 cf_new_extra_cppflags=
14135
14136 for cf_add_cflags in --param max-inline-insns-single=1200
14137 do
14138 case $cf_fix_cppflags in
14139 no)
14140         case $cf_add_cflags in #(vi
14141         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14142                 case $cf_add_cflags in
14143                 -D*)
14144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14145
14146                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14147                                 && test -z "${cf_tst_cflags}" \
14148                                 && cf_fix_cppflags=yes
14149
14150                         if test $cf_fix_cppflags = yes ; then
14151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14152                                 continue
14153                         elif test "${cf_tst_cflags}" = "\"'" ; then
14154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14155                                 continue
14156                         fi
14157                         ;;
14158                 esac
14159                 case "$CPPFLAGS" in
14160                 *$cf_add_cflags) #(vi
14161                         ;;
14162                 *) #(vi
14163                         case $cf_add_cflags in #(vi
14164                         -D*)
14165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14166
14167 CPPFLAGS=`echo "$CPPFLAGS" | \
14168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14170
14171                                 ;;
14172                         esac
14173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14174                         ;;
14175                 esac
14176                 ;;
14177         *)
14178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14179                 ;;
14180         esac
14181         ;;
14182 yes)
14183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14184
14185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14186
14187         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14188                 && test -z "${cf_tst_cflags}" \
14189                 && cf_fix_cppflags=no
14190         ;;
14191 esac
14192 done
14193
14194 if test -n "$cf_new_cflags" ; then
14195
14196         CFLAGS="$CFLAGS $cf_new_cflags"
14197 fi
14198
14199 if test -n "$cf_new_cppflags" ; then
14200
14201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14202 fi
14203
14204 if test -n "$cf_new_extra_cppflags" ; then
14205
14206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14207 fi
14208
14209     fi
14210   fi
14211 fi
14212
14213 echo "$as_me:14213: checking for signal global datatype" >&5
14214 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14215 if test "${cf_cv_sig_atomic_t+set}" = set; then
14216   echo $ECHO_N "(cached) $ECHO_C" >&6
14217 else
14218
14219         for cf_type in \
14220                 "volatile sig_atomic_t" \
14221                 "sig_atomic_t" \
14222                 "int"
14223         do
14224         cat >conftest.$ac_ext <<_ACEOF
14225 #line 14225 "configure"
14226 #include "confdefs.h"
14227
14228 #include <sys/types.h>
14229 #include <signal.h>
14230 #include <stdio.h>
14231
14232 extern $cf_type x;
14233 $cf_type x;
14234 static void handler(int sig)
14235 {
14236         x = 5;
14237 }
14238 int
14239 main ()
14240 {
14241 signal(SIGINT, handler);
14242                  x = 1
14243   ;
14244   return 0;
14245 }
14246 _ACEOF
14247 rm -f conftest.$ac_objext
14248 if { (eval echo "$as_me:14248: \"$ac_compile\"") >&5
14249   (eval $ac_compile) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit $ac_status); } &&
14253          { ac_try='test -s conftest.$ac_objext'
14254   { (eval echo "$as_me:14254: \"$ac_try\"") >&5
14255   (eval $ac_try) 2>&5
14256   ac_status=$?
14257   echo "$as_me:14257: \$? = $ac_status" >&5
14258   (exit $ac_status); }; }; then
14259   cf_cv_sig_atomic_t=$cf_type
14260 else
14261   echo "$as_me: failed program was:" >&5
14262 cat conftest.$ac_ext >&5
14263 cf_cv_sig_atomic_t=no
14264 fi
14265 rm -f conftest.$ac_objext conftest.$ac_ext
14266                 test "$cf_cv_sig_atomic_t" != no && break
14267         done
14268
14269 fi
14270
14271 echo "$as_me:14271: result: $cf_cv_sig_atomic_t" >&5
14272 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14273 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14274 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14275 EOF
14276
14277 if test $NCURSES_CHTYPE = auto ; then
14278
14279 echo "$as_me:14279: checking for type of chtype" >&5
14280 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14281 if test "${cf_cv_typeof_chtype+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284
14285                 if test "$cross_compiling" = yes; then
14286   cf_cv_typeof_chtype=long
14287 else
14288   cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291
14292 #define WANT_BITS 31
14293 #include <stdio.h>
14294 int main()
14295 {
14296         FILE *fp = fopen("cf_test.out", "w");
14297         if (fp != 0) {
14298                 char *result = "long";
14299                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14300                         int n;
14301                         unsigned int x, y;
14302                         for (n = 0; n < WANT_BITS; n++) {
14303                                 x = (1 << n);
14304                                 y = (x >> n);
14305                                 if (y != 1 || x == 0) {
14306                                         x = 0;
14307                                         break;
14308                                 }
14309                         }
14310                         /*
14311                          * If x is nonzero, an int is big enough for the bits
14312                          * that we want.
14313                          */
14314                         result = (x != 0) ? "int" : "long";
14315                 }
14316                 fputs(result, fp);
14317                 fclose(fp);
14318         }
14319         ${cf_cv_main_return:-return}(0);
14320 }
14321
14322 _ACEOF
14323 rm -f conftest$ac_exeext
14324 if { (eval echo "$as_me:14324: \"$ac_link\"") >&5
14325   (eval $ac_link) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14329   { (eval echo "$as_me:14329: \"$ac_try\"") >&5
14330   (eval $ac_try) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit $ac_status); }; }; then
14334   cf_cv_typeof_chtype=`cat cf_test.out`
14335 else
14336   echo "$as_me: program exited with status $ac_status" >&5
14337 echo "$as_me: failed program was:" >&5
14338 cat conftest.$ac_ext >&5
14339 cf_cv_typeof_chtype=long
14340 fi
14341 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14342 fi
14343                 rm -f cf_test.out
14344
14345 fi
14346
14347 echo "$as_me:14347: result: $cf_cv_typeof_chtype" >&5
14348 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14349
14350 cat >>confdefs.h <<EOF
14351 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14352 EOF
14353
14354 else
14355         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14356 fi
14357 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14358
14359 echo "$as_me:14359: checking if unsigned literals are legal" >&5
14360 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14361 if test "${cf_cv_unsigned_literals+set}" = set; then
14362   echo $ECHO_N "(cached) $ECHO_C" >&6
14363 else
14364
14365         cat >conftest.$ac_ext <<_ACEOF
14366 #line 14366 "configure"
14367 #include "confdefs.h"
14368
14369 int
14370 main ()
14371 {
14372 long x = 1L + 1UL + 1U + 1
14373   ;
14374   return 0;
14375 }
14376 _ACEOF
14377 rm -f conftest.$ac_objext
14378 if { (eval echo "$as_me:14378: \"$ac_compile\"") >&5
14379   (eval $ac_compile) 2>&5
14380   ac_status=$?
14381   echo "$as_me:14381: \$? = $ac_status" >&5
14382   (exit $ac_status); } &&
14383          { ac_try='test -s conftest.$ac_objext'
14384   { (eval echo "$as_me:14384: \"$ac_try\"") >&5
14385   (eval $ac_try) 2>&5
14386   ac_status=$?
14387   echo "$as_me:14387: \$? = $ac_status" >&5
14388   (exit $ac_status); }; }; then
14389   cf_cv_unsigned_literals=yes
14390 else
14391   echo "$as_me: failed program was:" >&5
14392 cat conftest.$ac_ext >&5
14393 cf_cv_unsigned_literals=no
14394 fi
14395 rm -f conftest.$ac_objext conftest.$ac_ext
14396
14397 fi
14398
14399 echo "$as_me:14399: result: $cf_cv_unsigned_literals" >&5
14400 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14401
14402 cf_cv_1UL="1"
14403 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14404 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14405
14406 if test $NCURSES_MMASK_T = auto ; then
14407         cf_cv_typeof_mmask_t=long
14408 else
14409         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14410 fi
14411 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14412
14413 ###     Checks for external-data
14414
14415 echo "$as_me:14415: checking if external errno is declared" >&5
14416 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14417 if test "${cf_cv_dcl_errno+set}" = set; then
14418   echo $ECHO_N "(cached) $ECHO_C" >&6
14419 else
14420
14421     cat >conftest.$ac_ext <<_ACEOF
14422 #line 14422 "configure"
14423 #include "confdefs.h"
14424
14425 #ifdef HAVE_STDLIB_H
14426 #include <stdlib.h>
14427 #endif
14428 #include <stdio.h>
14429 #include <sys/types.h>
14430 #include <errno.h>
14431 int
14432 main ()
14433 {
14434 int x = (int) errno
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 rm -f conftest.$ac_objext
14440 if { (eval echo "$as_me:14440: \"$ac_compile\"") >&5
14441   (eval $ac_compile) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } &&
14445          { ac_try='test -s conftest.$ac_objext'
14446   { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447   (eval $ac_try) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); }; }; then
14451   cf_cv_dcl_errno=yes
14452 else
14453   echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 cf_cv_dcl_errno=no
14456 fi
14457 rm -f conftest.$ac_objext conftest.$ac_ext
14458
14459 fi
14460 echo "$as_me:14460: result: $cf_cv_dcl_errno" >&5
14461 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14462
14463 if test "$cf_cv_dcl_errno" = no ; then
14464
14465 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14466
14467     cat >>confdefs.h <<EOF
14468 #define $cf_result 1
14469 EOF
14470
14471 fi
14472
14473 # It's possible (for near-UNIX clones) that the data doesn't exist
14474
14475 echo "$as_me:14475: checking if external errno exists" >&5
14476 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14477 if test "${cf_cv_have_errno+set}" = set; then
14478   echo $ECHO_N "(cached) $ECHO_C" >&6
14479 else
14480
14481     cat >conftest.$ac_ext <<_ACEOF
14482 #line 14482 "configure"
14483 #include "confdefs.h"
14484
14485 #undef errno
14486 extern int errno;
14487
14488 int
14489 main ()
14490 {
14491 errno = 2
14492   ;
14493   return 0;
14494 }
14495 _ACEOF
14496 rm -f conftest.$ac_objext conftest$ac_exeext
14497 if { (eval echo "$as_me:14497: \"$ac_link\"") >&5
14498   (eval $ac_link) 2>&5
14499   ac_status=$?
14500   echo "$as_me:14500: \$? = $ac_status" >&5
14501   (exit $ac_status); } &&
14502          { ac_try='test -s conftest$ac_exeext'
14503   { (eval echo "$as_me:14503: \"$ac_try\"") >&5
14504   (eval $ac_try) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit $ac_status); }; }; then
14508   cf_cv_have_errno=yes
14509 else
14510   echo "$as_me: failed program was:" >&5
14511 cat conftest.$ac_ext >&5
14512 cf_cv_have_errno=no
14513 fi
14514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14515
14516 fi
14517 echo "$as_me:14517: result: $cf_cv_have_errno" >&5
14518 echo "${ECHO_T}$cf_cv_have_errno" >&6
14519
14520 if test "$cf_cv_have_errno" = yes ; then
14521
14522 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14523
14524     cat >>confdefs.h <<EOF
14525 #define $cf_result 1
14526 EOF
14527
14528 fi
14529
14530 echo "$as_me:14530: checking if data-only library module links" >&5
14531 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14532 if test "${cf_cv_link_dataonly+set}" = set; then
14533   echo $ECHO_N "(cached) $ECHO_C" >&6
14534 else
14535
14536         rm -f conftest.a
14537         cat >conftest.$ac_ext <<EOF
14538 #line 14538 "configure"
14539 int     testdata[3] = { 123, 456, 789 };
14540 EOF
14541         if { (eval echo "$as_me:14541: \"$ac_compile\"") >&5
14542   (eval $ac_compile) 2>&5
14543   ac_status=$?
14544   echo "$as_me:14544: \$? = $ac_status" >&5
14545   (exit $ac_status); } ; then
14546                 mv conftest.o data.o && \
14547                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14548         fi
14549         rm -f conftest.$ac_ext data.o
14550         cat >conftest.$ac_ext <<EOF
14551 #line 14551 "configure"
14552 int     testfunc()
14553 {
14554 #if defined(NeXT)
14555         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14556 #else
14557         extern int testdata[3];
14558         return testdata[0] == 123
14559            &&  testdata[1] == 456
14560            &&  testdata[2] == 789;
14561 #endif
14562 }
14563 EOF
14564         if { (eval echo "$as_me:14564: \"$ac_compile\"") >&5
14565   (eval $ac_compile) 2>&5
14566   ac_status=$?
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); }; then
14569                 mv conftest.o func.o && \
14570                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14571         fi
14572         rm -f conftest.$ac_ext func.o
14573         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14574         cf_saveLIBS="$LIBS"
14575         LIBS="conftest.a $LIBS"
14576         if test "$cross_compiling" = yes; then
14577   cf_cv_link_dataonly=unknown
14578 else
14579   cat >conftest.$ac_ext <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14582
14583         int main()
14584         {
14585                 extern int testfunc();
14586                 ${cf_cv_main_return:-return} (!testfunc());
14587         }
14588
14589 _ACEOF
14590 rm -f conftest$ac_exeext
14591 if { (eval echo "$as_me:14591: \"$ac_link\"") >&5
14592   (eval $ac_link) 2>&5
14593   ac_status=$?
14594   echo "$as_me:14594: \$? = $ac_status" >&5
14595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14596   { (eval echo "$as_me:14596: \"$ac_try\"") >&5
14597   (eval $ac_try) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); }; }; then
14601   cf_cv_link_dataonly=yes
14602 else
14603   echo "$as_me: program exited with status $ac_status" >&5
14604 echo "$as_me: failed program was:" >&5
14605 cat conftest.$ac_ext >&5
14606 cf_cv_link_dataonly=no
14607 fi
14608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14609 fi
14610         LIBS="$cf_saveLIBS"
14611
14612 fi
14613
14614 echo "$as_me:14614: result: $cf_cv_link_dataonly" >&5
14615 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14616
14617 if test "$cf_cv_link_dataonly" = no ; then
14618         cat >>confdefs.h <<\EOF
14619 #define BROKEN_LINKER 1
14620 EOF
14621
14622         BROKEN_LINKER=1
14623 fi
14624
14625 ###     Checks for library functions.
14626
14627 for ac_func in \
14628 getcwd \
14629 getegid \
14630 geteuid \
14631 getttynam \
14632 issetugid \
14633 poll \
14634 remove \
14635 select \
14636 setbuf \
14637 setbuffer \
14638 setvbuf \
14639 sigaction \
14640 sigvec \
14641 strdup \
14642 strstr \
14643 tcgetpgrp \
14644 times \
14645 vsnprintf \
14646
14647 do
14648 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14649 echo "$as_me:14649: checking for $ac_func" >&5
14650 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14651 if eval "test \"\${$as_ac_var+set}\" = set"; then
14652   echo $ECHO_N "(cached) $ECHO_C" >&6
14653 else
14654   cat >conftest.$ac_ext <<_ACEOF
14655 #line 14655 "configure"
14656 #include "confdefs.h"
14657 /* System header to define __stub macros and hopefully few prototypes,
14658     which can conflict with char $ac_func (); below.  */
14659 #include <assert.h>
14660 /* Override any gcc2 internal prototype to avoid an error.  */
14661 #ifdef __cplusplus
14662 extern "C"
14663 #endif
14664 /* We use char because int might match the return type of a gcc2
14665    builtin and then its argument prototype would still apply.  */
14666 char $ac_func ();
14667 char (*f) ();
14668
14669 int
14670 main ()
14671 {
14672 /* The GNU C library defines this for functions which it implements
14673     to always fail with ENOSYS.  Some functions are actually named
14674     something starting with __ and the normal name is an alias.  */
14675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14676 choke me
14677 #else
14678 f = $ac_func;
14679 #endif
14680
14681   ;
14682   return 0;
14683 }
14684 _ACEOF
14685 rm -f conftest.$ac_objext conftest$ac_exeext
14686 if { (eval echo "$as_me:14686: \"$ac_link\"") >&5
14687   (eval $ac_link) 2>&5
14688   ac_status=$?
14689   echo "$as_me:14689: \$? = $ac_status" >&5
14690   (exit $ac_status); } &&
14691          { ac_try='test -s conftest$ac_exeext'
14692   { (eval echo "$as_me:14692: \"$ac_try\"") >&5
14693   (eval $ac_try) 2>&5
14694   ac_status=$?
14695   echo "$as_me:14695: \$? = $ac_status" >&5
14696   (exit $ac_status); }; }; then
14697   eval "$as_ac_var=yes"
14698 else
14699   echo "$as_me: failed program was:" >&5
14700 cat conftest.$ac_ext >&5
14701 eval "$as_ac_var=no"
14702 fi
14703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14704 fi
14705 echo "$as_me:14705: result: `eval echo '${'$as_ac_var'}'`" >&5
14706 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14707 if test `eval echo '${'$as_ac_var'}'` = yes; then
14708   cat >>confdefs.h <<EOF
14709 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14710 EOF
14711
14712 fi
14713 done
14714
14715 if test "$with_getcap" = "yes" ; then
14716
14717 echo "$as_me:14717: checking for terminal-capability database functions" >&5
14718 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14719 if test "${cf_cv_cgetent+set}" = set; then
14720   echo $ECHO_N "(cached) $ECHO_C" >&6
14721 else
14722
14723 cat >conftest.$ac_ext <<_ACEOF
14724 #line 14724 "configure"
14725 #include "confdefs.h"
14726
14727 #include <stdlib.h>
14728 int
14729 main ()
14730 {
14731
14732         char temp[128];
14733         char *buf = temp;
14734         char *db_array = temp;
14735         cgetent(&buf, /* int *, */ &db_array, "vt100");
14736         cgetcap(buf, "tc", '=');
14737         cgetmatch(buf, "tc");
14738
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 rm -f conftest.$ac_objext conftest$ac_exeext
14744 if { (eval echo "$as_me:14744: \"$ac_link\"") >&5
14745   (eval $ac_link) 2>&5
14746   ac_status=$?
14747   echo "$as_me:14747: \$? = $ac_status" >&5
14748   (exit $ac_status); } &&
14749          { ac_try='test -s conftest$ac_exeext'
14750   { (eval echo "$as_me:14750: \"$ac_try\"") >&5
14751   (eval $ac_try) 2>&5
14752   ac_status=$?
14753   echo "$as_me:14753: \$? = $ac_status" >&5
14754   (exit $ac_status); }; }; then
14755   cf_cv_cgetent=yes
14756 else
14757   echo "$as_me: failed program was:" >&5
14758 cat conftest.$ac_ext >&5
14759 cf_cv_cgetent=no
14760 fi
14761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14762
14763 fi
14764
14765 echo "$as_me:14765: result: $cf_cv_cgetent" >&5
14766 echo "${ECHO_T}$cf_cv_cgetent" >&6
14767 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14768 #define HAVE_BSD_CGETENT 1
14769 EOF
14770
14771 fi
14772
14773 echo "$as_me:14773: checking for isascii" >&5
14774 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14775 if test "${cf_cv_have_isascii+set}" = set; then
14776   echo $ECHO_N "(cached) $ECHO_C" >&6
14777 else
14778
14779         cat >conftest.$ac_ext <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782 #include <ctype.h>
14783 int
14784 main ()
14785 {
14786 int x = isascii(' ')
14787   ;
14788   return 0;
14789 }
14790 _ACEOF
14791 rm -f conftest.$ac_objext conftest$ac_exeext
14792 if { (eval echo "$as_me:14792: \"$ac_link\"") >&5
14793   (eval $ac_link) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); } &&
14797          { ac_try='test -s conftest$ac_exeext'
14798   { (eval echo "$as_me:14798: \"$ac_try\"") >&5
14799   (eval $ac_try) 2>&5
14800   ac_status=$?
14801   echo "$as_me:14801: \$? = $ac_status" >&5
14802   (exit $ac_status); }; }; then
14803   cf_cv_have_isascii=yes
14804 else
14805   echo "$as_me: failed program was:" >&5
14806 cat conftest.$ac_ext >&5
14807 cf_cv_have_isascii=no
14808 fi
14809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14810
14811 fi
14812 echo "$as_me:14812: result: $cf_cv_have_isascii" >&5
14813 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14814 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14815 #define HAVE_ISASCII 1
14816 EOF
14817
14818 if test "$ac_cv_func_sigaction" = yes; then
14819 echo "$as_me:14819: checking whether sigaction needs _POSIX_SOURCE" >&5
14820 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14821 cat >conftest.$ac_ext <<_ACEOF
14822 #line 14822 "configure"
14823 #include "confdefs.h"
14824
14825 #include <sys/types.h>
14826 #include <signal.h>
14827 int
14828 main ()
14829 {
14830 struct sigaction act
14831   ;
14832   return 0;
14833 }
14834 _ACEOF
14835 rm -f conftest.$ac_objext
14836 if { (eval echo "$as_me:14836: \"$ac_compile\"") >&5
14837   (eval $ac_compile) 2>&5
14838   ac_status=$?
14839   echo "$as_me:14839: \$? = $ac_status" >&5
14840   (exit $ac_status); } &&
14841          { ac_try='test -s conftest.$ac_objext'
14842   { (eval echo "$as_me:14842: \"$ac_try\"") >&5
14843   (eval $ac_try) 2>&5
14844   ac_status=$?
14845   echo "$as_me:14845: \$? = $ac_status" >&5
14846   (exit $ac_status); }; }; then
14847   sigact_bad=no
14848 else
14849   echo "$as_me: failed program was:" >&5
14850 cat conftest.$ac_ext >&5
14851
14852 cat >conftest.$ac_ext <<_ACEOF
14853 #line 14853 "configure"
14854 #include "confdefs.h"
14855
14856 #define _POSIX_SOURCE
14857 #include <sys/types.h>
14858 #include <signal.h>
14859 int
14860 main ()
14861 {
14862 struct sigaction act
14863   ;
14864   return 0;
14865 }
14866 _ACEOF
14867 rm -f conftest.$ac_objext
14868 if { (eval echo "$as_me:14868: \"$ac_compile\"") >&5
14869   (eval $ac_compile) 2>&5
14870   ac_status=$?
14871   echo "$as_me:14871: \$? = $ac_status" >&5
14872   (exit $ac_status); } &&
14873          { ac_try='test -s conftest.$ac_objext'
14874   { (eval echo "$as_me:14874: \"$ac_try\"") >&5
14875   (eval $ac_try) 2>&5
14876   ac_status=$?
14877   echo "$as_me:14877: \$? = $ac_status" >&5
14878   (exit $ac_status); }; }; then
14879   sigact_bad=yes
14880          cat >>confdefs.h <<\EOF
14881 #define _POSIX_SOURCE 1
14882 EOF
14883
14884 else
14885   echo "$as_me: failed program was:" >&5
14886 cat conftest.$ac_ext >&5
14887 sigact_bad=unknown
14888 fi
14889 rm -f conftest.$ac_objext conftest.$ac_ext
14890 fi
14891 rm -f conftest.$ac_objext conftest.$ac_ext
14892 echo "$as_me:14892: result: $sigact_bad" >&5
14893 echo "${ECHO_T}$sigact_bad" >&6
14894 fi
14895
14896 echo "$as_me:14896: checking if nanosleep really works" >&5
14897 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14898 if test "${cf_cv_func_nanosleep+set}" = set; then
14899   echo $ECHO_N "(cached) $ECHO_C" >&6
14900 else
14901
14902 if test "$cross_compiling" = yes; then
14903   cf_cv_func_nanosleep=unknown
14904 else
14905   cat >conftest.$ac_ext <<_ACEOF
14906 #line 14906 "configure"
14907 #include "confdefs.h"
14908
14909 #include <stdio.h>
14910 #include <errno.h>
14911 #include <time.h>
14912
14913 #ifdef HAVE_SYS_TIME_H
14914 #include <sys/time.h>
14915 #endif
14916
14917 int main() {
14918         struct timespec ts1, ts2;
14919         int code;
14920         ts1.tv_sec  = 0;
14921         ts1.tv_nsec = 750000000;
14922         ts2.tv_sec  = 0;
14923         ts2.tv_nsec = 0;
14924         errno = 0;
14925         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14926         ${cf_cv_main_return:-return}(code != 0);
14927 }
14928
14929 _ACEOF
14930 rm -f conftest$ac_exeext
14931 if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932   (eval $ac_link) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14936   { (eval echo "$as_me:14936: \"$ac_try\"") >&5
14937   (eval $ac_try) 2>&5
14938   ac_status=$?
14939   echo "$as_me:14939: \$? = $ac_status" >&5
14940   (exit $ac_status); }; }; then
14941   cf_cv_func_nanosleep=yes
14942 else
14943   echo "$as_me: program exited with status $ac_status" >&5
14944 echo "$as_me: failed program was:" >&5
14945 cat conftest.$ac_ext >&5
14946 cf_cv_func_nanosleep=no
14947 fi
14948 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14949 fi
14950 fi
14951 echo "$as_me:14951: result: $cf_cv_func_nanosleep" >&5
14952 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14953
14954 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14955 #define HAVE_NANOSLEEP 1
14956 EOF
14957
14958 for ac_header in \
14959 termio.h \
14960 termios.h \
14961 unistd.h \
14962
14963 do
14964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14965 echo "$as_me:14965: checking for $ac_header" >&5
14966 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14967 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14968   echo $ECHO_N "(cached) $ECHO_C" >&6
14969 else
14970   cat >conftest.$ac_ext <<_ACEOF
14971 #line 14971 "configure"
14972 #include "confdefs.h"
14973 #include <$ac_header>
14974 _ACEOF
14975 if { (eval echo "$as_me:14975: \"$ac_cpp conftest.$ac_ext\"") >&5
14976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14977   ac_status=$?
14978   egrep -v '^ *\+' conftest.er1 >conftest.err
14979   rm -f conftest.er1
14980   cat conftest.err >&5
14981   echo "$as_me:14981: \$? = $ac_status" >&5
14982   (exit $ac_status); } >/dev/null; then
14983   if test -s conftest.err; then
14984     ac_cpp_err=$ac_c_preproc_warn_flag
14985   else
14986     ac_cpp_err=
14987   fi
14988 else
14989   ac_cpp_err=yes
14990 fi
14991 if test -z "$ac_cpp_err"; then
14992   eval "$as_ac_Header=yes"
14993 else
14994   echo "$as_me: failed program was:" >&5
14995   cat conftest.$ac_ext >&5
14996   eval "$as_ac_Header=no"
14997 fi
14998 rm -f conftest.err conftest.$ac_ext
14999 fi
15000 echo "$as_me:15000: result: `eval echo '${'$as_ac_Header'}'`" >&5
15001 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15002 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15003   cat >>confdefs.h <<EOF
15004 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15005 EOF
15006
15007 fi
15008 done
15009
15010 if test "$ISC" = yes ; then
15011
15012 for ac_header in sys/termio.h
15013 do
15014 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15015 echo "$as_me:15015: checking for $ac_header" >&5
15016 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15017 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15018   echo $ECHO_N "(cached) $ECHO_C" >&6
15019 else
15020   cat >conftest.$ac_ext <<_ACEOF
15021 #line 15021 "configure"
15022 #include "confdefs.h"
15023 #include <$ac_header>
15024 _ACEOF
15025 if { (eval echo "$as_me:15025: \"$ac_cpp conftest.$ac_ext\"") >&5
15026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15027   ac_status=$?
15028   egrep -v '^ *\+' conftest.er1 >conftest.err
15029   rm -f conftest.er1
15030   cat conftest.err >&5
15031   echo "$as_me:15031: \$? = $ac_status" >&5
15032   (exit $ac_status); } >/dev/null; then
15033   if test -s conftest.err; then
15034     ac_cpp_err=$ac_c_preproc_warn_flag
15035   else
15036     ac_cpp_err=
15037   fi
15038 else
15039   ac_cpp_err=yes
15040 fi
15041 if test -z "$ac_cpp_err"; then
15042   eval "$as_ac_Header=yes"
15043 else
15044   echo "$as_me: failed program was:" >&5
15045   cat conftest.$ac_ext >&5
15046   eval "$as_ac_Header=no"
15047 fi
15048 rm -f conftest.err conftest.$ac_ext
15049 fi
15050 echo "$as_me:15050: result: `eval echo '${'$as_ac_Header'}'`" >&5
15051 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15052 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15053   cat >>confdefs.h <<EOF
15054 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15055 EOF
15056
15057 fi
15058 done
15059
15060 fi
15061 if test "$ac_cv_header_termios_h" = yes ; then
15062         case "$CFLAGS $CPPFLAGS" in
15063         *-D_POSIX_SOURCE*)
15064                 termios_bad=dunno ;;
15065         *)      termios_bad=maybe ;;
15066         esac
15067         if test "$termios_bad" = maybe ; then
15068         echo "$as_me:15068: checking whether termios.h needs _POSIX_SOURCE" >&5
15069 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15070         cat >conftest.$ac_ext <<_ACEOF
15071 #line 15071 "configure"
15072 #include "confdefs.h"
15073 #include <termios.h>
15074 int
15075 main ()
15076 {
15077 struct termios foo; int x = foo.c_iflag
15078   ;
15079   return 0;
15080 }
15081 _ACEOF
15082 rm -f conftest.$ac_objext
15083 if { (eval echo "$as_me:15083: \"$ac_compile\"") >&5
15084   (eval $ac_compile) 2>&5
15085   ac_status=$?
15086   echo "$as_me:15086: \$? = $ac_status" >&5
15087   (exit $ac_status); } &&
15088          { ac_try='test -s conftest.$ac_objext'
15089   { (eval echo "$as_me:15089: \"$ac_try\"") >&5
15090   (eval $ac_try) 2>&5
15091   ac_status=$?
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); }; }; then
15094   termios_bad=no
15095 else
15096   echo "$as_me: failed program was:" >&5
15097 cat conftest.$ac_ext >&5
15098
15099                 cat >conftest.$ac_ext <<_ACEOF
15100 #line 15100 "configure"
15101 #include "confdefs.h"
15102
15103 #define _POSIX_SOURCE
15104 #include <termios.h>
15105 int
15106 main ()
15107 {
15108 struct termios foo; int x = foo.c_iflag
15109   ;
15110   return 0;
15111 }
15112 _ACEOF
15113 rm -f conftest.$ac_objext
15114 if { (eval echo "$as_me:15114: \"$ac_compile\"") >&5
15115   (eval $ac_compile) 2>&5
15116   ac_status=$?
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); } &&
15119          { ac_try='test -s conftest.$ac_objext'
15120   { (eval echo "$as_me:15120: \"$ac_try\"") >&5
15121   (eval $ac_try) 2>&5
15122   ac_status=$?
15123   echo "$as_me:15123: \$? = $ac_status" >&5
15124   (exit $ac_status); }; }; then
15125   termios_bad=unknown
15126 else
15127   echo "$as_me: failed program was:" >&5
15128 cat conftest.$ac_ext >&5
15129 termios_bad=yes cat >>confdefs.h <<\EOF
15130 #define _POSIX_SOURCE 1
15131 EOF
15132
15133 fi
15134 rm -f conftest.$ac_objext conftest.$ac_ext
15135
15136 fi
15137 rm -f conftest.$ac_objext conftest.$ac_ext
15138         echo "$as_me:15138: result: $termios_bad" >&5
15139 echo "${ECHO_T}$termios_bad" >&6
15140         fi
15141 fi
15142
15143 echo "$as_me:15143: checking for tcgetattr" >&5
15144 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15145 if test "${cf_cv_have_tcgetattr+set}" = set; then
15146   echo $ECHO_N "(cached) $ECHO_C" >&6
15147 else
15148
15149 cat >conftest.$ac_ext <<_ACEOF
15150 #line 15150 "configure"
15151 #include "confdefs.h"
15152
15153 #include <sys/types.h>
15154 #ifdef HAVE_UNISTD_H
15155 #include <unistd.h>
15156 #endif
15157 #ifdef HAVE_TERMIOS_H
15158 #include <termios.h>
15159 #define TTY struct termios
15160 #else
15161 #ifdef HAVE_TERMIO_H
15162 #include <termio.h>
15163 #define TTY struct termio
15164 #endif
15165 #endif
15166
15167 int
15168 main ()
15169 {
15170
15171 TTY foo;
15172 tcgetattr(1, &foo);
15173   ;
15174   return 0;
15175 }
15176 _ACEOF
15177 rm -f conftest.$ac_objext conftest$ac_exeext
15178 if { (eval echo "$as_me:15178: \"$ac_link\"") >&5
15179   (eval $ac_link) 2>&5
15180   ac_status=$?
15181   echo "$as_me:15181: \$? = $ac_status" >&5
15182   (exit $ac_status); } &&
15183          { ac_try='test -s conftest$ac_exeext'
15184   { (eval echo "$as_me:15184: \"$ac_try\"") >&5
15185   (eval $ac_try) 2>&5
15186   ac_status=$?
15187   echo "$as_me:15187: \$? = $ac_status" >&5
15188   (exit $ac_status); }; }; then
15189   cf_cv_have_tcgetattr=yes
15190 else
15191   echo "$as_me: failed program was:" >&5
15192 cat conftest.$ac_ext >&5
15193 cf_cv_have_tcgetattr=no
15194 fi
15195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15196 fi
15197 echo "$as_me:15197: result: $cf_cv_have_tcgetattr" >&5
15198 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15199 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15200 #define HAVE_TCGETATTR 1
15201 EOF
15202
15203 echo "$as_me:15203: checking for vsscanf function or workaround" >&5
15204 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15205 if test "${cf_cv_func_vsscanf+set}" = set; then
15206   echo $ECHO_N "(cached) $ECHO_C" >&6
15207 else
15208
15209 cat >conftest.$ac_ext <<_ACEOF
15210 #line 15210 "configure"
15211 #include "confdefs.h"
15212
15213 #include <stdarg.h>
15214 #include <stdio.h>
15215 int
15216 main ()
15217 {
15218
15219         va_list ap;
15220         vsscanf("from", "%d", ap)
15221   ;
15222   return 0;
15223 }
15224 _ACEOF
15225 rm -f conftest.$ac_objext conftest$ac_exeext
15226 if { (eval echo "$as_me:15226: \"$ac_link\"") >&5
15227   (eval $ac_link) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); } &&
15231          { ac_try='test -s conftest$ac_exeext'
15232   { (eval echo "$as_me:15232: \"$ac_try\"") >&5
15233   (eval $ac_try) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); }; }; then
15237   cf_cv_func_vsscanf=vsscanf
15238 else
15239   echo "$as_me: failed program was:" >&5
15240 cat conftest.$ac_ext >&5
15241
15242 cat >conftest.$ac_ext <<_ACEOF
15243 #line 15243 "configure"
15244 #include "confdefs.h"
15245
15246 #include <stdarg.h>
15247 #include <stdio.h>
15248 int
15249 main ()
15250 {
15251
15252     FILE strbuf;
15253     char *str = "from";
15254
15255     strbuf._flag = _IOREAD;
15256     strbuf._ptr = strbuf._base = (unsigned char *) str;
15257     strbuf._cnt = strlen(str);
15258     strbuf._file = _NFILE;
15259     return (vfscanf(&strbuf, "%d", ap))
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 rm -f conftest.$ac_objext conftest$ac_exeext
15265 if { (eval echo "$as_me:15265: \"$ac_link\"") >&5
15266   (eval $ac_link) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); } &&
15270          { ac_try='test -s conftest$ac_exeext'
15271   { (eval echo "$as_me:15271: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); }; }; then
15276   cf_cv_func_vsscanf=vfscanf
15277 else
15278   echo "$as_me: failed program was:" >&5
15279 cat conftest.$ac_ext >&5
15280
15281 cat >conftest.$ac_ext <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15284
15285 #include <stdarg.h>
15286 #include <stdio.h>
15287 int
15288 main ()
15289 {
15290
15291     FILE strbuf;
15292     char *str = "from";
15293
15294     strbuf._flag = _IOREAD;
15295     strbuf._ptr = strbuf._base = (unsigned char *) str;
15296     strbuf._cnt = strlen(str);
15297     strbuf._file = _NFILE;
15298     return (_doscan(&strbuf, "%d", ap))
15299   ;
15300   return 0;
15301 }
15302 _ACEOF
15303 rm -f conftest.$ac_objext conftest$ac_exeext
15304 if { (eval echo "$as_me:15304: \"$ac_link\"") >&5
15305   (eval $ac_link) 2>&5
15306   ac_status=$?
15307   echo "$as_me:15307: \$? = $ac_status" >&5
15308   (exit $ac_status); } &&
15309          { ac_try='test -s conftest$ac_exeext'
15310   { (eval echo "$as_me:15310: \"$ac_try\"") >&5
15311   (eval $ac_try) 2>&5
15312   ac_status=$?
15313   echo "$as_me:15313: \$? = $ac_status" >&5
15314   (exit $ac_status); }; }; then
15315   cf_cv_func_vsscanf=_doscan
15316 else
15317   echo "$as_me: failed program was:" >&5
15318 cat conftest.$ac_ext >&5
15319
15320 cf_cv_func_vsscanf=no
15321 fi
15322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15323 fi
15324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15325 fi
15326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15327 fi
15328 echo "$as_me:15328: result: $cf_cv_func_vsscanf" >&5
15329 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15330
15331 case $cf_cv_func_vsscanf in #(vi
15332 vsscanf) cat >>confdefs.h <<\EOF
15333 #define HAVE_VSSCANF 1
15334 EOF
15335 ;; #(vi
15336 vfscanf) cat >>confdefs.h <<\EOF
15337 #define HAVE_VFSCANF 1
15338 EOF
15339 ;; #(vi
15340 _doscan) cat >>confdefs.h <<\EOF
15341 #define HAVE__DOSCAN 1
15342 EOF
15343 ;;
15344 esac
15345
15346 echo "$as_me:15346: checking for working mkstemp" >&5
15347 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15348 if test "${cf_cv_func_mkstemp+set}" = set; then
15349   echo $ECHO_N "(cached) $ECHO_C" >&6
15350 else
15351
15352 rm -rf conftest*
15353 if test "$cross_compiling" = yes; then
15354   echo "$as_me:15354: checking for mkstemp" >&5
15355 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15356 if test "${ac_cv_func_mkstemp+set}" = set; then
15357   echo $ECHO_N "(cached) $ECHO_C" >&6
15358 else
15359   cat >conftest.$ac_ext <<_ACEOF
15360 #line 15360 "configure"
15361 #include "confdefs.h"
15362 /* System header to define __stub macros and hopefully few prototypes,
15363     which can conflict with char mkstemp (); below.  */
15364 #include <assert.h>
15365 /* Override any gcc2 internal prototype to avoid an error.  */
15366 #ifdef __cplusplus
15367 extern "C"
15368 #endif
15369 /* We use char because int might match the return type of a gcc2
15370    builtin and then its argument prototype would still apply.  */
15371 char mkstemp ();
15372 char (*f) ();
15373
15374 int
15375 main ()
15376 {
15377 /* The GNU C library defines this for functions which it implements
15378     to always fail with ENOSYS.  Some functions are actually named
15379     something starting with __ and the normal name is an alias.  */
15380 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15381 choke me
15382 #else
15383 f = mkstemp;
15384 #endif
15385
15386   ;
15387   return 0;
15388 }
15389 _ACEOF
15390 rm -f conftest.$ac_objext conftest$ac_exeext
15391 if { (eval echo "$as_me:15391: \"$ac_link\"") >&5
15392   (eval $ac_link) 2>&5
15393   ac_status=$?
15394   echo "$as_me:15394: \$? = $ac_status" >&5
15395   (exit $ac_status); } &&
15396          { ac_try='test -s conftest$ac_exeext'
15397   { (eval echo "$as_me:15397: \"$ac_try\"") >&5
15398   (eval $ac_try) 2>&5
15399   ac_status=$?
15400   echo "$as_me:15400: \$? = $ac_status" >&5
15401   (exit $ac_status); }; }; then
15402   ac_cv_func_mkstemp=yes
15403 else
15404   echo "$as_me: failed program was:" >&5
15405 cat conftest.$ac_ext >&5
15406 ac_cv_func_mkstemp=no
15407 fi
15408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15409 fi
15410 echo "$as_me:15410: result: $ac_cv_func_mkstemp" >&5
15411 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15412
15413 else
15414   cat >conftest.$ac_ext <<_ACEOF
15415 #line 15415 "configure"
15416 #include "confdefs.h"
15417
15418 #include <sys/types.h>
15419 #include <stdlib.h>
15420 #include <stdio.h>
15421 #include <string.h>
15422 #include <sys/stat.h>
15423 int main()
15424 {
15425         char *tmpl = "conftestXXXXXX";
15426         char name[2][80];
15427         int n;
15428         int result = 0;
15429         int fd;
15430         struct stat sb;
15431
15432         umask(077);
15433         for (n = 0; n < 2; ++n) {
15434                 strcpy(name[n], tmpl);
15435                 if ((fd = mkstemp(name[n])) >= 0) {
15436                         if (!strcmp(name[n], tmpl)
15437                          || stat(name[n], &sb) != 0
15438                          || (sb.st_mode & S_IFMT) != S_IFREG
15439                          || (sb.st_mode & 077) != 0) {
15440                                 result = 1;
15441                         }
15442                         close(fd);
15443                 }
15444         }
15445         if (result == 0
15446          && !strcmp(name[0], name[1]))
15447                 result = 1;
15448         ${cf_cv_main_return:-return}(result);
15449 }
15450
15451 _ACEOF
15452 rm -f conftest$ac_exeext
15453 if { (eval echo "$as_me:15453: \"$ac_link\"") >&5
15454   (eval $ac_link) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15458   { (eval echo "$as_me:15458: \"$ac_try\"") >&5
15459   (eval $ac_try) 2>&5
15460   ac_status=$?
15461   echo "$as_me:15461: \$? = $ac_status" >&5
15462   (exit $ac_status); }; }; then
15463   cf_cv_func_mkstemp=yes
15464
15465 else
15466   echo "$as_me: program exited with status $ac_status" >&5
15467 echo "$as_me: failed program was:" >&5
15468 cat conftest.$ac_ext >&5
15469 cf_cv_func_mkstemp=no
15470
15471 fi
15472 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15473 fi
15474
15475 fi
15476 echo "$as_me:15476: result: $cf_cv_func_mkstemp" >&5
15477 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15478 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15479         cat >>confdefs.h <<\EOF
15480 #define HAVE_MKSTEMP 1
15481 EOF
15482
15483 fi
15484
15485 # setup for prototype of fallback for vsscanf()
15486
15487 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15488         HAVE_VSSCANF=1
15489 else
15490         HAVE_VSSCANF=0
15491 fi
15492
15493 if test "$cross_compiling" = yes ; then
15494         { echo "$as_me:15494: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15495 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15496 else
15497         echo "$as_me:15497: checking whether setvbuf arguments are reversed" >&5
15498 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15499 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15500   echo $ECHO_N "(cached) $ECHO_C" >&6
15501 else
15502   if test "$cross_compiling" = yes; then
15503   { { echo "$as_me:15503: error: cannot run test program while cross compiling" >&5
15504 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15505    { (exit 1); exit 1; }; }
15506 else
15507   cat >conftest.$ac_ext <<_ACEOF
15508 #line 15508 "configure"
15509 #include "confdefs.h"
15510 #include <stdio.h>
15511 /* If setvbuf has the reversed format, exit 0. */
15512 int
15513 main ()
15514 {
15515   /* This call has the arguments reversed.
15516      A reversed system may check and see that the address of main
15517      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15518   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15519     $ac_main_return(1);
15520   putc('\r', stdout);
15521   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15522 }
15523 _ACEOF
15524 rm -f conftest$ac_exeext
15525 if { (eval echo "$as_me:15525: \"$ac_link\"") >&5
15526   (eval $ac_link) 2>&5
15527   ac_status=$?
15528   echo "$as_me:15528: \$? = $ac_status" >&5
15529   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15530   { (eval echo "$as_me:15530: \"$ac_try\"") >&5
15531   (eval $ac_try) 2>&5
15532   ac_status=$?
15533   echo "$as_me:15533: \$? = $ac_status" >&5
15534   (exit $ac_status); }; }; then
15535   ac_cv_func_setvbuf_reversed=yes
15536 else
15537   echo "$as_me: program exited with status $ac_status" >&5
15538 echo "$as_me: failed program was:" >&5
15539 cat conftest.$ac_ext >&5
15540 ac_cv_func_setvbuf_reversed=no
15541 fi
15542 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15543 fi
15544 rm -f core core.* *.core
15545 fi
15546 echo "$as_me:15546: result: $ac_cv_func_setvbuf_reversed" >&5
15547 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15548 if test $ac_cv_func_setvbuf_reversed = yes; then
15549
15550 cat >>confdefs.h <<\EOF
15551 #define SETVBUF_REVERSED 1
15552 EOF
15553
15554 fi
15555
15556 fi
15557 echo "$as_me:15557: checking return type of signal handlers" >&5
15558 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15559 if test "${ac_cv_type_signal+set}" = set; then
15560   echo $ECHO_N "(cached) $ECHO_C" >&6
15561 else
15562   cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565 #include <sys/types.h>
15566 #include <signal.h>
15567 #ifdef signal
15568 # undef signal
15569 #endif
15570 #ifdef __cplusplus
15571 extern "C" void (*signal (int, void (*)(int)))(int);
15572 #else
15573 void (*signal ()) ();
15574 #endif
15575
15576 int
15577 main ()
15578 {
15579 int i;
15580   ;
15581   return 0;
15582 }
15583 _ACEOF
15584 rm -f conftest.$ac_objext
15585 if { (eval echo "$as_me:15585: \"$ac_compile\"") >&5
15586   (eval $ac_compile) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); } &&
15590          { ac_try='test -s conftest.$ac_objext'
15591   { (eval echo "$as_me:15591: \"$ac_try\"") >&5
15592   (eval $ac_try) 2>&5
15593   ac_status=$?
15594   echo "$as_me:15594: \$? = $ac_status" >&5
15595   (exit $ac_status); }; }; then
15596   ac_cv_type_signal=void
15597 else
15598   echo "$as_me: failed program was:" >&5
15599 cat conftest.$ac_ext >&5
15600 ac_cv_type_signal=int
15601 fi
15602 rm -f conftest.$ac_objext conftest.$ac_ext
15603 fi
15604 echo "$as_me:15604: result: $ac_cv_type_signal" >&5
15605 echo "${ECHO_T}$ac_cv_type_signal" >&6
15606
15607 cat >>confdefs.h <<EOF
15608 #define RETSIGTYPE $ac_cv_type_signal
15609 EOF
15610
15611 echo "$as_me:15611: checking for type sigaction_t" >&5
15612 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15613 if test "${cf_cv_type_sigaction+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616
15617         cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620
15621 #include <signal.h>
15622 int
15623 main ()
15624 {
15625 sigaction_t x
15626   ;
15627   return 0;
15628 }
15629 _ACEOF
15630 rm -f conftest.$ac_objext
15631 if { (eval echo "$as_me:15631: \"$ac_compile\"") >&5
15632   (eval $ac_compile) 2>&5
15633   ac_status=$?
15634   echo "$as_me:15634: \$? = $ac_status" >&5
15635   (exit $ac_status); } &&
15636          { ac_try='test -s conftest.$ac_objext'
15637   { (eval echo "$as_me:15637: \"$ac_try\"") >&5
15638   (eval $ac_try) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); }; }; then
15642   cf_cv_type_sigaction=yes
15643 else
15644   echo "$as_me: failed program was:" >&5
15645 cat conftest.$ac_ext >&5
15646 cf_cv_type_sigaction=no
15647 fi
15648 rm -f conftest.$ac_objext conftest.$ac_ext
15649 fi
15650
15651 echo "$as_me:15651: result: $cf_cv_type_sigaction" >&5
15652 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15653 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15654 #define HAVE_TYPE_SIGACTION 1
15655 EOF
15656
15657 echo "$as_me:15657: checking declaration of size-change" >&5
15658 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15659 if test "${cf_cv_sizechange+set}" = set; then
15660   echo $ECHO_N "(cached) $ECHO_C" >&6
15661 else
15662
15663     cf_cv_sizechange=unknown
15664     cf_save_CPPFLAGS="$CPPFLAGS"
15665
15666 for cf_opts in "" "NEED_PTEM_H"
15667 do
15668
15669     CPPFLAGS="$cf_save_CPPFLAGS"
15670     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15671     cat >conftest.$ac_ext <<_ACEOF
15672 #line 15672 "configure"
15673 #include "confdefs.h"
15674 #include <sys/types.h>
15675 #ifdef HAVE_TERMIOS_H
15676 #include <termios.h>
15677 #else
15678 #ifdef HAVE_TERMIO_H
15679 #include <termio.h>
15680 #endif
15681 #endif
15682 #ifdef NEED_PTEM_H
15683 /* This is a workaround for SCO:  they neglected to define struct winsize in
15684  * termios.h -- it's only in termio.h and ptem.h
15685  */
15686 #include        <sys/stream.h>
15687 #include        <sys/ptem.h>
15688 #endif
15689 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15690 #include <sys/ioctl.h>
15691 #endif
15692
15693 int
15694 main ()
15695 {
15696
15697 #ifdef TIOCGSIZE
15698         struct ttysize win;     /* FIXME: what system is this? */
15699         int y = win.ts_lines;
15700         int x = win.ts_cols;
15701 #else
15702 #ifdef TIOCGWINSZ
15703         struct winsize win;
15704         int y = win.ws_row;
15705         int x = win.ws_col;
15706 #else
15707         no TIOCGSIZE or TIOCGWINSZ
15708 #endif /* TIOCGWINSZ */
15709 #endif /* TIOCGSIZE */
15710
15711   ;
15712   return 0;
15713 }
15714 _ACEOF
15715 rm -f conftest.$ac_objext
15716 if { (eval echo "$as_me:15716: \"$ac_compile\"") >&5
15717   (eval $ac_compile) 2>&5
15718   ac_status=$?
15719   echo "$as_me:15719: \$? = $ac_status" >&5
15720   (exit $ac_status); } &&
15721          { ac_try='test -s conftest.$ac_objext'
15722   { (eval echo "$as_me:15722: \"$ac_try\"") >&5
15723   (eval $ac_try) 2>&5
15724   ac_status=$?
15725   echo "$as_me:15725: \$? = $ac_status" >&5
15726   (exit $ac_status); }; }; then
15727   cf_cv_sizechange=yes
15728 else
15729   echo "$as_me: failed program was:" >&5
15730 cat conftest.$ac_ext >&5
15731 cf_cv_sizechange=no
15732 fi
15733 rm -f conftest.$ac_objext conftest.$ac_ext
15734
15735         CPPFLAGS="$cf_save_CPPFLAGS"
15736         if test "$cf_cv_sizechange" = yes ; then
15737                 echo "size-change succeeded ($cf_opts)" >&5
15738                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15739                 break
15740         fi
15741 done
15742
15743 fi
15744 echo "$as_me:15744: result: $cf_cv_sizechange" >&5
15745 echo "${ECHO_T}$cf_cv_sizechange" >&6
15746 if test "$cf_cv_sizechange" != no ; then
15747         cat >>confdefs.h <<\EOF
15748 #define HAVE_SIZECHANGE 1
15749 EOF
15750
15751         case $cf_cv_sizechange in #(vi
15752         NEED*)
15753                 cat >>confdefs.h <<EOF
15754 #define $cf_cv_sizechange  1
15755 EOF
15756
15757                 ;;
15758         esac
15759 fi
15760
15761 echo "$as_me:15761: checking for memmove" >&5
15762 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15763 if test "${ac_cv_func_memmove+set}" = set; then
15764   echo $ECHO_N "(cached) $ECHO_C" >&6
15765 else
15766   cat >conftest.$ac_ext <<_ACEOF
15767 #line 15767 "configure"
15768 #include "confdefs.h"
15769 /* System header to define __stub macros and hopefully few prototypes,
15770     which can conflict with char memmove (); below.  */
15771 #include <assert.h>
15772 /* Override any gcc2 internal prototype to avoid an error.  */
15773 #ifdef __cplusplus
15774 extern "C"
15775 #endif
15776 /* We use char because int might match the return type of a gcc2
15777    builtin and then its argument prototype would still apply.  */
15778 char memmove ();
15779 char (*f) ();
15780
15781 int
15782 main ()
15783 {
15784 /* The GNU C library defines this for functions which it implements
15785     to always fail with ENOSYS.  Some functions are actually named
15786     something starting with __ and the normal name is an alias.  */
15787 #if defined (__stub_memmove) || defined (__stub___memmove)
15788 choke me
15789 #else
15790 f = memmove;
15791 #endif
15792
15793   ;
15794   return 0;
15795 }
15796 _ACEOF
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:15798: \"$ac_link\"") >&5
15799   (eval $ac_link) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); } &&
15803          { ac_try='test -s conftest$ac_exeext'
15804   { (eval echo "$as_me:15804: \"$ac_try\"") >&5
15805   (eval $ac_try) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); }; }; then
15809   ac_cv_func_memmove=yes
15810 else
15811   echo "$as_me: failed program was:" >&5
15812 cat conftest.$ac_ext >&5
15813 ac_cv_func_memmove=no
15814 fi
15815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15816 fi
15817 echo "$as_me:15817: result: $ac_cv_func_memmove" >&5
15818 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15819 if test $ac_cv_func_memmove = yes; then
15820   :
15821 else
15822
15823 echo "$as_me:15823: checking for bcopy" >&5
15824 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15825 if test "${ac_cv_func_bcopy+set}" = set; then
15826   echo $ECHO_N "(cached) $ECHO_C" >&6
15827 else
15828   cat >conftest.$ac_ext <<_ACEOF
15829 #line 15829 "configure"
15830 #include "confdefs.h"
15831 /* System header to define __stub macros and hopefully few prototypes,
15832     which can conflict with char bcopy (); below.  */
15833 #include <assert.h>
15834 /* Override any gcc2 internal prototype to avoid an error.  */
15835 #ifdef __cplusplus
15836 extern "C"
15837 #endif
15838 /* We use char because int might match the return type of a gcc2
15839    builtin and then its argument prototype would still apply.  */
15840 char bcopy ();
15841 char (*f) ();
15842
15843 int
15844 main ()
15845 {
15846 /* The GNU C library defines this for functions which it implements
15847     to always fail with ENOSYS.  Some functions are actually named
15848     something starting with __ and the normal name is an alias.  */
15849 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15850 choke me
15851 #else
15852 f = bcopy;
15853 #endif
15854
15855   ;
15856   return 0;
15857 }
15858 _ACEOF
15859 rm -f conftest.$ac_objext conftest$ac_exeext
15860 if { (eval echo "$as_me:15860: \"$ac_link\"") >&5
15861   (eval $ac_link) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); } &&
15865          { ac_try='test -s conftest$ac_exeext'
15866   { (eval echo "$as_me:15866: \"$ac_try\"") >&5
15867   (eval $ac_try) 2>&5
15868   ac_status=$?
15869   echo "$as_me:15869: \$? = $ac_status" >&5
15870   (exit $ac_status); }; }; then
15871   ac_cv_func_bcopy=yes
15872 else
15873   echo "$as_me: failed program was:" >&5
15874 cat conftest.$ac_ext >&5
15875 ac_cv_func_bcopy=no
15876 fi
15877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15878 fi
15879 echo "$as_me:15879: result: $ac_cv_func_bcopy" >&5
15880 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15881 if test $ac_cv_func_bcopy = yes; then
15882
15883         echo "$as_me:15883: checking if bcopy does overlapping moves" >&5
15884 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15885 if test "${cf_cv_good_bcopy+set}" = set; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888
15889                 if test "$cross_compiling" = yes; then
15890   cf_cv_good_bcopy=unknown
15891 else
15892   cat >conftest.$ac_ext <<_ACEOF
15893 #line 15893 "configure"
15894 #include "confdefs.h"
15895
15896 int main() {
15897         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15898         char temp[40];
15899         bcopy(data, temp, sizeof(data));
15900         bcopy(temp+10, temp, 15);
15901         bcopy(temp+5, temp+15, 10);
15902         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15903 }
15904
15905 _ACEOF
15906 rm -f conftest$ac_exeext
15907 if { (eval echo "$as_me:15907: \"$ac_link\"") >&5
15908   (eval $ac_link) 2>&5
15909   ac_status=$?
15910   echo "$as_me:15910: \$? = $ac_status" >&5
15911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15912   { (eval echo "$as_me:15912: \"$ac_try\"") >&5
15913   (eval $ac_try) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); }; }; then
15917   cf_cv_good_bcopy=yes
15918 else
15919   echo "$as_me: program exited with status $ac_status" >&5
15920 echo "$as_me: failed program was:" >&5
15921 cat conftest.$ac_ext >&5
15922 cf_cv_good_bcopy=no
15923 fi
15924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15925 fi
15926
15927 fi
15928 echo "$as_me:15928: result: $cf_cv_good_bcopy" >&5
15929 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15930
15931 else
15932   cf_cv_good_bcopy=no
15933 fi
15934
15935         if test "$cf_cv_good_bcopy" = yes ; then
15936                 cat >>confdefs.h <<\EOF
15937 #define USE_OK_BCOPY 1
15938 EOF
15939
15940         else
15941                 cat >>confdefs.h <<\EOF
15942 #define USE_MY_MEMMOVE 1
15943 EOF
15944
15945         fi
15946
15947 fi
15948
15949 echo "$as_me:15949: checking if poll really works" >&5
15950 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15951 if test "${cf_cv_working_poll+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954
15955 if test "$cross_compiling" = yes; then
15956   cf_cv_working_poll=unknown
15957 else
15958   cat >conftest.$ac_ext <<_ACEOF
15959 #line 15959 "configure"
15960 #include "confdefs.h"
15961
15962 #include <stdio.h>
15963 #ifdef HAVE_POLL_H
15964 #include <poll.h>
15965 #else
15966 #include <sys/poll.h>
15967 #endif
15968 int main() {
15969         struct pollfd myfds;
15970         int ret;
15971
15972         myfds.fd = 0;
15973         myfds.events = POLLIN;
15974
15975         ret = poll(&myfds, 1, 100);
15976         ${cf_cv_main_return:-return}(ret != 0);
15977 }
15978 _ACEOF
15979 rm -f conftest$ac_exeext
15980 if { (eval echo "$as_me:15980: \"$ac_link\"") >&5
15981   (eval $ac_link) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15985   { (eval echo "$as_me:15985: \"$ac_try\"") >&5
15986   (eval $ac_try) 2>&5
15987   ac_status=$?
15988   echo "$as_me:15988: \$? = $ac_status" >&5
15989   (exit $ac_status); }; }; then
15990   cf_cv_working_poll=yes
15991 else
15992   echo "$as_me: program exited with status $ac_status" >&5
15993 echo "$as_me: failed program was:" >&5
15994 cat conftest.$ac_ext >&5
15995 cf_cv_working_poll=no
15996 fi
15997 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15998 fi
15999 fi
16000 echo "$as_me:16000: result: $cf_cv_working_poll" >&5
16001 echo "${ECHO_T}$cf_cv_working_poll" >&6
16002 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16003 #define HAVE_WORKING_POLL 1
16004 EOF
16005
16006 echo "$as_me:16006: checking for va_copy" >&5
16007 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16008 if test "${cf_cv_have_va_copy+set}" = set; then
16009   echo $ECHO_N "(cached) $ECHO_C" >&6
16010 else
16011
16012 cat >conftest.$ac_ext <<_ACEOF
16013 #line 16013 "configure"
16014 #include "confdefs.h"
16015
16016 #include <stdarg.h>
16017
16018 int
16019 main ()
16020 {
16021
16022         static va_list dst;
16023         static va_list src;
16024         va_copy(dst, src)
16025   ;
16026   return 0;
16027 }
16028 _ACEOF
16029 rm -f conftest.$ac_objext conftest$ac_exeext
16030 if { (eval echo "$as_me:16030: \"$ac_link\"") >&5
16031   (eval $ac_link) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit $ac_status); } &&
16035          { ac_try='test -s conftest$ac_exeext'
16036   { (eval echo "$as_me:16036: \"$ac_try\"") >&5
16037   (eval $ac_try) 2>&5
16038   ac_status=$?
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); }; }; then
16041   cf_cv_have_va_copy=yes
16042 else
16043   echo "$as_me: failed program was:" >&5
16044 cat conftest.$ac_ext >&5
16045 cf_cv_have_va_copy=no
16046 fi
16047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16048 fi
16049 echo "$as_me:16049: result: $cf_cv_have_va_copy" >&5
16050 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16051
16052 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16053 #define HAVE_VA_COPY 1
16054 EOF
16055
16056 echo "$as_me:16056: checking for __va_copy" >&5
16057 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16058 if test "${cf_cv_have___va_copy+set}" = set; then
16059   echo $ECHO_N "(cached) $ECHO_C" >&6
16060 else
16061
16062 cat >conftest.$ac_ext <<_ACEOF
16063 #line 16063 "configure"
16064 #include "confdefs.h"
16065
16066 #include <stdarg.h>
16067
16068 int
16069 main ()
16070 {
16071
16072         static va_list dst;
16073         static va_list src;
16074         __va_copy(dst, src)
16075   ;
16076   return 0;
16077 }
16078 _ACEOF
16079 rm -f conftest.$ac_objext conftest$ac_exeext
16080 if { (eval echo "$as_me:16080: \"$ac_link\"") >&5
16081   (eval $ac_link) 2>&5
16082   ac_status=$?
16083   echo "$as_me:16083: \$? = $ac_status" >&5
16084   (exit $ac_status); } &&
16085          { ac_try='test -s conftest$ac_exeext'
16086   { (eval echo "$as_me:16086: \"$ac_try\"") >&5
16087   (eval $ac_try) 2>&5
16088   ac_status=$?
16089   echo "$as_me:16089: \$? = $ac_status" >&5
16090   (exit $ac_status); }; }; then
16091   cf_cv_have___va_copy=yes
16092 else
16093   echo "$as_me: failed program was:" >&5
16094 cat conftest.$ac_ext >&5
16095 cf_cv_have___va_copy=no
16096 fi
16097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16098 fi
16099 echo "$as_me:16099: result: $cf_cv_have___va_copy" >&5
16100 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16101
16102 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16103 #define HAVE___VA_COPY 1
16104 EOF
16105
16106 echo "$as_me:16106: checking for pid_t" >&5
16107 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16108 if test "${ac_cv_type_pid_t+set}" = set; then
16109   echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111   cat >conftest.$ac_ext <<_ACEOF
16112 #line 16112 "configure"
16113 #include "confdefs.h"
16114 $ac_includes_default
16115 int
16116 main ()
16117 {
16118 if ((pid_t *) 0)
16119   return 0;
16120 if (sizeof (pid_t))
16121   return 0;
16122   ;
16123   return 0;
16124 }
16125 _ACEOF
16126 rm -f conftest.$ac_objext
16127 if { (eval echo "$as_me:16127: \"$ac_compile\"") >&5
16128   (eval $ac_compile) 2>&5
16129   ac_status=$?
16130   echo "$as_me:16130: \$? = $ac_status" >&5
16131   (exit $ac_status); } &&
16132          { ac_try='test -s conftest.$ac_objext'
16133   { (eval echo "$as_me:16133: \"$ac_try\"") >&5
16134   (eval $ac_try) 2>&5
16135   ac_status=$?
16136   echo "$as_me:16136: \$? = $ac_status" >&5
16137   (exit $ac_status); }; }; then
16138   ac_cv_type_pid_t=yes
16139 else
16140   echo "$as_me: failed program was:" >&5
16141 cat conftest.$ac_ext >&5
16142 ac_cv_type_pid_t=no
16143 fi
16144 rm -f conftest.$ac_objext conftest.$ac_ext
16145 fi
16146 echo "$as_me:16146: result: $ac_cv_type_pid_t" >&5
16147 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16148 if test $ac_cv_type_pid_t = yes; then
16149   :
16150 else
16151
16152 cat >>confdefs.h <<EOF
16153 #define pid_t int
16154 EOF
16155
16156 fi
16157
16158 for ac_header in unistd.h vfork.h
16159 do
16160 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16161 echo "$as_me:16161: checking for $ac_header" >&5
16162 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16163 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16164   echo $ECHO_N "(cached) $ECHO_C" >&6
16165 else
16166   cat >conftest.$ac_ext <<_ACEOF
16167 #line 16167 "configure"
16168 #include "confdefs.h"
16169 #include <$ac_header>
16170 _ACEOF
16171 if { (eval echo "$as_me:16171: \"$ac_cpp conftest.$ac_ext\"") >&5
16172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16173   ac_status=$?
16174   egrep -v '^ *\+' conftest.er1 >conftest.err
16175   rm -f conftest.er1
16176   cat conftest.err >&5
16177   echo "$as_me:16177: \$? = $ac_status" >&5
16178   (exit $ac_status); } >/dev/null; then
16179   if test -s conftest.err; then
16180     ac_cpp_err=$ac_c_preproc_warn_flag
16181   else
16182     ac_cpp_err=
16183   fi
16184 else
16185   ac_cpp_err=yes
16186 fi
16187 if test -z "$ac_cpp_err"; then
16188   eval "$as_ac_Header=yes"
16189 else
16190   echo "$as_me: failed program was:" >&5
16191   cat conftest.$ac_ext >&5
16192   eval "$as_ac_Header=no"
16193 fi
16194 rm -f conftest.err conftest.$ac_ext
16195 fi
16196 echo "$as_me:16196: result: `eval echo '${'$as_ac_Header'}'`" >&5
16197 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16198 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16199   cat >>confdefs.h <<EOF
16200 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16201 EOF
16202
16203 fi
16204 done
16205
16206 for ac_func in fork vfork
16207 do
16208 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16209 echo "$as_me:16209: checking for $ac_func" >&5
16210 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16211 if eval "test \"\${$as_ac_var+set}\" = set"; then
16212   echo $ECHO_N "(cached) $ECHO_C" >&6
16213 else
16214   cat >conftest.$ac_ext <<_ACEOF
16215 #line 16215 "configure"
16216 #include "confdefs.h"
16217 /* System header to define __stub macros and hopefully few prototypes,
16218     which can conflict with char $ac_func (); below.  */
16219 #include <assert.h>
16220 /* Override any gcc2 internal prototype to avoid an error.  */
16221 #ifdef __cplusplus
16222 extern "C"
16223 #endif
16224 /* We use char because int might match the return type of a gcc2
16225    builtin and then its argument prototype would still apply.  */
16226 char $ac_func ();
16227 char (*f) ();
16228
16229 int
16230 main ()
16231 {
16232 /* The GNU C library defines this for functions which it implements
16233     to always fail with ENOSYS.  Some functions are actually named
16234     something starting with __ and the normal name is an alias.  */
16235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16236 choke me
16237 #else
16238 f = $ac_func;
16239 #endif
16240
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 rm -f conftest.$ac_objext conftest$ac_exeext
16246 if { (eval echo "$as_me:16246: \"$ac_link\"") >&5
16247   (eval $ac_link) 2>&5
16248   ac_status=$?
16249   echo "$as_me:16249: \$? = $ac_status" >&5
16250   (exit $ac_status); } &&
16251          { ac_try='test -s conftest$ac_exeext'
16252   { (eval echo "$as_me:16252: \"$ac_try\"") >&5
16253   (eval $ac_try) 2>&5
16254   ac_status=$?
16255   echo "$as_me:16255: \$? = $ac_status" >&5
16256   (exit $ac_status); }; }; then
16257   eval "$as_ac_var=yes"
16258 else
16259   echo "$as_me: failed program was:" >&5
16260 cat conftest.$ac_ext >&5
16261 eval "$as_ac_var=no"
16262 fi
16263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16264 fi
16265 echo "$as_me:16265: result: `eval echo '${'$as_ac_var'}'`" >&5
16266 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16267 if test `eval echo '${'$as_ac_var'}'` = yes; then
16268   cat >>confdefs.h <<EOF
16269 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16270 EOF
16271
16272 fi
16273 done
16274
16275 ac_cv_func_fork_works=$ac_cv_func_fork
16276 if test "x$ac_cv_func_fork" = xyes; then
16277   echo "$as_me:16277: checking for working fork" >&5
16278 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16279 if test "${ac_cv_func_fork_works+set}" = set; then
16280   echo $ECHO_N "(cached) $ECHO_C" >&6
16281 else
16282   if test "$cross_compiling" = yes; then
16283   ac_cv_func_fork_works=cross
16284 else
16285   cat >conftest.$ac_ext <<_ACEOF
16286 /* By Rüdiger Kuhlmann. */
16287       #include <sys/types.h>
16288       #if HAVE_UNISTD_H
16289       # include <unistd.h>
16290       #endif
16291       /* Some systems only have a dummy stub for fork() */
16292       int main ()
16293       {
16294         if (fork() < 0)
16295           $ac_main_return (1);
16296         $ac_main_return (0);
16297       }
16298 _ACEOF
16299 rm -f conftest$ac_exeext
16300 if { (eval echo "$as_me:16300: \"$ac_link\"") >&5
16301   (eval $ac_link) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16305   { (eval echo "$as_me:16305: \"$ac_try\"") >&5
16306   (eval $ac_try) 2>&5
16307   ac_status=$?
16308   echo "$as_me:16308: \$? = $ac_status" >&5
16309   (exit $ac_status); }; }; then
16310   ac_cv_func_fork_works=yes
16311 else
16312   echo "$as_me: program exited with status $ac_status" >&5
16313 echo "$as_me: failed program was:" >&5
16314 cat conftest.$ac_ext >&5
16315 ac_cv_func_fork_works=no
16316 fi
16317 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16318 fi
16319 fi
16320 echo "$as_me:16320: result: $ac_cv_func_fork_works" >&5
16321 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16322
16323 fi
16324 if test "x$ac_cv_func_fork_works" = xcross; then
16325   case $host in
16326     *-*-amigaos* | *-*-msdosdjgpp*)
16327       # Override, as these systems have only a dummy fork() stub
16328       ac_cv_func_fork_works=no
16329       ;;
16330     *)
16331       ac_cv_func_fork_works=yes
16332       ;;
16333   esac
16334   { echo "$as_me:16334: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16335 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16336 fi
16337 ac_cv_func_vfork_works=$ac_cv_func_vfork
16338 if test "x$ac_cv_func_vfork" = xyes; then
16339   echo "$as_me:16339: checking for working vfork" >&5
16340 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16341 if test "${ac_cv_func_vfork_works+set}" = set; then
16342   echo $ECHO_N "(cached) $ECHO_C" >&6
16343 else
16344   if test "$cross_compiling" = yes; then
16345   ac_cv_func_vfork_works=cross
16346 else
16347   cat >conftest.$ac_ext <<_ACEOF
16348 #line 16348 "configure"
16349 #include "confdefs.h"
16350 /* Thanks to Paul Eggert for this test.  */
16351 #include <stdio.h>
16352 #include <sys/types.h>
16353 #include <sys/stat.h>
16354 #if HAVE_UNISTD_H
16355 # include <unistd.h>
16356 #endif
16357 #if HAVE_VFORK_H
16358 # include <vfork.h>
16359 #endif
16360 /* On some sparc systems, changes by the child to local and incoming
16361    argument registers are propagated back to the parent.  The compiler
16362    is told about this with #include <vfork.h>, but some compilers
16363    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16364    static variable whose address is put into a register that is
16365    clobbered by the vfork.  */
16366 static
16367 #ifdef __cplusplus
16368 sparc_address_test (int arg)
16369 # else
16370 sparc_address_test (arg) int arg;
16371 #endif
16372 {
16373   static pid_t child;
16374   if (!child) {
16375     child = vfork ();
16376     if (child < 0) {
16377       perror ("vfork");
16378       _exit(2);
16379     }
16380     if (!child) {
16381       arg = getpid();
16382       write(-1, "", 0);
16383       _exit (arg);
16384     }
16385   }
16386 }
16387
16388 int
16389 main ()
16390 {
16391   pid_t parent = getpid ();
16392   pid_t child;
16393
16394   sparc_address_test ();
16395
16396   child = vfork ();
16397
16398   if (child == 0) {
16399     /* Here is another test for sparc vfork register problems.  This
16400        test uses lots of local variables, at least as many local
16401        variables as main has allocated so far including compiler
16402        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16403        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16404        reuse the register of parent for one of the local variables,
16405        since it will think that parent can't possibly be used any more
16406        in this routine.  Assigning to the local variable will thus
16407        munge parent in the parent process.  */
16408     pid_t
16409       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16410       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16411     /* Convince the compiler that p..p7 are live; otherwise, it might
16412        use the same hardware register for all 8 local variables.  */
16413     if (p != p1 || p != p2 || p != p3 || p != p4
16414         || p != p5 || p != p6 || p != p7)
16415       _exit(1);
16416
16417     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16418        from child file descriptors.  If the child closes a descriptor
16419        before it execs or exits, this munges the parent's descriptor
16420        as well.  Test for this by closing stdout in the child.  */
16421     _exit(close(fileno(stdout)) != 0);
16422   } else {
16423     int status;
16424     struct stat st;
16425
16426     while (wait(&status) != child)
16427       ;
16428     $ac_main_return(
16429          /* Was there some problem with vforking?  */
16430          child < 0
16431
16432          /* Did the child fail?  (This shouldn't happen.)  */
16433          || status
16434
16435          /* Did the vfork/compiler bug occur?  */
16436          || parent != getpid()
16437
16438          /* Did the file descriptor bug occur?  */
16439          || fstat(fileno(stdout), &st) != 0
16440          );
16441   }
16442 }
16443 _ACEOF
16444 rm -f conftest$ac_exeext
16445 if { (eval echo "$as_me:16445: \"$ac_link\"") >&5
16446   (eval $ac_link) 2>&5
16447   ac_status=$?
16448   echo "$as_me:16448: \$? = $ac_status" >&5
16449   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16450   { (eval echo "$as_me:16450: \"$ac_try\"") >&5
16451   (eval $ac_try) 2>&5
16452   ac_status=$?
16453   echo "$as_me:16453: \$? = $ac_status" >&5
16454   (exit $ac_status); }; }; then
16455   ac_cv_func_vfork_works=yes
16456 else
16457   echo "$as_me: program exited with status $ac_status" >&5
16458 echo "$as_me: failed program was:" >&5
16459 cat conftest.$ac_ext >&5
16460 ac_cv_func_vfork_works=no
16461 fi
16462 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16463 fi
16464 fi
16465 echo "$as_me:16465: result: $ac_cv_func_vfork_works" >&5
16466 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16467
16468 fi;
16469 if test "x$ac_cv_func_fork_works" = xcross; then
16470   ac_cv_func_vfork_works=ac_cv_func_vfork
16471   { echo "$as_me:16471: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16472 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16473 fi
16474
16475 if test "x$ac_cv_func_vfork_works" = xyes; then
16476
16477 cat >>confdefs.h <<\EOF
16478 #define HAVE_WORKING_VFORK 1
16479 EOF
16480
16481 else
16482
16483 cat >>confdefs.h <<\EOF
16484 #define vfork fork
16485 EOF
16486
16487 fi
16488 if test "x$ac_cv_func_fork_works" = xyes; then
16489
16490 cat >>confdefs.h <<\EOF
16491 #define HAVE_WORKING_FORK 1
16492 EOF
16493
16494 fi
16495
16496 # special check for test/ditto.c
16497
16498 echo "$as_me:16498: checking for openpty in -lutil" >&5
16499 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16500 if test "${ac_cv_lib_util_openpty+set}" = set; then
16501   echo $ECHO_N "(cached) $ECHO_C" >&6
16502 else
16503   ac_check_lib_save_LIBS=$LIBS
16504 LIBS="-lutil  $LIBS"
16505 cat >conftest.$ac_ext <<_ACEOF
16506 #line 16506 "configure"
16507 #include "confdefs.h"
16508
16509 /* Override any gcc2 internal prototype to avoid an error.  */
16510 #ifdef __cplusplus
16511 extern "C"
16512 #endif
16513 /* We use char because int might match the return type of a gcc2
16514    builtin and then its argument prototype would still apply.  */
16515 char openpty ();
16516 int
16517 main ()
16518 {
16519 openpty ();
16520   ;
16521   return 0;
16522 }
16523 _ACEOF
16524 rm -f conftest.$ac_objext conftest$ac_exeext
16525 if { (eval echo "$as_me:16525: \"$ac_link\"") >&5
16526   (eval $ac_link) 2>&5
16527   ac_status=$?
16528   echo "$as_me:16528: \$? = $ac_status" >&5
16529   (exit $ac_status); } &&
16530          { ac_try='test -s conftest$ac_exeext'
16531   { (eval echo "$as_me:16531: \"$ac_try\"") >&5
16532   (eval $ac_try) 2>&5
16533   ac_status=$?
16534   echo "$as_me:16534: \$? = $ac_status" >&5
16535   (exit $ac_status); }; }; then
16536   ac_cv_lib_util_openpty=yes
16537 else
16538   echo "$as_me: failed program was:" >&5
16539 cat conftest.$ac_ext >&5
16540 ac_cv_lib_util_openpty=no
16541 fi
16542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16543 LIBS=$ac_check_lib_save_LIBS
16544 fi
16545 echo "$as_me:16545: result: $ac_cv_lib_util_openpty" >&5
16546 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16547 if test $ac_cv_lib_util_openpty = yes; then
16548   cf_cv_lib_util=yes
16549 else
16550   cf_cv_lib_util=no
16551 fi
16552
16553 echo "$as_me:16553: checking for openpty header" >&5
16554 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16555 if test "${cf_cv_func_openpty+set}" = set; then
16556   echo $ECHO_N "(cached) $ECHO_C" >&6
16557 else
16558
16559     cf_save_LIBS="$LIBS"
16560     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16561     for cf_header in pty.h libutil.h util.h
16562     do
16563     cat >conftest.$ac_ext <<_ACEOF
16564 #line 16564 "configure"
16565 #include "confdefs.h"
16566
16567 #include <$cf_header>
16568
16569 int
16570 main ()
16571 {
16572
16573     int x = openpty((int *)0, (int *)0, (char *)0,
16574                    (struct termios *)0, (struct winsize *)0);
16575
16576   ;
16577   return 0;
16578 }
16579 _ACEOF
16580 rm -f conftest.$ac_objext conftest$ac_exeext
16581 if { (eval echo "$as_me:16581: \"$ac_link\"") >&5
16582   (eval $ac_link) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } &&
16586          { ac_try='test -s conftest$ac_exeext'
16587   { (eval echo "$as_me:16587: \"$ac_try\"") >&5
16588   (eval $ac_try) 2>&5
16589   ac_status=$?
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); }; }; then
16592
16593         cf_cv_func_openpty=$cf_header
16594         break
16595
16596 else
16597   echo "$as_me: failed program was:" >&5
16598 cat conftest.$ac_ext >&5
16599
16600         cf_cv_func_openpty=no
16601
16602 fi
16603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16604     done
16605     LIBS="$cf_save_LIBS"
16606
16607 fi
16608 echo "$as_me:16608: result: $cf_cv_func_openpty" >&5
16609 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16610
16611 if test "$cf_cv_func_openpty" != no ; then
16612     cat >>confdefs.h <<EOF
16613 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16614 EOF
16615
16616     cat >>confdefs.h <<\EOF
16617 #define USE_XTERM_PTY 1
16618 EOF
16619
16620     if test "$cf_cv_lib_util" = yes ; then
16621         TEST_LIBS="-lutil $TEST_LIBS"
16622     fi
16623 fi
16624
16625 if test "$with_hashed_db" != no ; then
16626         cat >>confdefs.h <<\EOF
16627 #define USE_HASHED_DB 1
16628 EOF
16629
16630 case $with_hashed_db in #(vi
16631 yes|*able*) #(vi
16632     ;;
16633 *)
16634     if test -d "$with_hashed_db" ; then
16635
16636 if test -n "$with_hashed_db/include" ; then
16637   for cf_add_incdir in $with_hashed_db/include
16638   do
16639         while test $cf_add_incdir != /usr/include
16640         do
16641           if test -d $cf_add_incdir
16642           then
16643                 cf_have_incdir=no
16644                 if test -n "$CFLAGS$CPPFLAGS" ; then
16645                   # a loop is needed to ensure we can add subdirs of existing dirs
16646                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16647                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16648                           cf_have_incdir=yes; break
16649                         fi
16650                   done
16651                 fi
16652
16653                 if test "$cf_have_incdir" = no ; then
16654                   if test "$cf_add_incdir" = /usr/local/include ; then
16655                         if test "$GCC" = yes
16656                         then
16657                           cf_save_CPPFLAGS=$CPPFLAGS
16658                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16659                           cat >conftest.$ac_ext <<_ACEOF
16660 #line 16660 "configure"
16661 #include "confdefs.h"
16662 #include <stdio.h>
16663 int
16664 main ()
16665 {
16666 printf("Hello")
16667   ;
16668   return 0;
16669 }
16670 _ACEOF
16671 rm -f conftest.$ac_objext
16672 if { (eval echo "$as_me:16672: \"$ac_compile\"") >&5
16673   (eval $ac_compile) 2>&5
16674   ac_status=$?
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); } &&
16677          { ac_try='test -s conftest.$ac_objext'
16678   { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:16681: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   :
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 cat conftest.$ac_ext >&5
16687 cf_have_incdir=yes
16688 fi
16689 rm -f conftest.$ac_objext conftest.$ac_ext
16690                           CPPFLAGS=$cf_save_CPPFLAGS
16691                         fi
16692                   fi
16693                 fi
16694
16695                 if test "$cf_have_incdir" = no ; then
16696                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16697
16698 echo "${as_me:-configure}:16698: testing adding $cf_add_incdir to include-path ..." 1>&5
16699
16700                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16701
16702                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16703                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16704                   cf_add_incdir="$cf_top_incdir"
16705                 else
16706                   break
16707                 fi
16708           fi
16709         done
16710   done
16711 fi
16712
16713 if test -n "$with_hashed_db/lib" ; then
16714   for cf_add_libdir in $with_hashed_db/lib
16715   do
16716     if test $cf_add_libdir = /usr/lib ; then
16717       :
16718     elif test -d $cf_add_libdir
16719     then
16720       cf_have_libdir=no
16721       if test -n "$LDFLAGS$LIBS" ; then
16722         # a loop is needed to ensure we can add subdirs of existing dirs
16723         for cf_test_libdir in $LDFLAGS $LIBS ; do
16724           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16725             cf_have_libdir=yes; break
16726           fi
16727         done
16728       fi
16729       if test "$cf_have_libdir" = no ; then
16730         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16731
16732 echo "${as_me:-configure}:16732: testing adding $cf_add_libdir to library-path ..." 1>&5
16733
16734         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16735       fi
16736     fi
16737   done
16738 fi
16739
16740     fi
16741 esac
16742
16743 echo "$as_me:16743: checking for db.h" >&5
16744 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16745 if test "${ac_cv_header_db_h+set}" = set; then
16746   echo $ECHO_N "(cached) $ECHO_C" >&6
16747 else
16748   cat >conftest.$ac_ext <<_ACEOF
16749 #line 16749 "configure"
16750 #include "confdefs.h"
16751 #include <db.h>
16752 _ACEOF
16753 if { (eval echo "$as_me:16753: \"$ac_cpp conftest.$ac_ext\"") >&5
16754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16755   ac_status=$?
16756   egrep -v '^ *\+' conftest.er1 >conftest.err
16757   rm -f conftest.er1
16758   cat conftest.err >&5
16759   echo "$as_me:16759: \$? = $ac_status" >&5
16760   (exit $ac_status); } >/dev/null; then
16761   if test -s conftest.err; then
16762     ac_cpp_err=$ac_c_preproc_warn_flag
16763   else
16764     ac_cpp_err=
16765   fi
16766 else
16767   ac_cpp_err=yes
16768 fi
16769 if test -z "$ac_cpp_err"; then
16770   ac_cv_header_db_h=yes
16771 else
16772   echo "$as_me: failed program was:" >&5
16773   cat conftest.$ac_ext >&5
16774   ac_cv_header_db_h=no
16775 fi
16776 rm -f conftest.err conftest.$ac_ext
16777 fi
16778 echo "$as_me:16778: result: $ac_cv_header_db_h" >&5
16779 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16780 if test $ac_cv_header_db_h = yes; then
16781
16782 echo "$as_me:16782: checking for version of db" >&5
16783 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16784 if test "${cf_cv_hashed_db_version+set}" = set; then
16785   echo $ECHO_N "(cached) $ECHO_C" >&6
16786 else
16787
16788 cf_cv_hashed_db_version=unknown
16789
16790 for cf_db_version in 1 2 3 4 5
16791 do
16792
16793 echo "${as_me:-configure}:16793: testing checking for db version $cf_db_version ..." 1>&5
16794
16795         cat >conftest.$ac_ext <<_ACEOF
16796 #line 16796 "configure"
16797 #include "confdefs.h"
16798
16799 $ac_includes_default
16800 #include <db.h>
16801
16802 #ifdef DB_VERSION_MAJOR
16803         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16804 #if $cf_db_version == DB_VERSION_MAJOR
16805         /* ok */
16806 #else
16807         make an error
16808 #endif
16809 #else
16810 #if $cf_db_version == 1
16811         /* ok: assuming this is DB 1.8.5 */
16812 #else
16813         make an error
16814 #endif
16815 #endif
16816
16817 int
16818 main ()
16819 {
16820 DBT *foo = 0
16821   ;
16822   return 0;
16823 }
16824 _ACEOF
16825 rm -f conftest.$ac_objext
16826 if { (eval echo "$as_me:16826: \"$ac_compile\"") >&5
16827   (eval $ac_compile) 2>&5
16828   ac_status=$?
16829   echo "$as_me:16829: \$? = $ac_status" >&5
16830   (exit $ac_status); } &&
16831          { ac_try='test -s conftest.$ac_objext'
16832   { (eval echo "$as_me:16832: \"$ac_try\"") >&5
16833   (eval $ac_try) 2>&5
16834   ac_status=$?
16835   echo "$as_me:16835: \$? = $ac_status" >&5
16836   (exit $ac_status); }; }; then
16837
16838         cf_cv_hashed_db_version=$cf_db_version
16839         break
16840
16841 else
16842   echo "$as_me: failed program was:" >&5
16843 cat conftest.$ac_ext >&5
16844 fi
16845 rm -f conftest.$ac_objext conftest.$ac_ext
16846 done
16847
16848 fi
16849 echo "$as_me:16849: result: $cf_cv_hashed_db_version" >&5
16850 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16851
16852 if test "$cf_cv_hashed_db_version" = unknown ; then
16853         { { echo "$as_me:16853: error: Cannot determine version of db" >&5
16854 echo "$as_me: error: Cannot determine version of db" >&2;}
16855    { (exit 1); exit 1; }; }
16856 else
16857
16858 echo "$as_me:16858: checking for db libraries" >&5
16859 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16860 if test "${cf_cv_hashed_db_libs+set}" = set; then
16861   echo $ECHO_N "(cached) $ECHO_C" >&6
16862 else
16863
16864 cf_cv_hashed_db_libs=unknown
16865 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16866 do
16867         cf_save_libs="$LIBS"
16868         if test -n "$cf_db_libs"; then
16869                 LIBS="-l$cf_db_libs $LIBS"
16870         fi
16871
16872 echo "${as_me:-configure}:16872: testing checking for library "$cf_db_libs" ..." 1>&5
16873
16874         cat >conftest.$ac_ext <<_ACEOF
16875 #line 16875 "configure"
16876 #include "confdefs.h"
16877
16878 $ac_includes_default
16879 #include <db.h>
16880
16881 int
16882 main ()
16883 {
16884
16885         char *path = "/tmp/foo";
16886 #ifdef DB_VERSION_MAJOR
16887 #if DB_VERSION_MAJOR >= 4
16888         DB *result = 0;
16889         db_create(&result, NULL, 0);
16890         result->open(result,
16891                 NULL,
16892                 path,
16893                 path,
16894                 DB_HASH,
16895                 DB_CREATE,
16896                 0644);
16897 #elif DB_VERSION_MAJOR >= 3
16898         DB *result = 0;
16899         db_create(&result, NULL, 0);
16900         result->open(result,
16901                 path,
16902                 path,
16903                 DB_HASH,
16904                 DB_CREATE,
16905                 0644);
16906 #elif DB_VERSION_MAJOR >= 2
16907         DB *result = 0;
16908         db_open(path,
16909                 DB_HASH,
16910                 DB_CREATE,
16911                 0644,
16912                 (DB_ENV *) 0,
16913                 (DB_INFO *) 0,
16914                 &result);
16915 #endif /* DB_VERSION_MAJOR */
16916 #else
16917         DB *result = dbopen(path,
16918                      2,
16919                      0644,
16920                      DB_HASH,
16921                      0);
16922 #endif
16923         ${cf_cv_main_return:-return}(result != 0)
16924
16925   ;
16926   return 0;
16927 }
16928 _ACEOF
16929 rm -f conftest.$ac_objext conftest$ac_exeext
16930 if { (eval echo "$as_me:16930: \"$ac_link\"") >&5
16931   (eval $ac_link) 2>&5
16932   ac_status=$?
16933   echo "$as_me:16933: \$? = $ac_status" >&5
16934   (exit $ac_status); } &&
16935          { ac_try='test -s conftest$ac_exeext'
16936   { (eval echo "$as_me:16936: \"$ac_try\"") >&5
16937   (eval $ac_try) 2>&5
16938   ac_status=$?
16939   echo "$as_me:16939: \$? = $ac_status" >&5
16940   (exit $ac_status); }; }; then
16941
16942         if test -n "$cf_db_libs" ; then
16943                 cf_cv_hashed_db_libs=$cf_db_libs
16944         else
16945                 cf_cv_hashed_db_libs=default
16946         fi
16947         LIBS="$cf_save_libs"
16948         break
16949
16950 else
16951   echo "$as_me: failed program was:" >&5
16952 cat conftest.$ac_ext >&5
16953 fi
16954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16955         LIBS="$cf_save_libs"
16956 done
16957
16958 fi
16959 echo "$as_me:16959: result: $cf_cv_hashed_db_libs" >&5
16960 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16961
16962         if test "$cf_cv_hashed_db_libs" = unknown ; then
16963                 { { echo "$as_me:16963: error: Cannot determine library for db" >&5
16964 echo "$as_me: error: Cannot determine library for db" >&2;}
16965    { (exit 1); exit 1; }; }
16966         elif test "$cf_cv_hashed_db_libs" != default ; then
16967                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16968         fi
16969 fi
16970
16971 else
16972
16973         { { echo "$as_me:16973: error: Cannot find db.h" >&5
16974 echo "$as_me: error: Cannot find db.h" >&2;}
16975    { (exit 1); exit 1; }; }
16976
16977 fi
16978
16979 fi
16980
16981 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16982         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16983         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16984 fi
16985
16986 # Just in case, check if the C compiler has a bool type.
16987
16988 echo "$as_me:16988: checking if we should include stdbool.h" >&5
16989 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16990
16991 if test "${cf_cv_header_stdbool_h+set}" = set; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994
16995         cat >conftest.$ac_ext <<_ACEOF
16996 #line 16996 "configure"
16997 #include "confdefs.h"
16998
16999 int
17000 main ()
17001 {
17002 bool foo = false
17003   ;
17004   return 0;
17005 }
17006 _ACEOF
17007 rm -f conftest.$ac_objext
17008 if { (eval echo "$as_me:17008: \"$ac_compile\"") >&5
17009   (eval $ac_compile) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); } &&
17013          { ac_try='test -s conftest.$ac_objext'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit $ac_status); }; }; then
17019   cf_cv_header_stdbool_h=0
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 cat conftest.$ac_ext >&5
17023 cat >conftest.$ac_ext <<_ACEOF
17024 #line 17024 "configure"
17025 #include "confdefs.h"
17026
17027 #ifndef __BEOS__
17028 #include <stdbool.h>
17029 #endif
17030
17031 int
17032 main ()
17033 {
17034 bool foo = false
17035   ;
17036   return 0;
17037 }
17038 _ACEOF
17039 rm -f conftest.$ac_objext
17040 if { (eval echo "$as_me:17040: \"$ac_compile\"") >&5
17041   (eval $ac_compile) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); } &&
17045          { ac_try='test -s conftest.$ac_objext'
17046   { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047   (eval $ac_try) 2>&5
17048   ac_status=$?
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit $ac_status); }; }; then
17051   cf_cv_header_stdbool_h=1
17052 else
17053   echo "$as_me: failed program was:" >&5
17054 cat conftest.$ac_ext >&5
17055 cf_cv_header_stdbool_h=0
17056 fi
17057 rm -f conftest.$ac_objext conftest.$ac_ext
17058 fi
17059 rm -f conftest.$ac_objext conftest.$ac_ext
17060 fi
17061
17062 if test "$cf_cv_header_stdbool_h" = 1
17063 then    echo "$as_me:17063: result: yes" >&5
17064 echo "${ECHO_T}yes" >&6
17065 else    echo "$as_me:17065: result: no" >&5
17066 echo "${ECHO_T}no" >&6
17067 fi
17068
17069 echo "$as_me:17069: checking for builtin bool type" >&5
17070 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17071
17072 if test "${cf_cv_cc_bool_type+set}" = set; then
17073   echo $ECHO_N "(cached) $ECHO_C" >&6
17074 else
17075
17076         cat >conftest.$ac_ext <<_ACEOF
17077 #line 17077 "configure"
17078 #include "confdefs.h"
17079
17080 #include <stdio.h>
17081 #include <sys/types.h>
17082
17083 int
17084 main ()
17085 {
17086 bool x = false
17087   ;
17088   return 0;
17089 }
17090 _ACEOF
17091 rm -f conftest.$ac_objext
17092 if { (eval echo "$as_me:17092: \"$ac_compile\"") >&5
17093   (eval $ac_compile) 2>&5
17094   ac_status=$?
17095   echo "$as_me:17095: \$? = $ac_status" >&5
17096   (exit $ac_status); } &&
17097          { ac_try='test -s conftest.$ac_objext'
17098   { (eval echo "$as_me:17098: \"$ac_try\"") >&5
17099   (eval $ac_try) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); }; }; then
17103   cf_cv_cc_bool_type=1
17104 else
17105   echo "$as_me: failed program was:" >&5
17106 cat conftest.$ac_ext >&5
17107 cf_cv_cc_bool_type=0
17108 fi
17109 rm -f conftest.$ac_objext conftest.$ac_ext
17110
17111 fi
17112
17113 if test "$cf_cv_cc_bool_type" = 1
17114 then    echo "$as_me:17114: result: yes" >&5
17115 echo "${ECHO_T}yes" >&6
17116 else    echo "$as_me:17116: result: no" >&5
17117 echo "${ECHO_T}no" >&6
17118 fi
17119
17120 # Check for C++ compiler characteristics (and ensure that it's there!)
17121 if test -n "$CXX" ; then
17122         ac_ext=cc
17123 ac_cpp='$CXXCPP $CPPFLAGS'
17124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17127 ac_main_return=return
17128
17129 if test -n "$GXX" ; then
17130 case $cf_cv_system_name in #(vi
17131 os2*) #(vi
17132         cf_stdcpp_libname=stdcpp
17133         ;;
17134 *)
17135         cf_stdcpp_libname=stdc++
17136         ;;
17137 esac
17138 echo "$as_me:17138: checking for library $cf_stdcpp_libname" >&5
17139 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17140 if test "${cf_cv_libstdcpp+set}" = set; then
17141   echo $ECHO_N "(cached) $ECHO_C" >&6
17142 else
17143
17144         cf_save="$LIBS"
17145         LIBS="-l$cf_stdcpp_libname $LIBS"
17146 cat >conftest.$ac_ext <<_ACEOF
17147 #line 17147 "configure"
17148 #include "confdefs.h"
17149
17150 #include <strstream.h>
17151 int
17152 main ()
17153 {
17154
17155 char buf[80];
17156 strstreambuf foo(buf, sizeof(buf))
17157
17158   ;
17159   return 0;
17160 }
17161 _ACEOF
17162 rm -f conftest.$ac_objext conftest$ac_exeext
17163 if { (eval echo "$as_me:17163: \"$ac_link\"") >&5
17164   (eval $ac_link) 2>&5
17165   ac_status=$?
17166   echo "$as_me:17166: \$? = $ac_status" >&5
17167   (exit $ac_status); } &&
17168          { ac_try='test -s conftest$ac_exeext'
17169   { (eval echo "$as_me:17169: \"$ac_try\"") >&5
17170   (eval $ac_try) 2>&5
17171   ac_status=$?
17172   echo "$as_me:17172: \$? = $ac_status" >&5
17173   (exit $ac_status); }; }; then
17174   cf_cv_libstdcpp=yes
17175 else
17176   echo "$as_me: failed program was:" >&5
17177 cat conftest.$ac_ext >&5
17178 cf_cv_libstdcpp=no
17179 fi
17180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17181         LIBS="$cf_save"
17182
17183 fi
17184 echo "$as_me:17184: result: $cf_cv_libstdcpp" >&5
17185 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17186 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17187 fi
17188
17189         echo "$as_me:17189: checking whether $CXX understands -c and -o together" >&5
17190 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17191 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17192   echo $ECHO_N "(cached) $ECHO_C" >&6
17193 else
17194
17195 cat > conftest.$ac_ext <<CF_EOF
17196 #include <stdio.h>
17197 int main()
17198 {
17199         ${cf_cv_main_return:-return}(0);
17200 }
17201 CF_EOF
17202 # We do the test twice because some compilers refuse to overwrite an
17203 # existing .o file with -o, though they will create one.
17204 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17205 if { (eval echo "$as_me:17205: \"$ac_try\"") >&5
17206   (eval $ac_try) 2>&5
17207   ac_status=$?
17208   echo "$as_me:17208: \$? = $ac_status" >&5
17209   (exit $ac_status); } &&
17210   test -f conftest2.$ac_objext && { (eval echo "$as_me:17210: \"$ac_try\"") >&5
17211   (eval $ac_try) 2>&5
17212   ac_status=$?
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); };
17215 then
17216   eval cf_cv_prog_CXX_c_o=yes
17217 else
17218   eval cf_cv_prog_CXX_c_o=no
17219 fi
17220 rm -rf conftest*
17221
17222 fi
17223 if test $cf_cv_prog_CXX_c_o = yes; then
17224   echo "$as_me:17224: result: yes" >&5
17225 echo "${ECHO_T}yes" >&6
17226 else
17227   echo "$as_me:17227: result: no" >&5
17228 echo "${ECHO_T}no" >&6
17229 fi
17230
17231         case $GXX_VERSION in
17232         1*|2.0-6*)
17233                 cf_cxx_library=yes
17234                 ;;
17235         *-2.7*|2.7*)
17236
17237 cf_cxx_library=unknown
17238 case $cf_cv_system_name in #(vi
17239 os2*) #(vi
17240         cf_gpp_libname=gpp
17241         ;;
17242 *)
17243         cf_gpp_libname=g++
17244         ;;
17245 esac
17246 if test "$GXX" = yes; then
17247         echo "$as_me:17247: checking for lib$cf_gpp_libname" >&5
17248 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17249         cf_save="$LIBS"
17250         LIBS="-l$cf_gpp_libname $LIBS"
17251         cat >conftest.$ac_ext <<_ACEOF
17252 #line 17252 "configure"
17253 #include "confdefs.h"
17254
17255 #include <$cf_gpp_libname/builtin.h>
17256
17257 int
17258 main ()
17259 {
17260 two_arg_error_handler_t foo2 = lib_error_handler
17261   ;
17262   return 0;
17263 }
17264 _ACEOF
17265 rm -f conftest.$ac_objext conftest$ac_exeext
17266 if { (eval echo "$as_me:17266: \"$ac_link\"") >&5
17267   (eval $ac_link) 2>&5
17268   ac_status=$?
17269   echo "$as_me:17269: \$? = $ac_status" >&5
17270   (exit $ac_status); } &&
17271          { ac_try='test -s conftest$ac_exeext'
17272   { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); }; }; then
17277   cf_cxx_library=yes
17278          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17279          if test "$cf_gpp_libname" = cpp ; then
17280             cat >>confdefs.h <<\EOF
17281 #define HAVE_GPP_BUILTIN_H 1
17282 EOF
17283
17284          else
17285             cat >>confdefs.h <<\EOF
17286 #define HAVE_GXX_BUILTIN_H 1
17287 EOF
17288
17289          fi
17290 else
17291   echo "$as_me: failed program was:" >&5
17292 cat conftest.$ac_ext >&5
17293 cat >conftest.$ac_ext <<_ACEOF
17294 #line 17294 "configure"
17295 #include "confdefs.h"
17296
17297 #include <builtin.h>
17298
17299 int
17300 main ()
17301 {
17302 two_arg_error_handler_t foo2 = lib_error_handler
17303   ;
17304   return 0;
17305 }
17306 _ACEOF
17307 rm -f conftest.$ac_objext conftest$ac_exeext
17308 if { (eval echo "$as_me:17308: \"$ac_link\"") >&5
17309   (eval $ac_link) 2>&5
17310   ac_status=$?
17311   echo "$as_me:17311: \$? = $ac_status" >&5
17312   (exit $ac_status); } &&
17313          { ac_try='test -s conftest$ac_exeext'
17314   { (eval echo "$as_me:17314: \"$ac_try\"") >&5
17315   (eval $ac_try) 2>&5
17316   ac_status=$?
17317   echo "$as_me:17317: \$? = $ac_status" >&5
17318   (exit $ac_status); }; }; then
17319   cf_cxx_library=yes
17320          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17321          cat >>confdefs.h <<\EOF
17322 #define HAVE_BUILTIN_H 1
17323 EOF
17324
17325 else
17326   echo "$as_me: failed program was:" >&5
17327 cat conftest.$ac_ext >&5
17328 cf_cxx_library=no
17329 fi
17330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17331 fi
17332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17333         LIBS="$cf_save"
17334         echo "$as_me:17334: result: $cf_cxx_library" >&5
17335 echo "${ECHO_T}$cf_cxx_library" >&6
17336 fi
17337
17338                 ;;
17339         *)
17340                 cf_cxx_library=no
17341                 ;;
17342         esac
17343
17344         ac_ext=cc
17345 ac_cpp='$CXXCPP $CPPFLAGS'
17346 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17347 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17348 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17349 ac_main_return=return
17350 echo "$as_me:17350: checking how to run the C++ preprocessor" >&5
17351 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17352 if test -z "$CXXCPP"; then
17353   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17354   echo $ECHO_N "(cached) $ECHO_C" >&6
17355 else
17356       # Double quotes because CXXCPP needs to be expanded
17357     for CXXCPP in "$CXX -E" "/lib/cpp"
17358     do
17359       ac_preproc_ok=false
17360 for ac_cxx_preproc_warn_flag in '' yes
17361 do
17362   # Use a header file that comes with gcc, so configuring glibc
17363   # with a fresh cross-compiler works.
17364   # On the NeXT, cc -E runs the code through the compiler's parser,
17365   # not just through cpp. "Syntax error" is here to catch this case.
17366   cat >conftest.$ac_ext <<_ACEOF
17367 #line 17367 "configure"
17368 #include "confdefs.h"
17369 #include <assert.h>
17370                      Syntax error
17371 _ACEOF
17372 if { (eval echo "$as_me:17372: \"$ac_cpp conftest.$ac_ext\"") >&5
17373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17374   ac_status=$?
17375   egrep -v '^ *\+' conftest.er1 >conftest.err
17376   rm -f conftest.er1
17377   cat conftest.err >&5
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); } >/dev/null; then
17380   if test -s conftest.err; then
17381     ac_cpp_err=$ac_cxx_preproc_warn_flag
17382   else
17383     ac_cpp_err=
17384   fi
17385 else
17386   ac_cpp_err=yes
17387 fi
17388 if test -z "$ac_cpp_err"; then
17389   :
17390 else
17391   echo "$as_me: failed program was:" >&5
17392   cat conftest.$ac_ext >&5
17393   # Broken: fails on valid input.
17394 continue
17395 fi
17396 rm -f conftest.err conftest.$ac_ext
17397
17398   # OK, works on sane cases.  Now check whether non-existent headers
17399   # can be detected and how.
17400   cat >conftest.$ac_ext <<_ACEOF
17401 #line 17401 "configure"
17402 #include "confdefs.h"
17403 #include <ac_nonexistent.h>
17404 _ACEOF
17405 if { (eval echo "$as_me:17405: \"$ac_cpp conftest.$ac_ext\"") >&5
17406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17407   ac_status=$?
17408   egrep -v '^ *\+' conftest.er1 >conftest.err
17409   rm -f conftest.er1
17410   cat conftest.err >&5
17411   echo "$as_me:17411: \$? = $ac_status" >&5
17412   (exit $ac_status); } >/dev/null; then
17413   if test -s conftest.err; then
17414     ac_cpp_err=$ac_cxx_preproc_warn_flag
17415   else
17416     ac_cpp_err=
17417   fi
17418 else
17419   ac_cpp_err=yes
17420 fi
17421 if test -z "$ac_cpp_err"; then
17422   # Broken: success on invalid input.
17423 continue
17424 else
17425   echo "$as_me: failed program was:" >&5
17426   cat conftest.$ac_ext >&5
17427   # Passes both tests.
17428 ac_preproc_ok=:
17429 break
17430 fi
17431 rm -f conftest.err conftest.$ac_ext
17432
17433 done
17434 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17435 rm -f conftest.err conftest.$ac_ext
17436 if $ac_preproc_ok; then
17437   break
17438 fi
17439
17440     done
17441     ac_cv_prog_CXXCPP=$CXXCPP
17442
17443 fi
17444   CXXCPP=$ac_cv_prog_CXXCPP
17445 else
17446   ac_cv_prog_CXXCPP=$CXXCPP
17447 fi
17448 echo "$as_me:17448: result: $CXXCPP" >&5
17449 echo "${ECHO_T}$CXXCPP" >&6
17450 ac_preproc_ok=false
17451 for ac_cxx_preproc_warn_flag in '' yes
17452 do
17453   # Use a header file that comes with gcc, so configuring glibc
17454   # with a fresh cross-compiler works.
17455   # On the NeXT, cc -E runs the code through the compiler's parser,
17456   # not just through cpp. "Syntax error" is here to catch this case.
17457   cat >conftest.$ac_ext <<_ACEOF
17458 #line 17458 "configure"
17459 #include "confdefs.h"
17460 #include <assert.h>
17461                      Syntax error
17462 _ACEOF
17463 if { (eval echo "$as_me:17463: \"$ac_cpp conftest.$ac_ext\"") >&5
17464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17465   ac_status=$?
17466   egrep -v '^ *\+' conftest.er1 >conftest.err
17467   rm -f conftest.er1
17468   cat conftest.err >&5
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit $ac_status); } >/dev/null; then
17471   if test -s conftest.err; then
17472     ac_cpp_err=$ac_cxx_preproc_warn_flag
17473   else
17474     ac_cpp_err=
17475   fi
17476 else
17477   ac_cpp_err=yes
17478 fi
17479 if test -z "$ac_cpp_err"; then
17480   :
17481 else
17482   echo "$as_me: failed program was:" >&5
17483   cat conftest.$ac_ext >&5
17484   # Broken: fails on valid input.
17485 continue
17486 fi
17487 rm -f conftest.err conftest.$ac_ext
17488
17489   # OK, works on sane cases.  Now check whether non-existent headers
17490   # can be detected and how.
17491   cat >conftest.$ac_ext <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17494 #include <ac_nonexistent.h>
17495 _ACEOF
17496 if { (eval echo "$as_me:17496: \"$ac_cpp conftest.$ac_ext\"") >&5
17497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17498   ac_status=$?
17499   egrep -v '^ *\+' conftest.er1 >conftest.err
17500   rm -f conftest.er1
17501   cat conftest.err >&5
17502   echo "$as_me:17502: \$? = $ac_status" >&5
17503   (exit $ac_status); } >/dev/null; then
17504   if test -s conftest.err; then
17505     ac_cpp_err=$ac_cxx_preproc_warn_flag
17506   else
17507     ac_cpp_err=
17508   fi
17509 else
17510   ac_cpp_err=yes
17511 fi
17512 if test -z "$ac_cpp_err"; then
17513   # Broken: success on invalid input.
17514 continue
17515 else
17516   echo "$as_me: failed program was:" >&5
17517   cat conftest.$ac_ext >&5
17518   # Passes both tests.
17519 ac_preproc_ok=:
17520 break
17521 fi
17522 rm -f conftest.err conftest.$ac_ext
17523
17524 done
17525 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17526 rm -f conftest.err conftest.$ac_ext
17527 if $ac_preproc_ok; then
17528   :
17529 else
17530   { { echo "$as_me:17530: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17531 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17532    { (exit 1); exit 1; }; }
17533 fi
17534
17535 ac_ext=cc
17536 ac_cpp='$CXXCPP $CPPFLAGS'
17537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17540 ac_main_return=return
17541
17542 for ac_header in iostream typeinfo
17543 do
17544 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17545 echo "$as_me:17545: checking for $ac_header" >&5
17546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17548   echo $ECHO_N "(cached) $ECHO_C" >&6
17549 else
17550   cat >conftest.$ac_ext <<_ACEOF
17551 #line 17551 "configure"
17552 #include "confdefs.h"
17553 #include <$ac_header>
17554 _ACEOF
17555 if { (eval echo "$as_me:17555: \"$ac_cpp conftest.$ac_ext\"") >&5
17556   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17557   ac_status=$?
17558   egrep -v '^ *\+' conftest.er1 >conftest.err
17559   rm -f conftest.er1
17560   cat conftest.err >&5
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); } >/dev/null; then
17563   if test -s conftest.err; then
17564     ac_cpp_err=$ac_cxx_preproc_warn_flag
17565   else
17566     ac_cpp_err=
17567   fi
17568 else
17569   ac_cpp_err=yes
17570 fi
17571 if test -z "$ac_cpp_err"; then
17572   eval "$as_ac_Header=yes"
17573 else
17574   echo "$as_me: failed program was:" >&5
17575   cat conftest.$ac_ext >&5
17576   eval "$as_ac_Header=no"
17577 fi
17578 rm -f conftest.err conftest.$ac_ext
17579 fi
17580 echo "$as_me:17580: result: `eval echo '${'$as_ac_Header'}'`" >&5
17581 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17582 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17583   cat >>confdefs.h <<EOF
17584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17585 EOF
17586
17587 fi
17588 done
17589
17590     if test x"$ac_cv_header_iostream" = xyes ; then
17591         echo "$as_me:17591: checking if iostream uses std-namespace" >&5
17592 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17593         cat >conftest.$ac_ext <<_ACEOF
17594 #line 17594 "configure"
17595 #include "confdefs.h"
17596
17597 #include <iostream>
17598 using std::endl;
17599 using std::cerr;
17600 int
17601 main ()
17602 {
17603
17604 cerr << "testing" << endl;
17605
17606   ;
17607   return 0;
17608 }
17609 _ACEOF
17610 rm -f conftest.$ac_objext
17611 if { (eval echo "$as_me:17611: \"$ac_compile\"") >&5
17612   (eval $ac_compile) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); } &&
17616          { ac_try='test -s conftest.$ac_objext'
17617   { (eval echo "$as_me:17617: \"$ac_try\"") >&5
17618   (eval $ac_try) 2>&5
17619   ac_status=$?
17620   echo "$as_me:17620: \$? = $ac_status" >&5
17621   (exit $ac_status); }; }; then
17622   cf_iostream_namespace=yes
17623 else
17624   echo "$as_me: failed program was:" >&5
17625 cat conftest.$ac_ext >&5
17626 cf_iostream_namespace=no
17627 fi
17628 rm -f conftest.$ac_objext conftest.$ac_ext
17629         echo "$as_me:17629: result: $cf_iostream_namespace" >&5
17630 echo "${ECHO_T}$cf_iostream_namespace" >&6
17631         if test "$cf_iostream_namespace" = yes ; then
17632             cat >>confdefs.h <<\EOF
17633 #define IOSTREAM_NAMESPACE 1
17634 EOF
17635
17636         fi
17637     fi
17638
17639 echo "$as_me:17639: checking if we should include stdbool.h" >&5
17640 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17641
17642 if test "${cf_cv_header_stdbool_h+set}" = set; then
17643   echo $ECHO_N "(cached) $ECHO_C" >&6
17644 else
17645
17646         cat >conftest.$ac_ext <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649
17650 int
17651 main ()
17652 {
17653 bool foo = false
17654   ;
17655   return 0;
17656 }
17657 _ACEOF
17658 rm -f conftest.$ac_objext
17659 if { (eval echo "$as_me:17659: \"$ac_compile\"") >&5
17660   (eval $ac_compile) 2>&5
17661   ac_status=$?
17662   echo "$as_me:17662: \$? = $ac_status" >&5
17663   (exit $ac_status); } &&
17664          { ac_try='test -s conftest.$ac_objext'
17665   { (eval echo "$as_me:17665: \"$ac_try\"") >&5
17666   (eval $ac_try) 2>&5
17667   ac_status=$?
17668   echo "$as_me:17668: \$? = $ac_status" >&5
17669   (exit $ac_status); }; }; then
17670   cf_cv_header_stdbool_h=0
17671 else
17672   echo "$as_me: failed program was:" >&5
17673 cat conftest.$ac_ext >&5
17674 cat >conftest.$ac_ext <<_ACEOF
17675 #line 17675 "configure"
17676 #include "confdefs.h"
17677
17678 #ifndef __BEOS__
17679 #include <stdbool.h>
17680 #endif
17681
17682 int
17683 main ()
17684 {
17685 bool foo = false
17686   ;
17687   return 0;
17688 }
17689 _ACEOF
17690 rm -f conftest.$ac_objext
17691 if { (eval echo "$as_me:17691: \"$ac_compile\"") >&5
17692   (eval $ac_compile) 2>&5
17693   ac_status=$?
17694   echo "$as_me:17694: \$? = $ac_status" >&5
17695   (exit $ac_status); } &&
17696          { ac_try='test -s conftest.$ac_objext'
17697   { (eval echo "$as_me:17697: \"$ac_try\"") >&5
17698   (eval $ac_try) 2>&5
17699   ac_status=$?
17700   echo "$as_me:17700: \$? = $ac_status" >&5
17701   (exit $ac_status); }; }; then
17702   cf_cv_header_stdbool_h=1
17703 else
17704   echo "$as_me: failed program was:" >&5
17705 cat conftest.$ac_ext >&5
17706 cf_cv_header_stdbool_h=0
17707 fi
17708 rm -f conftest.$ac_objext conftest.$ac_ext
17709 fi
17710 rm -f conftest.$ac_objext conftest.$ac_ext
17711 fi
17712
17713 if test "$cf_cv_header_stdbool_h" = 1
17714 then    echo "$as_me:17714: result: yes" >&5
17715 echo "${ECHO_T}yes" >&6
17716 else    echo "$as_me:17716: result: no" >&5
17717 echo "${ECHO_T}no" >&6
17718 fi
17719
17720 echo "$as_me:17720: checking for builtin bool type" >&5
17721 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17722
17723 if test "${cf_cv_builtin_bool+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726
17727         cat >conftest.$ac_ext <<_ACEOF
17728 #line 17728 "configure"
17729 #include "confdefs.h"
17730
17731 #include <stdio.h>
17732 #include <sys/types.h>
17733
17734 int
17735 main ()
17736 {
17737 bool x = false
17738   ;
17739   return 0;
17740 }
17741 _ACEOF
17742 rm -f conftest.$ac_objext
17743 if { (eval echo "$as_me:17743: \"$ac_compile\"") >&5
17744   (eval $ac_compile) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); } &&
17748          { ac_try='test -s conftest.$ac_objext'
17749   { (eval echo "$as_me:17749: \"$ac_try\"") >&5
17750   (eval $ac_try) 2>&5
17751   ac_status=$?
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit $ac_status); }; }; then
17754   cf_cv_builtin_bool=1
17755 else
17756   echo "$as_me: failed program was:" >&5
17757 cat conftest.$ac_ext >&5
17758 cf_cv_builtin_bool=0
17759 fi
17760 rm -f conftest.$ac_objext conftest.$ac_ext
17761
17762 fi
17763
17764 if test "$cf_cv_builtin_bool" = 1
17765 then    echo "$as_me:17765: result: yes" >&5
17766 echo "${ECHO_T}yes" >&6
17767 else    echo "$as_me:17767: result: no" >&5
17768 echo "${ECHO_T}no" >&6
17769 fi
17770
17771 echo "$as_me:17771: checking for size of bool" >&5
17772 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17773 if test "${cf_cv_type_of_bool+set}" = set; then
17774   echo $ECHO_N "(cached) $ECHO_C" >&6
17775 else
17776
17777         rm -f cf_test.out
17778         if test "$cross_compiling" = yes; then
17779   cf_cv_type_of_bool=unknown
17780 else
17781   cat >conftest.$ac_ext <<_ACEOF
17782 #line 17782 "configure"
17783 #include "confdefs.h"
17784
17785 #include <stdlib.h>
17786 #include <stdio.h>
17787
17788 #if defined(__cplusplus)
17789
17790 #ifdef HAVE_GXX_BUILTIN_H
17791 #include <g++/builtin.h>
17792 #elif HAVE_GPP_BUILTIN_H
17793 #include <gpp/builtin.h>
17794 #elif HAVE_BUILTIN_H
17795 #include <builtin.h>
17796 #endif
17797
17798 #else
17799
17800 #if $cf_cv_header_stdbool_h
17801 #include <stdbool.h>
17802 #endif
17803
17804 #endif
17805
17806 main()
17807 {
17808         FILE *fp = fopen("cf_test.out", "w");
17809         if (fp != 0) {
17810                 bool x = true;
17811                 if ((bool)(-x) >= 0)
17812                         fputs("unsigned ", fp);
17813                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17814                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17815                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17816                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17817                 fclose(fp);
17818         }
17819         ${cf_cv_main_return:-return}(0);
17820 }
17821
17822 _ACEOF
17823 rm -f conftest$ac_exeext
17824 if { (eval echo "$as_me:17824: \"$ac_link\"") >&5
17825   (eval $ac_link) 2>&5
17826   ac_status=$?
17827   echo "$as_me:17827: \$? = $ac_status" >&5
17828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17829   { (eval echo "$as_me:17829: \"$ac_try\"") >&5
17830   (eval $ac_try) 2>&5
17831   ac_status=$?
17832   echo "$as_me:17832: \$? = $ac_status" >&5
17833   (exit $ac_status); }; }; then
17834   cf_cv_type_of_bool=`cat cf_test.out`
17835                  if test -z "$cf_cv_type_of_bool"; then
17836                    cf_cv_type_of_bool=unknown
17837                  fi
17838 else
17839   echo "$as_me: program exited with status $ac_status" >&5
17840 echo "$as_me: failed program was:" >&5
17841 cat conftest.$ac_ext >&5
17842 cf_cv_type_of_bool=unknown
17843 fi
17844 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17845 fi
17846
17847 fi
17848
17849         rm -f cf_test.out
17850 echo "$as_me:17850: result: $cf_cv_type_of_bool" >&5
17851 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17852 if test "$cf_cv_type_of_bool" = unknown ; then
17853         case .$NCURSES_BOOL in #(vi
17854         .auto|.) NCURSES_BOOL=unsigned;;
17855         esac
17856         { echo "$as_me:17856: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17857 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17858         cf_cv_type_of_bool=$NCURSES_BOOL
17859 fi
17860
17861 echo "$as_me:17861: checking for special defines needed for etip.h" >&5
17862 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17863 cf_save_CXXFLAGS="$CXXFLAGS"
17864 cf_result="none"
17865 for cf_math in "" MATH_H
17866 do
17867 for cf_excp in "" MATH_EXCEPTION
17868 do
17869         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17870         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17871         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17872 cat >conftest.$ac_ext <<_ACEOF
17873 #line 17873 "configure"
17874 #include "confdefs.h"
17875
17876 #include <etip.h.in>
17877
17878 int
17879 main ()
17880 {
17881
17882   ;
17883   return 0;
17884 }
17885 _ACEOF
17886 rm -f conftest.$ac_objext
17887 if { (eval echo "$as_me:17887: \"$ac_compile\"") >&5
17888   (eval $ac_compile) 2>&5
17889   ac_status=$?
17890   echo "$as_me:17890: \$? = $ac_status" >&5
17891   (exit $ac_status); } &&
17892          { ac_try='test -s conftest.$ac_objext'
17893   { (eval echo "$as_me:17893: \"$ac_try\"") >&5
17894   (eval $ac_try) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); }; }; then
17898
17899         test -n "$cf_math" && cat >>confdefs.h <<EOF
17900 #define ETIP_NEEDS_${cf_math} 1
17901 EOF
17902
17903         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17904 #define ETIP_NEEDS_${cf_excp} 1
17905 EOF
17906
17907         cf_result="$cf_math $cf_excp"
17908         break
17909
17910 else
17911   echo "$as_me: failed program was:" >&5
17912 cat conftest.$ac_ext >&5
17913 fi
17914 rm -f conftest.$ac_objext conftest.$ac_ext
17915 done
17916 done
17917 echo "$as_me:17917: result: $cf_result" >&5
17918 echo "${ECHO_T}$cf_result" >&6
17919 CXXFLAGS="$cf_save_CXXFLAGS"
17920
17921 if test -n "$CXX"; then
17922 echo "$as_me:17922: checking if $CXX accepts parameter initialization" >&5
17923 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17924 if test "${cf_cv_cpp_param_init+set}" = set; then
17925   echo $ECHO_N "(cached) $ECHO_C" >&6
17926 else
17927
17928         ac_ext=cc
17929 ac_cpp='$CXXCPP $CPPFLAGS'
17930 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17931 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17932 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17933 ac_main_return=return
17934
17935         if test "$cross_compiling" = yes; then
17936   cf_cv_cpp_param_init=unknown
17937 else
17938   cat >conftest.$ac_ext <<_ACEOF
17939 #line 17939 "configure"
17940 #include "confdefs.h"
17941
17942 class TEST {
17943 private:
17944         int value;
17945 public:
17946         TEST(int x = 1);
17947         ~TEST();
17948 };
17949
17950 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17951 {
17952         value = x;
17953 }
17954 void main() { }
17955
17956 _ACEOF
17957 rm -f conftest$ac_exeext
17958 if { (eval echo "$as_me:17958: \"$ac_link\"") >&5
17959   (eval $ac_link) 2>&5
17960   ac_status=$?
17961   echo "$as_me:17961: \$? = $ac_status" >&5
17962   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17963   { (eval echo "$as_me:17963: \"$ac_try\"") >&5
17964   (eval $ac_try) 2>&5
17965   ac_status=$?
17966   echo "$as_me:17966: \$? = $ac_status" >&5
17967   (exit $ac_status); }; }; then
17968   cf_cv_cpp_param_init=yes
17969 else
17970   echo "$as_me: program exited with status $ac_status" >&5
17971 echo "$as_me: failed program was:" >&5
17972 cat conftest.$ac_ext >&5
17973 cf_cv_cpp_param_init=no
17974 fi
17975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17976 fi
17977         ac_ext=cc
17978 ac_cpp='$CXXCPP $CPPFLAGS'
17979 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17980 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17981 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17982 ac_main_return=return
17983
17984 fi
17985 echo "$as_me:17985: result: $cf_cv_cpp_param_init" >&5
17986 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17987 fi
17988 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17989 #define CPP_HAS_PARAM_INIT 1
17990 EOF
17991
17992 if test -n "$CXX"; then
17993
17994 echo "$as_me:17994: checking if $CXX accepts static_cast" >&5
17995 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17996 if test "${cf_cv_cpp_static_cast+set}" = set; then
17997   echo $ECHO_N "(cached) $ECHO_C" >&6
17998 else
17999
18000         ac_ext=cc
18001 ac_cpp='$CXXCPP $CPPFLAGS'
18002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18005 ac_main_return=return
18006
18007         cat >conftest.$ac_ext <<_ACEOF
18008 #line 18008 "configure"
18009 #include "confdefs.h"
18010
18011 class NCursesPanel
18012 {
18013 public:
18014   NCursesPanel(int nlines,
18015                int ncols,
18016                int begin_y = 0,
18017                int begin_x = 0)
18018   {
18019   }
18020
18021   ~NCursesPanel();
18022 };
18023
18024 template<class T> class NCursesUserPanel : public NCursesPanel
18025 {
18026 public:
18027   NCursesUserPanel (int nlines,
18028                     int ncols,
18029                     int begin_y = 0,
18030                     int begin_x = 0,
18031                     const T* p_UserData = static_cast<T*>(0))
18032     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18033   {
18034   };
18035   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18036   {
18037   };
18038
18039   virtual ~NCursesUserPanel() {};
18040 };
18041
18042 int
18043 main ()
18044 {
18045
18046         const char* p_UserData = static_cast<char*>(0)
18047   ;
18048   return 0;
18049 }
18050 _ACEOF
18051 rm -f conftest.$ac_objext
18052 if { (eval echo "$as_me:18052: \"$ac_compile\"") >&5
18053   (eval $ac_compile) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit $ac_status); } &&
18057          { ac_try='test -s conftest.$ac_objext'
18058   { (eval echo "$as_me:18058: \"$ac_try\"") >&5
18059   (eval $ac_try) 2>&5
18060   ac_status=$?
18061   echo "$as_me:18061: \$? = $ac_status" >&5
18062   (exit $ac_status); }; }; then
18063   cf_cv_cpp_static_cast=yes
18064 else
18065   echo "$as_me: failed program was:" >&5
18066 cat conftest.$ac_ext >&5
18067 cf_cv_cpp_static_cast=no
18068 fi
18069 rm -f conftest.$ac_objext conftest.$ac_ext
18070
18071         ac_ext=cc
18072 ac_cpp='$CXXCPP $CPPFLAGS'
18073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18076 ac_main_return=return
18077
18078 fi
18079 echo "$as_me:18079: result: $cf_cv_cpp_static_cast" >&5
18080 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18081
18082 fi
18083
18084 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18085 #define CPP_HAS_STATIC_CAST 1
18086 EOF
18087
18088         CXX_AR='$(AR)'
18089         CXX_ARFLAGS='$(ARFLAGS)'
18090         case $cf_cv_system_name in #(vi
18091         irix*) #(vi
18092             if test "$GXX" != yes ; then
18093                 CXX_AR='$(CXX)'
18094                 CXX_ARFLAGS='-ar -o'
18095             fi
18096             ;;
18097         sco3.2v5*) #(vi
18098             CXXLDFLAGS="-u main"
18099             ;;
18100         solaris2*)
18101             if test "$GXX" != yes ; then
18102                 CXX_AR='$(CXX)'
18103                 CXX_ARFLAGS='-xar -o'
18104             fi
18105             ;;
18106         esac
18107
18108 else
18109         cf_cxx_library=no
18110         cf_cv_builtin_bool=1
18111
18112         # Just because we are not configuring against C++ right now does not
18113         # mean that a user will not want to use C++.  Some distributors disable
18114         # the C++ portion of this configuration as a shortcut (or just to avoid
18115         # compiling the demo in the c++ directory).  So we need a reasonable
18116         # default for the 'bool' type.
18117         #
18118         # Caveat: since the storage of the bool type is not standardized, it
18119         # may change.
18120
18121         if test "$NCURSES_BOOL" != auto ; then
18122                 cf_cv_type_of_bool=$NCURSES_BOOL
18123                 cf_cv_header_stdbool_h=0
18124         else
18125                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18126
18127 echo "$as_me:18127: checking for size of bool" >&5
18128 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18129 if test "${cf_cv_type_of_bool+set}" = set; then
18130   echo $ECHO_N "(cached) $ECHO_C" >&6
18131 else
18132
18133         rm -f cf_test.out
18134         if test "$cross_compiling" = yes; then
18135   cf_cv_type_of_bool=unknown
18136 else
18137   cat >conftest.$ac_ext <<_ACEOF
18138 #line 18138 "configure"
18139 #include "confdefs.h"
18140
18141 #include <stdlib.h>
18142 #include <stdio.h>
18143
18144 #if defined(__cplusplus)
18145
18146 #ifdef HAVE_GXX_BUILTIN_H
18147 #include <g++/builtin.h>
18148 #elif HAVE_GPP_BUILTIN_H
18149 #include <gpp/builtin.h>
18150 #elif HAVE_BUILTIN_H
18151 #include <builtin.h>
18152 #endif
18153
18154 #else
18155
18156 #if $cf_cv_header_stdbool_h
18157 #include <stdbool.h>
18158 #endif
18159
18160 #endif
18161
18162 main()
18163 {
18164         FILE *fp = fopen("cf_test.out", "w");
18165         if (fp != 0) {
18166                 bool x = true;
18167                 if ((bool)(-x) >= 0)
18168                         fputs("unsigned ", fp);
18169                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18170                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18171                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18172                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18173                 fclose(fp);
18174         }
18175         ${cf_cv_main_return:-return}(0);
18176 }
18177
18178 _ACEOF
18179 rm -f conftest$ac_exeext
18180 if { (eval echo "$as_me:18180: \"$ac_link\"") >&5
18181   (eval $ac_link) 2>&5
18182   ac_status=$?
18183   echo "$as_me:18183: \$? = $ac_status" >&5
18184   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18185   { (eval echo "$as_me:18185: \"$ac_try\"") >&5
18186   (eval $ac_try) 2>&5
18187   ac_status=$?
18188   echo "$as_me:18188: \$? = $ac_status" >&5
18189   (exit $ac_status); }; }; then
18190   cf_cv_type_of_bool=`cat cf_test.out`
18191                  if test -z "$cf_cv_type_of_bool"; then
18192                    cf_cv_type_of_bool=unknown
18193                  fi
18194 else
18195   echo "$as_me: program exited with status $ac_status" >&5
18196 echo "$as_me: failed program was:" >&5
18197 cat conftest.$ac_ext >&5
18198 cf_cv_type_of_bool=unknown
18199 fi
18200 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18201 fi
18202
18203 fi
18204
18205         rm -f cf_test.out
18206 echo "$as_me:18206: result: $cf_cv_type_of_bool" >&5
18207 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18208 if test "$cf_cv_type_of_bool" = unknown ; then
18209         case .$NCURSES_BOOL in #(vi
18210         .auto|.) NCURSES_BOOL=unsigned;;
18211         esac
18212         { echo "$as_me:18212: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18213 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18214         cf_cv_type_of_bool=$NCURSES_BOOL
18215 fi
18216
18217                 else
18218                         echo "$as_me:18218: checking for fallback type of bool" >&5
18219 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18220                         case "$host_cpu" in #(vi
18221                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18222                         *)      cf_cv_type_of_bool=int  ;;
18223                         esac
18224                         echo "$as_me:18224: result: $cf_cv_type_of_bool" >&5
18225 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18226                 fi
18227         fi
18228 fi
18229
18230 # If the C compiler did not declare bool, and we did not determine that the C++
18231 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18232 # ncurses library use the same type as C++ bool.  Note that this allows one to
18233 # specify the type of bool in a configure-script option and postpone
18234 # integration with the C++ compiler provided that the types are compatible.
18235 USE_CXX_BOOL=1
18236 if test $cf_cv_cc_bool_type = 1
18237 then
18238         # oops: C has a bool.  Unlikely, but C++ could differ.
18239         USE_CXX_BOOL=0
18240 elif test $cf_cv_builtin_bool = 0
18241 then
18242         # C++ has no bool
18243         USE_CXX_BOOL=0
18244 else
18245         # this is the normal case
18246         USE_CXX_BOOL='defined(__cplusplus)'
18247 fi
18248
18249 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18250
18251         if test "$cf_with_ada" != "no" ; then
18252                 if test "$with_libtool" != "no"; then
18253                         { echo "$as_me:18253: WARNING: libtool does not support Ada - disabling feature" >&5
18254 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18255                         cf_with_ada=no
18256                 fi
18257         fi
18258
18259         if test "$cf_with_ada" != "no" ; then
18260
18261 cf_ada_make=gnatmake
18262 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18263 set dummy $cf_ada_make; ac_word=$2
18264 echo "$as_me:18264: checking for $ac_word" >&5
18265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18266 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18267   echo $ECHO_N "(cached) $ECHO_C" >&6
18268 else
18269   if test -n "$gnat_exists"; then
18270   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18271 else
18272   ac_save_IFS=$IFS; IFS=$ac_path_separator
18273 ac_dummy="$PATH"
18274 for ac_dir in $ac_dummy; do
18275   IFS=$ac_save_IFS
18276   test -z "$ac_dir" && ac_dir=.
18277   $as_executable_p "$ac_dir/$ac_word" || continue
18278 ac_cv_prog_gnat_exists="yes"
18279 echo "$as_me:18279: found $ac_dir/$ac_word" >&5
18280 break
18281 done
18282
18283   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18284 fi
18285 fi
18286 gnat_exists=$ac_cv_prog_gnat_exists
18287 if test -n "$gnat_exists"; then
18288   echo "$as_me:18288: result: $gnat_exists" >&5
18289 echo "${ECHO_T}$gnat_exists" >&6
18290 else
18291   echo "$as_me:18291: result: no" >&5
18292 echo "${ECHO_T}no" >&6
18293 fi
18294
18295 if test "$ac_cv_prog_gnat_exists" = no; then
18296    cf_ada_make=
18297 else
18298
18299 echo "$as_me:18299: checking for gnat version" >&5
18300 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18301 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18302         grep '[0-9].[0-9][0-9]*' |\
18303     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18304 echo "$as_me:18304: result: $cf_gnat_version" >&5
18305 echo "${ECHO_T}$cf_gnat_version" >&6
18306
18307 case $cf_gnat_version in #(vi
18308 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18309         cf_cv_prog_gnat_correct=yes
18310         ;;
18311 *)
18312         { echo "$as_me:18312: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18313 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18314         cf_cv_prog_gnat_correct=no
18315         ;;
18316 esac
18317
18318    # Extract the first word of "m4", so it can be a program name with args.
18319 set dummy m4; ac_word=$2
18320 echo "$as_me:18320: checking for $ac_word" >&5
18321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18322 if test "${ac_cv_prog_M4_exists+set}" = set; then
18323   echo $ECHO_N "(cached) $ECHO_C" >&6
18324 else
18325   if test -n "$M4_exists"; then
18326   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18327 else
18328   ac_save_IFS=$IFS; IFS=$ac_path_separator
18329 ac_dummy="$PATH"
18330 for ac_dir in $ac_dummy; do
18331   IFS=$ac_save_IFS
18332   test -z "$ac_dir" && ac_dir=.
18333   $as_executable_p "$ac_dir/$ac_word" || continue
18334 ac_cv_prog_M4_exists="yes"
18335 echo "$as_me:18335: found $ac_dir/$ac_word" >&5
18336 break
18337 done
18338
18339   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18340 fi
18341 fi
18342 M4_exists=$ac_cv_prog_M4_exists
18343 if test -n "$M4_exists"; then
18344   echo "$as_me:18344: result: $M4_exists" >&5
18345 echo "${ECHO_T}$M4_exists" >&6
18346 else
18347   echo "$as_me:18347: result: no" >&5
18348 echo "${ECHO_T}no" >&6
18349 fi
18350
18351    if test "$ac_cv_prog_M4_exists" = no; then
18352       cf_cv_prog_gnat_correct=no
18353       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18354    fi
18355    if test "$cf_cv_prog_gnat_correct" = yes; then
18356       echo "$as_me:18356: checking if GNAT works" >&5
18357 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18358
18359 rm -rf conftest* *~conftest*
18360 cat >>conftest.ads <<CF_EOF
18361 procedure conftest;
18362 CF_EOF
18363 cat >>conftest.adb <<CF_EOF
18364 with Text_IO;
18365 with GNAT.OS_Lib;
18366 procedure conftest is
18367 begin
18368    Text_IO.Put ("Hello World");
18369    Text_IO.New_Line;
18370    GNAT.OS_Lib.OS_Exit (0);
18371 end conftest;
18372 CF_EOF
18373 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18374    if ( ./conftest 1>&5 2>&1 ) ; then
18375       cf_cv_prog_gnat_correct=yes
18376    else
18377       cf_cv_prog_gnat_correct=no
18378    fi
18379 else
18380    cf_cv_prog_gnat_correct=no
18381 fi
18382 rm -rf conftest* *~conftest*
18383
18384       echo "$as_me:18384: result: $cf_cv_prog_gnat_correct" >&5
18385 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18386    fi
18387 fi
18388
18389                 if test "$cf_cv_prog_gnat_correct" = yes; then
18390
18391         ADAFLAGS="$ADAFLAGS -gnatpn"
18392
18393                         # make ADAFLAGS consistent with CFLAGS
18394                         case "$CFLAGS" in
18395                         *-g*)
18396
18397         ADAFLAGS="$ADAFLAGS -g"
18398
18399                                 ;;
18400                         esac
18401                         case "$CFLAGS" in
18402                         *-O*)
18403
18404         ADAFLAGS="$ADAFLAGS -O3"
18405
18406                                 ;;
18407                         esac
18408
18409 echo "$as_me:18409: checking if GNAT supports generics" >&5
18410 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18411 case $cf_gnat_version in #(vi
18412 3.[1-9]*|[4-9].*) #(vi
18413         cf_gnat_generics=yes
18414         ;;
18415 *)
18416         cf_gnat_generics=no
18417         ;;
18418 esac
18419 echo "$as_me:18419: result: $cf_gnat_generics" >&5
18420 echo "${ECHO_T}$cf_gnat_generics" >&6
18421
18422 if test "$cf_gnat_generics" = yes
18423 then
18424         cf_compile_generics=generics
18425         cf_generic_objects="\${GENOBJS}"
18426 else
18427         cf_compile_generics=
18428         cf_generic_objects=
18429 fi
18430
18431 echo "$as_me:18431: checking if GNAT supports SIGINT" >&5
18432 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18433 if test "${cf_cv_gnat_sigint+set}" = set; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436
18437 rm -rf conftest* *~conftest*
18438 cat >>conftest.ads <<CF_EOF
18439 with Ada.Interrupts.Names;
18440
18441 package ConfTest is
18442
18443    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18444    pragma Unreserve_All_Interrupts;
18445    pragma Warnings (On);
18446
18447    protected Process is
18448       procedure Stop;
18449       function Continue return Boolean;
18450       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18451    private
18452       Done : Boolean := False;
18453    end Process;
18454
18455 end ConfTest;
18456 CF_EOF
18457 cat >>conftest.adb <<CF_EOF
18458 package body ConfTest is
18459    protected body Process is
18460       procedure Stop is
18461       begin
18462          Done := True;
18463       end Stop;
18464       function Continue return Boolean is
18465       begin
18466          return not Done;
18467       end Continue;
18468    end Process;
18469 end ConfTest;
18470 CF_EOF
18471 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18472       cf_cv_gnat_sigint=yes
18473 else
18474    cf_cv_gnat_sigint=no
18475 fi
18476 rm -rf conftest* *~conftest*
18477
18478 fi
18479 echo "$as_me:18479: result: $cf_cv_gnat_sigint" >&5
18480 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18481
18482 if test $cf_cv_gnat_sigint = yes ; then
18483         USE_GNAT_SIGINT=""
18484 else
18485         USE_GNAT_SIGINT="#"
18486 fi
18487
18488 echo "$as_me:18488: checking if GNAT pragma Unreferenced works" >&5
18489 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18490 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18491   echo $ECHO_N "(cached) $ECHO_C" >&6
18492 else
18493
18494 rm -rf conftest* *~conftest*
18495 cat >>conftest.ads <<CF_EOF
18496 procedure conftest;
18497 CF_EOF
18498 cat >>conftest.adb <<CF_EOF
18499 with Text_IO;
18500 with GNAT.OS_Lib;
18501 procedure conftest is
18502    test : Integer;
18503    pragma Unreferenced (test);
18504 begin
18505    test := 1;
18506    Text_IO.Put ("Hello World");
18507    Text_IO.New_Line;
18508    GNAT.OS_Lib.OS_Exit (0);
18509 end conftest;
18510 CF_EOF
18511 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18512       cf_cv_pragma_unreferenced=yes
18513 else
18514    cf_cv_pragma_unreferenced=no
18515 fi
18516 rm -rf conftest* *~conftest*
18517
18518 fi
18519 echo "$as_me:18519: result: $cf_cv_pragma_unreferenced" >&5
18520 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18521
18522 # if the pragma is supported, use it (needed in the Trace code).
18523 if test $cf_cv_pragma_unreferenced = yes ; then
18524         PRAGMA_UNREF=TRUE
18525 else
18526         PRAGMA_UNREF=FALSE
18527 fi
18528
18529 cf_gnat_libraries=no
18530 cf_gnat_projects=no
18531
18532 echo "$as_me:18532: checking if GNAT supports project files" >&5
18533 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18534 case $cf_gnat_version in #(vi
18535 3.[0-9]*) #(vi
18536         ;;
18537 *)
18538         case $cf_cv_system_name in #(vi
18539         cygwin*) #(vi
18540                 ;;
18541         *)
18542                 mkdir conftest.src conftest.bin conftest.lib
18543                 cd conftest.src
18544                 rm -rf conftest* *~conftest*
18545                 cat >>library.gpr <<CF_EOF
18546 project Library is
18547   Kind := External ("LIB_KIND");
18548   for Library_Name use "ConfTest";
18549   for Object_Dir use ".";
18550   for Library_ALI_Dir use External("LIBRARY_DIR");
18551   for Library_Version use External ("SONAME");
18552   for Library_Kind use Kind;
18553   for Library_Dir use External("BUILD_DIR");
18554   Source_Dir := External ("SOURCE_DIR");
18555   for Source_Dirs use (Source_Dir);
18556   package Compiler is
18557      for Default_Switches ("Ada") use
18558        ("-g",
18559         "-O2",
18560         "-gnatafno",
18561         "-gnatVa",   -- All validity checks
18562         "-gnatwa");  -- Activate all optional errors
18563   end Compiler;
18564 end Library;
18565 CF_EOF
18566                 cat >>confpackage.ads <<CF_EOF
18567 package ConfPackage is
18568    procedure conftest;
18569 end ConfPackage;
18570 CF_EOF
18571                 cat >>confpackage.adb <<CF_EOF
18572 with Text_IO;
18573 package body ConfPackage is
18574    procedure conftest is
18575    begin
18576       Text_IO.Put ("Hello World");
18577       Text_IO.New_Line;
18578    end conftest;
18579 end ConfPackage;
18580 CF_EOF
18581                 if ( $cf_ada_make $ADAFLAGS \
18582                                 -Plibrary.gpr \
18583                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18584                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18585                                 -XSOURCE_DIR=`pwd` \
18586                                 -XSONAME=libConfTest.so.1 \
18587                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18588                         cf_gnat_projects=yes
18589                 fi
18590                 cd ..
18591                 if test -f conftest.lib/confpackage.ali
18592                 then
18593                         cf_gnat_libraries=yes
18594                 fi
18595                 rm -rf conftest* *~conftest*
18596                 ;;
18597         esac
18598         ;;
18599 esac
18600 echo "$as_me:18600: result: $cf_gnat_projects" >&5
18601 echo "${ECHO_T}$cf_gnat_projects" >&6
18602
18603 if test $cf_gnat_projects = yes
18604 then
18605         echo "$as_me:18605: checking if GNAT supports libraries" >&5
18606 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18607         echo "$as_me:18607: result: $cf_gnat_libraries" >&5
18608 echo "${ECHO_T}$cf_gnat_libraries" >&6
18609 fi
18610
18611 if test "$cf_gnat_projects" = yes
18612 then
18613         USE_OLD_MAKERULES="#"
18614         USE_GNAT_PROJECTS=""
18615 else
18616         USE_OLD_MAKERULES=""
18617         USE_GNAT_PROJECTS="#"
18618 fi
18619
18620 if test "$cf_gnat_libraries" = yes
18621 then
18622         USE_GNAT_LIBRARIES=""
18623 else
18624         USE_GNAT_LIBRARIES="#"
18625 fi
18626
18627 echo "$as_me:18627: checking for ada-compiler" >&5
18628 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18629
18630 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18631 if test "${with_ada_compiler+set}" = set; then
18632   withval="$with_ada_compiler"
18633   cf_ada_compiler=$withval
18634 else
18635   cf_ada_compiler=gnatmake
18636 fi;
18637
18638 echo "$as_me:18638: result: $cf_ada_compiler" >&5
18639 echo "${ECHO_T}$cf_ada_compiler" >&6
18640
18641                         cf_ada_package=terminal_interface
18642
18643 echo "$as_me:18643: checking for ada-include" >&5
18644 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18645
18646 # Check whether --with-ada-include or --without-ada-include was given.
18647 if test "${with_ada_include+set}" = set; then
18648   withval="$with_ada_include"
18649
18650 else
18651   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18652 fi; if test -n "$prefix/share/ada/adainclude" ; then
18653
18654 if test "x$prefix" != xNONE; then
18655   cf_path_syntax="$prefix"
18656 else
18657   cf_path_syntax="$ac_default_prefix"
18658 fi
18659
18660 case ".$withval" in #(vi
18661 .\$\(*\)*|.\'*\'*) #(vi
18662   ;;
18663 ..|./*|.\\*) #(vi
18664   ;;
18665 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18666   ;;
18667 .\${*prefix}*) #(vi
18668   eval withval="$withval"
18669   case ".$withval" in #(vi
18670   .NONE/*)
18671     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18672     ;;
18673   esac
18674   ;; #(vi
18675 .no|.NONE/*)
18676   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18677   ;;
18678 *)
18679   { { echo "$as_me:18679: error: expected a pathname, not \"$withval\"" >&5
18680 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18681    { (exit 1); exit 1; }; }
18682   ;;
18683 esac
18684
18685 fi
18686 ADA_INCLUDE="$withval"
18687
18688 echo "$as_me:18688: result: $ADA_INCLUDE" >&5
18689 echo "${ECHO_T}$ADA_INCLUDE" >&6
18690
18691 echo "$as_me:18691: checking for ada-objects" >&5
18692 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18693
18694 # Check whether --with-ada-objects or --without-ada-objects was given.
18695 if test "${with_ada_objects+set}" = set; then
18696   withval="$with_ada_objects"
18697
18698 else
18699   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18700 fi; if test -n "$prefix/lib/ada/adalib" ; then
18701
18702 if test "x$prefix" != xNONE; then
18703   cf_path_syntax="$prefix"
18704 else
18705   cf_path_syntax="$ac_default_prefix"
18706 fi
18707
18708 case ".$withval" in #(vi
18709 .\$\(*\)*|.\'*\'*) #(vi
18710   ;;
18711 ..|./*|.\\*) #(vi
18712   ;;
18713 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18714   ;;
18715 .\${*prefix}*) #(vi
18716   eval withval="$withval"
18717   case ".$withval" in #(vi
18718   .NONE/*)
18719     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18720     ;;
18721   esac
18722   ;; #(vi
18723 .no|.NONE/*)
18724   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18725   ;;
18726 *)
18727   { { echo "$as_me:18727: error: expected a pathname, not \"$withval\"" >&5
18728 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18729    { (exit 1); exit 1; }; }
18730   ;;
18731 esac
18732
18733 fi
18734 ADA_OBJECTS="$withval"
18735
18736 echo "$as_me:18736: result: $ADA_OBJECTS" >&5
18737 echo "${ECHO_T}$ADA_OBJECTS" >&6
18738
18739 echo "$as_me:18739: checking if an Ada95 shared-library should be built" >&5
18740 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18741
18742 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18743 if test "${with_ada_sharedlib+set}" = set; then
18744   withval="$with_ada_sharedlib"
18745   with_ada_sharedlib=$withval
18746 else
18747   with_ada_sharedlib=no
18748 fi;
18749 echo "$as_me:18749: result: $with_ada_sharedlib" >&5
18750 echo "${ECHO_T}$with_ada_sharedlib" >&6
18751
18752 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18753 MAKE_ADA_SHAREDLIB="#"
18754
18755 if test "x$with_ada_sharedlib" != xno
18756 then
18757         MAKE_ADA_SHAREDLIB=
18758         if test "x$with_ada_sharedlib" != xyes
18759         then
18760                 ADA_SHAREDLIB="$with_ada_sharedlib"
18761         fi
18762 fi
18763
18764                 fi
18765         fi
18766 else
18767         cf_with_ada=no
18768 fi
18769
18770 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18771 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18772 ###
18773 ### ticlib modules may be a separate library, otherwise contained in termlib.
18774 ### termlib modules may be a separate library, otherwise contained in ncurses.
18775 ###
18776 ### The of "+" or " " between the tokens controls the way the script
18777 ### chooses to split module lists into libraries.
18778 ###
18779 ### (see CF_LIB_RULES).
18780 echo "$as_me:18780: checking for library subsets" >&5
18781 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18782 LIB_SUBSETS=
18783
18784 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18785         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18786         if test "$with_ticlib" != no ; then
18787                 LIB_SUBSETS="${LIB_SUBSETS} "
18788         else
18789                 LIB_SUBSETS="${LIB_SUBSETS}+"
18790         fi
18791 fi
18792
18793 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18794 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18795
18796 if test "$with_termlib" != no ; then
18797         LIB_SUBSETS="${LIB_SUBSETS} "
18798 else
18799         LIB_SUBSETS="${LIB_SUBSETS}+"
18800 fi
18801
18802 LIB_SUBSETS="${LIB_SUBSETS}base"
18803
18804 # Most term-driver calls are to tinfo, but some like init_pair are to the
18805 # base library (so it resides in base).
18806 if test "$with_term_driver" != no ; then
18807         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18808         case $cf_cv_system_name in #(vi
18809         *mingw32*) #(vi
18810                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18811                 ;;
18812         *) #(vi
18813                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18814                 ;;
18815         esac
18816 fi
18817
18818 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18819 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18820
18821 echo "$as_me:18821: result: $LIB_SUBSETS" >&5
18822 echo "${ECHO_T}$LIB_SUBSETS" >&6
18823
18824 ### Construct the list of include-directories to be generated
18825
18826 CPPFLAGS="$CPPFLAGS -I. -I../include"
18827 if test "$srcdir" != "."; then
18828         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18829 fi
18830 if test "$GCC" != yes; then
18831         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18832 elif test "$includedir" != "/usr/include"; then
18833         if test "$includedir" = '${prefix}/include' ; then
18834                 if test $prefix != /usr ; then
18835                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18836                 fi
18837         else
18838                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18839         fi
18840 fi
18841
18842 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18843 if test "$srcdir" != "."; then
18844         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18845 fi
18846 if test "$GCC" != yes; then
18847         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18848 elif test "$includedir" != "/usr/include"; then
18849         if test "$includedir" = '${prefix}/include' ; then
18850                 if test $prefix != /usr ; then
18851                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18852                 fi
18853         else
18854                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18855         fi
18856 fi
18857
18858 ### Build up pieces for makefile rules
18859 echo "$as_me:18859: checking default library suffix" >&5
18860 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18861
18862         case $DFT_LWR_MODEL in
18863         libtool) DFT_ARG_SUFFIX=''   ;;
18864         normal)  DFT_ARG_SUFFIX=''   ;;
18865         debug)   DFT_ARG_SUFFIX='_g' ;;
18866         profile) DFT_ARG_SUFFIX='_p' ;;
18867         shared)  DFT_ARG_SUFFIX=''   ;;
18868         esac
18869         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18870 echo "$as_me:18870: result: $DFT_ARG_SUFFIX" >&5
18871 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18872
18873 echo "$as_me:18873: checking default library-dependency suffix" >&5
18874 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18875
18876         case $DFT_LWR_MODEL in #(vi
18877         libtool) #(vi
18878                 DFT_LIB_SUFFIX='.la'
18879                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18880                 ;;
18881         normal) #(vi
18882                 DFT_LIB_SUFFIX='.a'
18883                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18884                 ;;
18885         debug) #(vi
18886                 DFT_LIB_SUFFIX='_g.a'
18887                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18888                 ;;
18889         profile) #(vi
18890                 DFT_LIB_SUFFIX='_p.a'
18891                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18892                 ;;
18893         shared) #(vi
18894                 case $cf_cv_system_name in
18895                 aix[5-7]*) #(vi
18896                         DFT_LIB_SUFFIX='.a'
18897                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18898                         ;;
18899                 cygwin*) #(vi
18900                         DFT_LIB_SUFFIX='.dll'
18901                         DFT_DEP_SUFFIX='.dll.a'
18902                         ;;
18903                 darwin*) #(vi
18904                         DFT_LIB_SUFFIX='.dylib'
18905                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18906                         ;;
18907                 hpux*) #(vi
18908                         case $target in
18909                         ia64*) #(vi
18910                                 DFT_LIB_SUFFIX='.so'
18911                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18912                                 ;;
18913                         *) #(vi
18914                                 DFT_LIB_SUFFIX='.sl'
18915                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18916                                 ;;
18917                         esac
18918                         ;;
18919                 *)      DFT_LIB_SUFFIX='.so'
18920                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18921                         ;;
18922                 esac
18923         esac
18924         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18925         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18926 echo "$as_me:18926: result: $DFT_DEP_SUFFIX" >&5
18927 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18928
18929 echo "$as_me:18929: checking default object directory" >&5
18930 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18931
18932         case $DFT_LWR_MODEL in
18933         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18934         normal)  DFT_OBJ_SUBDIR='objects' ;;
18935         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18936         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18937         shared)
18938                 case $cf_cv_system_name in #(vi
18939                 cygwin) #(vi
18940                         DFT_OBJ_SUBDIR='objects' ;;
18941                 *)
18942                         DFT_OBJ_SUBDIR='obj_s' ;;
18943                 esac
18944         esac
18945 echo "$as_me:18945: result: $DFT_OBJ_SUBDIR" >&5
18946 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18947
18948 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18949 if test "$cf_with_cxx" = yes ; then
18950 echo "$as_me:18950: checking c++ library-dependency suffix" >&5
18951 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18952 if test "$with_libtool" != "no"; then
18953         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18954 else
18955
18956         case normal in #(vi
18957         libtool) #(vi
18958                 CXX_LIB_SUFFIX='.la'
18959                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18960                 ;;
18961         normal) #(vi
18962                 CXX_LIB_SUFFIX='.a'
18963                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18964                 ;;
18965         debug) #(vi
18966                 CXX_LIB_SUFFIX='_g.a'
18967                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18968                 ;;
18969         profile) #(vi
18970                 CXX_LIB_SUFFIX='_p.a'
18971                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18972                 ;;
18973         shared) #(vi
18974                 case $cf_cv_system_name in
18975                 aix[5-7]*) #(vi
18976                         CXX_LIB_SUFFIX='.a'
18977                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18978                         ;;
18979                 cygwin*) #(vi
18980                         CXX_LIB_SUFFIX='.dll'
18981                         CXX_DEP_SUFFIX='.dll.a'
18982                         ;;
18983                 darwin*) #(vi
18984                         CXX_LIB_SUFFIX='.dylib'
18985                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18986                         ;;
18987                 hpux*) #(vi
18988                         case $target in
18989                         ia64*) #(vi
18990                                 CXX_LIB_SUFFIX='.so'
18991                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18992                                 ;;
18993                         *) #(vi
18994                                 CXX_LIB_SUFFIX='.sl'
18995                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18996                                 ;;
18997                         esac
18998                         ;;
18999                 *)      CXX_LIB_SUFFIX='.so'
19000                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19001                         ;;
19002                 esac
19003         esac
19004         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19005         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19006 fi
19007 echo "$as_me:19007: result: $CXX_LIB_SUFFIX" >&5
19008 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19009
19010 fi
19011
19012 # do not want -ldl in build except as needed for -lncurses dependency
19013 if test "$with_dlsym" = yes ; then
19014 if test $DFT_LWR_MODEL = shared || \
19015    test $DFT_LWR_MODEL = libtool ; then
19016
19017 # remove dl library from $LIBS
19018 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19019
19020 fi
19021 fi
19022 ### Set up low-level terminfo dependencies for makefiles.
19023
19024 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19025 # do not need libdl
19026 TICS_LIST=
19027 if test "$with_dlsym" = yes ; then
19028
19029 # remove dl library from $SHLIB_LIST
19030 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19031
19032 fi
19033
19034 if test "$with_ticlib" != no ; then
19035
19036         if test "$with_ticlib" != yes ; then
19037                 TICS_NAME=$with_ticlib
19038                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19039                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19040                 TICS_LIB_SUFFIX="${with_ticlib}"
19041         else
19042                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19043                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19044                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19045         fi
19046         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
19047 else
19048         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19049 fi
19050
19051 if test "$with_termlib" != no ; then
19052
19053         if test "$with_termlib" != yes ; then
19054                 TINFO_NAME=$with_termlib
19055                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19056                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19057                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19058                 TINFO_LIB_SUFFIX="${with_termlib}"
19059         else
19060                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19061                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19062                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19063                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19064         fi
19065
19066         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19067         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19068         if test "$DFT_LWR_MODEL" = "libtool"; then
19069                 TEST_ARGS="${TEST_DEPS}"
19070                 TEST_ARG2="${TEST_DEP2}"
19071                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19072                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19073                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19074         else
19075                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19076                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19077                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19078                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19079                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19080         fi
19081 else
19082         # the next lines are needed for linking libtic over libncurses
19083         TINFO_NAME=${LIB_NAME}
19084         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19085         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19086         if test "$with_tic_depends" = yes ; then
19087                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19088         else
19089                 TICS_LIST="$SHLIB_LIST"
19090         fi
19091
19092         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19093 fi
19094
19095 if test "$DFT_LWR_MODEL" = shared ; then
19096         case $cf_cv_system_name in #(vi
19097         cygwin*)
19098                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19099                 TINFO_SUFFIX=.dll
19100                 ;;
19101         esac
19102 fi
19103
19104 if test "$with_dlsym" = yes ; then
19105
19106 # remove dl library from $TICS_LIST
19107 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19108
19109 fi
19110
19111 if test "$DFT_LWR_MODEL" = "libtool"; then
19112     OBJEXT=lo
19113 fi
19114
19115 # needed for Ada95
19116 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
19117
19118 case $DFT_LWR_MODEL in
19119 normal|debug|profile)
19120
19121 if test "$GCC" = yes ; then
19122         case $cf_cv_system_name in #(
19123         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19124                 LDFLAGS_STATIC=
19125                 LDFLAGS_SHARED=
19126                 ;;
19127     *)  #( normally, except when broken
19128         LDFLAGS_STATIC=-static
19129         LDFLAGS_SHARED=-dynamic
19130         ;;
19131     esac
19132 else
19133         case $cf_cv_system_name in #(
19134         aix[4-7]*)      #( from ld manpage
19135                 LDFLAGS_STATIC=-bstatic
19136                 LDFLAGS_SHARED=-bdynamic
19137                 ;;
19138         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19139                 # We could also use just "archive" and "shared".
19140                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19141                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19142                 ;;
19143         irix*)          #( from ld manpage IRIX64
19144                 LDFLAGS_STATIC=-Bstatic
19145                 LDFLAGS_SHARED=-Bdynamic
19146                 ;;
19147         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19148                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19149                 LDFLAGS_STATIC=-noso
19150                 LDFLAGS_SHARED=-so_archive
19151                 ;;
19152         solaris2*)
19153                 LDFLAGS_STATIC=-Bstatic
19154                 LDFLAGS_SHARED=-Bdynamic
19155                 ;;
19156         esac
19157 fi
19158
19159 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19160 then
19161         echo "$as_me:19161: checking if linker supports switching between static/dynamic" >&5
19162 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19163
19164         rm -f libconftest.a
19165         cat >conftest.$ac_ext <<EOF
19166 #line 19166 "configure"
19167 #include <stdio.h>
19168 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19169 EOF
19170         if { (eval echo "$as_me:19170: \"$ac_compile\"") >&5
19171   (eval $ac_compile) 2>&5
19172   ac_status=$?
19173   echo "$as_me:19173: \$? = $ac_status" >&5
19174   (exit $ac_status); } ; then
19175                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19176                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19177         fi
19178         rm -f conftest.*
19179
19180         cf_save_LIBS="$LIBS"
19181
19182         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19183         cat >conftest.$ac_ext <<_ACEOF
19184 #line 19184 "configure"
19185 #include "confdefs.h"
19186
19187 #line 19187 "configure"
19188 #include <stdio.h>
19189 int cf_ldflags_static(FILE *fp);
19190
19191 int
19192 main ()
19193 {
19194
19195         return cf_ldflags_static(stdin);
19196
19197   ;
19198   return 0;
19199 }
19200 _ACEOF
19201 rm -f conftest.$ac_objext conftest$ac_exeext
19202 if { (eval echo "$as_me:19202: \"$ac_link\"") >&5
19203   (eval $ac_link) 2>&5
19204   ac_status=$?
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit $ac_status); } &&
19207          { ac_try='test -s conftest$ac_exeext'
19208   { (eval echo "$as_me:19208: \"$ac_try\"") >&5
19209   (eval $ac_try) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit $ac_status); }; }; then
19213   cf_ldflags_static=yes
19214 else
19215   echo "$as_me: failed program was:" >&5
19216 cat conftest.$ac_ext >&5
19217 cf_ldflags_static=no
19218 fi
19219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19220
19221         rm -f libconftest.*
19222         LIBS="$cf_save_LIBS"
19223
19224         echo "$as_me:19224: result: $cf_ldflags_static" >&5
19225 echo "${ECHO_T}$cf_ldflags_static" >&6
19226
19227         if test $cf_ldflags_static != yes
19228         then
19229                 LDFLAGS_STATIC=
19230                 LDFLAGS_SHARED=
19231         fi
19232 else
19233         LDFLAGS_STATIC=
19234         LDFLAGS_SHARED=
19235 fi
19236
19237         ;;
19238 esac
19239
19240 echo "$as_me:19240: checking where we will install curses.h" >&5
19241 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19242 test "$with_overwrite" = no && \
19243 test "x$includedir" = 'x${prefix}/include' && \
19244         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19245 echo "$as_me:19245: result: $includedir" >&5
19246 echo "${ECHO_T}$includedir" >&6
19247
19248 ### Resolve a conflict between normal and wide-curses by forcing applications
19249 ### that will need libutf8 to add it to their configure script.
19250 if test "$with_overwrite" != no ; then
19251 if test "$NCURSES_LIBUTF8" = 1 ; then
19252         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19253         { echo "$as_me:19253: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19254 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19255 fi
19256 fi
19257 WITH_OVERWRITE=$with_overwrite
19258
19259 # used to separate tack out of the tree
19260 NCURSES_TREE=
19261
19262 ### predefined stuff for the test programs
19263 cat >>confdefs.h <<\EOF
19264 #define HAVE_SLK_COLOR 1
19265 EOF
19266
19267 ### Construct the list of subdirectories for which we'll customize makefiles
19268 ### with the appropriate compile-rules.
19269
19270 echo "$as_me:19270: checking for src modules" >&5
19271 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19272
19273 # dependencies and linker-arguments for test-programs
19274 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19275 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19276 if test "$DFT_LWR_MODEL" = "libtool"; then
19277         TEST_ARGS="${TEST_DEPS}"
19278         TEST_ARG2="${TEST_DEP2}"
19279 else
19280         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19281         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19282 fi
19283
19284 cf_cv_src_modules=
19285 for cf_dir in $modules_to_build
19286 do
19287         if test -f $srcdir/$cf_dir/modules; then
19288
19289                 # We may/may not have tack in the distribution, though the
19290                 # makefile is.
19291                 if test $cf_dir = tack ; then
19292                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19293                                 continue
19294                         fi
19295                 fi
19296
19297                 if test -z "$cf_cv_src_modules"; then
19298                         cf_cv_src_modules=$cf_dir
19299                 else
19300                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19301                 fi
19302
19303                 # Make the ncurses_cfg.h file record the library interface files as
19304                 # well.  These are header files that are the same name as their
19305                 # directory.  Ncurses is the only library that does not follow
19306                 # that pattern.
19307                 if test $cf_dir = tack ; then
19308                         continue
19309                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19310
19311 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19312
19313                         cat >>confdefs.h <<EOF
19314 #define HAVE_${cf_have_include}_H 1
19315 EOF
19316
19317                         cat >>confdefs.h <<EOF
19318 #define HAVE_LIB${cf_have_include} 1
19319 EOF
19320
19321                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19322                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19323                         if test "$DFT_LWR_MODEL" = "libtool"; then
19324                                 TEST_ARGS="${TEST_DEPS}"
19325                                 TEST_ARG2="${TEST_DEP2}"
19326                         else
19327                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19328                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19329                         fi
19330                 fi
19331         fi
19332 done
19333 echo "$as_me:19333: result: $cf_cv_src_modules" >&5
19334 echo "${ECHO_T}$cf_cv_src_modules" >&6
19335
19336 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19337 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19338
19339 SRC_SUBDIRS=
19340 if test "x$cf_with_manpages" != xno ; then
19341         SRC_SUBDIRS="$SRC_SUBDIRS man"
19342 fi
19343 SRC_SUBDIRS="$SRC_SUBDIRS include"
19344 for cf_dir in $cf_cv_src_modules
19345 do
19346         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19347 done
19348 if test "x$cf_with_tests" != "xno" ; then
19349         SRC_SUBDIRS="$SRC_SUBDIRS test"
19350 fi
19351 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19352 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19353
19354 ADA_SUBDIRS=
19355 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19356         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19357         ADA_SUBDIRS="gen src"
19358         if test "x$cf_with_tests" != "xno" ; then
19359                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19360         fi
19361 fi
19362
19363 SUB_MAKEFILES=
19364 for cf_dir in $SRC_SUBDIRS
19365 do
19366         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19367 done
19368
19369 if test -n "$ADA_SUBDIRS"; then
19370         for cf_dir in $ADA_SUBDIRS
19371         do
19372                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19373         done
19374
19375 fi
19376
19377 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19378    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19379    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19380 fi
19381
19382 DIRS_TO_MAKE="lib"
19383 for cf_item in $cf_list_models
19384 do
19385
19386         case $cf_item in
19387         libtool) cf_subdir='obj_lo'  ;;
19388         normal)  cf_subdir='objects' ;;
19389         debug)   cf_subdir='obj_g' ;;
19390         profile) cf_subdir='obj_p' ;;
19391         shared)
19392                 case $cf_cv_system_name in #(vi
19393                 cygwin) #(vi
19394                         cf_subdir='objects' ;;
19395                 *)
19396                         cf_subdir='obj_s' ;;
19397                 esac
19398         esac
19399
19400         for cf_item2 in $DIRS_TO_MAKE
19401         do
19402                 test $cf_item2 = $cf_subdir && break
19403         done
19404         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19405 done
19406 for cf_dir in $DIRS_TO_MAKE
19407 do
19408         test ! -d $cf_dir && mkdir $cf_dir
19409 done
19410
19411 # symbols that differ when compiling Ada95 by itself.
19412 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19413
19414 # values to use as strings
19415 cat >>confdefs.h <<EOF
19416 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19417 EOF
19418
19419 cat >>confdefs.h <<EOF
19420 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19421 EOF
19422
19423 ### Now that we're done running tests, add the compiler-warnings, if any
19424
19425 cf_fix_cppflags=no
19426 cf_new_cflags=
19427 cf_new_cppflags=
19428 cf_new_extra_cppflags=
19429
19430 for cf_add_cflags in $EXTRA_CFLAGS
19431 do
19432 case $cf_fix_cppflags in
19433 no)
19434         case $cf_add_cflags in #(vi
19435         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19436                 case $cf_add_cflags in
19437                 -D*)
19438                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19439
19440                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19441                                 && test -z "${cf_tst_cflags}" \
19442                                 && cf_fix_cppflags=yes
19443
19444                         if test $cf_fix_cppflags = yes ; then
19445                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19446                                 continue
19447                         elif test "${cf_tst_cflags}" = "\"'" ; then
19448                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19449                                 continue
19450                         fi
19451                         ;;
19452                 esac
19453                 case "$CPPFLAGS" in
19454                 *$cf_add_cflags) #(vi
19455                         ;;
19456                 *) #(vi
19457                         case $cf_add_cflags in #(vi
19458                         -D*)
19459                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19460
19461 CPPFLAGS=`echo "$CPPFLAGS" | \
19462         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19463                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19464
19465                                 ;;
19466                         esac
19467                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19468                         ;;
19469                 esac
19470                 ;;
19471         *)
19472                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19473                 ;;
19474         esac
19475         ;;
19476 yes)
19477         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19478
19479         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19480
19481         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19482                 && test -z "${cf_tst_cflags}" \
19483                 && cf_fix_cppflags=no
19484         ;;
19485 esac
19486 done
19487
19488 if test -n "$cf_new_cflags" ; then
19489
19490         CFLAGS="$CFLAGS $cf_new_cflags"
19491 fi
19492
19493 if test -n "$cf_new_cppflags" ; then
19494
19495         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19496 fi
19497
19498 if test -n "$cf_new_extra_cppflags" ; then
19499
19500         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19501 fi
19502
19503 ### Define substitutions for header files to avoid name-pollution
19504
19505 if test "$cf_cv_have_tcgetattr" = yes ; then
19506         HAVE_TCGETATTR=1
19507 else
19508         HAVE_TCGETATTR=0
19509 fi
19510
19511 if test "$ac_cv_header_termio_h" = yes ; then
19512         HAVE_TERMIO_H=1
19513 else
19514         HAVE_TERMIO_H=0
19515 fi
19516
19517 if test "$ac_cv_header_termios_h" = yes ; then
19518         HAVE_TERMIOS_H=1
19519 else
19520         HAVE_TERMIOS_H=0
19521 fi
19522
19523 ################################################################################
19524 test "$use_database" = yes && \
19525 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19526
19527 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19528 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19529
19530 if test x"$enable_pc_files" = xyes ; then \
19531 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19532 MAKE_PC_FILES=
19533 else
19534 MAKE_PC_FILES="#"
19535 fi
19536
19537 # Extract the first word of "tic", so it can be a program name with args.
19538 set dummy tic; ac_word=$2
19539 echo "$as_me:19539: checking for $ac_word" >&5
19540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19541 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19542   echo $ECHO_N "(cached) $ECHO_C" >&6
19543 else
19544   case $TIC_PATH in
19545   [\\/]* | ?:[\\/]*)
19546   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19547   ;;
19548   *)
19549   ac_save_IFS=$IFS; IFS=$ac_path_separator
19550 ac_dummy="$PATH:/usr/local/ncurses/bin"
19551 for ac_dir in $ac_dummy; do
19552   IFS=$ac_save_IFS
19553   test -z "$ac_dir" && ac_dir=.
19554   if $as_executable_p "$ac_dir/$ac_word"; then
19555    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19556    echo "$as_me:19556: found $ac_dir/$ac_word" >&5
19557    break
19558 fi
19559 done
19560
19561   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19562   ;;
19563 esac
19564 fi
19565 TIC_PATH=$ac_cv_path_TIC_PATH
19566
19567 if test -n "$TIC_PATH"; then
19568   echo "$as_me:19568: result: $TIC_PATH" >&5
19569 echo "${ECHO_T}$TIC_PATH" >&6
19570 else
19571   echo "$as_me:19571: result: no" >&5
19572 echo "${ECHO_T}no" >&6
19573 fi
19574
19575 if test -n "$FALLBACK_LIST"
19576 then
19577         if test "$TIC_PATH" = unknown
19578         then
19579                 { echo "$as_me:19579: WARNING: no tic program found for fallbacks" >&5
19580 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19581         fi
19582 fi
19583
19584 if test "x$cf_with_tests" != xno ; then
19585         MAKE_TESTS=
19586 else
19587         MAKE_TESTS="#"
19588 fi
19589
19590 ADAHTML_DIR=../../doc/html/ada
19591
19592 SUB_SCRIPTS=
19593 case $cf_cv_system_name in #(vi
19594 *mingw32*) #(vi
19595         SUB_SCRIPTS="mk-dlls.sh"
19596         ;;
19597 esac
19598
19599 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"
19600 ac_config_commands="$ac_config_commands default"
19601 cat >confcache <<\_ACEOF
19602 # This file is a shell script that caches the results of configure
19603 # tests run on this system so they can be shared between configure
19604 # scripts and configure runs, see configure's option --config-cache.
19605 # It is not useful on other systems.  If it contains results you don't
19606 # want to keep, you may remove or edit it.
19607 #
19608 # config.status only pays attention to the cache file if you give it
19609 # the --recheck option to rerun configure.
19610 #
19611 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19612 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19613 # following values.
19614
19615 _ACEOF
19616
19617 # The following way of writing the cache mishandles newlines in values,
19618 # but we know of no workaround that is simple, portable, and efficient.
19619 # So, don't put newlines in cache variables' values.
19620 # Ultrix sh set writes to stderr and can't be redirected directly,
19621 # and sets the high bit in the cache file unless we assign to the vars.
19622 {
19623   (set) 2>&1 |
19624     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19625     *ac_space=\ *)
19626       # `set' does not quote correctly, so add quotes (double-quote
19627       # substitution turns \\\\ into \\, and sed turns \\ into \).
19628       sed -n \
19629         "s/'/'\\\\''/g;
19630           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19631       ;;
19632     *)
19633       # `set' quotes correctly as required by POSIX, so do not add quotes.
19634       sed -n \
19635         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19636       ;;
19637     esac;
19638 } |
19639   sed '
19640      t clear
19641      : clear
19642      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19643      t end
19644      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19645      : end' >>confcache
19646 if cmp -s $cache_file confcache; then :; else
19647   if test -w $cache_file; then
19648     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19649     cat confcache >$cache_file
19650   else
19651     echo "not updating unwritable cache $cache_file"
19652   fi
19653 fi
19654 rm -f confcache
19655
19656 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19657 # Let make expand exec_prefix.
19658 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19659
19660 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19661 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19662 # trailing colons and then remove the whole line if VPATH becomes empty
19663 # (actually we leave an empty line to preserve line numbers).
19664 if test "x$srcdir" = x.; then
19665   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19666 s/:*\$(srcdir):*/:/;
19667 s/:*\${srcdir}:*/:/;
19668 s/:*@srcdir@:*/:/;
19669 s/^\([^=]*=[    ]*\):*/\1/;
19670 s/:*$//;
19671 s/^[^=]*=[      ]*$//;
19672 }'
19673 fi
19674
19675 DEFS=-DHAVE_CONFIG_H
19676
19677 : ${CONFIG_STATUS=./config.status}
19678 ac_clean_files_save=$ac_clean_files
19679 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19680 { echo "$as_me:19680: creating $CONFIG_STATUS" >&5
19681 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19682 cat >$CONFIG_STATUS <<_ACEOF
19683 #! $SHELL
19684 # Generated automatically by configure.
19685 # Run this file to recreate the current configuration.
19686 # Compiler output produced by configure, useful for debugging
19687 # configure, is in config.log if it exists.
19688
19689 debug=false
19690 SHELL=\${CONFIG_SHELL-$SHELL}
19691 ac_cs_invocation="\$0 \$@"
19692
19693 _ACEOF
19694
19695 cat >>$CONFIG_STATUS <<\_ACEOF
19696 # Be Bourne compatible
19697 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19698   emulate sh
19699   NULLCMD=:
19700 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19701   set -o posix
19702 fi
19703
19704 # Name of the executable.
19705 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19706
19707 if expr a : '\(a\)' >/dev/null 2>&1; then
19708   as_expr=expr
19709 else
19710   as_expr=false
19711 fi
19712
19713 rm -f conf$$ conf$$.exe conf$$.file
19714 echo >conf$$.file
19715 if ln -s conf$$.file conf$$ 2>/dev/null; then
19716   # We could just check for DJGPP; but this test a) works b) is more generic
19717   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19718   if test -f conf$$.exe; then
19719     # Don't use ln at all; we don't have any links
19720     as_ln_s='cp -p'
19721   else
19722     as_ln_s='ln -s'
19723   fi
19724 elif ln conf$$.file conf$$ 2>/dev/null; then
19725   as_ln_s=ln
19726 else
19727   as_ln_s='cp -p'
19728 fi
19729 rm -f conf$$ conf$$.exe conf$$.file
19730
19731 as_executable_p="test -f"
19732
19733 # Support unset when possible.
19734 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19735   as_unset=unset
19736 else
19737   as_unset=false
19738 fi
19739
19740 # NLS nuisances.
19741 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19742 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19743 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19744 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19745 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19746 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19747 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19748 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19749
19750 # IFS
19751 # We need space, tab and new line, in precisely that order.
19752 as_nl='
19753 '
19754 IFS="   $as_nl"
19755
19756 # CDPATH.
19757 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19758
19759 exec 6>&1
19760
19761 _ACEOF
19762
19763 # Files that config.status was made for.
19764 if test -n "$ac_config_files"; then
19765   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19766 fi
19767
19768 if test -n "$ac_config_headers"; then
19769   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19770 fi
19771
19772 if test -n "$ac_config_links"; then
19773   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19774 fi
19775
19776 if test -n "$ac_config_commands"; then
19777   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19778 fi
19779
19780 cat >>$CONFIG_STATUS <<\EOF
19781
19782 ac_cs_usage="\
19783 \`$as_me' instantiates files from templates according to the
19784 current configuration.
19785
19786 Usage: $0 [OPTIONS] [FILE]...
19787
19788   -h, --help       print this help, then exit
19789   -V, --version    print version number, then exit
19790   -d, --debug      don't remove temporary files
19791       --recheck    update $as_me by reconfiguring in the same conditions
19792   --file=FILE[:TEMPLATE]
19793                    instantiate the configuration file FILE
19794   --header=FILE[:TEMPLATE]
19795                    instantiate the configuration header FILE
19796
19797 Configuration files:
19798 $config_files
19799
19800 Configuration headers:
19801 $config_headers
19802
19803 Configuration commands:
19804 $config_commands
19805
19806 Report bugs to <dickey@invisible-island.net>."
19807 EOF
19808
19809 cat >>$CONFIG_STATUS <<EOF
19810 ac_cs_version="\\
19811 config.status
19812 configured by $0, generated by GNU Autoconf 2.52.20101002,
19813   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19814
19815 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19816 Free Software Foundation, Inc.
19817 This config.status script is free software; the Free Software Foundation
19818 gives unlimited permission to copy, distribute and modify it."
19819 srcdir=$srcdir
19820 INSTALL="$INSTALL"
19821 EOF
19822
19823 cat >>$CONFIG_STATUS <<\EOF
19824 # If no file are specified by the user, then we need to provide default
19825 # value.  By we need to know if files were specified by the user.
19826 ac_need_defaults=:
19827 while test $# != 0
19828 do
19829   case $1 in
19830   --*=*)
19831     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19832     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19833     shift
19834     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19835     shift
19836     ;;
19837   -*);;
19838   *) # This is not an option, so the user has probably given explicit
19839      # arguments.
19840      ac_need_defaults=false;;
19841   esac
19842
19843   case $1 in
19844   # Handling of the options.
19845 EOF
19846 cat >>$CONFIG_STATUS <<EOF
19847   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19848     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19849     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19850 EOF
19851 cat >>$CONFIG_STATUS <<\EOF
19852   --version | --vers* | -V )
19853     echo "$ac_cs_version"; exit 0 ;;
19854   --he | --h)
19855     # Conflict between --help and --header
19856     { { echo "$as_me:19856: error: ambiguous option: $1
19857 Try \`$0 --help' for more information." >&5
19858 echo "$as_me: error: ambiguous option: $1
19859 Try \`$0 --help' for more information." >&2;}
19860    { (exit 1); exit 1; }; };;
19861   --help | --hel | -h )
19862     echo "$ac_cs_usage"; exit 0 ;;
19863   --debug | --d* | -d )
19864     debug=: ;;
19865   --file | --fil | --fi | --f )
19866     shift
19867     CONFIG_FILES="$CONFIG_FILES $1"
19868     ac_need_defaults=false;;
19869   --header | --heade | --head | --hea )
19870     shift
19871     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19872     ac_need_defaults=false;;
19873
19874   # This is an error.
19875   -*) { { echo "$as_me:19875: error: unrecognized option: $1
19876 Try \`$0 --help' for more information." >&5
19877 echo "$as_me: error: unrecognized option: $1
19878 Try \`$0 --help' for more information." >&2;}
19879    { (exit 1); exit 1; }; } ;;
19880
19881   *) ac_config_targets="$ac_config_targets $1" ;;
19882
19883   esac
19884   shift
19885 done
19886
19887 exec 5>>config.log
19888 cat >&5 << _ACEOF
19889
19890 ## ----------------------- ##
19891 ## Running config.status.  ##
19892 ## ----------------------- ##
19893
19894 This file was extended by $as_me 2.52.20101002, executed with
19895   CONFIG_FILES    = $CONFIG_FILES
19896   CONFIG_HEADERS  = $CONFIG_HEADERS
19897   CONFIG_LINKS    = $CONFIG_LINKS
19898   CONFIG_COMMANDS = $CONFIG_COMMANDS
19899   > $ac_cs_invocation
19900 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19901
19902 _ACEOF
19903 EOF
19904
19905 cat >>$CONFIG_STATUS <<EOF
19906 #
19907 # INIT-COMMANDS section.
19908 #
19909
19910 ### Special initialization commands, used to pass information from the
19911 ### configuration-run into config.status
19912
19913 AWK="$AWK"
19914 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19915 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19916 ECHO_LINK="$ECHO_LINK"
19917 LDCONFIG="$LDCONFIG"
19918 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19919 LIB_NAME="$LIB_NAME"
19920 LIB_SUBSETS="$LIB_SUBSETS"
19921 LIB_SUFFIX="$LIB_SUFFIX"
19922 LIB_TRACING="$LIB_TRACING"
19923 LN_S="$LN_S"
19924 MAKE_TERMINFO="$MAKE_TERMINFO"
19925 NCURSES_MAJOR="$NCURSES_MAJOR"
19926 NCURSES_MINOR="$NCURSES_MINOR"
19927 NCURSES_OSPEED="$NCURSES_OSPEED"
19928 NCURSES_PATCH="$NCURSES_PATCH"
19929 SRC_SUBDIRS="$SRC_SUBDIRS"
19930 TERMINFO="$TERMINFO"
19931 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19932 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19933 TICS_NAME="$TICS_NAME"
19934 TIC_PATH="$TIC_PATH"
19935 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19936 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19937 TINFO_NAME="$TINFO_NAME"
19938 TINFO_SUFFIX="$TINFO_SUFFIX"
19939 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19940 WITH_CURSES_H="$with_curses_h"
19941 WITH_ECHO="$with_echo"
19942 WITH_OVERWRITE="$with_overwrite"
19943 cf_LIST_MODELS="$cf_list_models"
19944 cf_cv_abi_version="$cf_cv_abi_version"
19945 cf_cv_do_relink="$cf_cv_do_relink"
19946 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19947 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19948 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19949 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19950 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19951 cf_cv_rel_version="$cf_cv_rel_version"
19952 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19953 cf_cv_shared_soname='$cf_cv_shared_soname'
19954 cf_cv_shlib_version="$cf_cv_shlib_version"
19955 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19956 cf_cv_system_name="$cf_cv_system_name"
19957 cf_with_ada="$cf_with_ada"
19958 cf_with_cxx_binding="$cf_with_cxx_binding"
19959 cf_with_manpages="$cf_with_manpages"
19960 cf_with_tests="$cf_with_tests"
19961 host="$host"
19962 target="$target"
19963
19964 EOF
19965
19966 cat >>$CONFIG_STATUS <<\EOF
19967 for ac_config_target in $ac_config_targets
19968 do
19969   case "$ac_config_target" in
19970   # Handling of arguments.
19971   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19972   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19973   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19974   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19975   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19976   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19977   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19978   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19979   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19980   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19981   *) { { echo "$as_me:19981: error: invalid argument: $ac_config_target" >&5
19982 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19983    { (exit 1); exit 1; }; };;
19984   esac
19985 done
19986
19987 # If the user did not use the arguments to specify the items to instantiate,
19988 # then the envvar interface is used.  Set only those that are not.
19989 # We use the long form for the default assignment because of an extremely
19990 # bizarre bug on SunOS 4.1.3.
19991 if $ac_need_defaults; then
19992   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19993   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19994   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19995 fi
19996
19997 # Create a temporary directory, and hook for its removal unless debugging.
19998 $debug ||
19999 {
20000   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20001   trap '{ (exit 1); exit 1; }' 1 2 13 15
20002 }
20003
20004 # Create a (secure) tmp directory for tmp files.
20005 : ${TMPDIR=/tmp}
20006 {
20007   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20008   test -n "$tmp" && test -d "$tmp"
20009 }  ||
20010 {
20011   tmp=$TMPDIR/cs$$-$RANDOM
20012   (umask 077 && mkdir $tmp)
20013 } ||
20014 {
20015    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20016    { (exit 1); exit 1; }
20017 }
20018
20019 EOF
20020
20021 cat >>$CONFIG_STATUS <<EOF
20022
20023 #
20024 # CONFIG_FILES section.
20025 #
20026
20027 # No need to generate the scripts if there are no CONFIG_FILES.
20028 # This happens for instance when ./config.status config.h
20029 if test -n "\$CONFIG_FILES"; then
20030   # Protect against being on the right side of a sed subst in config.status.
20031   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20032    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20033 s,@SHELL@,$SHELL,;t t
20034 s,@exec_prefix@,$exec_prefix,;t t
20035 s,@prefix@,$prefix,;t t
20036 s,@program_transform_name@,$program_transform_name,;t t
20037 s,@bindir@,$bindir,;t t
20038 s,@sbindir@,$sbindir,;t t
20039 s,@libexecdir@,$libexecdir,;t t
20040 s,@datadir@,$datadir,;t t
20041 s,@sysconfdir@,$sysconfdir,;t t
20042 s,@sharedstatedir@,$sharedstatedir,;t t
20043 s,@localstatedir@,$localstatedir,;t t
20044 s,@libdir@,$libdir,;t t
20045 s,@includedir@,$includedir,;t t
20046 s,@oldincludedir@,$oldincludedir,;t t
20047 s,@infodir@,$infodir,;t t
20048 s,@mandir@,$mandir,;t t
20049 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20050 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20051 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20052 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20053 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20054 s,@build_alias@,$build_alias,;t t
20055 s,@host_alias@,$host_alias,;t t
20056 s,@target_alias@,$target_alias,;t t
20057 s,@ECHO_C@,$ECHO_C,;t t
20058 s,@ECHO_N@,$ECHO_N,;t t
20059 s,@ECHO_T@,$ECHO_T,;t t
20060 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20061 s,@DEFS@,$DEFS,;t t
20062 s,@LIBS@,$LIBS,;t t
20063 s,@top_builddir@,$top_builddir,;t t
20064 s,@EGREP@,$EGREP,;t t
20065 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20066 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20067 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20068 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20069 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20070 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20071 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20072 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20073 s,@build@,$build,;t t
20074 s,@build_cpu@,$build_cpu,;t t
20075 s,@build_vendor@,$build_vendor,;t t
20076 s,@build_os@,$build_os,;t t
20077 s,@host@,$host,;t t
20078 s,@host_cpu@,$host_cpu,;t t
20079 s,@host_vendor@,$host_vendor,;t t
20080 s,@host_os@,$host_os,;t t
20081 s,@target@,$target,;t t
20082 s,@target_cpu@,$target_cpu,;t t
20083 s,@target_vendor@,$target_vendor,;t t
20084 s,@target_os@,$target_os,;t t
20085 s,@CC@,$CC,;t t
20086 s,@CFLAGS@,$CFLAGS,;t t
20087 s,@LDFLAGS@,$LDFLAGS,;t t
20088 s,@CPPFLAGS@,$CPPFLAGS,;t t
20089 s,@ac_ct_CC@,$ac_ct_CC,;t t
20090 s,@EXEEXT@,$EXEEXT,;t t
20091 s,@OBJEXT@,$OBJEXT,;t t
20092 s,@CPP@,$CPP,;t t
20093 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20094 s,@PROG_EXT@,$PROG_EXT,;t t
20095 s,@LDCONFIG@,$LDCONFIG,;t t
20096 s,@CXX@,$CXX,;t t
20097 s,@CXXFLAGS@,$CXXFLAGS,;t t
20098 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20099 s,@AWK@,$AWK,;t t
20100 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20101 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20102 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20103 s,@LINT@,$LINT,;t t
20104 s,@LINT_OPTS@,$LINT_OPTS,;t t
20105 s,@LN_S@,$LN_S,;t t
20106 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20107 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20108 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20109 s,@SET_MAKE@,$SET_MAKE,;t t
20110 s,@CTAGS@,$CTAGS,;t t
20111 s,@ETAGS@,$ETAGS,;t t
20112 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20113 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20114 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20115 s,@RANLIB@,$RANLIB,;t t
20116 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20117 s,@LD@,$LD,;t t
20118 s,@ac_ct_LD@,$ac_ct_LD,;t t
20119 s,@AR@,$AR,;t t
20120 s,@ac_ct_AR@,$ac_ct_AR,;t t
20121 s,@ARFLAGS@,$ARFLAGS,;t t
20122 s,@DESTDIR@,$DESTDIR,;t t
20123 s,@BUILD_CC@,$BUILD_CC,;t t
20124 s,@BUILD_CPP@,$BUILD_CPP,;t t
20125 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20126 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20127 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20128 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20129 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20130 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20131 s,@cf_list_models@,$cf_list_models,;t t
20132 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20133 s,@LIBTOOL@,$LIBTOOL,;t t
20134 s,@LT_UNDEF@,$LT_UNDEF,;t t
20135 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20136 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20137 s,@LIB_CREATE@,$LIB_CREATE,;t t
20138 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20139 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20140 s,@LIB_PREP@,$LIB_PREP,;t t
20141 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20142 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20143 s,@LIB_LINK@,$LIB_LINK,;t t
20144 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20145 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20146 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20147 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20148 s,@TICS_NAME@,$TICS_NAME,;t t
20149 s,@TINFO_NAME@,$TINFO_NAME,;t t
20150 s,@LIB_NAME@,$LIB_NAME,;t t
20151 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20152 s,@CC_G_OPT@,$CC_G_OPT,;t t
20153 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20154 s,@LD_MODEL@,$LD_MODEL,;t t
20155 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20156 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20157 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20158 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20159 s,@LINK_PROGS@,$LINK_PROGS,;t t
20160 s,@LINK_TESTS@,$LINK_TESTS,;t t
20161 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20162 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20163 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20164 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20165 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20166 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20167 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20168 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20169 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20170 s,@TERMINFO@,$TERMINFO,;t t
20171 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20172 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20173 s,@TERMPATH@,$TERMPATH,;t t
20174 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20175 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20176 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20177 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20178 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20179 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20180 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20181 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20182 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20183 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20184 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20185 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20186 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20187 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20188 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20189 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20190 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20191 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20192 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20193 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20194 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20195 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20196 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20197 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20198 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20199 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20200 s,@PTHREAD@,$PTHREAD,;t t
20201 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20202 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20203 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20204 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20205 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20206 s,@ECHO_LINK@,$ECHO_LINK,;t t
20207 s,@ADAFLAGS@,$ADAFLAGS,;t t
20208 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20209 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20210 s,@ADA_TRACE@,$ADA_TRACE,;t t
20211 s,@MATH_LIB@,$MATH_LIB,;t t
20212 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20213 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20214 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20215 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20216 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20217 s,@TEST_LIBS@,$TEST_LIBS,;t t
20218 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20219 s,@CXXCPP@,$CXXCPP,;t t
20220 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20221 s,@CXX_AR@,$CXX_AR,;t t
20222 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20223 s,@CXXLIBS@,$CXXLIBS,;t t
20224 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20225 s,@gnat_exists@,$gnat_exists,;t t
20226 s,@M4_exists@,$M4_exists,;t t
20227 s,@cf_ada_make@,$cf_ada_make,;t t
20228 s,@cf_compile_generics@,$cf_compile_generics,;t t
20229 s,@cf_generic_objects@,$cf_generic_objects,;t t
20230 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20231 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20232 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20233 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20234 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20235 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20236 s,@cf_ada_package@,$cf_ada_package,;t t
20237 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20238 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20239 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20240 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20241 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20242 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20243 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20244 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20245 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20246 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20247 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20248 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20249 s,@TICS_ARGS@,$TICS_ARGS,;t t
20250 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20251 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20252 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20253 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20254 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20255 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20256 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20257 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20258 s,@TICS_LIST@,$TICS_LIST,;t t
20259 s,@TINFO_LIST@,$TINFO_LIST,;t t
20260 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20261 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20262 s,@TEST_ARGS@,$TEST_ARGS,;t t
20263 s,@TEST_DEPS@,$TEST_DEPS,;t t
20264 s,@TEST_ARG2@,$TEST_ARG2,;t t
20265 s,@TEST_DEP2@,$TEST_DEP2,;t t
20266 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20267 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20268 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20269 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20270 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20271 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20272 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20273 s,@cross_compiling@,$cross_compiling,;t t
20274 s,@TIC_PATH@,$TIC_PATH,;t t
20275 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20276 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20277 CEOF
20278
20279 EOF
20280
20281   cat >>$CONFIG_STATUS <<\EOF
20282   # Split the substitutions into bite-sized pieces for seds with
20283   # small command number limits, like on Digital OSF/1 and HP-UX.
20284   ac_max_sed_lines=48
20285   ac_sed_frag=1 # Number of current file.
20286   ac_beg=1 # First line for current file.
20287   ac_end=$ac_max_sed_lines # Line after last line for current file.
20288   ac_more_lines=:
20289   ac_sed_cmds=
20290   while $ac_more_lines; do
20291     if test $ac_beg -gt 1; then
20292       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20293     else
20294       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20295     fi
20296     if test ! -s $tmp/subs.frag; then
20297       ac_more_lines=false
20298     else
20299       # The purpose of the label and of the branching condition is to
20300       # speed up the sed processing (if there are no `@' at all, there
20301       # is no need to browse any of the substitutions).
20302       # These are the two extra sed commands mentioned above.
20303       (echo ':t
20304   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20305       if test -z "$ac_sed_cmds"; then
20306         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20307       else
20308         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20309       fi
20310       ac_sed_frag=`expr $ac_sed_frag + 1`
20311       ac_beg=$ac_end
20312       ac_end=`expr $ac_end + $ac_max_sed_lines`
20313     fi
20314   done
20315   if test -z "$ac_sed_cmds"; then
20316     ac_sed_cmds=cat
20317   fi
20318 fi # test -n "$CONFIG_FILES"
20319
20320 EOF
20321 cat >>$CONFIG_STATUS <<\EOF
20322 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20323   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20324   case $ac_file in
20325   - | *:- | *:-:* ) # input from stdin
20326         cat >$tmp/stdin
20327         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20328         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20329   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20330         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20331   * )   ac_file_in=$ac_file.in ;;
20332   esac
20333
20334   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20335   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20336          X"$ac_file" : 'X\(//\)[^/]' \| \
20337          X"$ac_file" : 'X\(//\)$' \| \
20338          X"$ac_file" : 'X\(/\)' \| \
20339          .     : '\(.\)' 2>/dev/null ||
20340 echo X"$ac_file" |
20341     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20342           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20343           /^X\(\/\/\)$/{ s//\1/; q; }
20344           /^X\(\/\).*/{ s//\1/; q; }
20345           s/.*/./; q'`
20346   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20347     { case "$ac_dir" in
20348   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20349   *)                      as_incr_dir=.;;
20350 esac
20351 as_dummy="$ac_dir"
20352 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20353   case $as_mkdir_dir in
20354     # Skip DOS drivespec
20355     ?:) as_incr_dir=$as_mkdir_dir ;;
20356     *)
20357       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20358       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20359     ;;
20360   esac
20361 done; }
20362
20363     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20364     # A "../" for each directory in $ac_dir_suffix.
20365     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20366   else
20367     ac_dir_suffix= ac_dots=
20368   fi
20369
20370   case $srcdir in
20371   .)  ac_srcdir=.
20372       if test -z "$ac_dots"; then
20373          ac_top_srcdir=.
20374       else
20375          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20376       fi ;;
20377   [\\/]* | ?:[\\/]* )
20378       ac_srcdir=$srcdir$ac_dir_suffix;
20379       ac_top_srcdir=$srcdir ;;
20380   *) # Relative path.
20381     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20382     ac_top_srcdir=$ac_dots$srcdir ;;
20383   esac
20384
20385   case $INSTALL in
20386   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20387   *) ac_INSTALL=$ac_dots$INSTALL ;;
20388   esac
20389
20390   if test x"$ac_file" != x-; then
20391     { echo "$as_me:20391: creating $ac_file" >&5
20392 echo "$as_me: creating $ac_file" >&6;}
20393     rm -f "$ac_file"
20394   fi
20395   # Let's still pretend it is `configure' which instantiates (i.e., don't
20396   # use $as_me), people would be surprised to read:
20397   #    /* config.h.  Generated automatically by config.status.  */
20398   configure_input="Generated automatically from `echo $ac_file_in |
20399                                                  sed 's,.*/,,'` by configure."
20400
20401   # First look for the input files in the build tree, otherwise in the
20402   # src tree.
20403   ac_file_inputs=`IFS=:
20404     for f in $ac_file_in; do
20405       case $f in
20406       -) echo $tmp/stdin ;;
20407       [\\/$]*)
20408          # Absolute (can't be DOS-style, as IFS=:)
20409          test -f "$f" || { { echo "$as_me:20409: error: cannot find input file: $f" >&5
20410 echo "$as_me: error: cannot find input file: $f" >&2;}
20411    { (exit 1); exit 1; }; }
20412          echo $f;;
20413       *) # Relative
20414          if test -f "$f"; then
20415            # Build tree
20416            echo $f
20417          elif test -f "$srcdir/$f"; then
20418            # Source tree
20419            echo $srcdir/$f
20420          else
20421            # /dev/null tree
20422            { { echo "$as_me:20422: error: cannot find input file: $f" >&5
20423 echo "$as_me: error: cannot find input file: $f" >&2;}
20424    { (exit 1); exit 1; }; }
20425          fi;;
20426       esac
20427     done` || { (exit 1); exit 1; }
20428 EOF
20429 cat >>$CONFIG_STATUS <<EOF
20430   sed "$ac_vpsub
20431 $extrasub
20432 EOF
20433 cat >>$CONFIG_STATUS <<\EOF
20434 :t
20435 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20436 s,@configure_input@,$configure_input,;t t
20437 s,@srcdir@,$ac_srcdir,;t t
20438 s,@top_srcdir@,$ac_top_srcdir,;t t
20439 s,@INSTALL@,$ac_INSTALL,;t t
20440 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20441   rm -f $tmp/stdin
20442   if test x"$ac_file" != x-; then
20443     mv $tmp/out $ac_file
20444   else
20445     cat $tmp/out
20446     rm -f $tmp/out
20447   fi
20448
20449 done
20450 EOF
20451 cat >>$CONFIG_STATUS <<\EOF
20452
20453 #
20454 # CONFIG_HEADER section.
20455 #
20456
20457 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20458 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20459 #
20460 # ac_d sets the value in "#define NAME VALUE" lines.
20461 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20462 ac_dB='[        ].*$,\1#\2'
20463 ac_dC=' '
20464 ac_dD=',;t'
20465 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20466 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20467 ac_iB='\([      ]\),\1#\2define\3'
20468 ac_iC=' '
20469 ac_iD='\4,;t'
20470 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20471 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20472 ac_uB='$,\1#\2define\3'
20473 ac_uC=' '
20474 ac_uD=',;t'
20475
20476 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20477   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20478   case $ac_file in
20479   - | *:- | *:-:* ) # input from stdin
20480         cat >$tmp/stdin
20481         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20482         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20483   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20484         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20485   * )   ac_file_in=$ac_file.in ;;
20486   esac
20487
20488   test x"$ac_file" != x- && { echo "$as_me:20488: creating $ac_file" >&5
20489 echo "$as_me: creating $ac_file" >&6;}
20490
20491   # First look for the input files in the build tree, otherwise in the
20492   # src tree.
20493   ac_file_inputs=`IFS=:
20494     for f in $ac_file_in; do
20495       case $f in
20496       -) echo $tmp/stdin ;;
20497       [\\/$]*)
20498          # Absolute (can't be DOS-style, as IFS=:)
20499          test -f "$f" || { { echo "$as_me:20499: error: cannot find input file: $f" >&5
20500 echo "$as_me: error: cannot find input file: $f" >&2;}
20501    { (exit 1); exit 1; }; }
20502          echo $f;;
20503       *) # Relative
20504          if test -f "$f"; then
20505            # Build tree
20506            echo $f
20507          elif test -f "$srcdir/$f"; then
20508            # Source tree
20509            echo $srcdir/$f
20510          else
20511            # /dev/null tree
20512            { { echo "$as_me:20512: error: cannot find input file: $f" >&5
20513 echo "$as_me: error: cannot find input file: $f" >&2;}
20514    { (exit 1); exit 1; }; }
20515          fi;;
20516       esac
20517     done` || { (exit 1); exit 1; }
20518   # Remove the trailing spaces.
20519   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20520
20521 EOF
20522
20523 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20524 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20525 # be either 'cat' or 'sort'.
20526 cat confdefs.h | uniq >conftest.vals
20527
20528 # Break up conftest.vals because some shells have a limit on
20529 # the size of here documents, and old seds have small limits too.
20530
20531 rm -f conftest.tail
20532 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20533 while grep . conftest.vals >/dev/null
20534 do
20535   # Write chunks of a limited-size here document to conftest.frag.
20536   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20537   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20538   echo 'CEOF' >> $CONFIG_STATUS
20539   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20540   rm -f conftest.vals
20541   mv conftest.tail conftest.vals
20542 done
20543 rm -f conftest.vals
20544
20545 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20546 # marker @DEFS@.
20547 echo '  cat >> conftest.edit <<CEOF
20548 /@DEFS@/r conftest.frag
20549 /@DEFS@/d
20550 CEOF
20551 sed -f conftest.edit $tmp/in > $tmp/out
20552 rm -f $tmp/in
20553 mv $tmp/out $tmp/in
20554 rm -f conftest.edit conftest.frag
20555 ' >> $CONFIG_STATUS
20556
20557 cat >>$CONFIG_STATUS <<\EOF
20558   # Let's still pretend it is `configure' which instantiates (i.e., don't
20559   # use $as_me), people would be surprised to read:
20560   #    /* config.h.  Generated automatically by config.status.  */
20561   if test x"$ac_file" = x-; then
20562     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20563   else
20564     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20565   fi
20566   cat $tmp/in >>$tmp/config.h
20567   rm -f $tmp/in
20568   if test x"$ac_file" != x-; then
20569     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20570       { echo "$as_me:20570: $ac_file is unchanged" >&5
20571 echo "$as_me: $ac_file is unchanged" >&6;}
20572     else
20573       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20574          X"$ac_file" : 'X\(//\)[^/]' \| \
20575          X"$ac_file" : 'X\(//\)$' \| \
20576          X"$ac_file" : 'X\(/\)' \| \
20577          .     : '\(.\)' 2>/dev/null ||
20578 echo X"$ac_file" |
20579     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20580           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20581           /^X\(\/\/\)$/{ s//\1/; q; }
20582           /^X\(\/\).*/{ s//\1/; q; }
20583           s/.*/./; q'`
20584       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20585         { case "$ac_dir" in
20586   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20587   *)                      as_incr_dir=.;;
20588 esac
20589 as_dummy="$ac_dir"
20590 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20591   case $as_mkdir_dir in
20592     # Skip DOS drivespec
20593     ?:) as_incr_dir=$as_mkdir_dir ;;
20594     *)
20595       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20596       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20597     ;;
20598   esac
20599 done; }
20600
20601       fi
20602       rm -f $ac_file
20603       mv $tmp/config.h $ac_file
20604     fi
20605   else
20606     cat $tmp/config.h
20607     rm -f $tmp/config.h
20608   fi
20609 done
20610 EOF
20611 cat >>$CONFIG_STATUS <<\EOF
20612 #
20613 # CONFIG_COMMANDS section.
20614 #
20615 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20616   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20617   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20618
20619   case $ac_dest in
20620     default )
20621 if test "x$cf_with_tests" != xno ; then
20622
20623 for cf_dir in test
20624 do
20625         if test ! -d $srcdir/$cf_dir; then
20626                 continue
20627         elif test -f $srcdir/$cf_dir/programs; then
20628                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20629         fi
20630 done
20631
20632 fi
20633
20634         case $cf_cv_system_name in #(vi
20635         OS/2*|os2*) #(vi
20636         LIB_PREFIX=''
20637         ;;
20638         *)      LIB_PREFIX='lib'
20639         ;;
20640         esac
20641 cf_prefix=$LIB_PREFIX
20642
20643 if test $cf_cv_shlib_version = cygdll ; then
20644         TINFO_NAME=$TINFO_ARG_SUFFIX
20645         TINFO_SUFFIX=.dll
20646 fi
20647
20648 if test -n "$TINFO_SUFFIX" ; then
20649         case $TINFO_SUFFIX in
20650         tw*)
20651                 TINFO_NAME="${TINFO_NAME}tw"
20652                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20653                 ;;
20654         t*)
20655                 TINFO_NAME="${TINFO_NAME}t"
20656                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20657                 ;;
20658         w*)
20659                 TINFO_NAME="${TINFO_NAME}w"
20660                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20661                 ;;
20662         esac
20663 fi
20664
20665 for cf_dir in $SRC_SUBDIRS
20666 do
20667         if test ! -d $srcdir/$cf_dir ; then
20668                 continue
20669         elif test -f $srcdir/$cf_dir/modules; then
20670
20671                 SHARED_LIB=
20672                 LIBS_TO_MAKE=
20673                 for cf_item in $cf_LIST_MODELS
20674                 do
20675
20676         case $cf_item in #(vi
20677         libtool) #(vi
20678                 cf_suffix='.la'
20679                 cf_depsuf=$cf_suffix
20680                 ;;
20681         normal) #(vi
20682                 cf_suffix='.a'
20683                 cf_depsuf=$cf_suffix
20684                 ;;
20685         debug) #(vi
20686                 cf_suffix='_g.a'
20687                 cf_depsuf=$cf_suffix
20688                 ;;
20689         profile) #(vi
20690                 cf_suffix='_p.a'
20691                 cf_depsuf=$cf_suffix
20692                 ;;
20693         shared) #(vi
20694                 case $cf_cv_system_name in
20695                 aix[5-7]*) #(vi
20696                         cf_suffix='.a'
20697                         cf_depsuf=$cf_suffix
20698                         ;;
20699                 cygwin*) #(vi
20700                         cf_suffix='.dll'
20701                         cf_depsuf='.dll.a'
20702                         ;;
20703                 darwin*) #(vi
20704                         cf_suffix='.dylib'
20705                         cf_depsuf=$cf_suffix
20706                         ;;
20707                 hpux*) #(vi
20708                         case $target in
20709                         ia64*) #(vi
20710                                 cf_suffix='.so'
20711                                 cf_depsuf=$cf_suffix
20712                                 ;;
20713                         *) #(vi
20714                                 cf_suffix='.sl'
20715                                 cf_depsuf=$cf_suffix
20716                                 ;;
20717                         esac
20718                         ;;
20719                 *)      cf_suffix='.so'
20720                         cf_depsuf=$cf_suffix
20721                         ;;
20722                 esac
20723         esac
20724         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20725         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20726
20727                         if test $cf_item = shared ; then
20728                         if test "$cf_cv_do_symlinks" = yes ; then
20729                                 case "$cf_cv_shlib_version" in #(vi
20730                                 rel) #(vi
20731                                         case "$cf_cv_system_name" in #(vi
20732                                         darwin*)
20733                                         case .${LIB_SUFFIX} in
20734                                         .tw*)
20735                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20736                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20737                                                 ;;
20738                                         .t*)
20739                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20740                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20741                                                 ;;
20742                                         .w*)
20743                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20744                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20745                                                 ;;
20746                                         *)
20747                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20748                                                 ;;
20749                                         esac
20750                                         ;; #(vi
20751                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20752                                         esac
20753                                         ;;
20754                                 abi)
20755                                         case "$cf_cv_system_name" in #(vi
20756                                         darwin*)
20757                                         case .${LIB_SUFFIX} in
20758                                         .tw*)
20759                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20760                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20761                                                 ;;
20762                                         .t*)
20763                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20764                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20765                                                 ;;
20766                                         .w*)
20767                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20768                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20769                                                 ;;
20770                                         *)
20771                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20772                                                 ;;
20773                                         esac
20774                                         ;; #(vi
20775                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20776                                         esac
20777                                         ;;
20778                                 esac
20779                         fi
20780                         # cygwin needs import library, and has unique naming convention
20781                         # use autodetected ${cf_prefix} for import lib and static lib, but
20782                         # use 'cyg' prefix for shared lib.
20783                         if test $cf_cv_shlib_version = cygdll ; then
20784                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20785                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20786                                 continue
20787                         fi
20788                         fi
20789                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20790                 done
20791
20792                 if test $cf_dir = ncurses ; then
20793                         cf_subsets="$LIB_SUBSETS"
20794                         cf_r_parts="$cf_subsets"
20795                         cf_liblist="$LIBS_TO_MAKE"
20796
20797                         while test -n "$cf_r_parts"
20798                         do
20799                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20800                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20801                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20802                                         cf_item=
20803                                         case $cf_l_parts in #(vi
20804                                         *termlib*) #(vi
20805                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20806                                                 ;;
20807                                         *ticlib*)
20808                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20809                                                 ;;
20810                                         *)
20811                                                 break
20812                                                 ;;
20813                                         esac
20814                                         if test -n "$cf_item"; then
20815                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20816                                         fi
20817                                 else
20818                                         break
20819                                 fi
20820                         done
20821                 else
20822                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20823                 fi
20824
20825                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20826                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20827                         $cf_dir/Makefile >$cf_dir/Makefile.out
20828                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20829
20830                 $AWK -f $srcdir/mk-0th.awk \
20831                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20832                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20833
20834                 for cf_subset in $cf_subsets
20835                 do
20836                         cf_subdirs=
20837                         for cf_item in $cf_LIST_MODELS
20838                         do
20839                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20840
20841 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20842
20843         case $cf_item in #(vi
20844         libtool) #(vi
20845                 cf_suffix='.la'
20846                 cf_depsuf=$cf_suffix
20847                 ;;
20848         normal) #(vi
20849                 cf_suffix='.a'
20850                 cf_depsuf=$cf_suffix
20851                 ;;
20852         debug) #(vi
20853                 cf_suffix='_g.a'
20854                 cf_depsuf=$cf_suffix
20855                 ;;
20856         profile) #(vi
20857                 cf_suffix='_p.a'
20858                 cf_depsuf=$cf_suffix
20859                 ;;
20860         shared) #(vi
20861                 case $cf_cv_system_name in
20862                 aix[5-7]*) #(vi
20863                         cf_suffix='.a'
20864                         cf_depsuf=$cf_suffix
20865                         ;;
20866                 cygwin*) #(vi
20867                         cf_suffix='.dll'
20868                         cf_depsuf='.dll.a'
20869                         ;;
20870                 darwin*) #(vi
20871                         cf_suffix='.dylib'
20872                         cf_depsuf=$cf_suffix
20873                         ;;
20874                 hpux*) #(vi
20875                         case $target in
20876                         ia64*) #(vi
20877                                 cf_suffix='.so'
20878                                 cf_depsuf=$cf_suffix
20879                                 ;;
20880                         *) #(vi
20881                                 cf_suffix='.sl'
20882                                 cf_depsuf=$cf_suffix
20883                                 ;;
20884                         esac
20885                         ;;
20886                 *)      cf_suffix='.so'
20887                         cf_depsuf=$cf_suffix
20888                         ;;
20889                 esac
20890         esac
20891         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20892         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20893
20894         case $cf_item in
20895         libtool) cf_subdir='obj_lo'  ;;
20896         normal)  cf_subdir='objects' ;;
20897         debug)   cf_subdir='obj_g' ;;
20898         profile) cf_subdir='obj_p' ;;
20899         shared)
20900                 case $cf_cv_system_name in #(vi
20901                 cygwin) #(vi
20902                         cf_subdir='objects' ;;
20903                 *)
20904                         cf_subdir='obj_s' ;;
20905                 esac
20906         esac
20907
20908                         # Test for case where we build libtinfo with a different name.
20909                         cf_libname=$cf_dir
20910                         if test $cf_dir = ncurses ; then
20911                                 case $cf_subset in
20912                                 *base*)
20913                                         cf_libname=${cf_libname}$LIB_SUFFIX
20914                                         ;;
20915                                 *termlib*)
20916                                         cf_libname=$TINFO_LIB_SUFFIX
20917                                         ;;
20918                                 ticlib*)
20919                                         cf_libname=$TICS_LIB_SUFFIX
20920                                         ;;
20921                                 esac
20922                         else
20923                                 cf_libname=${cf_libname}$LIB_SUFFIX
20924                         fi
20925                         if test -n "${DFT_ARG_SUFFIX}" ; then
20926                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20927                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20928                         fi
20929
20930                         # These dependencies really are for development, not
20931                         # builds, but they are useful in porting, too.
20932                         cf_depend="../include/ncurses_cfg.h"
20933                         if test "$srcdir" = "."; then
20934                                 cf_reldir="."
20935                         else
20936                                 cf_reldir="\${srcdir}"
20937                         fi
20938
20939                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20940                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20941                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20942                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20943                         fi
20944
20945                         cf_dir_suffix=
20946                         old_cf_suffix="$cf_suffix"
20947                         if test "$cf_cv_shlib_version_infix" = yes ; then
20948                         if test -n "$LIB_SUFFIX" ; then
20949                                 case $LIB_SUFFIX in
20950                                 tw*)
20951                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20952                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20953                                         cf_dir_suffix=tw
20954                                         ;;
20955                                 t*)
20956                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20957                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20958                                         cf_dir_suffix=t
20959                                         ;;
20960                                 w*)
20961                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20962                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20963                                         cf_dir_suffix=w
20964                                         ;;
20965                                 esac
20966                         fi
20967                         fi
20968
20969                         $AWK -f $srcdir/mk-1st.awk \
20970                                 name=${cf_libname}${cf_dir_suffix} \
20971                                 traces=$LIB_TRACING \
20972                                 MODEL=$cf_ITEM \
20973                                 model=$cf_subdir \
20974                                 prefix=$cf_prefix \
20975                                 suffix=$cf_suffix \
20976                                 subset=$cf_subset \
20977                                 SymLink="$LN_S" \
20978                                 TermlibRoot=$TINFO_NAME \
20979                                 TermlibSuffix=$TINFO_SUFFIX \
20980                                 ShlibVer=$cf_cv_shlib_version \
20981                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20982                                 ReLink=${cf_cv_do_relink:-no} \
20983                                 DoLinks=$cf_cv_do_symlinks \
20984                                 rmSoLocs=$cf_cv_rm_so_locs \
20985                                 ldconfig="$LDCONFIG" \
20986                                 overwrite=$WITH_OVERWRITE \
20987                                 depend="$cf_depend" \
20988                                 host="$host" \
20989                                 libtool_version="$LIBTOOL_VERSION" \
20990                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20991
20992                         cf_suffix="$old_cf_suffix"
20993
20994                         for cf_subdir2 in $cf_subdirs lib
20995                         do
20996                                 test $cf_subdir = $cf_subdir2 && break
20997                         done
20998                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20999                         $AWK -f $srcdir/mk-2nd.awk \
21000                                 name=$cf_dir \
21001                                 traces=$LIB_TRACING \
21002                                 MODEL=$cf_ITEM \
21003                                 model=$cf_subdir \
21004                                 subset=$cf_subset \
21005                                 srcdir=$srcdir \
21006                                 echo=$WITH_ECHO \
21007                                 crenames=$cf_cv_prog_CC_c_o \
21008                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21009                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21010                         cf_subdirs="$cf_subdirs $cf_subdir"
21011                         done
21012                 done
21013         fi
21014
21015         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21016 done
21017
21018 for cf_dir in $SRC_SUBDIRS
21019 do
21020         if test ! -d $srcdir/$cf_dir ; then
21021                 continue
21022         fi
21023
21024         if test -f $cf_dir/Makefile ; then
21025                 case "$cf_dir" in
21026                 Ada95) #(vi
21027                         echo 'libs \' >> Makefile
21028                         echo 'install.libs \' >> Makefile
21029                         echo 'uninstall.libs ::' >> Makefile
21030                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21031                         ;;
21032                 esac
21033         fi
21034
21035         if test -f $srcdir/$cf_dir/modules; then
21036                 echo >> Makefile
21037                 if test -f $srcdir/$cf_dir/headers; then
21038 cat >> Makefile <<CF_EOF
21039 install.includes \\
21040 uninstall.includes \\
21041 CF_EOF
21042                 fi
21043 if test "$cf_dir" != "c++" ; then
21044 echo 'lint \' >> Makefile
21045 fi
21046 cat >> Makefile <<CF_EOF
21047 libs \\
21048 lintlib \\
21049 install.libs \\
21050 uninstall.libs \\
21051 install.$cf_dir \\
21052 uninstall.$cf_dir ::
21053         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21054 CF_EOF
21055         elif test -f $srcdir/$cf_dir/headers; then
21056 cat >> Makefile <<CF_EOF
21057
21058 libs \\
21059 install.libs \\
21060 uninstall.libs \\
21061 install.includes \\
21062 uninstall.includes ::
21063         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21064 CF_EOF
21065 fi
21066 done
21067
21068 cat >> Makefile <<CF_EOF
21069
21070 install.libs uninstall.libs \\
21071 install.data uninstall.data ::
21072 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21073 CF_EOF
21074
21075 if test "x$cf_with_manpages" = xyes; then
21076 cat >> Makefile <<CF_EOF
21077
21078 install.man \\
21079 uninstall.man ::
21080         cd man && \${MAKE} \${CF_MFLAGS} \$@
21081 CF_EOF
21082 fi
21083
21084 cat >> Makefile <<CF_EOF
21085
21086 distclean ::
21087         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21088         rm -f headers.sh headers.sed mk_shared_lib.sh
21089         rm -f edit_man.* man_alias.*
21090         rm -rf \${DIRS_TO_MAKE}
21091 CF_EOF
21092
21093 # Special case: tack's manpage lives in its own directory.
21094 if test "x$cf_with_manpages" = xyes; then
21095 if test -d tack ; then
21096 if test -f $srcdir/$tack.h; then
21097 cat >> Makefile <<CF_EOF
21098
21099 install.man \\
21100 uninstall.man ::
21101         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21102 CF_EOF
21103 fi
21104 fi
21105 fi
21106
21107 rm -f headers.sed headers.sh
21108
21109 echo creating headers.sh
21110 cat >headers.sh <<CF_EOF
21111 #! /bin/sh
21112 # This shell script is generated by the 'configure' script.  It is invoked in a
21113 # subdirectory of the build tree.  It generates a sed-script in the parent
21114 # directory that is used to adjust includes for header files that reside in a
21115 # subdirectory of /usr/include, etc.
21116 PRG=""
21117 while test \$# != 3
21118 do
21119 PRG="\$PRG \$1"; shift
21120 done
21121 DST=\$1
21122 REF=\$2
21123 SRC=\$3
21124 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21125 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21126 echo installing \$SRC in \$DST
21127 CF_EOF
21128
21129 if test $WITH_CURSES_H = yes; then
21130         cat >>headers.sh <<CF_EOF
21131 case \$DST in
21132 /*/include/*)
21133         END=\`basename \$DST\`
21134         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21135         do
21136                 NAME=\`basename \$i\`
21137                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21138         done
21139         ;;
21140 *)
21141         echo "" >> \$TMPSED
21142         ;;
21143 esac
21144 CF_EOF
21145
21146 else
21147         cat >>headers.sh <<CF_EOF
21148 case \$DST in
21149 /*/include/*)
21150         END=\`basename \$DST\`
21151         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21152         do
21153                 NAME=\`basename \$i\`
21154                 if test "\$NAME" = "curses.h"
21155                 then
21156                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21157                         NAME=ncurses.h
21158                 fi
21159                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21160         done
21161         ;;
21162 *)
21163         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21164         ;;
21165 esac
21166 CF_EOF
21167 fi
21168 cat >>headers.sh <<CF_EOF
21169 rm -f \$TMPSRC
21170 sed -f \$TMPSED \$SRC > \$TMPSRC
21171 NAME=\`basename \$SRC\`
21172 CF_EOF
21173 if test $WITH_CURSES_H != yes; then
21174         cat >>headers.sh <<CF_EOF
21175 test "\$NAME" = "curses.h" && NAME=ncurses.h
21176 CF_EOF
21177 fi
21178 cat >>headers.sh <<CF_EOF
21179 # Just in case someone gzip'd manpages, remove the conflicting copy.
21180 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21181
21182 eval \$PRG \$TMPSRC \$DST/\$NAME
21183 rm -f \$TMPSRC \$TMPSED
21184 CF_EOF
21185
21186 chmod 0755 headers.sh
21187
21188 for cf_dir in $SRC_SUBDIRS
21189 do
21190         if test ! -d $srcdir/$cf_dir ; then
21191                 continue
21192         fi
21193
21194         if test -f $srcdir/$cf_dir/headers; then
21195                 $AWK -f $srcdir/mk-hdr.awk \
21196                         subset="$LIB_SUBSETS" \
21197                         compat="$WITH_CURSES_H" \
21198                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21199         fi
21200
21201         if test -f $srcdir/$cf_dir/modules; then
21202                 if test "$cf_dir" != "c++" ; then
21203                         cat >>$cf_dir/Makefile <<"CF_EOF"
21204 depend : ${AUTO_SRC}
21205         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21206
21207 # DO NOT DELETE THIS LINE -- make depend depends on it.
21208 CF_EOF
21209                 fi
21210         fi
21211 done
21212
21213 if test "x$cf_with_ada" != xno ; then
21214 if test -z "$USE_OLD_MAKERULES" ; then
21215         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21216 fi
21217 fi
21218  ;;
21219   esac
21220 done
21221 EOF
21222
21223 cat >>$CONFIG_STATUS <<\EOF
21224
21225 { (exit 0); exit 0; }
21226 EOF
21227 chmod +x $CONFIG_STATUS
21228 ac_clean_files=$ac_clean_files_save
21229
21230 # configure is writing to config.log, and then calls config.status.
21231 # config.status does its own redirection, appending to config.log.
21232 # Unfortunately, on DOS this fails, as config.log is still kept open
21233 # by configure, so config.status won't be able to write to it; its
21234 # output is simply discarded.  So we exec the FD to /dev/null,
21235 # effectively closing config.log, so it can be properly (re)opened and
21236 # appended to by config.status.  When coming back to configure, we
21237 # need to make the FD available again.
21238 if test "$no_create" != yes; then
21239   ac_cs_success=:
21240   exec 5>/dev/null
21241   $SHELL $CONFIG_STATUS || ac_cs_success=false
21242   exec 5>>config.log
21243   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21244   # would make configure fail if this is the last instruction.
21245   $ac_cs_success || { (exit 1); exit 1; }
21246 fi
21247 ${MAKE:-make} preinstall