]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100501
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.489 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
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-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809   --disable-rpath-hack    don't add rpath options for additional libraries
810
811 Some influential environment variables:
812   CC          C compiler command
813   CFLAGS      C compiler flags
814   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
815               nonstandard directory <lib dir>
816   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
817               headers in a nonstandard directory <include dir>
818   CPP         C preprocessor
819   CXX         C++ compiler command
820   CXXFLAGS    C++ compiler flags
821   CXXCPP      C++ preprocessor
822
823 Use these variables to override the choices made by `configure' or to help
824 it to find libraries and programs with nonstandard names/locations.
825
826 EOF
827 fi
828
829 if test "$ac_init_help" = "recursive"; then
830   # If there are subdirs, report their specific --help.
831   ac_popdir=`pwd`
832   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
833     cd $ac_subdir
834     # A "../" for each directory in /$ac_subdir.
835     ac_dots=`echo $ac_subdir |
836              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
837
838     case $srcdir in
839     .) # No --srcdir option.  We are building in place.
840       ac_sub_srcdir=$srcdir ;;
841     [\\/]* | ?:[\\/]* ) # Absolute path.
842       ac_sub_srcdir=$srcdir/$ac_subdir ;;
843     *) # Relative path.
844       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
845     esac
846
847     # Check for guested configure; otherwise get Cygnus style configure.
848     if test -f $ac_sub_srcdir/configure.gnu; then
849       echo
850       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
851     elif test -f $ac_sub_srcdir/configure; then
852       echo
853       $SHELL $ac_sub_srcdir/configure  --help=recursive
854     elif test -f $ac_sub_srcdir/configure.ac ||
855            test -f $ac_sub_srcdir/configure.in; then
856       echo
857       $ac_configure --help
858     else
859       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
860     fi
861     cd $ac_popdir
862   done
863 fi
864
865 test -n "$ac_init_help" && exit 0
866 if $ac_init_version; then
867   cat <<\EOF
868
869 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
870 Free Software Foundation, Inc.
871 This configure script is free software; the Free Software Foundation
872 gives unlimited permission to copy, distribute and modify it.
873 EOF
874   exit 0
875 fi
876 exec 5>config.log
877 cat >&5 <<EOF
878 This file contains any messages produced by compilers while
879 running configure, to aid debugging if configure makes a mistake.
880
881 It was created by $as_me, which was
882 generated by GNU Autoconf 2.52.20100320.  Invocation command line was
883
884   $ $0 $@
885
886 EOF
887 {
888 cat <<_ASUNAME
889 ## ---------- ##
890 ## Platform.  ##
891 ## ---------- ##
892
893 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
894 uname -m = `(uname -m) 2>/dev/null || echo unknown`
895 uname -r = `(uname -r) 2>/dev/null || echo unknown`
896 uname -s = `(uname -s) 2>/dev/null || echo unknown`
897 uname -v = `(uname -v) 2>/dev/null || echo unknown`
898
899 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
900 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
901
902 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
903 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
904 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
905 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
906 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
907 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
908 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
909
910 PATH = $PATH
911
912 _ASUNAME
913 } >&5
914
915 cat >&5 <<EOF
916 ## ------------ ##
917 ## Core tests.  ##
918 ## ------------ ##
919
920 EOF
921
922 # Keep a trace of the command line.
923 # Strip out --no-create and --no-recursion so they do not pile up.
924 # Also quote any args containing shell meta-characters.
925 ac_configure_args=
926 ac_sep=
927 for ac_arg
928 do
929   case $ac_arg in
930   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
931   | --no-cr | --no-c) ;;
932   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
933   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
934   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
935     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
936     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
937     ac_sep=" " ;;
938   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
939      ac_sep=" " ;;
940   esac
941   # Get rid of the leading space.
942 done
943
944 # When interrupted or exit'd, cleanup temporary files, and complete
945 # config.log.  We remove comments because anyway the quotes in there
946 # would cause problems or look ugly.
947 trap 'exit_status=$?
948   # Save into config.log some information that might help in debugging.
949   echo >&5
950   echo "## ----------------- ##" >&5
951   echo "## Cache variables.  ##" >&5
952   echo "## ----------------- ##" >&5
953   echo >&5
954   # The following way of writing the cache mishandles newlines in values,
955 {
956   (set) 2>&1 |
957     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
958     *ac_space=\ *)
959       sed -n \
960         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
961           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
962       ;;
963     *)
964       sed -n \
965         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
966       ;;
967     esac;
968 } >&5
969   sed "/^$/d" confdefs.h >conftest.log
970   if test -s conftest.log; then
971     echo >&5
972     echo "## ------------ ##" >&5
973     echo "## confdefs.h.  ##" >&5
974     echo "## ------------ ##" >&5
975     echo >&5
976     cat conftest.log >&5
977   fi
978   (echo; echo) >&5
979   test "$ac_signal" != 0 &&
980     echo "$as_me: caught signal $ac_signal" >&5
981   echo "$as_me: exit $exit_status" >&5
982   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
983     exit $exit_status
984      ' 0
985 for ac_signal in 1 2 13 15; do
986   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
987 done
988 ac_signal=0
989
990 # confdefs.h avoids OS command line length limits that DEFS can exceed.
991 rm -rf conftest* confdefs.h
992 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
993 echo >confdefs.h
994
995 # Let the site file select an alternate cache file if it wants to.
996 # Prefer explicitly selected file to automatically selected ones.
997 if test -z "$CONFIG_SITE"; then
998   if test "x$prefix" != xNONE; then
999     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1000   else
1001     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1002   fi
1003 fi
1004 for ac_site_file in $CONFIG_SITE; do
1005   if test -r "$ac_site_file"; then
1006     { echo "$as_me:1006: loading site script $ac_site_file" >&5
1007 echo "$as_me: loading site script $ac_site_file" >&6;}
1008     cat "$ac_site_file" >&5
1009     . "$ac_site_file"
1010   fi
1011 done
1012
1013 if test -r "$cache_file"; then
1014   # Some versions of bash will fail to source /dev/null (special
1015   # files actually), so we avoid doing that.
1016   if test -f "$cache_file"; then
1017     { echo "$as_me:1017: loading cache $cache_file" >&5
1018 echo "$as_me: loading cache $cache_file" >&6;}
1019     case $cache_file in
1020       [\\/]* | ?:[\\/]* ) . $cache_file;;
1021       *)                      . ./$cache_file;;
1022     esac
1023   fi
1024 else
1025   { echo "$as_me:1025: creating cache $cache_file" >&5
1026 echo "$as_me: creating cache $cache_file" >&6;}
1027   >$cache_file
1028 fi
1029
1030 # Check that the precious variables saved in the cache have kept the same
1031 # value.
1032 ac_cache_corrupted=false
1033 for ac_var in `(set) 2>&1 |
1034                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1035   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1036   eval ac_new_set=\$ac_env_${ac_var}_set
1037   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1038   eval ac_new_val="\$ac_env_${ac_var}_value"
1039   case $ac_old_set,$ac_new_set in
1040     set,)
1041       { echo "$as_me:1041: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1042 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1043       ac_cache_corrupted=: ;;
1044     ,set)
1045       { echo "$as_me:1045: error: \`$ac_var' was not set in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,);;
1049     *)
1050       if test "x$ac_old_val" != "x$ac_new_val"; then
1051         { echo "$as_me:1051: error: \`$ac_var' has changed since the previous run:" >&5
1052 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1053         { echo "$as_me:1053:   former value:  $ac_old_val" >&5
1054 echo "$as_me:   former value:  $ac_old_val" >&2;}
1055         { echo "$as_me:1055:   current value: $ac_new_val" >&5
1056 echo "$as_me:   current value: $ac_new_val" >&2;}
1057         ac_cache_corrupted=:
1058       fi;;
1059   esac
1060   # Pass precious variables to config.status.  It doesn't matter if
1061   # we pass some twice (in addition to the command line arguments).
1062   if test "$ac_new_set" = set; then
1063     case $ac_new_val in
1064     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1065       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1066       ac_configure_args="$ac_configure_args '$ac_arg'"
1067       ;;
1068     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1069        ;;
1070     esac
1071   fi
1072 done
1073 if $ac_cache_corrupted; then
1074   { echo "$as_me:1074: error: changes in the environment can compromise the build" >&5
1075 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1076   { { echo "$as_me:1076: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1077 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1078    { (exit 1); exit 1; }; }
1079 fi
1080
1081 ac_ext=c
1082 ac_cpp='$CPP $CPPFLAGS'
1083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1086 ac_main_return=return
1087
1088 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1089   *c*,-n*) ECHO_N= ECHO_C='
1090 ' ECHO_T='      ' ;;
1091   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1092   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1093 esac
1094 echo "#! $SHELL" >conftest.sh
1095 echo  "exit 0"   >>conftest.sh
1096 chmod +x conftest.sh
1097 if { (echo "$as_me:1097: PATH=\".;.\"; conftest.sh") >&5
1098   (PATH=".;."; conftest.sh) 2>&5
1099   ac_status=$?
1100   echo "$as_me:1100: \$? = $ac_status" >&5
1101   (exit $ac_status); }; then
1102   ac_path_separator=';'
1103 else
1104   ac_path_separator=:
1105 fi
1106 PATH_SEPARATOR="$ac_path_separator"
1107 rm -f conftest.sh
1108
1109 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1110
1111 top_builddir=`pwd`
1112
1113 echo "$as_me:1113: checking for egrep" >&5
1114 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1115 if test "${ac_cv_prog_egrep+set}" = set; then
1116   echo $ECHO_N "(cached) $ECHO_C" >&6
1117 else
1118   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1119     then ac_cv_prog_egrep='grep -E'
1120     else ac_cv_prog_egrep='egrep'
1121     fi
1122 fi
1123 echo "$as_me:1123: result: $ac_cv_prog_egrep" >&5
1124 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1125  EGREP=$ac_cv_prog_egrep
1126
1127 test -z "$EGREP" && { { echo "$as_me:1127: error: No egrep program found" >&5
1128 echo "$as_me: error: No egrep program found" >&2;}
1129    { (exit 1); exit 1; }; }
1130
1131 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1134 cf_cv_abi_version=${NCURSES_MAJOR}
1135 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1136 cf_cv_timestamp=`date`
1137 echo "$as_me:1137: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1138 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1139
1140 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1141
1142 # Check whether --with-rel-version or --without-rel-version was given.
1143 if test "${with_rel_version+set}" = set; then
1144   withval="$with_rel_version"
1145   { echo "$as_me:1145: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1146 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1147  cf_cv_rel_version=$withval
1148 fi;
1149
1150  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1151  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1152
1153 if test -n "$NCURSES_MAJOR" ; then
1154   case $NCURSES_MAJOR in #(vi
1155   [0-9]*) #(vi
1156         ;;
1157   *)
1158         { { echo "$as_me:1158: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1159 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1160    { (exit 1); exit 1; }; }
1161         ;;
1162   esac
1163 else
1164   { { echo "$as_me:1164: error: Release major-version value is empty" >&5
1165 echo "$as_me: error: Release major-version value is empty" >&2;}
1166    { (exit 1); exit 1; }; }
1167 fi
1168
1169 if test -n "$NCURSES_MINOR" ; then
1170   case $NCURSES_MINOR in #(vi
1171   [0-9]*) #(vi
1172         ;;
1173   *)
1174         { { echo "$as_me:1174: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1175 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1176    { (exit 1); exit 1; }; }
1177         ;;
1178   esac
1179 else
1180   { { echo "$as_me:1180: error: Release minor-version value is empty" >&5
1181 echo "$as_me: error: Release minor-version value is empty" >&2;}
1182    { (exit 1); exit 1; }; }
1183 fi
1184
1185 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1186
1187 # Check whether --with-abi-version or --without-abi-version was given.
1188 if test "${with_abi_version+set}" = set; then
1189   withval="$with_abi_version"
1190   { echo "$as_me:1190: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1191 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1192  cf_cv_abi_version=$withval
1193 fi;
1194
1195 if test -n "$cf_cv_abi_version" ; then
1196   case $cf_cv_abi_version in #(vi
1197   [0-9]*) #(vi
1198         ;;
1199   *)
1200         { { echo "$as_me:1200: error: ABI version is not a number: $cf_cv_abi_version" >&5
1201 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1202    { (exit 1); exit 1; }; }
1203         ;;
1204   esac
1205 else
1206   { { echo "$as_me:1206: error: ABI version value is empty" >&5
1207 echo "$as_me: error: ABI version value is empty" >&2;}
1208    { (exit 1); exit 1; }; }
1209 fi
1210
1211 ac_aux_dir=
1212 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1213   if test -f $ac_dir/install-sh; then
1214     ac_aux_dir=$ac_dir
1215     ac_install_sh="$ac_aux_dir/install-sh -c"
1216     break
1217   elif 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/shtool; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/shtool install -c"
1224     break
1225   fi
1226 done
1227 if test -z "$ac_aux_dir"; then
1228   { { echo "$as_me:1228: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1229 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1233 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1234 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1235
1236 # Make sure we can run config.sub.
1237 $ac_config_sub sun4 >/dev/null 2>&1 ||
1238   { { echo "$as_me:1238: error: cannot run $ac_config_sub" >&5
1239 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1240    { (exit 1); exit 1; }; }
1241
1242 echo "$as_me:1242: checking build system type" >&5
1243 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1244 if test "${ac_cv_build+set}" = set; then
1245   echo $ECHO_N "(cached) $ECHO_C" >&6
1246 else
1247   ac_cv_build_alias=$build_alias
1248 test -z "$ac_cv_build_alias" &&
1249   ac_cv_build_alias=`$ac_config_guess`
1250 test -z "$ac_cv_build_alias" &&
1251   { { echo "$as_me:1251: error: cannot guess build type; you must specify one" >&5
1252 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1253    { (exit 1); exit 1; }; }
1254 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1255   { { echo "$as_me:1255: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1256 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1257    { (exit 1); exit 1; }; }
1258
1259 fi
1260 echo "$as_me:1260: result: $ac_cv_build" >&5
1261 echo "${ECHO_T}$ac_cv_build" >&6
1262 build=$ac_cv_build
1263 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1264 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1265 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1266
1267 echo "$as_me:1267: checking host system type" >&5
1268 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1269 if test "${ac_cv_host+set}" = set; then
1270   echo $ECHO_N "(cached) $ECHO_C" >&6
1271 else
1272   ac_cv_host_alias=$host_alias
1273 test -z "$ac_cv_host_alias" &&
1274   ac_cv_host_alias=$ac_cv_build_alias
1275 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1276   { { echo "$as_me:1276: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1277 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1278    { (exit 1); exit 1; }; }
1279
1280 fi
1281 echo "$as_me:1281: result: $ac_cv_host" >&5
1282 echo "${ECHO_T}$ac_cv_host" >&6
1283 host=$ac_cv_host
1284 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1285 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1286 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1287
1288 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1289         echo "$as_me:1289: checking target system type" >&5
1290 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1291 if test "${ac_cv_target+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_target_alias=$target_alias
1295 test "x$ac_cv_target_alias" = "x" &&
1296   ac_cv_target_alias=$ac_cv_host_alias
1297 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_target" >&5
1304 echo "${ECHO_T}$ac_cv_target" >&6
1305 target=$ac_cv_target
1306 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 # The aliases save the names the user supplied, while $host etc.
1311 # will get canonicalized.
1312 test -n "$target_alias" &&
1313   test "$program_prefix$program_suffix$program_transform_name" = \
1314     NONENONEs,x,x, &&
1315   program_prefix=${target_alias}-
1316         system_name="$host_os"
1317 else
1318         system_name="`(uname -s -r) 2>/dev/null`"
1319         if test -z "$system_name" ; then
1320                 system_name="`(hostname) 2>/dev/null`"
1321         fi
1322 fi
1323 test -n "$system_name" && cat >>confdefs.h <<EOF
1324 #define SYSTEM_NAME "$system_name"
1325 EOF
1326
1327 if test "${cf_cv_system_name+set}" = set; then
1328   echo $ECHO_N "(cached) $ECHO_C" >&6
1329 else
1330   cf_cv_system_name="$system_name"
1331 fi
1332
1333 test -z "$system_name" && system_name="$cf_cv_system_name"
1334 test -n "$cf_cv_system_name" && echo "$as_me:1334: result: Configuring for $cf_cv_system_name" >&5
1335 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1336
1337 if test ".$system_name" != ".$cf_cv_system_name" ; then
1338         echo "$as_me:1338: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1339 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1340         { { echo "$as_me:1340: error: \"Please remove config.cache and try again.\"" >&5
1341 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 # Check whether --with-system-type or --without-system-type was given.
1346 if test "${with_system_type+set}" = set; then
1347   withval="$with_system_type"
1348   { echo "$as_me:1348: WARNING: overriding system type to $withval" >&5
1349 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1350  cf_cv_system_name=$withval
1351 fi;
1352
1353 ###     Save the given $CFLAGS to allow user-override.
1354 cf_user_CFLAGS="$CFLAGS"
1355
1356 ###     Default install-location
1357
1358 echo "$as_me:1358: checking for prefix" >&5
1359 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1360 if test "x$prefix" = "xNONE" ; then
1361         case "$cf_cv_system_name" in
1362                 # non-vendor systems don't have a conflict
1363         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1364                 prefix=/usr
1365                 ;;
1366         *)      prefix=$ac_default_prefix
1367                 ;;
1368         esac
1369 fi
1370 echo "$as_me:1370: result: $prefix" >&5
1371 echo "${ECHO_T}$prefix" >&6
1372
1373 if test "x$prefix" = "xNONE" ; then
1374 echo "$as_me:1374: checking for default include-directory" >&5
1375 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1376 test -n "$verbose" && echo 1>&6
1377 for cf_symbol in \
1378         $includedir \
1379         $includedir/ncurses \
1380         $prefix/include \
1381         $prefix/include/ncurses \
1382         /usr/local/include \
1383         /usr/local/include/ncurses \
1384         /usr/include \
1385         /usr/include/ncurses
1386 do
1387         cf_dir=`eval echo $cf_symbol`
1388         if test -f $cf_dir/curses.h ; then
1389         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1390                 includedir="$cf_symbol"
1391                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1392                 break
1393         fi
1394         fi
1395         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1396 done
1397 echo "$as_me:1397: result: $includedir" >&5
1398 echo "${ECHO_T}$includedir" >&6
1399 fi
1400
1401 ###     Checks for programs.
1402 ac_ext=c
1403 ac_cpp='$CPP $CPPFLAGS'
1404 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1405 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1406 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1407 ac_main_return=return
1408 if test -n "$ac_tool_prefix"; then
1409   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1410 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1411 echo "$as_me:1411: checking for $ac_word" >&5
1412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1413 if test "${ac_cv_prog_CC+set}" = set; then
1414   echo $ECHO_N "(cached) $ECHO_C" >&6
1415 else
1416   if test -n "$CC"; then
1417   ac_cv_prog_CC="$CC" # Let the user override the test.
1418 else
1419   ac_save_IFS=$IFS; IFS=$ac_path_separator
1420 ac_dummy="$PATH"
1421 for ac_dir in $ac_dummy; do
1422   IFS=$ac_save_IFS
1423   test -z "$ac_dir" && ac_dir=.
1424   $as_executable_p "$ac_dir/$ac_word" || continue
1425 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1426 echo "$as_me:1426: found $ac_dir/$ac_word" >&5
1427 break
1428 done
1429
1430 fi
1431 fi
1432 CC=$ac_cv_prog_CC
1433 if test -n "$CC"; then
1434   echo "$as_me:1434: result: $CC" >&5
1435 echo "${ECHO_T}$CC" >&6
1436 else
1437   echo "$as_me:1437: result: no" >&5
1438 echo "${ECHO_T}no" >&6
1439 fi
1440
1441 fi
1442 if test -z "$ac_cv_prog_CC"; then
1443   ac_ct_CC=$CC
1444   # Extract the first word of "gcc", so it can be a program name with args.
1445 set dummy gcc; ac_word=$2
1446 echo "$as_me:1446: checking for $ac_word" >&5
1447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1448 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1449   echo $ECHO_N "(cached) $ECHO_C" >&6
1450 else
1451   if test -n "$ac_ct_CC"; then
1452   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1453 else
1454   ac_save_IFS=$IFS; IFS=$ac_path_separator
1455 ac_dummy="$PATH"
1456 for ac_dir in $ac_dummy; do
1457   IFS=$ac_save_IFS
1458   test -z "$ac_dir" && ac_dir=.
1459   $as_executable_p "$ac_dir/$ac_word" || continue
1460 ac_cv_prog_ac_ct_CC="gcc"
1461 echo "$as_me:1461: found $ac_dir/$ac_word" >&5
1462 break
1463 done
1464
1465 fi
1466 fi
1467 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1468 if test -n "$ac_ct_CC"; then
1469   echo "$as_me:1469: result: $ac_ct_CC" >&5
1470 echo "${ECHO_T}$ac_ct_CC" >&6
1471 else
1472   echo "$as_me:1472: result: no" >&5
1473 echo "${ECHO_T}no" >&6
1474 fi
1475
1476   CC=$ac_ct_CC
1477 else
1478   CC="$ac_cv_prog_CC"
1479 fi
1480
1481 if test -z "$CC"; then
1482   if test -n "$ac_tool_prefix"; then
1483   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1484 set dummy ${ac_tool_prefix}cc; ac_word=$2
1485 echo "$as_me:1485: checking for $ac_word" >&5
1486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1487 if test "${ac_cv_prog_CC+set}" = set; then
1488   echo $ECHO_N "(cached) $ECHO_C" >&6
1489 else
1490   if test -n "$CC"; then
1491   ac_cv_prog_CC="$CC" # Let the user override the test.
1492 else
1493   ac_save_IFS=$IFS; IFS=$ac_path_separator
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496   IFS=$ac_save_IFS
1497   test -z "$ac_dir" && ac_dir=.
1498   $as_executable_p "$ac_dir/$ac_word" || continue
1499 ac_cv_prog_CC="${ac_tool_prefix}cc"
1500 echo "$as_me:1500: found $ac_dir/$ac_word" >&5
1501 break
1502 done
1503
1504 fi
1505 fi
1506 CC=$ac_cv_prog_CC
1507 if test -n "$CC"; then
1508   echo "$as_me:1508: result: $CC" >&5
1509 echo "${ECHO_T}$CC" >&6
1510 else
1511   echo "$as_me:1511: result: no" >&5
1512 echo "${ECHO_T}no" >&6
1513 fi
1514
1515 fi
1516 if test -z "$ac_cv_prog_CC"; then
1517   ac_ct_CC=$CC
1518   # Extract the first word of "cc", so it can be a program name with args.
1519 set dummy cc; ac_word=$2
1520 echo "$as_me:1520: checking for $ac_word" >&5
1521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1522 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1523   echo $ECHO_N "(cached) $ECHO_C" >&6
1524 else
1525   if test -n "$ac_ct_CC"; then
1526   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1527 else
1528   ac_save_IFS=$IFS; IFS=$ac_path_separator
1529 ac_dummy="$PATH"
1530 for ac_dir in $ac_dummy; do
1531   IFS=$ac_save_IFS
1532   test -z "$ac_dir" && ac_dir=.
1533   $as_executable_p "$ac_dir/$ac_word" || continue
1534 ac_cv_prog_ac_ct_CC="cc"
1535 echo "$as_me:1535: found $ac_dir/$ac_word" >&5
1536 break
1537 done
1538
1539 fi
1540 fi
1541 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1542 if test -n "$ac_ct_CC"; then
1543   echo "$as_me:1543: result: $ac_ct_CC" >&5
1544 echo "${ECHO_T}$ac_ct_CC" >&6
1545 else
1546   echo "$as_me:1546: result: no" >&5
1547 echo "${ECHO_T}no" >&6
1548 fi
1549
1550   CC=$ac_ct_CC
1551 else
1552   CC="$ac_cv_prog_CC"
1553 fi
1554
1555 fi
1556 if test -z "$CC"; then
1557   # Extract the first word of "cc", so it can be a program name with args.
1558 set dummy cc; ac_word=$2
1559 echo "$as_me:1559: checking for $ac_word" >&5
1560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1561 if test "${ac_cv_prog_CC+set}" = set; then
1562   echo $ECHO_N "(cached) $ECHO_C" >&6
1563 else
1564   if test -n "$CC"; then
1565   ac_cv_prog_CC="$CC" # Let the user override the test.
1566 else
1567   ac_prog_rejected=no
1568   ac_save_IFS=$IFS; IFS=$ac_path_separator
1569 ac_dummy="$PATH"
1570 for ac_dir in $ac_dummy; do
1571   IFS=$ac_save_IFS
1572   test -z "$ac_dir" && ac_dir=.
1573   $as_executable_p "$ac_dir/$ac_word" || continue
1574 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1575   ac_prog_rejected=yes
1576   continue
1577 fi
1578 ac_cv_prog_CC="cc"
1579 echo "$as_me:1579: found $ac_dir/$ac_word" >&5
1580 break
1581 done
1582
1583 if test $ac_prog_rejected = yes; then
1584   # We found a bogon in the path, so make sure we never use it.
1585   set dummy $ac_cv_prog_CC
1586   shift
1587   if test $# != 0; then
1588     # We chose a different compiler from the bogus one.
1589     # However, it has the same basename, so the bogon will be chosen
1590     # first if we set CC to just the basename; use the full file name.
1591     shift
1592     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1593     shift
1594     ac_cv_prog_CC="$@"
1595   fi
1596 fi
1597 fi
1598 fi
1599 CC=$ac_cv_prog_CC
1600 if test -n "$CC"; then
1601   echo "$as_me:1601: result: $CC" >&5
1602 echo "${ECHO_T}$CC" >&6
1603 else
1604   echo "$as_me:1604: result: no" >&5
1605 echo "${ECHO_T}no" >&6
1606 fi
1607
1608 fi
1609 if test -z "$CC"; then
1610   if test -n "$ac_tool_prefix"; then
1611   for ac_prog in cl
1612   do
1613     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1615 echo "$as_me:1615: checking for $ac_word" >&5
1616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1617 if test "${ac_cv_prog_CC+set}" = set; then
1618   echo $ECHO_N "(cached) $ECHO_C" >&6
1619 else
1620   if test -n "$CC"; then
1621   ac_cv_prog_CC="$CC" # Let the user override the test.
1622 else
1623   ac_save_IFS=$IFS; IFS=$ac_path_separator
1624 ac_dummy="$PATH"
1625 for ac_dir in $ac_dummy; do
1626   IFS=$ac_save_IFS
1627   test -z "$ac_dir" && ac_dir=.
1628   $as_executable_p "$ac_dir/$ac_word" || continue
1629 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1630 echo "$as_me:1630: found $ac_dir/$ac_word" >&5
1631 break
1632 done
1633
1634 fi
1635 fi
1636 CC=$ac_cv_prog_CC
1637 if test -n "$CC"; then
1638   echo "$as_me:1638: result: $CC" >&5
1639 echo "${ECHO_T}$CC" >&6
1640 else
1641   echo "$as_me:1641: result: no" >&5
1642 echo "${ECHO_T}no" >&6
1643 fi
1644
1645     test -n "$CC" && break
1646   done
1647 fi
1648 if test -z "$CC"; then
1649   ac_ct_CC=$CC
1650   for ac_prog in cl
1651 do
1652   # Extract the first word of "$ac_prog", so it can be a program name with args.
1653 set dummy $ac_prog; ac_word=$2
1654 echo "$as_me:1654: checking for $ac_word" >&5
1655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1656 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1657   echo $ECHO_N "(cached) $ECHO_C" >&6
1658 else
1659   if test -n "$ac_ct_CC"; then
1660   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1661 else
1662   ac_save_IFS=$IFS; IFS=$ac_path_separator
1663 ac_dummy="$PATH"
1664 for ac_dir in $ac_dummy; do
1665   IFS=$ac_save_IFS
1666   test -z "$ac_dir" && ac_dir=.
1667   $as_executable_p "$ac_dir/$ac_word" || continue
1668 ac_cv_prog_ac_ct_CC="$ac_prog"
1669 echo "$as_me:1669: found $ac_dir/$ac_word" >&5
1670 break
1671 done
1672
1673 fi
1674 fi
1675 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1676 if test -n "$ac_ct_CC"; then
1677   echo "$as_me:1677: result: $ac_ct_CC" >&5
1678 echo "${ECHO_T}$ac_ct_CC" >&6
1679 else
1680   echo "$as_me:1680: result: no" >&5
1681 echo "${ECHO_T}no" >&6
1682 fi
1683
1684   test -n "$ac_ct_CC" && break
1685 done
1686
1687   CC=$ac_ct_CC
1688 fi
1689
1690 fi
1691
1692 test -z "$CC" && { { echo "$as_me:1692: error: no acceptable cc found in \$PATH" >&5
1693 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1694    { (exit 1); exit 1; }; }
1695
1696 # Provide some information about the compiler.
1697 echo "$as_me:1697:" \
1698      "checking for C compiler version" >&5
1699 ac_compiler=`set X $ac_compile; echo $2`
1700 { (eval echo "$as_me:1700: \"$ac_compiler --version </dev/null >&5\"") >&5
1701   (eval $ac_compiler --version </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705 { (eval echo "$as_me:1705: \"$ac_compiler -v </dev/null >&5\"") >&5
1706   (eval $ac_compiler -v </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -V </dev/null >&5\"") >&5
1711   (eval $ac_compiler -V </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715
1716 cat >conftest.$ac_ext <<_ACEOF
1717 #line 1717 "configure"
1718 #include "confdefs.h"
1719
1720 int
1721 main ()
1722 {
1723
1724   ;
1725   return 0;
1726 }
1727 _ACEOF
1728 ac_clean_files_save=$ac_clean_files
1729 ac_clean_files="$ac_clean_files a.out a.exe"
1730 # Try to create an executable without -o first, disregard a.out.
1731 # It will help us diagnose broken compilers, and finding out an intuition
1732 # of exeext.
1733 echo "$as_me:1733: checking for C compiler default output" >&5
1734 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1735 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1736 if { (eval echo "$as_me:1736: \"$ac_link_default\"") >&5
1737   (eval $ac_link_default) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; then
1741   # Find the output, starting from the most likely.  This scheme is
1742 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1743 # resort.
1744 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1745                 ls a.out conftest 2>/dev/null;
1746                 ls a.* conftest.* 2>/dev/null`; do
1747   case $ac_file in
1748     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1749     a.out ) # We found the default executable, but exeext='' is most
1750             # certainly right.
1751             break;;
1752     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1753           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1754           export ac_cv_exeext
1755           break;;
1756     * ) break;;
1757   esac
1758 done
1759 else
1760   echo "$as_me: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 { { echo "$as_me:1762: error: C compiler cannot create executables" >&5
1763 echo "$as_me: error: C compiler cannot create executables" >&2;}
1764    { (exit 77); exit 77; }; }
1765 fi
1766
1767 ac_exeext=$ac_cv_exeext
1768 echo "$as_me:1768: result: $ac_file" >&5
1769 echo "${ECHO_T}$ac_file" >&6
1770
1771 # Check the compiler produces executables we can run.  If not, either
1772 # the compiler is broken, or we cross compile.
1773 echo "$as_me:1773: checking whether the C compiler works" >&5
1774 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1775 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1776 # If not cross compiling, check that we can run a simple program.
1777 if test "$cross_compiling" != yes; then
1778   if { ac_try='./$ac_file'
1779   { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780   (eval $ac_try) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); }; }; then
1784     cross_compiling=no
1785   else
1786     if test "$cross_compiling" = maybe; then
1787         cross_compiling=yes
1788     else
1789         { { echo "$as_me:1789: error: cannot run C compiled programs.
1790 If you meant to cross compile, use \`--host'." >&5
1791 echo "$as_me: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&2;}
1793    { (exit 1); exit 1; }; }
1794     fi
1795   fi
1796 fi
1797 echo "$as_me:1797: result: yes" >&5
1798 echo "${ECHO_T}yes" >&6
1799
1800 rm -f a.out a.exe conftest$ac_cv_exeext
1801 ac_clean_files=$ac_clean_files_save
1802 # Check the compiler produces executables we can run.  If not, either
1803 # the compiler is broken, or we cross compile.
1804 echo "$as_me:1804: checking whether we are cross compiling" >&5
1805 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1806 echo "$as_me:1806: result: $cross_compiling" >&5
1807 echo "${ECHO_T}$cross_compiling" >&6
1808
1809 echo "$as_me:1809: checking for executable suffix" >&5
1810 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1811 if { (eval echo "$as_me:1811: \"$ac_link\"") >&5
1812   (eval $ac_link) 2>&5
1813   ac_status=$?
1814   echo "$as_me:1814: \$? = $ac_status" >&5
1815   (exit $ac_status); }; then
1816   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1817 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1818 # work properly (i.e., refer to `conftest.exe'), while it won't with
1819 # `rm'.
1820 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1821   case $ac_file in
1822     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1823     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824           export ac_cv_exeext
1825           break;;
1826     * ) break;;
1827   esac
1828 done
1829 else
1830   { { echo "$as_me:1830: error: cannot compute EXEEXT: cannot compile and link" >&5
1831 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1832    { (exit 1); exit 1; }; }
1833 fi
1834
1835 rm -f conftest$ac_cv_exeext
1836 echo "$as_me:1836: result: $ac_cv_exeext" >&5
1837 echo "${ECHO_T}$ac_cv_exeext" >&6
1838
1839 rm -f conftest.$ac_ext
1840 EXEEXT=$ac_cv_exeext
1841 ac_exeext=$EXEEXT
1842 echo "$as_me:1842: checking for object suffix" >&5
1843 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1844 if test "${ac_cv_objext+set}" = set; then
1845   echo $ECHO_N "(cached) $ECHO_C" >&6
1846 else
1847   cat >conftest.$ac_ext <<_ACEOF
1848 #line 1848 "configure"
1849 #include "confdefs.h"
1850
1851 int
1852 main ()
1853 {
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.o conftest.obj
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); }; then
1865   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1866   case $ac_file in
1867     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1868     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1869        break;;
1870   esac
1871 done
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 { { echo "$as_me:1875: error: cannot compute OBJEXT: cannot compile" >&5
1876 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1877    { (exit 1); exit 1; }; }
1878 fi
1879
1880 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1881 fi
1882 echo "$as_me:1882: result: $ac_cv_objext" >&5
1883 echo "${ECHO_T}$ac_cv_objext" >&6
1884 OBJEXT=$ac_cv_objext
1885 ac_objext=$OBJEXT
1886 echo "$as_me:1886: checking whether we are using the GNU C compiler" >&5
1887 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1888 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1889   echo $ECHO_N "(cached) $ECHO_C" >&6
1890 else
1891   cat >conftest.$ac_ext <<_ACEOF
1892 #line 1892 "configure"
1893 #include "confdefs.h"
1894
1895 int
1896 main ()
1897 {
1898 #ifndef __GNUC__
1899        choke me
1900 #endif
1901
1902   ;
1903   return 0;
1904 }
1905 _ACEOF
1906 rm -f conftest.$ac_objext
1907 if { (eval echo "$as_me:1907: \"$ac_compile\"") >&5
1908   (eval $ac_compile) 2>&5
1909   ac_status=$?
1910   echo "$as_me:1910: \$? = $ac_status" >&5
1911   (exit $ac_status); } &&
1912          { ac_try='test -s conftest.$ac_objext'
1913   { (eval echo "$as_me:1913: \"$ac_try\"") >&5
1914   (eval $ac_try) 2>&5
1915   ac_status=$?
1916   echo "$as_me:1916: \$? = $ac_status" >&5
1917   (exit $ac_status); }; }; then
1918   ac_compiler_gnu=yes
1919 else
1920   echo "$as_me: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1922 ac_compiler_gnu=no
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1926
1927 fi
1928 echo "$as_me:1928: result: $ac_cv_c_compiler_gnu" >&5
1929 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1930 GCC=`test $ac_compiler_gnu = yes && echo yes`
1931 ac_test_CFLAGS=${CFLAGS+set}
1932 ac_save_CFLAGS=$CFLAGS
1933 CFLAGS="-g"
1934 echo "$as_me:1934: checking whether $CC accepts -g" >&5
1935 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1936 if test "${ac_cv_prog_cc_g+set}" = set; then
1937   echo $ECHO_N "(cached) $ECHO_C" >&6
1938 else
1939   cat >conftest.$ac_ext <<_ACEOF
1940 #line 1940 "configure"
1941 #include "confdefs.h"
1942
1943 int
1944 main ()
1945 {
1946
1947   ;
1948   return 0;
1949 }
1950 _ACEOF
1951 rm -f conftest.$ac_objext
1952 if { (eval echo "$as_me:1952: \"$ac_compile\"") >&5
1953   (eval $ac_compile) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit $ac_status); } &&
1957          { ac_try='test -s conftest.$ac_objext'
1958   { (eval echo "$as_me:1958: \"$ac_try\"") >&5
1959   (eval $ac_try) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); }; }; then
1963   ac_cv_prog_cc_g=yes
1964 else
1965   echo "$as_me: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1967 ac_cv_prog_cc_g=no
1968 fi
1969 rm -f conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 echo "$as_me:1971: result: $ac_cv_prog_cc_g" >&5
1972 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1973 if test "$ac_test_CFLAGS" = set; then
1974   CFLAGS=$ac_save_CFLAGS
1975 elif test $ac_cv_prog_cc_g = yes; then
1976   if test "$GCC" = yes; then
1977     CFLAGS="-g -O2"
1978   else
1979     CFLAGS="-g"
1980   fi
1981 else
1982   if test "$GCC" = yes; then
1983     CFLAGS="-O2"
1984   else
1985     CFLAGS=
1986   fi
1987 fi
1988 # Some people use a C++ compiler to compile C.  Since we use `exit',
1989 # in C++ we need to declare it.  In case someone uses the same compiler
1990 # for both compiling C and C++ we need to have the C++ compiler decide
1991 # the declaration of exit, since it's the most demanding environment.
1992 cat >conftest.$ac_ext <<_ACEOF
1993 #ifndef __cplusplus
1994   choke me
1995 #endif
1996 _ACEOF
1997 rm -f conftest.$ac_objext
1998 if { (eval echo "$as_me:1998: \"$ac_compile\"") >&5
1999   (eval $ac_compile) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); } &&
2003          { ac_try='test -s conftest.$ac_objext'
2004   { (eval echo "$as_me:2004: \"$ac_try\"") >&5
2005   (eval $ac_try) 2>&5
2006   ac_status=$?
2007   echo "$as_me:2007: \$? = $ac_status" >&5
2008   (exit $ac_status); }; }; then
2009   for ac_declaration in \
2010    ''\
2011    '#include <stdlib.h>' \
2012    'extern "C" void std::exit (int) throw (); using std::exit;' \
2013    'extern "C" void std::exit (int); using std::exit;' \
2014    'extern "C" void exit (int) throw ();' \
2015    'extern "C" void exit (int);' \
2016    'void exit (int);'
2017 do
2018   cat >conftest.$ac_ext <<_ACEOF
2019 #line 2019 "configure"
2020 #include "confdefs.h"
2021 #include <stdlib.h>
2022 $ac_declaration
2023 int
2024 main ()
2025 {
2026 exit (42);
2027   ;
2028   return 0;
2029 }
2030 _ACEOF
2031 rm -f conftest.$ac_objext
2032 if { (eval echo "$as_me:2032: \"$ac_compile\"") >&5
2033   (eval $ac_compile) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit $ac_status); } &&
2037          { ac_try='test -s conftest.$ac_objext'
2038   { (eval echo "$as_me:2038: \"$ac_try\"") >&5
2039   (eval $ac_try) 2>&5
2040   ac_status=$?
2041   echo "$as_me:2041: \$? = $ac_status" >&5
2042   (exit $ac_status); }; }; then
2043   :
2044 else
2045   echo "$as_me: failed program was:" >&5
2046 cat conftest.$ac_ext >&5
2047 continue
2048 fi
2049 rm -f conftest.$ac_objext conftest.$ac_ext
2050   cat >conftest.$ac_ext <<_ACEOF
2051 #line 2051 "configure"
2052 #include "confdefs.h"
2053 $ac_declaration
2054 int
2055 main ()
2056 {
2057 exit (42);
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 rm -f conftest.$ac_objext
2063 if { (eval echo "$as_me:2063: \"$ac_compile\"") >&5
2064   (eval $ac_compile) 2>&5
2065   ac_status=$?
2066   echo "$as_me:2066: \$? = $ac_status" >&5
2067   (exit $ac_status); } &&
2068          { ac_try='test -s conftest.$ac_objext'
2069   { (eval echo "$as_me:2069: \"$ac_try\"") >&5
2070   (eval $ac_try) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit $ac_status); }; }; then
2074   break
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 done
2081 rm -f conftest*
2082 if test -n "$ac_declaration"; then
2083   echo '#ifdef __cplusplus' >>confdefs.h
2084   echo $ac_declaration      >>confdefs.h
2085   echo '#endif'             >>confdefs.h
2086 fi
2087
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 fi
2092 rm -f conftest.$ac_objext conftest.$ac_ext
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 ac_main_return=return
2099
2100 GCC_VERSION=none
2101 if test "$GCC" = yes ; then
2102         echo "$as_me:2102: checking version of $CC" >&5
2103 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2104         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2105         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2106         echo "$as_me:2106: result: $GCC_VERSION" >&5
2107 echo "${ECHO_T}$GCC_VERSION" >&6
2108 fi
2109
2110 ac_ext=c
2111 ac_cpp='$CPP $CPPFLAGS'
2112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2115 ac_main_return=return
2116 echo "$as_me:2116: checking how to run the C preprocessor" >&5
2117 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2118 # On Suns, sometimes $CPP names a directory.
2119 if test -n "$CPP" && test -d "$CPP"; then
2120   CPP=
2121 fi
2122 if test -z "$CPP"; then
2123   if test "${ac_cv_prog_CPP+set}" = set; then
2124   echo $ECHO_N "(cached) $ECHO_C" >&6
2125 else
2126       # Double quotes because CPP needs to be expanded
2127     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2128     do
2129       ac_preproc_ok=false
2130 for ac_c_preproc_warn_flag in '' yes
2131 do
2132   # Use a header file that comes with gcc, so configuring glibc
2133   # with a fresh cross-compiler works.
2134   # On the NeXT, cc -E runs the code through the compiler's parser,
2135   # not just through cpp. "Syntax error" is here to catch this case.
2136   cat >conftest.$ac_ext <<_ACEOF
2137 #line 2137 "configure"
2138 #include "confdefs.h"
2139 #include <assert.h>
2140                      Syntax error
2141 _ACEOF
2142 if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
2143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2144   ac_status=$?
2145   egrep -v '^ *\+' conftest.er1 >conftest.err
2146   rm -f conftest.er1
2147   cat conftest.err >&5
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } >/dev/null; then
2150   if test -s conftest.err; then
2151     ac_cpp_err=$ac_c_preproc_warn_flag
2152   else
2153     ac_cpp_err=
2154   fi
2155 else
2156   ac_cpp_err=yes
2157 fi
2158 if test -z "$ac_cpp_err"; then
2159   :
2160 else
2161   echo "$as_me: failed program was:" >&5
2162   cat conftest.$ac_ext >&5
2163   # Broken: fails on valid input.
2164 continue
2165 fi
2166 rm -f conftest.err conftest.$ac_ext
2167
2168   # OK, works on sane cases.  Now check whether non-existent headers
2169   # can be detected and how.
2170   cat >conftest.$ac_ext <<_ACEOF
2171 #line 2171 "configure"
2172 #include "confdefs.h"
2173 #include <ac_nonexistent.h>
2174 _ACEOF
2175 if { (eval echo "$as_me:2175: \"$ac_cpp conftest.$ac_ext\"") >&5
2176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2177   ac_status=$?
2178   egrep -v '^ *\+' conftest.er1 >conftest.err
2179   rm -f conftest.er1
2180   cat conftest.err >&5
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit $ac_status); } >/dev/null; then
2183   if test -s conftest.err; then
2184     ac_cpp_err=$ac_c_preproc_warn_flag
2185   else
2186     ac_cpp_err=
2187   fi
2188 else
2189   ac_cpp_err=yes
2190 fi
2191 if test -z "$ac_cpp_err"; then
2192   # Broken: success on invalid input.
2193 continue
2194 else
2195   echo "$as_me: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   # Passes both tests.
2198 ac_preproc_ok=:
2199 break
2200 fi
2201 rm -f conftest.err conftest.$ac_ext
2202
2203 done
2204 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2205 rm -f conftest.err conftest.$ac_ext
2206 if $ac_preproc_ok; then
2207   break
2208 fi
2209
2210     done
2211     ac_cv_prog_CPP=$CPP
2212
2213 fi
2214   CPP=$ac_cv_prog_CPP
2215 else
2216   ac_cv_prog_CPP=$CPP
2217 fi
2218 echo "$as_me:2218: result: $CPP" >&5
2219 echo "${ECHO_T}$CPP" >&6
2220 ac_preproc_ok=false
2221 for ac_c_preproc_warn_flag in '' yes
2222 do
2223   # Use a header file that comes with gcc, so configuring glibc
2224   # with a fresh cross-compiler works.
2225   # On the NeXT, cc -E runs the code through the compiler's parser,
2226   # not just through cpp. "Syntax error" is here to catch this case.
2227   cat >conftest.$ac_ext <<_ACEOF
2228 #line 2228 "configure"
2229 #include "confdefs.h"
2230 #include <assert.h>
2231                      Syntax error
2232 _ACEOF
2233 if { (eval echo "$as_me:2233: \"$ac_cpp conftest.$ac_ext\"") >&5
2234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2235   ac_status=$?
2236   egrep -v '^ *\+' conftest.er1 >conftest.err
2237   rm -f conftest.er1
2238   cat conftest.err >&5
2239   echo "$as_me:2239: \$? = $ac_status" >&5
2240   (exit $ac_status); } >/dev/null; then
2241   if test -s conftest.err; then
2242     ac_cpp_err=$ac_c_preproc_warn_flag
2243   else
2244     ac_cpp_err=
2245   fi
2246 else
2247   ac_cpp_err=yes
2248 fi
2249 if test -z "$ac_cpp_err"; then
2250   :
2251 else
2252   echo "$as_me: failed program was:" >&5
2253   cat conftest.$ac_ext >&5
2254   # Broken: fails on valid input.
2255 continue
2256 fi
2257 rm -f conftest.err conftest.$ac_ext
2258
2259   # OK, works on sane cases.  Now check whether non-existent headers
2260   # can be detected and how.
2261   cat >conftest.$ac_ext <<_ACEOF
2262 #line 2262 "configure"
2263 #include "confdefs.h"
2264 #include <ac_nonexistent.h>
2265 _ACEOF
2266 if { (eval echo "$as_me:2266: \"$ac_cpp conftest.$ac_ext\"") >&5
2267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2268   ac_status=$?
2269   egrep -v '^ *\+' conftest.er1 >conftest.err
2270   rm -f conftest.er1
2271   cat conftest.err >&5
2272   echo "$as_me:2272: \$? = $ac_status" >&5
2273   (exit $ac_status); } >/dev/null; then
2274   if test -s conftest.err; then
2275     ac_cpp_err=$ac_c_preproc_warn_flag
2276   else
2277     ac_cpp_err=
2278   fi
2279 else
2280   ac_cpp_err=yes
2281 fi
2282 if test -z "$ac_cpp_err"; then
2283   # Broken: success on invalid input.
2284 continue
2285 else
2286   echo "$as_me: failed program was:" >&5
2287   cat conftest.$ac_ext >&5
2288   # Passes both tests.
2289 ac_preproc_ok=:
2290 break
2291 fi
2292 rm -f conftest.err conftest.$ac_ext
2293
2294 done
2295 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2296 rm -f conftest.err conftest.$ac_ext
2297 if $ac_preproc_ok; then
2298   :
2299 else
2300   { { echo "$as_me:2300: error: C preprocessor \"$CPP\" fails sanity check" >&5
2301 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2302    { (exit 1); exit 1; }; }
2303 fi
2304
2305 ac_ext=c
2306 ac_cpp='$CPP $CPPFLAGS'
2307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2310 ac_main_return=return
2311
2312 if test $ac_cv_c_compiler_gnu = yes; then
2313     echo "$as_me:2313: checking whether $CC needs -traditional" >&5
2314 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2315 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2316   echo $ECHO_N "(cached) $ECHO_C" >&6
2317 else
2318     ac_pattern="Autoconf.*'x'"
2319   cat >conftest.$ac_ext <<_ACEOF
2320 #line 2320 "configure"
2321 #include "confdefs.h"
2322 #include <sgtty.h>
2323 int Autoconf = TIOCGETP;
2324 _ACEOF
2325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2326   egrep "$ac_pattern" >/dev/null 2>&1; then
2327   ac_cv_prog_gcc_traditional=yes
2328 else
2329   ac_cv_prog_gcc_traditional=no
2330 fi
2331 rm -f conftest*
2332
2333   if test $ac_cv_prog_gcc_traditional = no; then
2334     cat >conftest.$ac_ext <<_ACEOF
2335 #line 2335 "configure"
2336 #include "confdefs.h"
2337 #include <termio.h>
2338 int Autoconf = TCGETA;
2339 _ACEOF
2340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2341   egrep "$ac_pattern" >/dev/null 2>&1; then
2342   ac_cv_prog_gcc_traditional=yes
2343 fi
2344 rm -f conftest*
2345
2346   fi
2347 fi
2348 echo "$as_me:2348: result: $ac_cv_prog_gcc_traditional" >&5
2349 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2350   if test $ac_cv_prog_gcc_traditional = yes; then
2351     CC="$CC -traditional"
2352   fi
2353 fi
2354
2355 echo "$as_me:2355: checking whether $CC understands -c and -o together" >&5
2356 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2357 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2358   echo $ECHO_N "(cached) $ECHO_C" >&6
2359 else
2360
2361 cat > conftest.$ac_ext <<CF_EOF
2362 #include <stdio.h>
2363 int main()
2364 {
2365         ${cf_cv_main_return:-return}(0);
2366 }
2367 CF_EOF
2368 # We do the test twice because some compilers refuse to overwrite an
2369 # existing .o file with -o, though they will create one.
2370 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2371 if { (eval echo "$as_me:2371: \"$ac_try\"") >&5
2372   (eval $ac_try) 2>&5
2373   ac_status=$?
2374   echo "$as_me:2374: \$? = $ac_status" >&5
2375   (exit $ac_status); } &&
2376   test -f conftest2.$ac_objext && { (eval echo "$as_me:2376: \"$ac_try\"") >&5
2377   (eval $ac_try) 2>&5
2378   ac_status=$?
2379   echo "$as_me:2379: \$? = $ac_status" >&5
2380   (exit $ac_status); };
2381 then
2382   eval cf_cv_prog_CC_c_o=yes
2383 else
2384   eval cf_cv_prog_CC_c_o=no
2385 fi
2386 rm -f conftest*
2387
2388 fi
2389 if test $cf_cv_prog_CC_c_o = yes; then
2390   echo "$as_me:2390: result: yes" >&5
2391 echo "${ECHO_T}yes" >&6
2392 else
2393   echo "$as_me:2393: result: no" >&5
2394 echo "${ECHO_T}no" >&6
2395 fi
2396
2397 echo "$as_me:2397: checking for POSIXized ISC" >&5
2398 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2399 if test -d /etc/conf/kconfig.d &&
2400    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2401 then
2402   echo "$as_me:2402: result: yes" >&5
2403 echo "${ECHO_T}yes" >&6
2404   ISC=yes # If later tests want to check for ISC.
2405
2406 cat >>confdefs.h <<\EOF
2407 #define _POSIX_SOURCE 1
2408 EOF
2409
2410   if test "$GCC" = yes; then
2411     CC="$CC -posix"
2412   else
2413     CC="$CC -Xp"
2414   fi
2415 else
2416   echo "$as_me:2416: result: no" >&5
2417 echo "${ECHO_T}no" >&6
2418   ISC=
2419 fi
2420
2421 echo "$as_me:2421: checking for ${CC-cc} option to accept ANSI C" >&5
2422 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2423 if test "${cf_cv_ansi_cc+set}" = set; then
2424   echo $ECHO_N "(cached) $ECHO_C" >&6
2425 else
2426
2427 cf_cv_ansi_cc=no
2428 cf_save_CFLAGS="$CFLAGS"
2429 cf_save_CPPFLAGS="$CPPFLAGS"
2430 # Don't try gcc -ansi; that turns off useful extensions and
2431 # breaks some systems' header files.
2432 # AIX                   -qlanglvl=ansi
2433 # Ultrix and OSF/1      -std1
2434 # HP-UX                 -Aa -D_HPUX_SOURCE
2435 # SVR4                  -Xc
2436 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2437 for cf_arg in "-DCC_HAS_PROTOS" \
2438         "" \
2439         -qlanglvl=ansi \
2440         -std1 \
2441         -Ae \
2442         "-Aa -D_HPUX_SOURCE" \
2443         -Xc
2444 do
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 no)
2455         case $cf_add_cflags in #(vi
2456         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2457                 case $cf_add_cflags in
2458                 -D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         elif test "${cf_tst_cflags}" = "\"'" ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         fi
2472                         ;;
2473                 esac
2474                 case "$CPPFLAGS" in
2475                 *$cf_add_cflags) #(vi
2476                         ;;
2477                 *) #(vi
2478                         case $cf_add_cflags in #(vi
2479                         -D*)
2480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2481
2482 CPPFLAGS=`echo "$CPPFLAGS" | \
2483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2485
2486                                 ;;
2487                         esac
2488                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2489                         ;;
2490                 esac
2491                 ;;
2492         *)
2493                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2494                 ;;
2495         esac
2496         ;;
2497 yes)
2498         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2499
2500         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2501
2502         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2503                 && test -z "${cf_tst_cflags}" \
2504                 && cf_fix_cppflags=no
2505         ;;
2506 esac
2507 done
2508
2509 if test -n "$cf_new_cflags" ; then
2510
2511         CFLAGS="$CFLAGS $cf_new_cflags"
2512 fi
2513
2514 if test -n "$cf_new_cppflags" ; then
2515
2516         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2517 fi
2518
2519 if test -n "$cf_new_extra_cppflags" ; then
2520
2521         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2522 fi
2523
2524         cat >conftest.$ac_ext <<_ACEOF
2525 #line 2525 "configure"
2526 #include "confdefs.h"
2527
2528 #ifndef CC_HAS_PROTOS
2529 #if !defined(__STDC__) || (__STDC__ != 1)
2530 choke me
2531 #endif
2532 #endif
2533
2534 int
2535 main ()
2536 {
2537
2538         int test (int i, double x);
2539         struct s1 {int (*f) (int a);};
2540         struct s2 {int (*f) (double a);};
2541   ;
2542   return 0;
2543 }
2544 _ACEOF
2545 rm -f conftest.$ac_objext
2546 if { (eval echo "$as_me:2546: \"$ac_compile\"") >&5
2547   (eval $ac_compile) 2>&5
2548   ac_status=$?
2549   echo "$as_me:2549: \$? = $ac_status" >&5
2550   (exit $ac_status); } &&
2551          { ac_try='test -s conftest.$ac_objext'
2552   { (eval echo "$as_me:2552: \"$ac_try\"") >&5
2553   (eval $ac_try) 2>&5
2554   ac_status=$?
2555   echo "$as_me:2555: \$? = $ac_status" >&5
2556   (exit $ac_status); }; }; then
2557   cf_cv_ansi_cc="$cf_arg"; break
2558 else
2559   echo "$as_me: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 fi
2562 rm -f conftest.$ac_objext conftest.$ac_ext
2563 done
2564 CFLAGS="$cf_save_CFLAGS"
2565 CPPFLAGS="$cf_save_CPPFLAGS"
2566
2567 fi
2568 echo "$as_me:2568: result: $cf_cv_ansi_cc" >&5
2569 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2570
2571 if test "$cf_cv_ansi_cc" != "no"; then
2572 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_cv_ansi_cc
2580 do
2581 case $cf_fix_cppflags in
2582 no)
2583         case $cf_add_cflags in #(vi
2584         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2585                 case $cf_add_cflags in
2586                 -D*)
2587                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test $cf_fix_cppflags = yes ; then
2594                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2595                                 continue
2596                         elif test "${cf_tst_cflags}" = "\"'" ; then
2597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598                                 continue
2599                         fi
2600                         ;;
2601                 esac
2602                 case "$CPPFLAGS" in
2603                 *$cf_add_cflags) #(vi
2604                         ;;
2605                 *) #(vi
2606                         case $cf_add_cflags in #(vi
2607                         -D*)
2608                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2609
2610 CPPFLAGS=`echo "$CPPFLAGS" | \
2611         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2612                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2613
2614                                 ;;
2615                         esac
2616                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2617                         ;;
2618                 esac
2619                 ;;
2620         *)
2621                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2622                 ;;
2623         esac
2624         ;;
2625 yes)
2626         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2627
2628         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2629
2630         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2631                 && test -z "${cf_tst_cflags}" \
2632                 && cf_fix_cppflags=no
2633         ;;
2634 esac
2635 done
2636
2637 if test -n "$cf_new_cflags" ; then
2638
2639         CFLAGS="$CFLAGS $cf_new_cflags"
2640 fi
2641
2642 if test -n "$cf_new_cppflags" ; then
2643
2644         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2650 fi
2651
2652 else
2653         cat >>confdefs.h <<\EOF
2654 #define CC_HAS_PROTOS 1
2655 EOF
2656
2657 fi
2658 fi
2659
2660 if test "$cf_cv_ansi_cc" = "no"; then
2661         { { echo "$as_me:2661: error: Your compiler does not appear to recognize prototypes.
2662 You have the following choices:
2663         a. adjust your compiler options
2664         b. get an up-to-date compiler
2665         c. use a wrapper such as unproto" >&5
2666 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2667 You have the following choices:
2668         a. adjust your compiler options
2669         b. get an up-to-date compiler
2670         c. use a wrapper such as unproto" >&2;}
2671    { (exit 1); exit 1; }; }
2672 fi
2673
2674 case $cf_cv_system_name in
2675 os2*)
2676     CFLAGS="$CFLAGS -Zmt"
2677     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2678     CXXFLAGS="$CXXFLAGS -Zmt"
2679     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2680     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2681     ac_cv_exeext=.exe
2682     ;;
2683 esac
2684
2685 PROG_EXT="$EXEEXT"
2686
2687 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2688 #define PROG_EXT "$PROG_EXT"
2689 EOF
2690
2691 if test "$cross_compiling" = yes ; then
2692   LDCONFIG=:
2693 else
2694 case "$cf_cv_system_name" in #(vi
2695 dragonfly*|freebsd*) #(vi
2696   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2697   ;;
2698 *) LDPATH=$PATH:/sbin:/usr/sbin
2699   # Extract the first word of "ldconfig", so it can be a program name with args.
2700 set dummy ldconfig; ac_word=$2
2701 echo "$as_me:2701: checking for $ac_word" >&5
2702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2703 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2704   echo $ECHO_N "(cached) $ECHO_C" >&6
2705 else
2706   case $LDCONFIG in
2707   [\\/]* | ?:[\\/]*)
2708   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2709   ;;
2710   *)
2711   ac_save_IFS=$IFS; IFS=$ac_path_separator
2712 ac_dummy="$LDPATH"
2713 for ac_dir in $ac_dummy; do
2714   IFS=$ac_save_IFS
2715   test -z "$ac_dir" && ac_dir=.
2716   if $as_executable_p "$ac_dir/$ac_word"; then
2717    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2718    echo "$as_me:2718: found $ac_dir/$ac_word" >&5
2719    break
2720 fi
2721 done
2722
2723   ;;
2724 esac
2725 fi
2726 LDCONFIG=$ac_cv_path_LDCONFIG
2727
2728 if test -n "$LDCONFIG"; then
2729   echo "$as_me:2729: result: $LDCONFIG" >&5
2730 echo "${ECHO_T}$LDCONFIG" >&6
2731 else
2732   echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2734 fi
2735
2736   ;;
2737 esac
2738 fi
2739
2740 echo "$as_me:2740: checking if you want to ensure bool is consistent with C++" >&5
2741 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2742
2743 # Check whether --with-cxx or --without-cxx was given.
2744 if test "${with_cxx+set}" = set; then
2745   withval="$with_cxx"
2746   cf_with_cxx=$withval
2747 else
2748   cf_with_cxx=yes
2749 fi;
2750 echo "$as_me:2750: result: $cf_with_cxx" >&5
2751 echo "${ECHO_T}$cf_with_cxx" >&6
2752 if test "X$cf_with_cxx" = Xno ; then
2753         CXX=""
2754         GXX=""
2755 else
2756         # with autoconf 2.13, we can change the error to a warning:
2757                 ac_ext=cc
2758 ac_cpp='$CXXCPP $CPPFLAGS'
2759 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2760 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2761 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2762 ac_main_return=return
2763 if test -n "$ac_tool_prefix"; then
2764   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2765   do
2766     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2767 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2768 echo "$as_me:2768: checking for $ac_word" >&5
2769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2770 if test "${ac_cv_prog_CXX+set}" = set; then
2771   echo $ECHO_N "(cached) $ECHO_C" >&6
2772 else
2773   if test -n "$CXX"; then
2774   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2775 else
2776   ac_save_IFS=$IFS; IFS=$ac_path_separator
2777 ac_dummy="$PATH"
2778 for ac_dir in $ac_dummy; do
2779   IFS=$ac_save_IFS
2780   test -z "$ac_dir" && ac_dir=.
2781   $as_executable_p "$ac_dir/$ac_word" || continue
2782 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2783 echo "$as_me:2783: found $ac_dir/$ac_word" >&5
2784 break
2785 done
2786
2787 fi
2788 fi
2789 CXX=$ac_cv_prog_CXX
2790 if test -n "$CXX"; then
2791   echo "$as_me:2791: result: $CXX" >&5
2792 echo "${ECHO_T}$CXX" >&6
2793 else
2794   echo "$as_me:2794: result: no" >&5
2795 echo "${ECHO_T}no" >&6
2796 fi
2797
2798     test -n "$CXX" && break
2799   done
2800 fi
2801 if test -z "$CXX"; then
2802   ac_ct_CXX=$CXX
2803   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2804 do
2805   # Extract the first word of "$ac_prog", so it can be a program name with args.
2806 set dummy $ac_prog; ac_word=$2
2807 echo "$as_me:2807: checking for $ac_word" >&5
2808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2809 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2810   echo $ECHO_N "(cached) $ECHO_C" >&6
2811 else
2812   if test -n "$ac_ct_CXX"; then
2813   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2814 else
2815   ac_save_IFS=$IFS; IFS=$ac_path_separator
2816 ac_dummy="$PATH"
2817 for ac_dir in $ac_dummy; do
2818   IFS=$ac_save_IFS
2819   test -z "$ac_dir" && ac_dir=.
2820   $as_executable_p "$ac_dir/$ac_word" || continue
2821 ac_cv_prog_ac_ct_CXX="$ac_prog"
2822 echo "$as_me:2822: found $ac_dir/$ac_word" >&5
2823 break
2824 done
2825
2826 fi
2827 fi
2828 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2829 if test -n "$ac_ct_CXX"; then
2830   echo "$as_me:2830: result: $ac_ct_CXX" >&5
2831 echo "${ECHO_T}$ac_ct_CXX" >&6
2832 else
2833   echo "$as_me:2833: result: no" >&5
2834 echo "${ECHO_T}no" >&6
2835 fi
2836
2837   test -n "$ac_ct_CXX" && break
2838 done
2839 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2840
2841   CXX=$ac_ct_CXX
2842 fi
2843
2844 # Provide some information about the compiler.
2845 echo "$as_me:2845:" \
2846      "checking for C++ compiler version" >&5
2847 ac_compiler=`set X $ac_compile; echo $2`
2848 { (eval echo "$as_me:2848: \"$ac_compiler --version </dev/null >&5\"") >&5
2849   (eval $ac_compiler --version </dev/null >&5) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); }
2853 { (eval echo "$as_me:2853: \"$ac_compiler -v </dev/null >&5\"") >&5
2854   (eval $ac_compiler -v </dev/null >&5) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); }
2858 { (eval echo "$as_me:2858: \"$ac_compiler -V </dev/null >&5\"") >&5
2859   (eval $ac_compiler -V </dev/null >&5) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); }
2863
2864 echo "$as_me:2864: checking whether we are using the GNU C++ compiler" >&5
2865 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2866 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2867   echo $ECHO_N "(cached) $ECHO_C" >&6
2868 else
2869   cat >conftest.$ac_ext <<_ACEOF
2870 #line 2870 "configure"
2871 #include "confdefs.h"
2872
2873 int
2874 main ()
2875 {
2876 #ifndef __GNUC__
2877        choke me
2878 #endif
2879
2880   ;
2881   return 0;
2882 }
2883 _ACEOF
2884 rm -f conftest.$ac_objext
2885 if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
2886   (eval $ac_compile) 2>&5
2887   ac_status=$?
2888   echo "$as_me:2888: \$? = $ac_status" >&5
2889   (exit $ac_status); } &&
2890          { ac_try='test -s conftest.$ac_objext'
2891   { (eval echo "$as_me:2891: \"$ac_try\"") >&5
2892   (eval $ac_try) 2>&5
2893   ac_status=$?
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit $ac_status); }; }; then
2896   ac_compiler_gnu=yes
2897 else
2898   echo "$as_me: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 ac_compiler_gnu=no
2901 fi
2902 rm -f conftest.$ac_objext conftest.$ac_ext
2903 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2904
2905 fi
2906 echo "$as_me:2906: result: $ac_cv_cxx_compiler_gnu" >&5
2907 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2908 GXX=`test $ac_compiler_gnu = yes && echo yes`
2909 ac_test_CXXFLAGS=${CXXFLAGS+set}
2910 ac_save_CXXFLAGS=$CXXFLAGS
2911 CXXFLAGS="-g"
2912 echo "$as_me:2912: checking whether $CXX accepts -g" >&5
2913 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2914 if test "${ac_cv_prog_cxx_g+set}" = set; then
2915   echo $ECHO_N "(cached) $ECHO_C" >&6
2916 else
2917   cat >conftest.$ac_ext <<_ACEOF
2918 #line 2918 "configure"
2919 #include "confdefs.h"
2920
2921 int
2922 main ()
2923 {
2924
2925   ;
2926   return 0;
2927 }
2928 _ACEOF
2929 rm -f conftest.$ac_objext
2930 if { (eval echo "$as_me:2930: \"$ac_compile\"") >&5
2931   (eval $ac_compile) 2>&5
2932   ac_status=$?
2933   echo "$as_me:2933: \$? = $ac_status" >&5
2934   (exit $ac_status); } &&
2935          { ac_try='test -s conftest.$ac_objext'
2936   { (eval echo "$as_me:2936: \"$ac_try\"") >&5
2937   (eval $ac_try) 2>&5
2938   ac_status=$?
2939   echo "$as_me:2939: \$? = $ac_status" >&5
2940   (exit $ac_status); }; }; then
2941   ac_cv_prog_cxx_g=yes
2942 else
2943   echo "$as_me: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945 ac_cv_prog_cxx_g=no
2946 fi
2947 rm -f conftest.$ac_objext conftest.$ac_ext
2948 fi
2949 echo "$as_me:2949: result: $ac_cv_prog_cxx_g" >&5
2950 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2951 if test "$ac_test_CXXFLAGS" = set; then
2952   CXXFLAGS=$ac_save_CXXFLAGS
2953 elif test $ac_cv_prog_cxx_g = yes; then
2954   if test "$GXX" = yes; then
2955     CXXFLAGS="-g -O2"
2956   else
2957     CXXFLAGS="-g"
2958   fi
2959 else
2960   if test "$GXX" = yes; then
2961     CXXFLAGS="-O2"
2962   else
2963     CXXFLAGS=
2964   fi
2965 fi
2966 for ac_declaration in \
2967    ''\
2968    '#include <stdlib.h>' \
2969    'extern "C" void std::exit (int) throw (); using std::exit;' \
2970    'extern "C" void std::exit (int); using std::exit;' \
2971    'extern "C" void exit (int) throw ();' \
2972    'extern "C" void exit (int);' \
2973    'void exit (int);'
2974 do
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978 #include <stdlib.h>
2979 $ac_declaration
2980 int
2981 main ()
2982 {
2983 exit (42);
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   :
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 continue
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007   cat >conftest.$ac_ext <<_ACEOF
3008 #line 3008 "configure"
3009 #include "confdefs.h"
3010 $ac_declaration
3011 int
3012 main ()
3013 {
3014 exit (42);
3015   ;
3016   return 0;
3017 }
3018 _ACEOF
3019 rm -f conftest.$ac_objext
3020 if { (eval echo "$as_me:3020: \"$ac_compile\"") >&5
3021   (eval $ac_compile) 2>&5
3022   ac_status=$?
3023   echo "$as_me:3023: \$? = $ac_status" >&5
3024   (exit $ac_status); } &&
3025          { ac_try='test -s conftest.$ac_objext'
3026   { (eval echo "$as_me:3026: \"$ac_try\"") >&5
3027   (eval $ac_try) 2>&5
3028   ac_status=$?
3029   echo "$as_me:3029: \$? = $ac_status" >&5
3030   (exit $ac_status); }; }; then
3031   break
3032 else
3033   echo "$as_me: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3035 fi
3036 rm -f conftest.$ac_objext conftest.$ac_ext
3037 done
3038 rm -f conftest*
3039 if test -n "$ac_declaration"; then
3040   echo '#ifdef __cplusplus' >>confdefs.h
3041   echo $ac_declaration      >>confdefs.h
3042   echo '#endif'             >>confdefs.h
3043 fi
3044
3045 ac_ext=c
3046 ac_cpp='$CPP $CPPFLAGS'
3047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3050 ac_main_return=return
3051
3052                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3053         if test "$CXX" = "g++" ; then
3054                 # Extract the first word of "g++", so it can be a program name with args.
3055 set dummy g++; ac_word=$2
3056 echo "$as_me:3056: checking for $ac_word" >&5
3057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3058 if test "${ac_cv_path_CXX+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   case $CXX in
3062   [\\/]* | ?:[\\/]*)
3063   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3064   ;;
3065   *)
3066   ac_save_IFS=$IFS; IFS=$ac_path_separator
3067 ac_dummy="$PATH"
3068 for ac_dir in $ac_dummy; do
3069   IFS=$ac_save_IFS
3070   test -z "$ac_dir" && ac_dir=.
3071   if $as_executable_p "$ac_dir/$ac_word"; then
3072    ac_cv_path_CXX="$ac_dir/$ac_word"
3073    echo "$as_me:3073: found $ac_dir/$ac_word" >&5
3074    break
3075 fi
3076 done
3077
3078   ;;
3079 esac
3080 fi
3081 CXX=$ac_cv_path_CXX
3082
3083 if test -n "$CXX"; then
3084   echo "$as_me:3084: result: $CXX" >&5
3085 echo "${ECHO_T}$CXX" >&6
3086 else
3087   echo "$as_me:3087: result: no" >&5
3088 echo "${ECHO_T}no" >&6
3089 fi
3090
3091         fi
3092         if test "$CXX" = "g++" ; then
3093                 { echo "$as_me:3093: WARNING: ignoring hardcoded g++" >&5
3094 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096         fi
3097 fi
3098
3099 GXX_VERSION=none
3100 if test "$GXX" = yes; then
3101         echo "$as_me:3101: checking version of g++" >&5
3102 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3103         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3104         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3105         echo "$as_me:3105: result: $GXX_VERSION" >&5
3106 echo "${ECHO_T}$GXX_VERSION" >&6
3107 fi
3108
3109 case $GXX_VERSION in
3110 1*|2.[0-6]*)
3111         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3112         # cf_cxx_library=no
3113         { echo "$as_me:3113: WARNING: templates do not work" >&5
3114 echo "$as_me: WARNING: templates do not work" >&2;}
3115         ;;
3116 esac
3117
3118 echo "$as_me:3118: checking if you want to build C++ binding and demo" >&5
3119 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3120
3121 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3122 if test "${with_cxx_binding+set}" = set; then
3123   withval="$with_cxx_binding"
3124   cf_with_cxx_binding=$withval
3125 else
3126   cf_with_cxx_binding=$cf_with_cxx
3127 fi;
3128 echo "$as_me:3128: result: $cf_with_cxx_binding" >&5
3129 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3130
3131 echo "$as_me:3131: checking if you want to build with Ada95" >&5
3132 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3133
3134 # Check whether --with-ada or --without-ada was given.
3135 if test "${with_ada+set}" = set; then
3136   withval="$with_ada"
3137   cf_with_ada=$withval
3138 else
3139   cf_with_ada=yes
3140 fi;
3141 echo "$as_me:3141: result: $cf_with_ada" >&5
3142 echo "${ECHO_T}$cf_with_ada" >&6
3143
3144 echo "$as_me:3144: checking if you want to install manpages" >&5
3145 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3146
3147 # Check whether --with-manpages or --without-manpages was given.
3148 if test "${with_manpages+set}" = set; then
3149   withval="$with_manpages"
3150   cf_with_manpages=$withval
3151 else
3152   cf_with_manpages=yes
3153 fi;
3154 echo "$as_me:3154: result: $cf_with_manpages" >&5
3155 echo "${ECHO_T}$cf_with_manpages" >&6
3156
3157 echo "$as_me:3157: checking if you want to build programs such as tic" >&5
3158 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3159
3160 # Check whether --with-progs or --without-progs was given.
3161 if test "${with_progs+set}" = set; then
3162   withval="$with_progs"
3163   cf_with_progs=$withval
3164 else
3165   cf_with_progs=yes
3166 fi;
3167 echo "$as_me:3167: result: $cf_with_progs" >&5
3168 echo "${ECHO_T}$cf_with_progs" >&6
3169
3170 echo "$as_me:3170: checking if you wish to install curses.h" >&5
3171 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3172
3173 # Check whether --with-curses-h or --without-curses-h was given.
3174 if test "${with_curses_h+set}" = set; then
3175   withval="$with_curses_h"
3176   with_curses_h=$withval
3177 else
3178   with_curses_h=yes
3179 fi;
3180 echo "$as_me:3180: result: $with_curses_h" >&5
3181 echo "${ECHO_T}$with_curses_h" >&6
3182
3183 modules_to_build="ncurses"
3184 if test "X$cf_with_progs" != Xno ; then
3185 modules_to_build="$modules_to_build progs tack"
3186 fi
3187 modules_to_build="$modules_to_build panel menu form"
3188
3189 test "$program_prefix" != NONE &&
3190   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3191 # Use a double $ so make ignores it.
3192 test "$program_suffix" != NONE &&
3193   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3194 # Double any \ or $.  echo might interpret backslashes.
3195 # By default was `s,x,x', remove it if useless.
3196 cat <<\_ACEOF >conftest.sed
3197 s/[\\$]/&&/g;s/;s,x,x,$//
3198 _ACEOF
3199 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3200 rm conftest.sed
3201
3202 for ac_prog in mawk gawk nawk awk
3203 do
3204   # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_AWK+set}" = set; then
3209   echo $ECHO_N "(cached) $ECHO_C" >&6
3210 else
3211   if test -n "$AWK"; then
3212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3213 else
3214   ac_save_IFS=$IFS; IFS=$ac_path_separator
3215 ac_dummy="$PATH"
3216 for ac_dir in $ac_dummy; do
3217   IFS=$ac_save_IFS
3218   test -z "$ac_dir" && ac_dir=.
3219   $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_AWK="$ac_prog"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3222 break
3223 done
3224
3225 fi
3226 fi
3227 AWK=$ac_cv_prog_AWK
3228 if test -n "$AWK"; then
3229   echo "$as_me:3229: result: $AWK" >&5
3230 echo "${ECHO_T}$AWK" >&6
3231 else
3232   echo "$as_me:3232: result: no" >&5
3233 echo "${ECHO_T}no" >&6
3234 fi
3235
3236   test -n "$AWK" && break
3237 done
3238
3239 test -z "$AWK" && { { echo "$as_me:3239: error: No awk program found" >&5
3240 echo "$as_me: error: No awk program found" >&2;}
3241    { (exit 1); exit 1; }; }
3242
3243 echo "$as_me:3243: checking for egrep" >&5
3244 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3245 if test "${ac_cv_prog_egrep+set}" = set; then
3246   echo $ECHO_N "(cached) $ECHO_C" >&6
3247 else
3248   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3249     then ac_cv_prog_egrep='grep -E'
3250     else ac_cv_prog_egrep='egrep'
3251     fi
3252 fi
3253 echo "$as_me:3253: result: $ac_cv_prog_egrep" >&5
3254 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3255  EGREP=$ac_cv_prog_egrep
3256
3257 test -z "$EGREP" && { { echo "$as_me:3257: error: No egrep program found" >&5
3258 echo "$as_me: error: No egrep program found" >&2;}
3259    { (exit 1); exit 1; }; }
3260
3261 # Find a good install program.  We prefer a C program (faster),
3262 # so one script is as good as another.  But avoid the broken or
3263 # incompatible versions:
3264 # SysV /etc/install, /usr/sbin/install
3265 # SunOS /usr/etc/install
3266 # IRIX /sbin/install
3267 # AIX /bin/install
3268 # AmigaOS /C/install, which installs bootblocks on floppy discs
3269 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3270 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3271 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3272 # ./install, which can be erroneously created by make from ./install.sh.
3273 echo "$as_me:3273: checking for a BSD compatible install" >&5
3274 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3275 if test -z "$INSTALL"; then
3276 if test "${ac_cv_path_install+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279     ac_save_IFS=$IFS; IFS=$ac_path_separator
3280   for ac_dir in $PATH; do
3281     IFS=$ac_save_IFS
3282     # Account for people who put trailing slashes in PATH elements.
3283     case $ac_dir/ in
3284     / | ./ | .// | /cC/* \
3285     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3286     | /usr/ucb/* ) ;;
3287     *)
3288       # OSF1 and SCO ODT 3.0 have their own names for install.
3289       # Don't use installbsd from OSF since it installs stuff as root
3290       # by default.
3291       for ac_prog in ginstall scoinst install; do
3292         if $as_executable_p "$ac_dir/$ac_prog"; then
3293           if test $ac_prog = install &&
3294             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3295             # AIX install.  It has an incompatible calling convention.
3296             :
3297           elif test $ac_prog = install &&
3298             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3299             # program-specific install script used by HP pwplus--don't use.
3300             :
3301           else
3302             ac_cv_path_install="$ac_dir/$ac_prog -c"
3303             break 2
3304           fi
3305         fi
3306       done
3307       ;;
3308     esac
3309   done
3310
3311 fi
3312   if test "${ac_cv_path_install+set}" = set; then
3313     INSTALL=$ac_cv_path_install
3314   else
3315     # As a last resort, use the slow shell script.  We don't cache a
3316     # path for INSTALL within a source directory, because that will
3317     # break other packages using the cache if that directory is
3318     # removed, or if the path is relative.
3319     INSTALL=$ac_install_sh
3320   fi
3321 fi
3322 echo "$as_me:3322: result: $INSTALL" >&5
3323 echo "${ECHO_T}$INSTALL" >&6
3324
3325 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3326 # It thinks the first close brace ends the variable substitution.
3327 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3328
3329 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3330
3331 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3332
3333 case $INSTALL in
3334 /*)
3335   ;;
3336 *)
3337   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3338   test -z "$cf_dir" && cf_dir=.
3339   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3340   ;;
3341 esac
3342
3343 for ac_prog in tdlint lint alint splint lclint
3344 do
3345   # Extract the first word of "$ac_prog", so it can be a program name with args.
3346 set dummy $ac_prog; ac_word=$2
3347 echo "$as_me:3347: checking for $ac_word" >&5
3348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3349 if test "${ac_cv_prog_LINT+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   if test -n "$LINT"; then
3353   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3354 else
3355   ac_save_IFS=$IFS; IFS=$ac_path_separator
3356 ac_dummy="$PATH"
3357 for ac_dir in $ac_dummy; do
3358   IFS=$ac_save_IFS
3359   test -z "$ac_dir" && ac_dir=.
3360   $as_executable_p "$ac_dir/$ac_word" || continue
3361 ac_cv_prog_LINT="$ac_prog"
3362 echo "$as_me:3362: found $ac_dir/$ac_word" >&5
3363 break
3364 done
3365
3366 fi
3367 fi
3368 LINT=$ac_cv_prog_LINT
3369 if test -n "$LINT"; then
3370   echo "$as_me:3370: result: $LINT" >&5
3371 echo "${ECHO_T}$LINT" >&6
3372 else
3373   echo "$as_me:3373: result: no" >&5
3374 echo "${ECHO_T}no" >&6
3375 fi
3376
3377   test -n "$LINT" && break
3378 done
3379
3380 echo "$as_me:3380: checking whether ln -s works" >&5
3381 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3382 LN_S=$as_ln_s
3383 if test "$LN_S" = "ln -s"; then
3384   echo "$as_me:3384: result: yes" >&5
3385 echo "${ECHO_T}yes" >&6
3386 else
3387   echo "$as_me:3387: result: no, using $LN_S" >&5
3388 echo "${ECHO_T}no, using $LN_S" >&6
3389 fi
3390
3391 echo "$as_me:3391: checking for long file names" >&5
3392 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3393 if test "${ac_cv_sys_long_file_names+set}" = set; then
3394   echo $ECHO_N "(cached) $ECHO_C" >&6
3395 else
3396   ac_cv_sys_long_file_names=yes
3397 # Test for long file names in all the places we know might matter:
3398 #      .                the current directory, where building will happen
3399 #      $prefix/lib      where we will be installing things
3400 #      $exec_prefix/lib likewise
3401 # eval it to expand exec_prefix.
3402 #      $TMPDIR          if set, where it might want to write temporary files
3403 # if $TMPDIR is not set:
3404 #      /tmp             where it might want to write temporary files
3405 #      /var/tmp         likewise
3406 #      /usr/tmp         likewise
3407 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3408   ac_tmpdirs=$TMPDIR
3409 else
3410   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3411 fi
3412 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3413   test -d $ac_dir || continue
3414   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3415   ac_xdir=$ac_dir/cf$$
3416   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3417   ac_tf1=$ac_xdir/conftest9012345
3418   ac_tf2=$ac_xdir/conftest9012346
3419   (echo 1 >$ac_tf1) 2>/dev/null
3420   (echo 2 >$ac_tf2) 2>/dev/null
3421   ac_val=`cat $ac_tf1 2>/dev/null`
3422   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3423     ac_cv_sys_long_file_names=no
3424     rm -rf $ac_xdir 2>/dev/null
3425     break
3426   fi
3427   rm -rf $ac_xdir 2>/dev/null
3428 done
3429 fi
3430 echo "$as_me:3430: result: $ac_cv_sys_long_file_names" >&5
3431 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3432 if test $ac_cv_sys_long_file_names = yes; then
3433
3434 cat >>confdefs.h <<\EOF
3435 #define HAVE_LONG_FILE_NAMES 1
3436 EOF
3437
3438 fi
3439
3440 # if we find pkg-config, check if we should install the ".pc" files.
3441
3442 echo "$as_me:3442: checking if you want to use pkg-config" >&5
3443 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3444
3445 # Check whether --with-pkg-config or --without-pkg-config was given.
3446 if test "${with_pkg_config+set}" = set; then
3447   withval="$with_pkg_config"
3448   cf_pkg_config=$withval
3449 else
3450   cf_pkg_config=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_pkg_config" >&5
3453 echo "${ECHO_T}$cf_pkg_config" >&6
3454
3455 case $cf_pkg_config in #(vi
3456 no) #(vi
3457         PKG_CONFIG=none
3458         ;;
3459 yes) #(vi
3460         # Extract the first word of "pkg-config", so it can be a program name with args.
3461 set dummy pkg-config; ac_word=$2
3462 echo "$as_me:3462: checking for $ac_word" >&5
3463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3464 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3465   echo $ECHO_N "(cached) $ECHO_C" >&6
3466 else
3467   case $PKG_CONFIG in
3468   [\\/]* | ?:[\\/]*)
3469   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3470   ;;
3471   *)
3472   ac_save_IFS=$IFS; IFS=$ac_path_separator
3473 ac_dummy="$PATH"
3474 for ac_dir in $ac_dummy; do
3475   IFS=$ac_save_IFS
3476   test -z "$ac_dir" && ac_dir=.
3477   if $as_executable_p "$ac_dir/$ac_word"; then
3478    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3479    echo "$as_me:3479: found $ac_dir/$ac_word" >&5
3480    break
3481 fi
3482 done
3483
3484   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3485   ;;
3486 esac
3487 fi
3488 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3489
3490 if test -n "$PKG_CONFIG"; then
3491   echo "$as_me:3491: result: $PKG_CONFIG" >&5
3492 echo "${ECHO_T}$PKG_CONFIG" >&6
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496 fi
3497
3498         ;;
3499 *)
3500         PKG_CONFIG=$withval
3501         ;;
3502 esac
3503
3504 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3505 if test "$PKG_CONFIG" != none ; then
3506
3507 if test "x$prefix" != xNONE; then
3508   cf_path_syntax="$prefix"
3509 else
3510   cf_path_syntax="$ac_default_prefix"
3511 fi
3512
3513 case ".$PKG_CONFIG" in #(vi
3514 .\$\(*\)*|.\'*\'*) #(vi
3515   ;;
3516 ..|./*|.\\*) #(vi
3517   ;;
3518 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3519   ;;
3520 .\${*prefix}*) #(vi
3521   eval PKG_CONFIG="$PKG_CONFIG"
3522   case ".$PKG_CONFIG" in #(vi
3523   .NONE/*)
3524     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3525     ;;
3526   esac
3527   ;; #(vi
3528 .no|.NONE/*)
3529   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3530   ;;
3531 *)
3532   { { echo "$as_me:3532: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3533 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3534    { (exit 1); exit 1; }; }
3535   ;;
3536 esac
3537
3538 fi
3539
3540 if test "$PKG_CONFIG" != no ; then
3541         echo "$as_me:3541: checking if we should install .pc files for $PKG_CONFIG" >&5
3542 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3543
3544         # Leave this as something that can be overridden in the environment.
3545         if test -z "$PKG_CONFIG_LIBDIR" ; then
3546                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3547         fi
3548         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3549         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3550
3551 # Check whether --enable-pc-files or --disable-pc-files was given.
3552 if test "${enable_pc_files+set}" = set; then
3553   enableval="$enable_pc_files"
3554   enable_pc_files=$enableval
3555 else
3556   enable_pc_files=no
3557 fi;
3558                 echo "$as_me:3558: result: $enable_pc_files" >&5
3559 echo "${ECHO_T}$enable_pc_files" >&6
3560         else
3561                 echo "$as_me:3561: result: no" >&5
3562 echo "${ECHO_T}no" >&6
3563                 { echo "$as_me:3563: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3564 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3565                 enable_pc_files=no
3566         fi
3567 fi
3568
3569 echo "$as_me:3569: checking if we should assume mixed-case filenames" >&5
3570 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3571
3572 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3573 if test "${enable_mixed_case+set}" = set; then
3574   enableval="$enable_mixed_case"
3575   enable_mixedcase=$enableval
3576 else
3577   enable_mixedcase=auto
3578 fi;
3579 echo "$as_me:3579: result: $enable_mixedcase" >&5
3580 echo "${ECHO_T}$enable_mixedcase" >&6
3581 if test "$enable_mixedcase" = "auto" ; then
3582
3583 echo "$as_me:3583: checking if filesystem supports mixed-case filenames" >&5
3584 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3585 if test "${cf_cv_mixedcase+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588
3589 if test "$cross_compiling" = yes ; then
3590         case $target_alias in #(vi
3591         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3592                 cf_cv_mixedcase=no
3593                 ;;
3594         *)
3595                 cf_cv_mixedcase=yes
3596                 ;;
3597         esac
3598 else
3599         rm -f conftest CONFTEST
3600         echo test >conftest
3601         if test -f CONFTEST ; then
3602                 cf_cv_mixedcase=no
3603         else
3604                 cf_cv_mixedcase=yes
3605         fi
3606         rm -f conftest CONFTEST
3607 fi
3608
3609 fi
3610 echo "$as_me:3610: result: $cf_cv_mixedcase" >&5
3611 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3612 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3613 #define MIXEDCASE_FILENAMES 1
3614 EOF
3615
3616 else
3617     cf_cv_mixedcase=$enable_mixedcase
3618     if test "$enable_mixedcase" = "yes" ; then
3619         cat >>confdefs.h <<\EOF
3620 #define MIXEDCASE_FILENAMES 1
3621 EOF
3622
3623     fi
3624 fi
3625
3626 # do this after mixed-case option (tags/TAGS is not as important as tic).
3627 echo "$as_me:3627: checking whether ${MAKE-make} sets \${MAKE}" >&5
3628 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3629 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3630 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3631   echo $ECHO_N "(cached) $ECHO_C" >&6
3632 else
3633   cat >conftest.make <<\EOF
3634 all:
3635         @echo 'ac_maketemp="${MAKE}"'
3636 EOF
3637 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3638 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3639 if test -n "$ac_maketemp"; then
3640   eval ac_cv_prog_make_${ac_make}_set=yes
3641 else
3642   eval ac_cv_prog_make_${ac_make}_set=no
3643 fi
3644 rm -f conftest.make
3645 fi
3646 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3647   echo "$as_me:3647: result: yes" >&5
3648 echo "${ECHO_T}yes" >&6
3649   SET_MAKE=
3650 else
3651   echo "$as_me:3651: result: no" >&5
3652 echo "${ECHO_T}no" >&6
3653   SET_MAKE="MAKE=${MAKE-make}"
3654 fi
3655
3656 for ac_prog in exctags ctags
3657 do
3658   # Extract the first word of "$ac_prog", so it can be a program name with args.
3659 set dummy $ac_prog; ac_word=$2
3660 echo "$as_me:3660: checking for $ac_word" >&5
3661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3662 if test "${ac_cv_prog_CTAGS+set}" = set; then
3663   echo $ECHO_N "(cached) $ECHO_C" >&6
3664 else
3665   if test -n "$CTAGS"; then
3666   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3667 else
3668   ac_save_IFS=$IFS; IFS=$ac_path_separator
3669 ac_dummy="$PATH"
3670 for ac_dir in $ac_dummy; do
3671   IFS=$ac_save_IFS
3672   test -z "$ac_dir" && ac_dir=.
3673   $as_executable_p "$ac_dir/$ac_word" || continue
3674 ac_cv_prog_CTAGS="$ac_prog"
3675 echo "$as_me:3675: found $ac_dir/$ac_word" >&5
3676 break
3677 done
3678
3679 fi
3680 fi
3681 CTAGS=$ac_cv_prog_CTAGS
3682 if test -n "$CTAGS"; then
3683   echo "$as_me:3683: result: $CTAGS" >&5
3684 echo "${ECHO_T}$CTAGS" >&6
3685 else
3686   echo "$as_me:3686: result: no" >&5
3687 echo "${ECHO_T}no" >&6
3688 fi
3689
3690   test -n "$CTAGS" && break
3691 done
3692
3693 for ac_prog in exetags etags
3694 do
3695   # Extract the first word of "$ac_prog", so it can be a program name with args.
3696 set dummy $ac_prog; ac_word=$2
3697 echo "$as_me:3697: checking for $ac_word" >&5
3698 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3699 if test "${ac_cv_prog_ETAGS+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702   if test -n "$ETAGS"; then
3703   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3704 else
3705   ac_save_IFS=$IFS; IFS=$ac_path_separator
3706 ac_dummy="$PATH"
3707 for ac_dir in $ac_dummy; do
3708   IFS=$ac_save_IFS
3709   test -z "$ac_dir" && ac_dir=.
3710   $as_executable_p "$ac_dir/$ac_word" || continue
3711 ac_cv_prog_ETAGS="$ac_prog"
3712 echo "$as_me:3712: found $ac_dir/$ac_word" >&5
3713 break
3714 done
3715
3716 fi
3717 fi
3718 ETAGS=$ac_cv_prog_ETAGS
3719 if test -n "$ETAGS"; then
3720   echo "$as_me:3720: result: $ETAGS" >&5
3721 echo "${ECHO_T}$ETAGS" >&6
3722 else
3723   echo "$as_me:3723: result: no" >&5
3724 echo "${ECHO_T}no" >&6
3725 fi
3726
3727   test -n "$ETAGS" && break
3728 done
3729
3730 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3731 set dummy ${CTAGS-ctags}; ac_word=$2
3732 echo "$as_me:3732: checking for $ac_word" >&5
3733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3734 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3735   echo $ECHO_N "(cached) $ECHO_C" >&6
3736 else
3737   if test -n "$MAKE_LOWER_TAGS"; then
3738   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3739 else
3740   ac_save_IFS=$IFS; IFS=$ac_path_separator
3741 ac_dummy="$PATH"
3742 for ac_dir in $ac_dummy; do
3743   IFS=$ac_save_IFS
3744   test -z "$ac_dir" && ac_dir=.
3745   $as_executable_p "$ac_dir/$ac_word" || continue
3746 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3747 echo "$as_me:3747: found $ac_dir/$ac_word" >&5
3748 break
3749 done
3750
3751   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3752 fi
3753 fi
3754 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3755 if test -n "$MAKE_LOWER_TAGS"; then
3756   echo "$as_me:3756: result: $MAKE_LOWER_TAGS" >&5
3757 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3758 else
3759   echo "$as_me:3759: result: no" >&5
3760 echo "${ECHO_T}no" >&6
3761 fi
3762
3763 if test "$cf_cv_mixedcase" = yes ; then
3764         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3765 set dummy ${ETAGS-etags}; ac_word=$2
3766 echo "$as_me:3766: checking for $ac_word" >&5
3767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3768 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3769   echo $ECHO_N "(cached) $ECHO_C" >&6
3770 else
3771   if test -n "$MAKE_UPPER_TAGS"; then
3772   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3773 else
3774   ac_save_IFS=$IFS; IFS=$ac_path_separator
3775 ac_dummy="$PATH"
3776 for ac_dir in $ac_dummy; do
3777   IFS=$ac_save_IFS
3778   test -z "$ac_dir" && ac_dir=.
3779   $as_executable_p "$ac_dir/$ac_word" || continue
3780 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3781 echo "$as_me:3781: found $ac_dir/$ac_word" >&5
3782 break
3783 done
3784
3785   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3786 fi
3787 fi
3788 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3789 if test -n "$MAKE_UPPER_TAGS"; then
3790   echo "$as_me:3790: result: $MAKE_UPPER_TAGS" >&5
3791 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3792 else
3793   echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3795 fi
3796
3797 else
3798         MAKE_UPPER_TAGS=no
3799 fi
3800
3801 if test "$MAKE_UPPER_TAGS" = yes ; then
3802         MAKE_UPPER_TAGS=
3803 else
3804         MAKE_UPPER_TAGS="#"
3805 fi
3806
3807 if test "$MAKE_LOWER_TAGS" = yes ; then
3808         MAKE_LOWER_TAGS=
3809 else
3810         MAKE_LOWER_TAGS="#"
3811 fi
3812
3813 echo "$as_me:3813: checking for makeflags variable" >&5
3814 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3815 if test "${cf_cv_makeflags+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818
3819         cf_cv_makeflags=''
3820         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3821         do
3822                 cat >cf_makeflags.tmp <<CF_EOF
3823 SHELL = /bin/sh
3824 all :
3825         @ echo '.$cf_option'
3826 CF_EOF
3827                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3828                 case "$cf_result" in
3829                 .*k)
3830                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3831                         case "$cf_result" in
3832                         .*CC=*) cf_cv_makeflags=
3833                                 ;;
3834                         *)      cf_cv_makeflags=$cf_option
3835                                 ;;
3836                         esac
3837                         break
3838                         ;;
3839                 .-)     ;;
3840                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3841                         ;;
3842                 esac
3843         done
3844         rm -f cf_makeflags.tmp
3845
3846 fi
3847 echo "$as_me:3847: result: $cf_cv_makeflags" >&5
3848 echo "${ECHO_T}$cf_cv_makeflags" >&6
3849
3850 if test -n "$ac_tool_prefix"; then
3851   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3852 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3853 echo "$as_me:3853: checking for $ac_word" >&5
3854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3855 if test "${ac_cv_prog_RANLIB+set}" = set; then
3856   echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858   if test -n "$RANLIB"; then
3859   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3860 else
3861   ac_save_IFS=$IFS; IFS=$ac_path_separator
3862 ac_dummy="$PATH"
3863 for ac_dir in $ac_dummy; do
3864   IFS=$ac_save_IFS
3865   test -z "$ac_dir" && ac_dir=.
3866   $as_executable_p "$ac_dir/$ac_word" || continue
3867 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3868 echo "$as_me:3868: found $ac_dir/$ac_word" >&5
3869 break
3870 done
3871
3872 fi
3873 fi
3874 RANLIB=$ac_cv_prog_RANLIB
3875 if test -n "$RANLIB"; then
3876   echo "$as_me:3876: result: $RANLIB" >&5
3877 echo "${ECHO_T}$RANLIB" >&6
3878 else
3879   echo "$as_me:3879: result: no" >&5
3880 echo "${ECHO_T}no" >&6
3881 fi
3882
3883 fi
3884 if test -z "$ac_cv_prog_RANLIB"; then
3885   ac_ct_RANLIB=$RANLIB
3886   # Extract the first word of "ranlib", so it can be a program name with args.
3887 set dummy ranlib; ac_word=$2
3888 echo "$as_me:3888: checking for $ac_word" >&5
3889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3890 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   if test -n "$ac_ct_RANLIB"; then
3894   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3895 else
3896   ac_save_IFS=$IFS; IFS=$ac_path_separator
3897 ac_dummy="$PATH"
3898 for ac_dir in $ac_dummy; do
3899   IFS=$ac_save_IFS
3900   test -z "$ac_dir" && ac_dir=.
3901   $as_executable_p "$ac_dir/$ac_word" || continue
3902 ac_cv_prog_ac_ct_RANLIB="ranlib"
3903 echo "$as_me:3903: found $ac_dir/$ac_word" >&5
3904 break
3905 done
3906
3907   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3908 fi
3909 fi
3910 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3911 if test -n "$ac_ct_RANLIB"; then
3912   echo "$as_me:3912: result: $ac_ct_RANLIB" >&5
3913 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3914 else
3915   echo "$as_me:3915: result: no" >&5
3916 echo "${ECHO_T}no" >&6
3917 fi
3918
3919   RANLIB=$ac_ct_RANLIB
3920 else
3921   RANLIB="$ac_cv_prog_RANLIB"
3922 fi
3923
3924 if test -n "$ac_tool_prefix"; then
3925   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3926 set dummy ${ac_tool_prefix}ld; ac_word=$2
3927 echo "$as_me:3927: checking for $ac_word" >&5
3928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3929 if test "${ac_cv_prog_LD+set}" = set; then
3930   echo $ECHO_N "(cached) $ECHO_C" >&6
3931 else
3932   if test -n "$LD"; then
3933   ac_cv_prog_LD="$LD" # Let the user override the test.
3934 else
3935   ac_save_IFS=$IFS; IFS=$ac_path_separator
3936 ac_dummy="$PATH"
3937 for ac_dir in $ac_dummy; do
3938   IFS=$ac_save_IFS
3939   test -z "$ac_dir" && ac_dir=.
3940   $as_executable_p "$ac_dir/$ac_word" || continue
3941 ac_cv_prog_LD="${ac_tool_prefix}ld"
3942 echo "$as_me:3942: found $ac_dir/$ac_word" >&5
3943 break
3944 done
3945
3946 fi
3947 fi
3948 LD=$ac_cv_prog_LD
3949 if test -n "$LD"; then
3950   echo "$as_me:3950: result: $LD" >&5
3951 echo "${ECHO_T}$LD" >&6
3952 else
3953   echo "$as_me:3953: result: no" >&5
3954 echo "${ECHO_T}no" >&6
3955 fi
3956
3957 fi
3958 if test -z "$ac_cv_prog_LD"; then
3959   ac_ct_LD=$LD
3960   # Extract the first word of "ld", so it can be a program name with args.
3961 set dummy ld; ac_word=$2
3962 echo "$as_me:3962: checking for $ac_word" >&5
3963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3964 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3965   echo $ECHO_N "(cached) $ECHO_C" >&6
3966 else
3967   if test -n "$ac_ct_LD"; then
3968   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3969 else
3970   ac_save_IFS=$IFS; IFS=$ac_path_separator
3971 ac_dummy="$PATH"
3972 for ac_dir in $ac_dummy; do
3973   IFS=$ac_save_IFS
3974   test -z "$ac_dir" && ac_dir=.
3975   $as_executable_p "$ac_dir/$ac_word" || continue
3976 ac_cv_prog_ac_ct_LD="ld"
3977 echo "$as_me:3977: found $ac_dir/$ac_word" >&5
3978 break
3979 done
3980
3981   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3982 fi
3983 fi
3984 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3985 if test -n "$ac_ct_LD"; then
3986   echo "$as_me:3986: result: $ac_ct_LD" >&5
3987 echo "${ECHO_T}$ac_ct_LD" >&6
3988 else
3989   echo "$as_me:3989: result: no" >&5
3990 echo "${ECHO_T}no" >&6
3991 fi
3992
3993   LD=$ac_ct_LD
3994 else
3995   LD="$ac_cv_prog_LD"
3996 fi
3997
3998 if test -n "$ac_tool_prefix"; then
3999   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4000 set dummy ${ac_tool_prefix}ar; ac_word=$2
4001 echo "$as_me:4001: checking for $ac_word" >&5
4002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4003 if test "${ac_cv_prog_AR+set}" = set; then
4004   echo $ECHO_N "(cached) $ECHO_C" >&6
4005 else
4006   if test -n "$AR"; then
4007   ac_cv_prog_AR="$AR" # Let the user override the test.
4008 else
4009   ac_save_IFS=$IFS; IFS=$ac_path_separator
4010 ac_dummy="$PATH"
4011 for ac_dir in $ac_dummy; do
4012   IFS=$ac_save_IFS
4013   test -z "$ac_dir" && ac_dir=.
4014   $as_executable_p "$ac_dir/$ac_word" || continue
4015 ac_cv_prog_AR="${ac_tool_prefix}ar"
4016 echo "$as_me:4016: found $ac_dir/$ac_word" >&5
4017 break
4018 done
4019
4020 fi
4021 fi
4022 AR=$ac_cv_prog_AR
4023 if test -n "$AR"; then
4024   echo "$as_me:4024: result: $AR" >&5
4025 echo "${ECHO_T}$AR" >&6
4026 else
4027   echo "$as_me:4027: result: no" >&5
4028 echo "${ECHO_T}no" >&6
4029 fi
4030
4031 fi
4032 if test -z "$ac_cv_prog_AR"; then
4033   ac_ct_AR=$AR
4034   # Extract the first word of "ar", so it can be a program name with args.
4035 set dummy ar; ac_word=$2
4036 echo "$as_me:4036: checking for $ac_word" >&5
4037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4038 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4039   echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041   if test -n "$ac_ct_AR"; then
4042   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4043 else
4044   ac_save_IFS=$IFS; IFS=$ac_path_separator
4045 ac_dummy="$PATH"
4046 for ac_dir in $ac_dummy; do
4047   IFS=$ac_save_IFS
4048   test -z "$ac_dir" && ac_dir=.
4049   $as_executable_p "$ac_dir/$ac_word" || continue
4050 ac_cv_prog_ac_ct_AR="ar"
4051 echo "$as_me:4051: found $ac_dir/$ac_word" >&5
4052 break
4053 done
4054
4055   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4056 fi
4057 fi
4058 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4059 if test -n "$ac_ct_AR"; then
4060   echo "$as_me:4060: result: $ac_ct_AR" >&5
4061 echo "${ECHO_T}$ac_ct_AR" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067   AR=$ac_ct_AR
4068 else
4069   AR="$ac_cv_prog_AR"
4070 fi
4071
4072 if test -n "$ac_tool_prefix"; then
4073   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4074 set dummy ${ac_tool_prefix}ar; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_prog_AR+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   if test -n "$AR"; then
4081   ac_cv_prog_AR="$AR" # Let the user override the test.
4082 else
4083   ac_save_IFS=$IFS; IFS=$ac_path_separator
4084 ac_dummy="$PATH"
4085 for ac_dir in $ac_dummy; do
4086   IFS=$ac_save_IFS
4087   test -z "$ac_dir" && ac_dir=.
4088   $as_executable_p "$ac_dir/$ac_word" || continue
4089 ac_cv_prog_AR="${ac_tool_prefix}ar"
4090 echo "$as_me:4090: found $ac_dir/$ac_word" >&5
4091 break
4092 done
4093
4094 fi
4095 fi
4096 AR=$ac_cv_prog_AR
4097 if test -n "$AR"; then
4098   echo "$as_me:4098: result: $AR" >&5
4099 echo "${ECHO_T}$AR" >&6
4100 else
4101   echo "$as_me:4101: result: no" >&5
4102 echo "${ECHO_T}no" >&6
4103 fi
4104
4105 fi
4106 if test -z "$ac_cv_prog_AR"; then
4107   ac_ct_AR=$AR
4108   # Extract the first word of "ar", so it can be a program name with args.
4109 set dummy ar; ac_word=$2
4110 echo "$as_me:4110: checking for $ac_word" >&5
4111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4112 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115   if test -n "$ac_ct_AR"; then
4116   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4117 else
4118   ac_save_IFS=$IFS; IFS=$ac_path_separator
4119 ac_dummy="$PATH"
4120 for ac_dir in $ac_dummy; do
4121   IFS=$ac_save_IFS
4122   test -z "$ac_dir" && ac_dir=.
4123   $as_executable_p "$ac_dir/$ac_word" || continue
4124 ac_cv_prog_ac_ct_AR="ar"
4125 echo "$as_me:4125: found $ac_dir/$ac_word" >&5
4126 break
4127 done
4128
4129   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4130 fi
4131 fi
4132 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4133 if test -n "$ac_ct_AR"; then
4134   echo "$as_me:4134: result: $ac_ct_AR" >&5
4135 echo "${ECHO_T}$ac_ct_AR" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   AR=$ac_ct_AR
4142 else
4143   AR="$ac_cv_prog_AR"
4144 fi
4145
4146 echo "$as_me:4146: checking for options to update archives" >&5
4147 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4148 if test "${cf_cv_ar_flags+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151
4152         cf_cv_ar_flags=unknown
4153         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4154         do
4155                 rm -f conftest.$ac_cv_objext
4156                 rm -f conftest.a
4157
4158                 cat >conftest.$ac_ext <<EOF
4159 #line 4159 "configure"
4160 int     testdata[3] = { 123, 456, 789 };
4161 EOF
4162                 if { (eval echo "$as_me:4162: \"$ac_compile\"") >&5
4163   (eval $ac_compile) 2>&5
4164   ac_status=$?
4165   echo "$as_me:4165: \$? = $ac_status" >&5
4166   (exit $ac_status); } ; then
4167                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4168                         if test -f conftest.a ; then
4169                                 cf_cv_ar_flags=$cf_ar_flags
4170                                 break
4171                         fi
4172                 else
4173                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4174
4175 echo "${as_me-configure}:4175: testing cannot compile test-program ..." 1>&5
4176
4177                         break
4178                 fi
4179         done
4180         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4181
4182 fi
4183 echo "$as_me:4183: result: $cf_cv_ar_flags" >&5
4184 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4185 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4186 ARFLAGS=$cf_cv_ar_flags
4187
4188 echo "$as_me:4188: checking if you have specified an install-prefix" >&5
4189 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4190
4191 # Check whether --with-install-prefix or --without-install-prefix was given.
4192 if test "${with_install_prefix+set}" = set; then
4193   withval="$with_install_prefix"
4194   case "$withval" in #(vi
4195         yes|no) #(vi
4196                 ;;
4197         *)      DESTDIR="$withval"
4198                 ;;
4199         esac
4200 fi;
4201 echo "$as_me:4201: result: $DESTDIR" >&5
4202 echo "${ECHO_T}$DESTDIR" >&6
4203
4204 ###############################################################################
4205
4206 # If we're cross-compiling, allow the user to override the tools and their
4207 # options.  The configure script is oriented toward identifying the host
4208 # compiler, etc., but we need a build compiler to generate parts of the source.
4209
4210 if test "$cross_compiling" = yes ; then
4211
4212         # defaults that we might want to override
4213         : ${BUILD_CFLAGS:=''}
4214         : ${BUILD_CPPFLAGS:=''}
4215         : ${BUILD_LDFLAGS:=''}
4216         : ${BUILD_LIBS:=''}
4217         : ${BUILD_EXEEXT:='$x'}
4218         : ${BUILD_OBJEXT:='o'}
4219
4220 # Check whether --with-build-cc or --without-build-cc was given.
4221 if test "${with_build_cc+set}" = set; then
4222   withval="$with_build_cc"
4223   BUILD_CC="$withval"
4224 else
4225   for ac_prog in gcc cc cl
4226 do
4227   # Extract the first word of "$ac_prog", so it can be a program name with args.
4228 set dummy $ac_prog; ac_word=$2
4229 echo "$as_me:4229: checking for $ac_word" >&5
4230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4231 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   if test -n "$BUILD_CC"; then
4235   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4236 else
4237   ac_save_IFS=$IFS; IFS=$ac_path_separator
4238 ac_dummy="$PATH"
4239 for ac_dir in $ac_dummy; do
4240   IFS=$ac_save_IFS
4241   test -z "$ac_dir" && ac_dir=.
4242   $as_executable_p "$ac_dir/$ac_word" || continue
4243 ac_cv_prog_BUILD_CC="$ac_prog"
4244 echo "$as_me:4244: found $ac_dir/$ac_word" >&5
4245 break
4246 done
4247
4248 fi
4249 fi
4250 BUILD_CC=$ac_cv_prog_BUILD_CC
4251 if test -n "$BUILD_CC"; then
4252   echo "$as_me:4252: result: $BUILD_CC" >&5
4253 echo "${ECHO_T}$BUILD_CC" >&6
4254 else
4255   echo "$as_me:4255: result: no" >&5
4256 echo "${ECHO_T}no" >&6
4257 fi
4258
4259   test -n "$BUILD_CC" && break
4260 done
4261
4262 fi;
4263         echo "$as_me:4263: checking for native build C compiler" >&5
4264 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4265         echo "$as_me:4265: result: $BUILD_CC" >&5
4266 echo "${ECHO_T}$BUILD_CC" >&6
4267
4268         echo "$as_me:4268: checking for native build C preprocessor" >&5
4269 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4270
4271 # Check whether --with-build-cpp or --without-build-cpp was given.
4272 if test "${with_build_cpp+set}" = set; then
4273   withval="$with_build_cpp"
4274   BUILD_CPP="$withval"
4275 else
4276   BUILD_CPP='${BUILD_CC} -E'
4277 fi;
4278         echo "$as_me:4278: result: $BUILD_CPP" >&5
4279 echo "${ECHO_T}$BUILD_CPP" >&6
4280
4281         echo "$as_me:4281: checking for native build C flags" >&5
4282 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4283
4284 # Check whether --with-build-cflags or --without-build-cflags was given.
4285 if test "${with_build_cflags+set}" = set; then
4286   withval="$with_build_cflags"
4287   BUILD_CFLAGS="$withval"
4288 fi;
4289         echo "$as_me:4289: result: $BUILD_CFLAGS" >&5
4290 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4291
4292         echo "$as_me:4292: checking for native build C preprocessor-flags" >&5
4293 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4294
4295 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4296 if test "${with_build_cppflags+set}" = set; then
4297   withval="$with_build_cppflags"
4298   BUILD_CPPFLAGS="$withval"
4299 fi;
4300         echo "$as_me:4300: result: $BUILD_CPPFLAGS" >&5
4301 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4302
4303         echo "$as_me:4303: checking for native build linker-flags" >&5
4304 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4305
4306 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4307 if test "${with_build_ldflags+set}" = set; then
4308   withval="$with_build_ldflags"
4309   BUILD_LDFLAGS="$withval"
4310 fi;
4311         echo "$as_me:4311: result: $BUILD_LDFLAGS" >&5
4312 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4313
4314         echo "$as_me:4314: checking for native build linker-libraries" >&5
4315 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4316
4317 # Check whether --with-build-libs or --without-build-libs was given.
4318 if test "${with_build_libs+set}" = set; then
4319   withval="$with_build_libs"
4320   BUILD_LIBS="$withval"
4321 fi;
4322         echo "$as_me:4322: result: $BUILD_LIBS" >&5
4323 echo "${ECHO_T}$BUILD_LIBS" >&6
4324
4325         # this assumes we're on Unix.
4326         BUILD_EXEEXT=
4327         BUILD_OBJEXT=o
4328
4329         : ${BUILD_CC:='${CC}'}
4330
4331         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4332                 { { echo "$as_me:4332: error: Cross-build requires two compilers.
4333 Use --with-build-cc to specify the native compiler." >&5
4334 echo "$as_me: error: Cross-build requires two compilers.
4335 Use --with-build-cc to specify the native compiler." >&2;}
4336    { (exit 1); exit 1; }; }
4337         fi
4338
4339 else
4340         : ${BUILD_CC:='${CC}'}
4341         : ${BUILD_CPP:='${CPP}'}
4342         : ${BUILD_CFLAGS:='${CFLAGS}'}
4343         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4344         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4345         : ${BUILD_LIBS:='${LIBS}'}
4346         : ${BUILD_EXEEXT:='$x'}
4347         : ${BUILD_OBJEXT:='o'}
4348 fi
4349
4350 ###############################################################################
4351
4352 ### Options to allow the user to specify the set of libraries which are used.
4353 ### Use "--without-normal --with-shared" to allow the default model to be
4354 ### shared, for example.
4355 cf_list_models=""
4356
4357 LIBTOOL=
4358
4359 # common library maintenance symbols that are convenient for libtool scripts:
4360 LIB_CREATE='${AR} -cr'
4361 LIB_OBJECT='${OBJECTS}'
4362 LIB_SUFFIX=.a
4363 LIB_PREP="$RANLIB"
4364
4365 # symbols used to prop libtool up to enable it to determine what it should be
4366 # doing:
4367 LIB_CLEAN=
4368 LIB_COMPILE=
4369 LIB_LINK='${CC}'
4370 LIB_INSTALL=
4371 LIB_UNINSTALL=
4372
4373 echo "$as_me:4373: checking if you want to build libraries with libtool" >&5
4374 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4375
4376 # Check whether --with-libtool or --without-libtool was given.
4377 if test "${with_libtool+set}" = set; then
4378   withval="$with_libtool"
4379   with_libtool=$withval
4380 else
4381   with_libtool=no
4382 fi;
4383 echo "$as_me:4383: result: $with_libtool" >&5
4384 echo "${ECHO_T}$with_libtool" >&6
4385 if test "$with_libtool" != "no"; then
4386
4387         if test "$with_libtool" != "yes" ; then
4388
4389 if test "x$prefix" != xNONE; then
4390   cf_path_syntax="$prefix"
4391 else
4392   cf_path_syntax="$ac_default_prefix"
4393 fi
4394
4395 case ".$with_libtool" in #(vi
4396 .\$\(*\)*|.\'*\'*) #(vi
4397   ;;
4398 ..|./*|.\\*) #(vi
4399   ;;
4400 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4401   ;;
4402 .\${*prefix}*) #(vi
4403   eval with_libtool="$with_libtool"
4404   case ".$with_libtool" in #(vi
4405   .NONE/*)
4406     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4407     ;;
4408   esac
4409   ;; #(vi
4410 .no|.NONE/*)
4411   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4412   ;;
4413 *)
4414   { { echo "$as_me:4414: error: expected a pathname, not \"$with_libtool\"" >&5
4415 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4416    { (exit 1); exit 1; }; }
4417   ;;
4418 esac
4419
4420                 LIBTOOL=$with_libtool
4421         else
4422                 # Extract the first word of "libtool", so it can be a program name with args.
4423 set dummy libtool; ac_word=$2
4424 echo "$as_me:4424: checking for $ac_word" >&5
4425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4426 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4427   echo $ECHO_N "(cached) $ECHO_C" >&6
4428 else
4429   case $LIBTOOL in
4430   [\\/]* | ?:[\\/]*)
4431   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4432   ;;
4433   *)
4434   ac_save_IFS=$IFS; IFS=$ac_path_separator
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437   IFS=$ac_save_IFS
4438   test -z "$ac_dir" && ac_dir=.
4439   if $as_executable_p "$ac_dir/$ac_word"; then
4440    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4441    echo "$as_me:4441: found $ac_dir/$ac_word" >&5
4442    break
4443 fi
4444 done
4445
4446   ;;
4447 esac
4448 fi
4449 LIBTOOL=$ac_cv_path_LIBTOOL
4450
4451 if test -n "$LIBTOOL"; then
4452   echo "$as_me:4452: result: $LIBTOOL" >&5
4453 echo "${ECHO_T}$LIBTOOL" >&6
4454 else
4455   echo "$as_me:4455: result: no" >&5
4456 echo "${ECHO_T}no" >&6
4457 fi
4458
4459         fi
4460         if test -z "$LIBTOOL" ; then
4461                 { { echo "$as_me:4461: error: Cannot find libtool" >&5
4462 echo "$as_me: error: Cannot find libtool" >&2;}
4463    { (exit 1); exit 1; }; }
4464         fi
4465         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4466         LIB_OBJECT='${OBJECTS:.o=.lo}'
4467         LIB_SUFFIX=.la
4468         LIB_CLEAN='${LIBTOOL} --mode=clean'
4469         LIB_COMPILE='${LIBTOOL} --mode=compile'
4470         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4471         LIB_INSTALL='${LIBTOOL} --mode=install'
4472         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4473         LIB_PREP=:
4474
4475         # Show the version of libtool
4476         echo "$as_me:4476: checking version of libtool" >&5
4477 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4478
4479         # Save the version in a cache variable - this is not entirely a good
4480         # thing, but the version string from libtool is very ugly, and for
4481         # bug reports it might be useful to have the original string. "("
4482         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.].*//'`
4483         echo "$as_me:4483: result: $cf_cv_libtool_version" >&5
4484 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4485         if test -z "$cf_cv_libtool_version" ; then
4486                 { { echo "$as_me:4486: error: This is not GNU libtool" >&5
4487 echo "$as_me: error: This is not GNU libtool" >&2;}
4488    { (exit 1); exit 1; }; }
4489         fi
4490
4491         # special hack to add -no-undefined (which libtool should do for itself)
4492         LT_UNDEF=
4493         case "$cf_cv_system_name" in #(vi
4494         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4495                 LT_UNDEF=-no-undefined
4496                 ;;
4497         esac
4498
4499         # special hack to add --tag option for C++ compiler
4500         case $cf_cv_libtool_version in #(vi
4501         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4502                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4503                 LIBTOOL="$LIBTOOL --tag=CC"
4504                 ;;
4505         *)
4506                 LIBTOOL_CXX="$LIBTOOL"
4507                 ;;
4508         esac
4509 else
4510         LIBTOOL=""
4511         LIBTOOL_CXX=""
4512 fi
4513
4514 test -z "$LIBTOOL" && ECHO_LT=
4515
4516 if test "$with_libtool" != "no" ; then
4517
4518 cf_list_models="$cf_list_models libtool"
4519
4520 else
4521
4522 echo "$as_me:4522: checking if you want to build shared libraries" >&5
4523 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4524
4525 # Check whether --with-shared or --without-shared was given.
4526 if test "${with_shared+set}" = set; then
4527   withval="$with_shared"
4528   with_shared=$withval
4529 else
4530   with_shared=no
4531 fi;
4532 echo "$as_me:4532: result: $with_shared" >&5
4533 echo "${ECHO_T}$with_shared" >&6
4534 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4535
4536 echo "$as_me:4536: checking if you want to build static libraries" >&5
4537 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4538
4539 # Check whether --with-normal or --without-normal was given.
4540 if test "${with_normal+set}" = set; then
4541   withval="$with_normal"
4542   with_normal=$withval
4543 else
4544   with_normal=yes
4545 fi;
4546 echo "$as_me:4546: result: $with_normal" >&5
4547 echo "${ECHO_T}$with_normal" >&6
4548 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4549
4550 echo "$as_me:4550: checking if you want to build debug libraries" >&5
4551 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4552
4553 # Check whether --with-debug or --without-debug was given.
4554 if test "${with_debug+set}" = set; then
4555   withval="$with_debug"
4556   with_debug=$withval
4557 else
4558   with_debug=yes
4559 fi;
4560 echo "$as_me:4560: result: $with_debug" >&5
4561 echo "${ECHO_T}$with_debug" >&6
4562 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4563
4564 echo "$as_me:4564: checking if you want to build profiling libraries" >&5
4565 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4566
4567 # Check whether --with-profile or --without-profile was given.
4568 if test "${with_profile+set}" = set; then
4569   withval="$with_profile"
4570   with_profile=$withval
4571 else
4572   with_profile=no
4573 fi;
4574 echo "$as_me:4574: result: $with_profile" >&5
4575 echo "${ECHO_T}$with_profile" >&6
4576 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4577
4578 fi
4579
4580 ###############################################################################
4581
4582 echo "$as_me:4582: checking for specified models" >&5
4583 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4584 test -z "$cf_list_models" && cf_list_models=normal
4585 test "$with_libtool" != "no" && cf_list_models=libtool
4586 echo "$as_me:4586: result: $cf_list_models" >&5
4587 echo "${ECHO_T}$cf_list_models" >&6
4588
4589 ### Use the first model as the default, and save its suffix for use in building
4590 ### up test-applications.
4591 echo "$as_me:4591: checking for default model" >&5
4592 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4593 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4594 echo "$as_me:4594: result: $DFT_LWR_MODEL" >&5
4595 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4596
4597 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4598
4599 TICS_NAME=tic
4600
4601 TINFO_NAME=tinfo
4602
4603 LIB_NAME=ncurses
4604
4605 LIB_DIR=../lib
4606 LIB_2ND=../../lib
4607
4608         case $cf_cv_system_name in #(vi
4609         OS/2*|os2*) #(vi
4610         LIB_PREFIX=''
4611         ;;
4612         *)      LIB_PREFIX='lib'
4613         ;;
4614         esac
4615 cf_prefix=$LIB_PREFIX
4616
4617 LIB_PREFIX=$cf_prefix
4618
4619 LIB_SUFFIX=
4620
4621 ###############################################################################
4622
4623 echo "$as_me:4623: checking if you want to build a separate terminfo library" >&5
4624 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4625
4626 # Check whether --with-termlib or --without-termlib was given.
4627 if test "${with_termlib+set}" = set; then
4628   withval="$with_termlib"
4629   with_termlib=$withval
4630 else
4631   with_termlib=no
4632 fi;
4633 echo "$as_me:4633: result: $with_termlib" >&5
4634 echo "${ECHO_T}$with_termlib" >&6
4635
4636 echo "$as_me:4636: checking if you want to build a separate tic library" >&5
4637 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4638
4639 # Check whether --with-ticlib or --without-ticlib was given.
4640 if test "${with_ticlib+set}" = set; then
4641   withval="$with_ticlib"
4642   with_ticlib=$withval
4643 else
4644   with_ticlib=no
4645 fi;
4646 echo "$as_me:4646: result: $with_ticlib" >&5
4647 echo "${ECHO_T}$with_ticlib" >&6
4648
4649 ### Checks for special libraries, must be done up-front.
4650 SHLIB_LIST=""
4651
4652 echo "$as_me:4652: checking if you want to link with the GPM mouse library" >&5
4653 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4654
4655 # Check whether --with-gpm or --without-gpm was given.
4656 if test "${with_gpm+set}" = set; then
4657   withval="$with_gpm"
4658   with_gpm=$withval
4659 else
4660   with_gpm=maybe
4661 fi;
4662 echo "$as_me:4662: result: $with_gpm" >&5
4663 echo "${ECHO_T}$with_gpm" >&6
4664
4665 if test "$with_gpm" != no ; then
4666         echo "$as_me:4666: checking for gpm.h" >&5
4667 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4668 if test "${ac_cv_header_gpm_h+set}" = set; then
4669   echo $ECHO_N "(cached) $ECHO_C" >&6
4670 else
4671   cat >conftest.$ac_ext <<_ACEOF
4672 #line 4672 "configure"
4673 #include "confdefs.h"
4674 #include <gpm.h>
4675 _ACEOF
4676 if { (eval echo "$as_me:4676: \"$ac_cpp conftest.$ac_ext\"") >&5
4677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4678   ac_status=$?
4679   egrep -v '^ *\+' conftest.er1 >conftest.err
4680   rm -f conftest.er1
4681   cat conftest.err >&5
4682   echo "$as_me:4682: \$? = $ac_status" >&5
4683   (exit $ac_status); } >/dev/null; then
4684   if test -s conftest.err; then
4685     ac_cpp_err=$ac_c_preproc_warn_flag
4686   else
4687     ac_cpp_err=
4688   fi
4689 else
4690   ac_cpp_err=yes
4691 fi
4692 if test -z "$ac_cpp_err"; then
4693   ac_cv_header_gpm_h=yes
4694 else
4695   echo "$as_me: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   ac_cv_header_gpm_h=no
4698 fi
4699 rm -f conftest.err conftest.$ac_ext
4700 fi
4701 echo "$as_me:4701: result: $ac_cv_header_gpm_h" >&5
4702 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4703 if test $ac_cv_header_gpm_h = yes; then
4704
4705                 cat >>confdefs.h <<\EOF
4706 #define HAVE_GPM_H 1
4707 EOF
4708
4709                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4710                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4711
4712 echo "${as_me-configure}:4712: testing assuming we really have GPM library ..." 1>&5
4713
4714                         cat >>confdefs.h <<\EOF
4715 #define HAVE_LIBGPM 1
4716 EOF
4717
4718                 else
4719                         echo "$as_me:4719: checking for Gpm_Open in -lgpm" >&5
4720 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4721 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4722   echo $ECHO_N "(cached) $ECHO_C" >&6
4723 else
4724   ac_check_lib_save_LIBS=$LIBS
4725 LIBS="-lgpm  $LIBS"
4726 cat >conftest.$ac_ext <<_ACEOF
4727 #line 4727 "configure"
4728 #include "confdefs.h"
4729
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 #ifdef __cplusplus
4732 extern "C"
4733 #endif
4734 /* We use char because int might match the return type of a gcc2
4735    builtin and then its argument prototype would still apply.  */
4736 char Gpm_Open ();
4737 int
4738 main ()
4739 {
4740 Gpm_Open ();
4741   ;
4742   return 0;
4743 }
4744 _ACEOF
4745 rm -f conftest.$ac_objext conftest$ac_exeext
4746 if { (eval echo "$as_me:4746: \"$ac_link\"") >&5
4747   (eval $ac_link) 2>&5
4748   ac_status=$?
4749   echo "$as_me:4749: \$? = $ac_status" >&5
4750   (exit $ac_status); } &&
4751          { ac_try='test -s conftest$ac_exeext'
4752   { (eval echo "$as_me:4752: \"$ac_try\"") >&5
4753   (eval $ac_try) 2>&5
4754   ac_status=$?
4755   echo "$as_me:4755: \$? = $ac_status" >&5
4756   (exit $ac_status); }; }; then
4757   ac_cv_lib_gpm_Gpm_Open=yes
4758 else
4759   echo "$as_me: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 ac_cv_lib_gpm_Gpm_Open=no
4762 fi
4763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4764 LIBS=$ac_check_lib_save_LIBS
4765 fi
4766 echo "$as_me:4766: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4767 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4768 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4769   :
4770 else
4771
4772                                 { { echo "$as_me:4772: error: Cannot link with GPM library" >&5
4773 echo "$as_me: error: Cannot link with GPM library" >&2;}
4774    { (exit 1); exit 1; }; }
4775                 fi
4776                 with_gpm=yes
4777
4778 fi
4779
4780 else
4781
4782                 test "$with_gpm" != maybe && { echo "$as_me:4782: WARNING: Cannot find GPM header" >&5
4783 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4784                 with_gpm=no
4785
4786 fi
4787
4788 fi
4789
4790 if test "$with_gpm" != no ; then
4791         echo "$as_me:4791: checking if you want to load GPM dynamically" >&5
4792 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4793
4794 # Check whether --with-dlsym or --without-dlsym was given.
4795 if test "${with_dlsym+set}" = set; then
4796   withval="$with_dlsym"
4797   with_dlsym=$withval
4798 else
4799   with_dlsym=yes
4800 fi;
4801         echo "$as_me:4801: result: $with_dlsym" >&5
4802 echo "${ECHO_T}$with_dlsym" >&6
4803         if test "$with_dlsym" = yes ; then
4804
4805 cf_have_dlsym=no
4806 echo "$as_me:4806: checking for dlsym" >&5
4807 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4808 if test "${ac_cv_func_dlsym+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   cat >conftest.$ac_ext <<_ACEOF
4812 #line 4812 "configure"
4813 #include "confdefs.h"
4814 /* System header to define __stub macros and hopefully few prototypes,
4815     which can conflict with char dlsym (); below.  */
4816 #include <assert.h>
4817 /* Override any gcc2 internal prototype to avoid an error.  */
4818 #ifdef __cplusplus
4819 extern "C"
4820 #endif
4821 /* We use char because int might match the return type of a gcc2
4822    builtin and then its argument prototype would still apply.  */
4823 char dlsym ();
4824 char (*f) ();
4825
4826 int
4827 main ()
4828 {
4829 /* The GNU C library defines this for functions which it implements
4830     to always fail with ENOSYS.  Some functions are actually named
4831     something starting with __ and the normal name is an alias.  */
4832 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4833 choke me
4834 #else
4835 f = dlsym;
4836 #endif
4837
4838   ;
4839   return 0;
4840 }
4841 _ACEOF
4842 rm -f conftest.$ac_objext conftest$ac_exeext
4843 if { (eval echo "$as_me:4843: \"$ac_link\"") >&5
4844   (eval $ac_link) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); } &&
4848          { ac_try='test -s conftest$ac_exeext'
4849   { (eval echo "$as_me:4849: \"$ac_try\"") >&5
4850   (eval $ac_try) 2>&5
4851   ac_status=$?
4852   echo "$as_me:4852: \$? = $ac_status" >&5
4853   (exit $ac_status); }; }; then
4854   ac_cv_func_dlsym=yes
4855 else
4856   echo "$as_me: failed program was:" >&5
4857 cat conftest.$ac_ext >&5
4858 ac_cv_func_dlsym=no
4859 fi
4860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4861 fi
4862 echo "$as_me:4862: result: $ac_cv_func_dlsym" >&5
4863 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4864 if test $ac_cv_func_dlsym = yes; then
4865   cf_have_dlsym=yes
4866 else
4867
4868 cf_have_libdl=no
4869 echo "$as_me:4869: checking for dlsym in -ldl" >&5
4870 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4871 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   ac_check_lib_save_LIBS=$LIBS
4875 LIBS="-ldl  $LIBS"
4876 cat >conftest.$ac_ext <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4879
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 #ifdef __cplusplus
4882 extern "C"
4883 #endif
4884 /* We use char because int might match the return type of a gcc2
4885    builtin and then its argument prototype would still apply.  */
4886 char dlsym ();
4887 int
4888 main ()
4889 {
4890 dlsym ();
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 rm -f conftest.$ac_objext conftest$ac_exeext
4896 if { (eval echo "$as_me:4896: \"$ac_link\"") >&5
4897   (eval $ac_link) 2>&5
4898   ac_status=$?
4899   echo "$as_me:4899: \$? = $ac_status" >&5
4900   (exit $ac_status); } &&
4901          { ac_try='test -s conftest$ac_exeext'
4902   { (eval echo "$as_me:4902: \"$ac_try\"") >&5
4903   (eval $ac_try) 2>&5
4904   ac_status=$?
4905   echo "$as_me:4905: \$? = $ac_status" >&5
4906   (exit $ac_status); }; }; then
4907   ac_cv_lib_dl_dlsym=yes
4908 else
4909   echo "$as_me: failed program was:" >&5
4910 cat conftest.$ac_ext >&5
4911 ac_cv_lib_dl_dlsym=no
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914 LIBS=$ac_check_lib_save_LIBS
4915 fi
4916 echo "$as_me:4916: result: $ac_cv_lib_dl_dlsym" >&5
4917 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4918 if test $ac_cv_lib_dl_dlsym = yes; then
4919
4920         cf_have_dlsym=yes
4921         cf_have_libdl=yes
4922 fi
4923
4924 fi
4925
4926 if test "$cf_have_dlsym" = yes ; then
4927         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4928
4929         echo "$as_me:4929: checking whether able to link to dl*() functions" >&5
4930 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4931         cat >conftest.$ac_ext <<_ACEOF
4932 #line 4932 "configure"
4933 #include "confdefs.h"
4934 #include <dlfcn.h>
4935 int
4936 main ()
4937 {
4938
4939                 void *obj;
4940                 if ((obj = dlopen("filename", 0)) != 0) {
4941                         if (dlsym(obj, "symbolname") == 0) {
4942                         dlclose(obj);
4943                         }
4944                 }
4945   ;
4946   return 0;
4947 }
4948 _ACEOF
4949 rm -f conftest.$ac_objext conftest$ac_exeext
4950 if { (eval echo "$as_me:4950: \"$ac_link\"") >&5
4951   (eval $ac_link) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); } &&
4955          { ac_try='test -s conftest$ac_exeext'
4956   { (eval echo "$as_me:4956: \"$ac_try\"") >&5
4957   (eval $ac_try) 2>&5
4958   ac_status=$?
4959   echo "$as_me:4959: \$? = $ac_status" >&5
4960   (exit $ac_status); }; }; then
4961
4962                 cat >>confdefs.h <<\EOF
4963 #define HAVE_LIBDL 1
4964 EOF
4965
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969
4970                 { { echo "$as_me:4970: error: Cannot link test program for libdl" >&5
4971 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4972    { (exit 1); exit 1; }; }
4973 fi
4974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4975         echo "$as_me:4975: result: ok" >&5
4976 echo "${ECHO_T}ok" >&6
4977 else
4978         { { echo "$as_me:4978: error: Cannot find dlsym function" >&5
4979 echo "$as_me: error: Cannot find dlsym function" >&2;}
4980    { (exit 1); exit 1; }; }
4981 fi
4982
4983                 if test "$with_gpm" != yes ; then
4984                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4985
4986 echo "${as_me-configure}:4986: testing assuming soname for gpm is $with_gpm ..." 1>&5
4987
4988                         cf_cv_gpm_soname="$with_gpm"
4989                 else
4990
4991 echo "$as_me:4991: checking for soname of gpm library" >&5
4992 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4993 if test "${cf_cv_gpm_soname+set}" = set; then
4994   echo $ECHO_N "(cached) $ECHO_C" >&6
4995 else
4996
4997 cf_cv_gpm_soname=unknown
4998 if test "$cross_compiling" != yes ; then
4999 cat >conftest.$ac_ext <<CF_EOF
5000 #include <gpm.h>
5001 int main()
5002 {
5003 if (Gpm_Open(0,0)) Gpm_Close();
5004         ${cf_cv_main_return:-return}(0);
5005 }
5006 CF_EOF
5007 cf_save_LIBS="$LIBS"
5008         LIBS="-lgpm $LIBS"
5009         if { (eval echo "$as_me:5009: \"$ac_compile\"") >&5
5010   (eval $ac_compile) 2>&5
5011   ac_status=$?
5012   echo "$as_me:5012: \$? = $ac_status" >&5
5013   (exit $ac_status); } ; then
5014                 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015   (eval $ac_link) 2>&5
5016   ac_status=$?
5017   echo "$as_me:5017: \$? = $ac_status" >&5
5018   (exit $ac_status); } ; then
5019                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5020                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5021                 fi
5022         fi
5023 rm -f conftest*
5024 LIBS="$cf_save_LIBS"
5025 fi
5026
5027 fi
5028 echo "$as_me:5028: result: $cf_cv_gpm_soname" >&5
5029 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5030
5031                 fi
5032                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5033 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5034 EOF
5035
5036                 SHLIB_LIST="-ldl $SHLIB_LIST"
5037         else
5038                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5039                 TEST_LIBS="-lgpm $TEST_LIBS"
5040         fi
5041         cat >>confdefs.h <<\EOF
5042 #define HAVE_LIBGPM 1
5043 EOF
5044
5045 echo "$as_me:5045: checking for Gpm_Wgetch in -lgpm" >&5
5046 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5047 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5048   echo $ECHO_N "(cached) $ECHO_C" >&6
5049 else
5050   ac_check_lib_save_LIBS=$LIBS
5051 LIBS="-lgpm  $LIBS"
5052 cat >conftest.$ac_ext <<_ACEOF
5053 #line 5053 "configure"
5054 #include "confdefs.h"
5055
5056 /* Override any gcc2 internal prototype to avoid an error.  */
5057 #ifdef __cplusplus
5058 extern "C"
5059 #endif
5060 /* We use char because int might match the return type of a gcc2
5061    builtin and then its argument prototype would still apply.  */
5062 char Gpm_Wgetch ();
5063 int
5064 main ()
5065 {
5066 Gpm_Wgetch ();
5067   ;
5068   return 0;
5069 }
5070 _ACEOF
5071 rm -f conftest.$ac_objext conftest$ac_exeext
5072 if { (eval echo "$as_me:5072: \"$ac_link\"") >&5
5073   (eval $ac_link) 2>&5
5074   ac_status=$?
5075   echo "$as_me:5075: \$? = $ac_status" >&5
5076   (exit $ac_status); } &&
5077          { ac_try='test -s conftest$ac_exeext'
5078   { (eval echo "$as_me:5078: \"$ac_try\"") >&5
5079   (eval $ac_try) 2>&5
5080   ac_status=$?
5081   echo "$as_me:5081: \$? = $ac_status" >&5
5082   (exit $ac_status); }; }; then
5083   ac_cv_lib_gpm_Gpm_Wgetch=yes
5084 else
5085   echo "$as_me: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5087 ac_cv_lib_gpm_Gpm_Wgetch=no
5088 fi
5089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5090 LIBS=$ac_check_lib_save_LIBS
5091 fi
5092 echo "$as_me:5092: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5093 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5094 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5095
5096 echo "$as_me:5096: checking if GPM is weakly bound to curses library" >&5
5097 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5098 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101
5102 cf_cv_check_gpm_wgetch=unknown
5103 if test "$cross_compiling" != yes ; then
5104
5105 cat >conftest.$ac_ext <<CF_EOF
5106 #include <gpm.h>
5107 int main()
5108 {
5109         Gpm_Wgetch();
5110         ${cf_cv_main_return:-return}(0);
5111 }
5112 CF_EOF
5113
5114         cf_save_LIBS="$LIBS"
5115         # This only works if we can look at the symbol table.  If a shared
5116         # library is stripped for install, we cannot use that.  So we're forced
5117         # to rely on the static library, noting that some packagers may not
5118         # include it.
5119         LIBS="-static -lgpm -dynamic $LIBS"
5120         if { (eval echo "$as_me:5120: \"$ac_compile\"") >&5
5121   (eval $ac_compile) 2>&5
5122   ac_status=$?
5123   echo "$as_me:5123: \$? = $ac_status" >&5
5124   (exit $ac_status); } ; then
5125                 if { (eval echo "$as_me:5125: \"$ac_link\"") >&5
5126   (eval $ac_link) 2>&5
5127   ac_status=$?
5128   echo "$as_me:5128: \$? = $ac_status" >&5
5129   (exit $ac_status); } ; then
5130                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5131                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5132                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5133                 fi
5134         fi
5135         rm -f conftest*
5136         LIBS="$cf_save_LIBS"
5137 fi
5138
5139 fi
5140 echo "$as_me:5140: result: $cf_cv_check_gpm_wgetch" >&5
5141 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5142
5143 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5144         { echo "$as_me:5144: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5145 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5146 fi
5147
5148 fi
5149
5150 fi
5151
5152 # not everyone has "test -c"
5153 if test -c /dev/sysmouse 2>/dev/null ; then
5154 echo "$as_me:5154: checking if you want to use sysmouse" >&5
5155 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5156
5157 # Check whether --with-sysmouse or --without-sysmouse was given.
5158 if test "${with_sysmouse+set}" = set; then
5159   withval="$with_sysmouse"
5160   cf_with_sysmouse=$withval
5161 else
5162   cf_with_sysmouse=maybe
5163 fi;
5164         if test "$cf_with_sysmouse" != no ; then
5165         cat >conftest.$ac_ext <<_ACEOF
5166 #line 5166 "configure"
5167 #include "confdefs.h"
5168
5169 #include <osreldate.h>
5170 #if (__FreeBSD_version >= 400017)
5171 #include <sys/consio.h>
5172 #include <sys/fbio.h>
5173 #else
5174 #include <machine/console.h>
5175 #endif
5176
5177 int
5178 main ()
5179 {
5180
5181         struct mouse_info the_mouse;
5182         ioctl(0, CONS_MOUSECTL, &the_mouse);
5183
5184   ;
5185   return 0;
5186 }
5187 _ACEOF
5188 rm -f conftest.$ac_objext
5189 if { (eval echo "$as_me:5189: \"$ac_compile\"") >&5
5190   (eval $ac_compile) 2>&5
5191   ac_status=$?
5192   echo "$as_me:5192: \$? = $ac_status" >&5
5193   (exit $ac_status); } &&
5194          { ac_try='test -s conftest.$ac_objext'
5195   { (eval echo "$as_me:5195: \"$ac_try\"") >&5
5196   (eval $ac_try) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); }; }; then
5200   cf_with_sysmouse=yes
5201 else
5202   echo "$as_me: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 cf_with_sysmouse=no
5205 fi
5206 rm -f conftest.$ac_objext conftest.$ac_ext
5207         fi
5208 echo "$as_me:5208: result: $cf_with_sysmouse" >&5
5209 echo "${ECHO_T}$cf_with_sysmouse" >&6
5210 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5211 #define USE_SYSMOUSE 1
5212 EOF
5213
5214 fi
5215
5216 if test X"$CC_G_OPT" = X"" ; then
5217         CC_G_OPT='-g'
5218         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5219 fi
5220
5221 if test X"$CXX_G_OPT" = X"" ; then
5222         CXX_G_OPT='-g'
5223         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5224 fi
5225
5226 echo "$as_me:5226: checking for default loader flags" >&5
5227 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5228 case $DFT_LWR_MODEL in
5229 libtool) LD_MODEL=''   ;;
5230 normal)  LD_MODEL=''   ;;
5231 debug)   LD_MODEL=$CC_G_OPT ;;
5232 profile) LD_MODEL='-pg';;
5233 shared)  LD_MODEL=''   ;;
5234 esac
5235 echo "$as_me:5235: result: $LD_MODEL" >&5
5236 echo "${ECHO_T}$LD_MODEL" >&6
5237
5238 case $DFT_LWR_MODEL in
5239 shared)
5240
5241 echo "$as_me:5241: checking if rpath option should be used" >&5
5242 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5243
5244 # Check whether --enable-rpath or --disable-rpath was given.
5245 if test "${enable_rpath+set}" = set; then
5246   enableval="$enable_rpath"
5247   cf_cv_enable_rpath=$enableval
5248 else
5249   cf_cv_enable_rpath=no
5250 fi;
5251 echo "$as_me:5251: result: $cf_cv_enable_rpath" >&5
5252 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5253
5254 echo "$as_me:5254: checking if shared libraries should be relinked during install" >&5
5255 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5256
5257 # Check whether --enable-relink or --disable-relink was given.
5258 if test "${enable_relink+set}" = set; then
5259   enableval="$enable_relink"
5260   cf_cv_do_relink=$enableval
5261 else
5262   cf_cv_do_relink=yes
5263 fi;
5264 echo "$as_me:5264: result: $cf_cv_do_relink" >&5
5265 echo "${ECHO_T}$cf_cv_do_relink" >&6
5266         ;;
5267 esac
5268
5269 LD_RPATH_OPT=
5270 echo "$as_me:5270: checking for an rpath option" >&5
5271 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5272 case $cf_cv_system_name in #(vi
5273 irix*) #(vi
5274         if test "$GCC" = yes; then
5275                 LD_RPATH_OPT="-Wl,-rpath,"
5276         else
5277                 LD_RPATH_OPT="-rpath "
5278         fi
5279         ;;
5280 linux*|gnu*|k*bsd*-gnu) #(vi
5281         LD_RPATH_OPT="-Wl,-rpath,"
5282         ;;
5283 openbsd[2-9].*) #(vi
5284         LD_RPATH_OPT="-Wl,-rpath,"
5285         ;;
5286 freebsd*) #(vi
5287         LD_RPATH_OPT="-rpath "
5288         ;;
5289 netbsd*) #(vi
5290         LD_RPATH_OPT="-Wl,-rpath,"
5291         ;;
5292 osf*|mls+*) #(vi
5293         LD_RPATH_OPT="-rpath "
5294         ;;
5295 solaris2*) #(vi
5296         LD_RPATH_OPT="-R"
5297         ;;
5298 *)
5299         ;;
5300 esac
5301 echo "$as_me:5301: result: $LD_RPATH_OPT" >&5
5302 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5303
5304 case "x$LD_RPATH_OPT" in #(vi
5305 x-R*)
5306         echo "$as_me:5306: checking if we need a space after rpath option" >&5
5307 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5308         cf_save_LIBS="$LIBS"
5309         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5310         cat >conftest.$ac_ext <<_ACEOF
5311 #line 5311 "configure"
5312 #include "confdefs.h"
5313
5314 int
5315 main ()
5316 {
5317
5318   ;
5319   return 0;
5320 }
5321 _ACEOF
5322 rm -f conftest.$ac_objext conftest$ac_exeext
5323 if { (eval echo "$as_me:5323: \"$ac_link\"") >&5
5324   (eval $ac_link) 2>&5
5325   ac_status=$?
5326   echo "$as_me:5326: \$? = $ac_status" >&5
5327   (exit $ac_status); } &&
5328          { ac_try='test -s conftest$ac_exeext'
5329   { (eval echo "$as_me:5329: \"$ac_try\"") >&5
5330   (eval $ac_try) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); }; }; then
5334   cf_rpath_space=no
5335 else
5336   echo "$as_me: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5338 cf_rpath_space=yes
5339 fi
5340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5341         LIBS="$cf_save_LIBS"
5342         echo "$as_me:5342: result: $cf_rpath_space" >&5
5343 echo "${ECHO_T}$cf_rpath_space" >&6
5344         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5345         ;;
5346 esac
5347
5348         LOCAL_LDFLAGS=
5349         LOCAL_LDFLAGS2=
5350         LD_SHARED_OPTS=
5351         INSTALL_LIB="-m 644"
5352
5353         cf_cv_do_symlinks=no
5354         cf_ld_rpath_opt=
5355         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5356
5357         echo "$as_me:5357: checking if release/abi version should be used for shared libs" >&5
5358 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5359
5360 # Check whether --with-shlib-version or --without-shlib-version was given.
5361 if test "${with_shlib_version+set}" = set; then
5362   withval="$with_shlib_version"
5363   test -z "$withval" && withval=auto
5364         case $withval in #(vi
5365         yes) #(vi
5366                 cf_cv_shlib_version=auto
5367                 ;;
5368         rel|abi|auto|no) #(vi
5369                 cf_cv_shlib_version=$withval
5370                 ;;
5371         *)
5372                 { { echo "$as_me:5372: error: option value must be one of: rel, abi, auto or no" >&5
5373 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5374    { (exit 1); exit 1; }; }
5375                 ;;
5376         esac
5377
5378 else
5379   cf_cv_shlib_version=auto
5380 fi;
5381         echo "$as_me:5381: result: $cf_cv_shlib_version" >&5
5382 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5383
5384         cf_cv_rm_so_locs=no
5385
5386         # Some less-capable ports of gcc support only -fpic
5387         CC_SHARED_OPTS=
5388         if test "$GCC" = yes
5389         then
5390                 echo "$as_me:5390: checking which $CC option to use" >&5
5391 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5392                 cf_save_CFLAGS="$CFLAGS"
5393                 for CC_SHARED_OPTS in -fPIC -fpic ''
5394                 do
5395                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5396                         cat >conftest.$ac_ext <<_ACEOF
5397 #line 5397 "configure"
5398 #include "confdefs.h"
5399 #include <stdio.h>
5400 int
5401 main ()
5402 {
5403 int x = 1
5404   ;
5405   return 0;
5406 }
5407 _ACEOF
5408 rm -f conftest.$ac_objext
5409 if { (eval echo "$as_me:5409: \"$ac_compile\"") >&5
5410   (eval $ac_compile) 2>&5
5411   ac_status=$?
5412   echo "$as_me:5412: \$? = $ac_status" >&5
5413   (exit $ac_status); } &&
5414          { ac_try='test -s conftest.$ac_objext'
5415   { (eval echo "$as_me:5415: \"$ac_try\"") >&5
5416   (eval $ac_try) 2>&5
5417   ac_status=$?
5418   echo "$as_me:5418: \$? = $ac_status" >&5
5419   (exit $ac_status); }; }; then
5420   break
5421 else
5422   echo "$as_me: failed program was:" >&5
5423 cat conftest.$ac_ext >&5
5424 fi
5425 rm -f conftest.$ac_objext conftest.$ac_ext
5426                 done
5427                 echo "$as_me:5427: result: $CC_SHARED_OPTS" >&5
5428 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5429                 CFLAGS="$cf_save_CFLAGS"
5430         fi
5431
5432         cf_cv_shlib_version_infix=no
5433
5434         case $cf_cv_system_name in #(vi
5435         aix[56]*) #(vi
5436                 if test "$GCC" = yes; then
5437                         CC_SHARED_OPTS=
5438                         MK_SHARED_LIB="$(CC) -shared"
5439                 fi
5440                 ;;
5441         beos*) #(vi
5442                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5443                 ;;
5444         cygwin*) #(vi
5445                 CC_SHARED_OPTS=
5446                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5447                 cf_cv_shlib_version=cygdll
5448                 cf_cv_shlib_version_infix=cygdll
5449                 cat >mk_shared_lib.sh <<-CF_EOF
5450                 #!/bin/sh
5451                 SHARED_LIB=\$1
5452                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5453                 shift
5454                 cat <<-EOF
5455                 Linking shared library
5456                 ** SHARED_LIB \$SHARED_LIB
5457                 ** IMPORT_LIB \$IMPORT_LIB
5458 EOF
5459                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5460 CF_EOF
5461                 chmod +x mk_shared_lib.sh
5462                 ;;
5463         darwin*) #(vi
5464                 EXTRA_CFLAGS="-no-cpp-precomp"
5465                 CC_SHARED_OPTS="-dynamic"
5466                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5467                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5468                 cf_cv_shlib_version_infix=yes
5469                 echo "$as_me:5469: checking if ld -search_paths_first works" >&5
5470 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5471 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474
5475                         cf_save_LDFLAGS=$LDFLAGS
5476                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5477                         cat >conftest.$ac_ext <<_ACEOF
5478 #line 5478 "configure"
5479 #include "confdefs.h"
5480
5481 int
5482 main ()
5483 {
5484 int i;
5485   ;
5486   return 0;
5487 }
5488 _ACEOF
5489 rm -f conftest.$ac_objext conftest$ac_exeext
5490 if { (eval echo "$as_me:5490: \"$ac_link\"") >&5
5491   (eval $ac_link) 2>&5
5492   ac_status=$?
5493   echo "$as_me:5493: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -s conftest$ac_exeext'
5496   { (eval echo "$as_me:5496: \"$ac_try\"") >&5
5497   (eval $ac_try) 2>&5
5498   ac_status=$?
5499   echo "$as_me:5499: \$? = $ac_status" >&5
5500   (exit $ac_status); }; }; then
5501   cf_cv_ldflags_search_paths_first=yes
5502 else
5503   echo "$as_me: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 cf_cv_ldflags_search_paths_first=no
5506 fi
5507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5508                                 LDFLAGS=$cf_save_LDFLAGS
5509 fi
5510 echo "$as_me:5510: result: $cf_cv_ldflags_search_paths_first" >&5
5511 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5512                 if test $cf_cv_ldflags_search_paths_first = yes; then
5513                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5514                 fi
5515                 ;;
5516         hpux*) #(vi
5517                 # (tested with gcc 2.7.2 -- I don't have c89)
5518                 if test "$GCC" = yes; then
5519                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5520                 else
5521                         CC_SHARED_OPTS='+Z'
5522                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5523                 fi
5524                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5525                 # HP-UX shared libraries must be executable, and should be
5526                 # readonly to exploit a quirk in the memory manager.
5527                 INSTALL_LIB="-m 555"
5528                 ;;
5529         irix*) #(vi
5530                 if test "$cf_cv_enable_rpath" = yes ; then
5531                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5532                 fi
5533                 # tested with IRIX 5.2 and 'cc'.
5534                 if test "$GCC" != yes; then
5535                         CC_SHARED_OPTS='-KPIC'
5536                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5537                 else
5538                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5539                 fi
5540                 cf_cv_rm_so_locs=yes
5541                 ;;
5542         linux*|gnu*|k*bsd*-gnu) #(vi
5543                 if test "$DFT_LWR_MODEL" = "shared" ; then
5544                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5545                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5546                 fi
5547                 if test "$cf_cv_enable_rpath" = yes ; then
5548                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5549                 fi
5550
5551         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5552         if test "$cf_cv_shlib_version" = rel; then
5553                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5554         else
5555                 cf_cv_shared_soname='`basename $@`'
5556         fi
5557
5558                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5559                 ;;
5560         openbsd[2-9].*) #(vi
5561                 if test "$DFT_LWR_MODEL" = "shared" ; then
5562                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5563                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5564                 fi
5565                 if test "$cf_cv_enable_rpath" = yes ; then
5566                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5567                 fi
5568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5569
5570         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5571         if test "$cf_cv_shlib_version" = rel; then
5572                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5573         else
5574                 cf_cv_shared_soname='`basename $@`'
5575         fi
5576
5577                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5578                 ;;
5579         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5580                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5581                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5583                 ;;
5584         freebsd*) #(vi
5585                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5586                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5587                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5588                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5589                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5590                 fi
5591
5592         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5593         if test "$cf_cv_shlib_version" = rel; then
5594                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5595         else
5596                 cf_cv_shared_soname='`basename $@`'
5597         fi
5598
5599                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5600                 ;;
5601         netbsd*) #(vi
5602                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5603                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5604                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5605                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5606                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5607                         if test "$cf_cv_shlib_version" = auto; then
5608                         if test -f /usr/libexec/ld.elf_so; then
5609                                 cf_cv_shlib_version=abi
5610                         else
5611                                 cf_cv_shlib_version=rel
5612                         fi
5613                         fi
5614
5615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5616         if test "$cf_cv_shlib_version" = rel; then
5617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5618         else
5619                 cf_cv_shared_soname='`basename $@`'
5620         fi
5621
5622                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5623                 else
5624                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5625                 fi
5626                 ;;
5627         osf*|mls+*) #(vi
5628                 # tested with OSF/1 V3.2 and 'cc'
5629                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5630                 # link with shared libs).
5631                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5632                 case $host_os in #(vi
5633                 osf4*)
5634                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5635                         ;;
5636                 esac
5637                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5638                 if test "$DFT_LWR_MODEL" = "shared" ; then
5639                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5640                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5641                 fi
5642                 cf_cv_rm_so_locs=yes
5643                 ;;
5644         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5645                 # tested with osr5.0.5
5646                 if test "$GCC" != yes; then
5647                         CC_SHARED_OPTS='-belf -KPIC'
5648                 fi
5649                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5650                 if test "$cf_cv_enable_rpath" = yes ; then
5651                         # only way is to set LD_RUN_PATH but no switch for it
5652                         RUN_PATH=$libdir
5653                 fi
5654                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5655                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5656                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5657                 ;;
5658         sunos4*) #(vi
5659                 # tested with SunOS 4.1.1 and gcc 2.7.0
5660                 if test "$GCC" != yes; then
5661                         CC_SHARED_OPTS='-KPIC'
5662                 fi
5663                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5665                 ;;
5666         solaris2*) #(vi
5667                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5668                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5669                 if test "$DFT_LWR_MODEL" = "shared" ; then
5670                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5671                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5672                 fi
5673                 if test "$cf_cv_enable_rpath" = yes ; then
5674                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5675                 fi
5676
5677         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5678         if test "$cf_cv_shlib_version" = rel; then
5679                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5680         else
5681                 cf_cv_shared_soname='`basename $@`'
5682         fi
5683
5684                 if test "$GCC" != yes; then
5685                         cf_save_CFLAGS="$CFLAGS"
5686                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5687                         do
5688                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5689                                 cat >conftest.$ac_ext <<_ACEOF
5690 #line 5690 "configure"
5691 #include "confdefs.h"
5692 #include <stdio.h>
5693 int
5694 main ()
5695 {
5696 printf("Hello\n");
5697   ;
5698   return 0;
5699 }
5700 _ACEOF
5701 rm -f conftest.$ac_objext
5702 if { (eval echo "$as_me:5702: \"$ac_compile\"") >&5
5703   (eval $ac_compile) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); } &&
5707          { ac_try='test -s conftest.$ac_objext'
5708   { (eval echo "$as_me:5708: \"$ac_try\"") >&5
5709   (eval $ac_try) 2>&5
5710   ac_status=$?
5711   echo "$as_me:5711: \$? = $ac_status" >&5
5712   (exit $ac_status); }; }; then
5713   break
5714 else
5715   echo "$as_me: failed program was:" >&5
5716 cat conftest.$ac_ext >&5
5717 fi
5718 rm -f conftest.$ac_objext conftest.$ac_ext
5719                         done
5720                         CFLAGS="$cf_save_CFLAGS"
5721                         CC_SHARED_OPTS=$cf_shared_opts
5722                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5723                 else
5724                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5725                 fi
5726                 ;;
5727         sysv5uw7*|unix_sv*) #(vi
5728                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5729                 if test "$GCC" != yes; then
5730                         CC_SHARED_OPTS='-KPIC'
5731                 fi
5732                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5733                 ;;
5734         *)
5735                 CC_SHARED_OPTS='unknown'
5736                 MK_SHARED_LIB='echo unknown'
5737                 ;;
5738         esac
5739
5740         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5741         case "$cf_cv_shlib_version" in #(vi
5742         rel|abi)
5743                 case "$MK_SHARED_LIB" in #(vi
5744                 *'-o $@') #(vi
5745                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5746                         ;;
5747                 *)
5748                         { echo "$as_me:5748: WARNING: ignored --with-shlib-version" >&5
5749 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5750                         ;;
5751                 esac
5752                 ;;
5753         esac
5754
5755         if test -n "$cf_ld_rpath_opt" ; then
5756                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5757         fi
5758
5759 if test "$CC_SHARED_OPTS" = "unknown"; then
5760         for model in $cf_list_models; do
5761                 if test "$model" = "shared"; then
5762                         { { echo "$as_me:5762: error: Shared libraries are not supported in this version" >&5
5763 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5764    { (exit 1); exit 1; }; }
5765                 fi
5766         done
5767 fi
5768
5769 ###############################################################################
5770
5771 ###     use option --disable-overwrite to leave out the link to -lcurses
5772 echo "$as_me:5772: checking if you wish to install ncurses overwriting curses" >&5
5773 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5774
5775 # Check whether --enable-overwrite or --disable-overwrite was given.
5776 if test "${enable_overwrite+set}" = set; then
5777   enableval="$enable_overwrite"
5778   with_overwrite=$enableval
5779 else
5780   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5781 fi;
5782 echo "$as_me:5782: result: $with_overwrite" >&5
5783 echo "${ECHO_T}$with_overwrite" >&6
5784
5785 echo "$as_me:5785: checking if external terminfo-database is used" >&5
5786 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5787
5788 # Check whether --enable-database or --disable-database was given.
5789 if test "${enable_database+set}" = set; then
5790   enableval="$enable_database"
5791   use_database=$enableval
5792 else
5793   use_database=yes
5794 fi;
5795 echo "$as_me:5795: result: $use_database" >&5
5796 echo "${ECHO_T}$use_database" >&6
5797
5798 case $host_os in #(vi
5799 os2*) #(vi
5800         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5801         ;;
5802 *) #(vi
5803         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5804         ;;
5805 esac
5806
5807         case $cf_cv_system_name in
5808         os2*)   PATH_SEPARATOR=';'  ;;
5809         *)      PATH_SEPARATOR=':'  ;;
5810         esac
5811
5812 if test "$use_database" != no ; then
5813         cat >>confdefs.h <<\EOF
5814 #define USE_DATABASE 1
5815 EOF
5816
5817         echo "$as_me:5817: checking which terminfo source-file will be installed" >&5
5818 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5819
5820 # Check whether --with-database or --without-database was given.
5821 if test "${with_database+set}" = set; then
5822   withval="$with_database"
5823   TERMINFO_SRC=$withval
5824 fi;
5825         echo "$as_me:5825: result: $TERMINFO_SRC" >&5
5826 echo "${ECHO_T}$TERMINFO_SRC" >&6
5827
5828         echo "$as_me:5828: checking whether to use hashed database instead of directory/tree" >&5
5829 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5830
5831 # Check whether --with-hashed-db or --without-hashed-db was given.
5832 if test "${with_hashed_db+set}" = set; then
5833   withval="$with_hashed_db"
5834
5835 else
5836   with_hashed_db=no
5837 fi;
5838         echo "$as_me:5838: result: $with_hashed_db" >&5
5839 echo "${ECHO_T}$with_hashed_db" >&6
5840 else
5841         with_hashed_db=no
5842 fi
5843
5844 echo "$as_me:5844: checking for list of fallback descriptions" >&5
5845 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5846
5847 # Check whether --with-fallbacks or --without-fallbacks was given.
5848 if test "${with_fallbacks+set}" = set; then
5849   withval="$with_fallbacks"
5850   with_fallback=$withval
5851 else
5852   with_fallback=
5853 fi;
5854 echo "$as_me:5854: result: $with_fallback" >&5
5855 echo "${ECHO_T}$with_fallback" >&6
5856 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5857
5858 echo "$as_me:5858: checking if you want modern xterm or antique" >&5
5859 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5860
5861 # Check whether --with-xterm-new or --without-xterm-new was given.
5862 if test "${with_xterm_new+set}" = set; then
5863   withval="$with_xterm_new"
5864   with_xterm_new=$withval
5865 else
5866   with_xterm_new=yes
5867 fi;
5868 case $with_xterm_new in
5869 no)     with_xterm_new=xterm-old;;
5870 *)      with_xterm_new=xterm-new;;
5871 esac
5872 echo "$as_me:5872: result: $with_xterm_new" >&5
5873 echo "${ECHO_T}$with_xterm_new" >&6
5874 WHICH_XTERM=$with_xterm_new
5875
5876 MAKE_TERMINFO=
5877 if test "$use_database" = no ; then
5878         TERMINFO="${datadir}/terminfo"
5879         MAKE_TERMINFO="#"
5880 else
5881
5882 echo "$as_me:5882: checking for list of terminfo directories" >&5
5883 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5884
5885 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5886 if test "${with_terminfo_dirs+set}" = set; then
5887   withval="$with_terminfo_dirs"
5888
5889 else
5890   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5891 fi;
5892 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5893 cf_dst_path=
5894 for cf_src_path in $withval
5895 do
5896
5897 if test "x$prefix" != xNONE; then
5898   cf_path_syntax="$prefix"
5899 else
5900   cf_path_syntax="$ac_default_prefix"
5901 fi
5902
5903 case ".$cf_src_path" in #(vi
5904 .\$\(*\)*|.\'*\'*) #(vi
5905   ;;
5906 ..|./*|.\\*) #(vi
5907   ;;
5908 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5909   ;;
5910 .\${*prefix}*) #(vi
5911   eval cf_src_path="$cf_src_path"
5912   case ".$cf_src_path" in #(vi
5913   .NONE/*)
5914     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5915     ;;
5916   esac
5917   ;; #(vi
5918 .no|.NONE/*)
5919   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5920   ;;
5921 *)
5922   { { echo "$as_me:5922: error: expected a pathname, not \"$cf_src_path\"" >&5
5923 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5924    { (exit 1); exit 1; }; }
5925   ;;
5926 esac
5927
5928   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5929   cf_dst_path="${cf_dst_path}${cf_src_path}"
5930 done
5931 IFS="$ac_save_ifs"
5932
5933 eval 'TERMINFO_DIRS="$cf_dst_path"'
5934
5935 echo "$as_me:5935: result: $TERMINFO_DIRS" >&5
5936 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5937 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5938 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5939 EOF
5940
5941 echo "$as_me:5941: checking for default terminfo directory" >&5
5942 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5943
5944 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5945 if test "${with_default_terminfo_dir+set}" = set; then
5946   withval="$with_default_terminfo_dir"
5947
5948 else
5949   withval="${TERMINFO-${datadir}/terminfo}"
5950 fi; if test -n "${datadir}/terminfo" ; then
5951
5952 if test "x$prefix" != xNONE; then
5953   cf_path_syntax="$prefix"
5954 else
5955   cf_path_syntax="$ac_default_prefix"
5956 fi
5957
5958 case ".$withval" in #(vi
5959 .\$\(*\)*|.\'*\'*) #(vi
5960   ;;
5961 ..|./*|.\\*) #(vi
5962   ;;
5963 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5964   ;;
5965 .\${*prefix}*) #(vi
5966   eval withval="$withval"
5967   case ".$withval" in #(vi
5968   .NONE/*)
5969     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5970     ;;
5971   esac
5972   ;; #(vi
5973 .no|.NONE/*)
5974   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5975   ;;
5976 *)
5977   { { echo "$as_me:5977: error: expected a pathname, not \"$withval\"" >&5
5978 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5979    { (exit 1); exit 1; }; }
5980   ;;
5981 esac
5982
5983 fi
5984 TERMINFO="$withval"
5985
5986 echo "$as_me:5986: result: $TERMINFO" >&5
5987 echo "${ECHO_T}$TERMINFO" >&6
5988 cat >>confdefs.h <<EOF
5989 #define TERMINFO "$TERMINFO"
5990 EOF
5991
5992 fi
5993
5994 ###     use option --disable-big-core to make tic run on small machines
5995 ###     We need 4Mb, check if we can allocate 50% more than that.
5996 echo "$as_me:5996: checking if big-core option selected" >&5
5997 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5998
5999 # Check whether --enable-big-core or --disable-big-core was given.
6000 if test "${enable_big_core+set}" = set; then
6001   enableval="$enable_big_core"
6002   with_big_core=$enableval
6003 else
6004   if test "$cross_compiling" = yes; then
6005   with_big_core=no
6006 else
6007   cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010
6011 #include <stdlib.h>
6012 #include <string.h>
6013 int main() {
6014         unsigned long n = 6000000L;
6015         char *s = malloc(n);
6016         if (s != 0)
6017                 s[0] = s[n-1] = 0;
6018         ${cf_cv_main_return:-return}(s == 0);
6019 }
6020 _ACEOF
6021 rm -f conftest$ac_exeext
6022 if { (eval echo "$as_me:6022: \"$ac_link\"") >&5
6023   (eval $ac_link) 2>&5
6024   ac_status=$?
6025   echo "$as_me:6025: \$? = $ac_status" >&5
6026   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   with_big_core=yes
6033 else
6034   echo "$as_me: program exited with status $ac_status" >&5
6035 echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 with_big_core=no
6038 fi
6039 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6040 fi
6041 fi;
6042 echo "$as_me:6042: result: $with_big_core" >&5
6043 echo "${ECHO_T}$with_big_core" >&6
6044 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6045 #define HAVE_BIG_CORE 1
6046 EOF
6047
6048 ### ISO C only guarantees 512-char strings, we have tables which load faster
6049 ### when constructed using "big" strings.  More than the C compiler, the awk
6050 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6051 echo "$as_me:6051: checking if big-strings option selected" >&5
6052 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6053
6054 # Check whether --enable-big-strings or --disable-big-strings was given.
6055 if test "${enable_big_strings+set}" = set; then
6056   enableval="$enable_big_strings"
6057   with_big_strings=$enableval
6058 else
6059
6060         case x$AWK in #(vi
6061         x)
6062                 eval with_big_strings=no
6063                 ;;
6064         *) #(vi
6065                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6066                         | $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
6067                         eval with_big_strings=yes
6068                 else
6069                         eval with_big_strings=no
6070                 fi
6071                 ;;
6072         esac
6073
6074 fi;
6075 echo "$as_me:6075: result: $with_big_strings" >&5
6076 echo "${ECHO_T}$with_big_strings" >&6
6077
6078 USE_BIG_STRINGS=0
6079 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6080
6081 ###     use option --enable-termcap to compile in the termcap fallback support
6082 echo "$as_me:6082: checking if you want termcap-fallback support" >&5
6083 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6084
6085 # Check whether --enable-termcap or --disable-termcap was given.
6086 if test "${enable_termcap+set}" = set; then
6087   enableval="$enable_termcap"
6088   with_termcap=$enableval
6089 else
6090   with_termcap=no
6091 fi;
6092 echo "$as_me:6092: result: $with_termcap" >&5
6093 echo "${ECHO_T}$with_termcap" >&6
6094
6095 if test "$with_termcap" != "yes" ; then
6096         if test "$use_database" = no ; then
6097                 if test -z "$with_fallback" ; then
6098                         { { echo "$as_me:6098: error: You have disabled the database w/o specifying fallbacks" >&5
6099 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6100    { (exit 1); exit 1; }; }
6101                 fi
6102         fi
6103         cat >>confdefs.h <<\EOF
6104 #define PURE_TERMINFO 1
6105 EOF
6106
6107 else
6108
6109 if test "$with_ticlib" != no ; then
6110         { { echo "$as_me:6110: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6111 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6112    { (exit 1); exit 1; }; }
6113 fi
6114
6115 cat >>confdefs.h <<\EOF
6116 #define USE_TERMCAP 1
6117 EOF
6118
6119 echo "$as_me:6119: checking for list of termcap files" >&5
6120 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6121
6122 # Check whether --with-termpath or --without-termpath was given.
6123 if test "${with_termpath+set}" = set; then
6124   withval="$with_termpath"
6125
6126 else
6127   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6128 fi;
6129 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6130 cf_dst_path=
6131 for cf_src_path in $withval
6132 do
6133
6134 if test "x$prefix" != xNONE; then
6135   cf_path_syntax="$prefix"
6136 else
6137   cf_path_syntax="$ac_default_prefix"
6138 fi
6139
6140 case ".$cf_src_path" in #(vi
6141 .\$\(*\)*|.\'*\'*) #(vi
6142   ;;
6143 ..|./*|.\\*) #(vi
6144   ;;
6145 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6146   ;;
6147 .\${*prefix}*) #(vi
6148   eval cf_src_path="$cf_src_path"
6149   case ".$cf_src_path" in #(vi
6150   .NONE/*)
6151     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6152     ;;
6153   esac
6154   ;; #(vi
6155 .no|.NONE/*)
6156   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6157   ;;
6158 *)
6159   { { echo "$as_me:6159: error: expected a pathname, not \"$cf_src_path\"" >&5
6160 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6161    { (exit 1); exit 1; }; }
6162   ;;
6163 esac
6164
6165   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6166   cf_dst_path="${cf_dst_path}${cf_src_path}"
6167 done
6168 IFS="$ac_save_ifs"
6169
6170 eval 'TERMPATH="$cf_dst_path"'
6171
6172 echo "$as_me:6172: result: $TERMPATH" >&5
6173 echo "${ECHO_T}$TERMPATH" >&6
6174 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6175 #define TERMPATH "$TERMPATH"
6176 EOF
6177
6178 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6179 echo "$as_me:6179: checking if fast termcap-loader is needed" >&5
6180 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6181
6182 # Check whether --enable-getcap or --disable-getcap was given.
6183 if test "${enable_getcap+set}" = set; then
6184   enableval="$enable_getcap"
6185   with_getcap=$enableval
6186 else
6187   with_getcap=no
6188 fi;
6189 echo "$as_me:6189: result: $with_getcap" >&5
6190 echo "${ECHO_T}$with_getcap" >&6
6191 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6192 #define USE_GETCAP 1
6193 EOF
6194
6195 echo "$as_me:6195: checking if translated termcaps will be cached in ~/.terminfo" >&5
6196 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6197
6198 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6199 if test "${enable_getcap_cache+set}" = set; then
6200   enableval="$enable_getcap_cache"
6201   with_getcap_cache=$enableval
6202 else
6203   with_getcap_cache=no
6204 fi;
6205 echo "$as_me:6205: result: $with_getcap_cache" >&5
6206 echo "${ECHO_T}$with_getcap_cache" >&6
6207 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6208 #define USE_GETCAP_CACHE 1
6209 EOF
6210
6211 fi
6212
6213 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6214 echo "$as_me:6214: checking if ~/.terminfo is wanted" >&5
6215 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6216
6217 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6218 if test "${enable_home_terminfo+set}" = set; then
6219   enableval="$enable_home_terminfo"
6220   with_home_terminfo=$enableval
6221 else
6222   with_home_terminfo=yes
6223 fi;
6224 echo "$as_me:6224: result: $with_home_terminfo" >&5
6225 echo "${ECHO_T}$with_home_terminfo" >&6
6226 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6227 #define USE_HOME_TERMINFO 1
6228 EOF
6229
6230 echo "$as_me:6230: checking if you want to use restricted environment when running as root" >&5
6231 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6232
6233 # Check whether --enable-root-environ or --disable-root-environ was given.
6234 if test "${enable_root_environ+set}" = set; then
6235   enableval="$enable_root_environ"
6236   with_root_environ=$enableval
6237 else
6238   with_root_environ=yes
6239 fi;
6240 echo "$as_me:6240: result: $with_root_environ" >&5
6241 echo "${ECHO_T}$with_root_environ" >&6
6242 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6243 #define USE_ROOT_ENVIRON 1
6244 EOF
6245
6246 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6247 ###   to reduce storage requirements for the terminfo database.
6248
6249 for ac_func in \
6250         remove \
6251         unlink
6252 do
6253 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6254 echo "$as_me:6254: checking for $ac_func" >&5
6255 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6256 if eval "test \"\${$as_ac_var+set}\" = set"; then
6257   echo $ECHO_N "(cached) $ECHO_C" >&6
6258 else
6259   cat >conftest.$ac_ext <<_ACEOF
6260 #line 6260 "configure"
6261 #include "confdefs.h"
6262 /* System header to define __stub macros and hopefully few prototypes,
6263     which can conflict with char $ac_func (); below.  */
6264 #include <assert.h>
6265 /* Override any gcc2 internal prototype to avoid an error.  */
6266 #ifdef __cplusplus
6267 extern "C"
6268 #endif
6269 /* We use char because int might match the return type of a gcc2
6270    builtin and then its argument prototype would still apply.  */
6271 char $ac_func ();
6272 char (*f) ();
6273
6274 int
6275 main ()
6276 {
6277 /* The GNU C library defines this for functions which it implements
6278     to always fail with ENOSYS.  Some functions are actually named
6279     something starting with __ and the normal name is an alias.  */
6280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6281 choke me
6282 #else
6283 f = $ac_func;
6284 #endif
6285
6286   ;
6287   return 0;
6288 }
6289 _ACEOF
6290 rm -f conftest.$ac_objext conftest$ac_exeext
6291 if { (eval echo "$as_me:6291: \"$ac_link\"") >&5
6292   (eval $ac_link) 2>&5
6293   ac_status=$?
6294   echo "$as_me:6294: \$? = $ac_status" >&5
6295   (exit $ac_status); } &&
6296          { ac_try='test -s conftest$ac_exeext'
6297   { (eval echo "$as_me:6297: \"$ac_try\"") >&5
6298   (eval $ac_try) 2>&5
6299   ac_status=$?
6300   echo "$as_me:6300: \$? = $ac_status" >&5
6301   (exit $ac_status); }; }; then
6302   eval "$as_ac_var=yes"
6303 else
6304   echo "$as_me: failed program was:" >&5
6305 cat conftest.$ac_ext >&5
6306 eval "$as_ac_var=no"
6307 fi
6308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6309 fi
6310 echo "$as_me:6310: result: `eval echo '${'$as_ac_var'}'`" >&5
6311 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6312 if test `eval echo '${'$as_ac_var'}'` = yes; then
6313   cat >>confdefs.h <<EOF
6314 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6315 EOF
6316
6317 fi
6318 done
6319
6320 if test "$cross_compiling" = yes ; then
6321
6322 for ac_func in \
6323                 link \
6324                 symlink
6325 do
6326 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6327 echo "$as_me:6327: checking for $ac_func" >&5
6328 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6329 if eval "test \"\${$as_ac_var+set}\" = set"; then
6330   echo $ECHO_N "(cached) $ECHO_C" >&6
6331 else
6332   cat >conftest.$ac_ext <<_ACEOF
6333 #line 6333 "configure"
6334 #include "confdefs.h"
6335 /* System header to define __stub macros and hopefully few prototypes,
6336     which can conflict with char $ac_func (); below.  */
6337 #include <assert.h>
6338 /* Override any gcc2 internal prototype to avoid an error.  */
6339 #ifdef __cplusplus
6340 extern "C"
6341 #endif
6342 /* We use char because int might match the return type of a gcc2
6343    builtin and then its argument prototype would still apply.  */
6344 char $ac_func ();
6345 char (*f) ();
6346
6347 int
6348 main ()
6349 {
6350 /* The GNU C library defines this for functions which it implements
6351     to always fail with ENOSYS.  Some functions are actually named
6352     something starting with __ and the normal name is an alias.  */
6353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6354 choke me
6355 #else
6356 f = $ac_func;
6357 #endif
6358
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext conftest$ac_exeext
6364 if { (eval echo "$as_me:6364: \"$ac_link\"") >&5
6365   (eval $ac_link) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest$ac_exeext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   eval "$as_ac_var=yes"
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 eval "$as_ac_var=no"
6380 fi
6381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6382 fi
6383 echo "$as_me:6383: result: `eval echo '${'$as_ac_var'}'`" >&5
6384 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6385 if test `eval echo '${'$as_ac_var'}'` = yes; then
6386   cat >>confdefs.h <<EOF
6387 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6388 EOF
6389
6390 fi
6391 done
6392
6393 else
6394         echo "$as_me:6394: checking if link/symlink functions work" >&5
6395 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6396 if test "${cf_cv_link_funcs+set}" = set; then
6397   echo $ECHO_N "(cached) $ECHO_C" >&6
6398 else
6399
6400                 cf_cv_link_funcs=
6401                 for cf_func in link symlink ; do
6402                         if test "$cross_compiling" = yes; then
6403
6404                         eval 'ac_cv_func_'$cf_func'=error'
6405 else
6406   cat >conftest.$ac_ext <<_ACEOF
6407 #line 6407 "configure"
6408 #include "confdefs.h"
6409
6410 #include <sys/types.h>
6411 #include <sys/stat.h>
6412 #ifdef HAVE_UNISTD_H
6413 #include <unistd.h>
6414 #endif
6415 int main()
6416 {
6417         int fail = 0;
6418         char *src = "config.log";
6419         char *dst = "conftest.chk";
6420         struct stat src_sb;
6421         struct stat dst_sb;
6422
6423         stat(src, &src_sb);
6424         fail = ($cf_func("config.log", "conftest.chk") < 0)
6425             || (stat(dst, &dst_sb) < 0)
6426             || (dst_sb.st_mtime != src_sb.st_mtime);
6427 #ifdef HAVE_UNLINK
6428         unlink(dst);
6429 #else
6430         remove(dst);
6431 #endif
6432         ${cf_cv_main_return:-return} (fail);
6433 }
6434
6435 _ACEOF
6436 rm -f conftest$ac_exeext
6437 if { (eval echo "$as_me:6437: \"$ac_link\"") >&5
6438   (eval $ac_link) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6442   { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6443   (eval $ac_try) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); }; }; then
6447
6448                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6449                         eval 'ac_cv_func_'$cf_func'=yes'
6450 else
6451   echo "$as_me: program exited with status $ac_status" >&5
6452 echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454
6455                         eval 'ac_cv_func_'$cf_func'=no'
6456 fi
6457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6458 fi
6459                 done
6460                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6461
6462 fi
6463 echo "$as_me:6463: result: $cf_cv_link_funcs" >&5
6464 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6465         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6466 #define HAVE_LINK 1
6467 EOF
6468
6469         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6470 #define HAVE_SYMLINK 1
6471 EOF
6472
6473 fi
6474
6475 with_links=no
6476 with_symlinks=no
6477
6478 # soft links (symbolic links) are useful for some systems where hard links do
6479 # not work, or to make it simpler to copy terminfo trees around.
6480 if test "$ac_cv_func_symlink" = yes ; then
6481     echo "$as_me:6481: checking if tic should use symbolic links" >&5
6482 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6483
6484 # Check whether --enable-symlinks or --disable-symlinks was given.
6485 if test "${enable_symlinks+set}" = set; then
6486   enableval="$enable_symlinks"
6487   with_symlinks=$enableval
6488 else
6489   with_symlinks=no
6490 fi;
6491     echo "$as_me:6491: result: $with_symlinks" >&5
6492 echo "${ECHO_T}$with_symlinks" >&6
6493 fi
6494
6495 # If we have hard links and did not choose to use soft links instead, there is
6496 # no reason to make this choice optional - use the hard links.
6497 if test "$with_symlinks" = no ; then
6498     echo "$as_me:6498: checking if tic should use hard links" >&5
6499 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6500     if test "$ac_cv_func_link" = yes ; then
6501         with_links=yes
6502     else
6503         with_links=no
6504     fi
6505     echo "$as_me:6505: result: $with_links" >&5
6506 echo "${ECHO_T}$with_links" >&6
6507 fi
6508
6509 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6510 #define USE_LINKS 1
6511 EOF
6512
6513 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6514 #define USE_SYMLINKS 1
6515 EOF
6516
6517 ###   use option --enable-broken-linker to force on use of broken-linker support
6518 echo "$as_me:6518: checking if you want broken-linker support code" >&5
6519 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6520
6521 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6522 if test "${enable_broken_linker+set}" = set; then
6523   enableval="$enable_broken_linker"
6524   with_broken_linker=$enableval
6525 else
6526   with_broken_linker=${BROKEN_LINKER-no}
6527 fi;
6528 echo "$as_me:6528: result: $with_broken_linker" >&5
6529 echo "${ECHO_T}$with_broken_linker" >&6
6530
6531 BROKEN_LINKER=0
6532 if test "$with_broken_linker" = yes ; then
6533         cat >>confdefs.h <<\EOF
6534 #define BROKEN_LINKER 1
6535 EOF
6536
6537         BROKEN_LINKER=1
6538 elif test "$DFT_LWR_MODEL" = shared ; then
6539         case $cf_cv_system_name in #(vi
6540         cygwin*)
6541                 cat >>confdefs.h <<\EOF
6542 #define BROKEN_LINKER 1
6543 EOF
6544
6545                 BROKEN_LINKER=1
6546                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6547
6548 echo "${as_me-configure}:6548: testing cygwin linker is broken anyway ..." 1>&5
6549
6550                 ;;
6551         esac
6552 fi
6553
6554 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6555 echo "$as_me:6555: checking if tputs should process BSD-style prefix padding" >&5
6556 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6557
6558 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6559 if test "${enable_bsdpad+set}" = set; then
6560   enableval="$enable_bsdpad"
6561   with_bsdpad=$enableval
6562 else
6563   with_bsdpad=no
6564 fi;
6565 echo "$as_me:6565: result: $with_bsdpad" >&5
6566 echo "${ECHO_T}$with_bsdpad" >&6
6567 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6568 #define BSD_TPUTS 1
6569 EOF
6570
6571 ###   use option --enable-widec to turn on use of wide-character support
6572 NCURSES_CH_T=chtype
6573 NCURSES_LIBUTF8=0
6574
6575 NEED_WCHAR_H=0
6576 NCURSES_MBSTATE_T=0
6577 NCURSES_WCHAR_T=0
6578 NCURSES_WINT_T=0
6579
6580 # Check to define _XOPEN_SOURCE "automatically"
6581
6582 cf_XOPEN_SOURCE=500
6583 cf_POSIX_C_SOURCE=199506L
6584 cf_xopen_source=
6585
6586 case $host_os in #(vi
6587 aix[456]*) #(vi
6588         cf_xopen_source="-D_ALL_SOURCE"
6589         ;;
6590 darwin[0-8].*) #(vi
6591         cf_xopen_source="-D_APPLE_C_SOURCE"
6592         ;;
6593 darwin*) #(vi
6594         cf_xopen_source="-D_DARWIN_C_SOURCE"
6595         ;;
6596 freebsd*|dragonfly*) #(vi
6597         # 5.x headers associate
6598         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6599         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6600         cf_POSIX_C_SOURCE=200112L
6601         cf_XOPEN_SOURCE=600
6602         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6603         ;;
6604 hpux11*) #(vi
6605         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6606         ;;
6607 hpux*) #(vi
6608         cf_xopen_source="-D_HPUX_SOURCE"
6609         ;;
6610 irix[56].*) #(vi
6611         cf_xopen_source="-D_SGI_SOURCE"
6612         ;;
6613 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6614
6615 echo "$as_me:6615: checking if we must define _GNU_SOURCE" >&5
6616 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6617 if test "${cf_cv_gnu_source+set}" = set; then
6618   echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620
6621 cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624 #include <sys/types.h>
6625 int
6626 main ()
6627 {
6628
6629 #ifndef _XOPEN_SOURCE
6630 make an error
6631 #endif
6632   ;
6633   return 0;
6634 }
6635 _ACEOF
6636 rm -f conftest.$ac_objext
6637 if { (eval echo "$as_me:6637: \"$ac_compile\"") >&5
6638   (eval $ac_compile) 2>&5
6639   ac_status=$?
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit $ac_status); } &&
6642          { ac_try='test -s conftest.$ac_objext'
6643   { (eval echo "$as_me:6643: \"$ac_try\"") >&5
6644   (eval $ac_try) 2>&5
6645   ac_status=$?
6646   echo "$as_me:6646: \$? = $ac_status" >&5
6647   (exit $ac_status); }; }; then
6648   cf_cv_gnu_source=no
6649 else
6650   echo "$as_me: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 cf_save="$CPPFLAGS"
6653          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6654          cat >conftest.$ac_ext <<_ACEOF
6655 #line 6655 "configure"
6656 #include "confdefs.h"
6657 #include <sys/types.h>
6658 int
6659 main ()
6660 {
6661
6662 #ifdef _XOPEN_SOURCE
6663 make an error
6664 #endif
6665   ;
6666   return 0;
6667 }
6668 _ACEOF
6669 rm -f conftest.$ac_objext
6670 if { (eval echo "$as_me:6670: \"$ac_compile\"") >&5
6671   (eval $ac_compile) 2>&5
6672   ac_status=$?
6673   echo "$as_me:6673: \$? = $ac_status" >&5
6674   (exit $ac_status); } &&
6675          { ac_try='test -s conftest.$ac_objext'
6676   { (eval echo "$as_me:6676: \"$ac_try\"") >&5
6677   (eval $ac_try) 2>&5
6678   ac_status=$?
6679   echo "$as_me:6679: \$? = $ac_status" >&5
6680   (exit $ac_status); }; }; then
6681   cf_cv_gnu_source=no
6682 else
6683   echo "$as_me: failed program was:" >&5
6684 cat conftest.$ac_ext >&5
6685 cf_cv_gnu_source=yes
6686 fi
6687 rm -f conftest.$ac_objext conftest.$ac_ext
6688         CPPFLAGS="$cf_save"
6689
6690 fi
6691 rm -f conftest.$ac_objext conftest.$ac_ext
6692
6693 fi
6694 echo "$as_me:6694: result: $cf_cv_gnu_source" >&5
6695 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6696 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6697
6698         ;;
6699 mirbsd*) #(vi
6700         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6701         ;;
6702 netbsd*) #(vi
6703         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6704         ;;
6705 openbsd*) #(vi
6706         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6707         ;;
6708 osf[45]*) #(vi
6709         cf_xopen_source="-D_OSF_SOURCE"
6710         ;;
6711 nto-qnx*) #(vi
6712         cf_xopen_source="-D_QNX_SOURCE"
6713         ;;
6714 sco*) #(vi
6715         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6716         ;;
6717 solaris2.1[0-9]) #(vi
6718         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6719         ;;
6720 solaris2.[1-9]) #(vi
6721         cf_xopen_source="-D__EXTENSIONS__"
6722         ;;
6723 *)
6724         echo "$as_me:6724: checking if we should define _XOPEN_SOURCE" >&5
6725 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6726 if test "${cf_cv_xopen_source+set}" = set; then
6727   echo $ECHO_N "(cached) $ECHO_C" >&6
6728 else
6729
6730         cat >conftest.$ac_ext <<_ACEOF
6731 #line 6731 "configure"
6732 #include "confdefs.h"
6733 #include <sys/types.h>
6734 int
6735 main ()
6736 {
6737
6738 #ifndef _XOPEN_SOURCE
6739 make an error
6740 #endif
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 rm -f conftest.$ac_objext
6746 if { (eval echo "$as_me:6746: \"$ac_compile\"") >&5
6747   (eval $ac_compile) 2>&5
6748   ac_status=$?
6749   echo "$as_me:6749: \$? = $ac_status" >&5
6750   (exit $ac_status); } &&
6751          { ac_try='test -s conftest.$ac_objext'
6752   { (eval echo "$as_me:6752: \"$ac_try\"") >&5
6753   (eval $ac_try) 2>&5
6754   ac_status=$?
6755   echo "$as_me:6755: \$? = $ac_status" >&5
6756   (exit $ac_status); }; }; then
6757   cf_cv_xopen_source=no
6758 else
6759   echo "$as_me: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6761 cf_save="$CPPFLAGS"
6762          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6763          cat >conftest.$ac_ext <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6766 #include <sys/types.h>
6767 int
6768 main ()
6769 {
6770
6771 #ifdef _XOPEN_SOURCE
6772 make an error
6773 #endif
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 rm -f conftest.$ac_objext
6779 if { (eval echo "$as_me:6779: \"$ac_compile\"") >&5
6780   (eval $ac_compile) 2>&5
6781   ac_status=$?
6782   echo "$as_me:6782: \$? = $ac_status" >&5
6783   (exit $ac_status); } &&
6784          { ac_try='test -s conftest.$ac_objext'
6785   { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6786   (eval $ac_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }; }; then
6790   cf_cv_xopen_source=no
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6795 fi
6796 rm -f conftest.$ac_objext conftest.$ac_ext
6797         CPPFLAGS="$cf_save"
6798
6799 fi
6800 rm -f conftest.$ac_objext conftest.$ac_ext
6801
6802 fi
6803 echo "$as_me:6803: result: $cf_cv_xopen_source" >&5
6804 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6805         if test "$cf_cv_xopen_source" != no ; then
6806
6807 CFLAGS=`echo "$CFLAGS" | \
6808         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6809                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6810
6811 CPPFLAGS=`echo "$CPPFLAGS" | \
6812         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6813                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6814
6815                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6816
6817 cf_fix_cppflags=no
6818 cf_new_cflags=
6819 cf_new_cppflags=
6820 cf_new_extra_cppflags=
6821
6822 for cf_add_cflags in $cf_temp_xopen_source
6823 do
6824 case $cf_fix_cppflags in
6825 no)
6826         case $cf_add_cflags in #(vi
6827         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6828                 case $cf_add_cflags in
6829                 -D*)
6830                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6831
6832                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6833                                 && test -z "${cf_tst_cflags}" \
6834                                 && cf_fix_cppflags=yes
6835
6836                         if test $cf_fix_cppflags = yes ; then
6837                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6838                                 continue
6839                         elif test "${cf_tst_cflags}" = "\"'" ; then
6840                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6841                                 continue
6842                         fi
6843                         ;;
6844                 esac
6845                 case "$CPPFLAGS" in
6846                 *$cf_add_cflags) #(vi
6847                         ;;
6848                 *) #(vi
6849                         case $cf_add_cflags in #(vi
6850                         -D*)
6851                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6852
6853 CPPFLAGS=`echo "$CPPFLAGS" | \
6854         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6855                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6856
6857                                 ;;
6858                         esac
6859                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6860                         ;;
6861                 esac
6862                 ;;
6863         *)
6864                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6865                 ;;
6866         esac
6867         ;;
6868 yes)
6869         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6870
6871         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6872
6873         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6874                 && test -z "${cf_tst_cflags}" \
6875                 && cf_fix_cppflags=no
6876         ;;
6877 esac
6878 done
6879
6880 if test -n "$cf_new_cflags" ; then
6881
6882         CFLAGS="$CFLAGS $cf_new_cflags"
6883 fi
6884
6885 if test -n "$cf_new_cppflags" ; then
6886
6887         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6888 fi
6889
6890 if test -n "$cf_new_extra_cppflags" ; then
6891
6892         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6893 fi
6894
6895         fi
6896
6897 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6898
6899 cf_save_CFLAGS="$CFLAGS"
6900 cf_save_CPPFLAGS="$CPPFLAGS"
6901
6902 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6903         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6904                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6905
6906 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6907         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6908                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6909
6910 echo "$as_me:6910: checking if we should define _POSIX_C_SOURCE" >&5
6911 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6912 if test "${cf_cv_posix_c_source+set}" = set; then
6913   echo $ECHO_N "(cached) $ECHO_C" >&6
6914 else
6915
6916 echo "${as_me-configure}:6916: testing if the symbol is already defined go no further ..." 1>&5
6917
6918         cat >conftest.$ac_ext <<_ACEOF
6919 #line 6919 "configure"
6920 #include "confdefs.h"
6921 #include <sys/types.h>
6922 int
6923 main ()
6924 {
6925
6926 #ifndef _POSIX_C_SOURCE
6927 make an error
6928 #endif
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 rm -f conftest.$ac_objext
6934 if { (eval echo "$as_me:6934: \"$ac_compile\"") >&5
6935   (eval $ac_compile) 2>&5
6936   ac_status=$?
6937   echo "$as_me:6937: \$? = $ac_status" >&5
6938   (exit $ac_status); } &&
6939          { ac_try='test -s conftest.$ac_objext'
6940   { (eval echo "$as_me:6940: \"$ac_try\"") >&5
6941   (eval $ac_try) 2>&5
6942   ac_status=$?
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit $ac_status); }; }; then
6945   cf_cv_posix_c_source=no
6946 else
6947   echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 cf_want_posix_source=no
6950          case .$cf_POSIX_C_SOURCE in #(vi
6951          .[12]??*) #(vi
6952                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6953                 ;;
6954          .2) #(vi
6955                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6956                 cf_want_posix_source=yes
6957                 ;;
6958          .*)
6959                 cf_want_posix_source=yes
6960                 ;;
6961          esac
6962          if test "$cf_want_posix_source" = yes ; then
6963                 cat >conftest.$ac_ext <<_ACEOF
6964 #line 6964 "configure"
6965 #include "confdefs.h"
6966 #include <sys/types.h>
6967 int
6968 main ()
6969 {
6970
6971 #ifdef _POSIX_SOURCE
6972 make an error
6973 #endif
6974   ;
6975   return 0;
6976 }
6977 _ACEOF
6978 rm -f conftest.$ac_objext
6979 if { (eval echo "$as_me:6979: \"$ac_compile\"") >&5
6980   (eval $ac_compile) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); } &&
6984          { ac_try='test -s conftest.$ac_objext'
6985   { (eval echo "$as_me:6985: \"$ac_try\"") >&5
6986   (eval $ac_try) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); }; }; then
6990   :
6991 else
6992   echo "$as_me: failed program was:" >&5
6993 cat conftest.$ac_ext >&5
6994 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6995 fi
6996 rm -f conftest.$ac_objext conftest.$ac_ext
6997          fi
6998
6999 echo "${as_me-configure}:6999: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7000
7001          CFLAGS="$cf_trim_CFLAGS"
7002          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7003
7004 echo "${as_me-configure}:7004: testing if the second compile does not leave our definition intact error ..." 1>&5
7005
7006          cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009 #include <sys/types.h>
7010 int
7011 main ()
7012 {
7013
7014 #ifndef _POSIX_C_SOURCE
7015 make an error
7016 #endif
7017   ;
7018   return 0;
7019 }
7020 _ACEOF
7021 rm -f conftest.$ac_objext
7022 if { (eval echo "$as_me:7022: \"$ac_compile\"") >&5
7023   (eval $ac_compile) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); } &&
7027          { ac_try='test -s conftest.$ac_objext'
7028   { (eval echo "$as_me:7028: \"$ac_try\"") >&5
7029   (eval $ac_try) 2>&5
7030   ac_status=$?
7031   echo "$as_me:7031: \$? = $ac_status" >&5
7032   (exit $ac_status); }; }; then
7033   :
7034 else
7035   echo "$as_me: failed program was:" >&5
7036 cat conftest.$ac_ext >&5
7037 cf_cv_posix_c_source=no
7038 fi
7039 rm -f conftest.$ac_objext conftest.$ac_ext
7040          CFLAGS="$cf_save_CFLAGS"
7041          CPPFLAGS="$cf_save_CPPFLAGS"
7042
7043 fi
7044 rm -f conftest.$ac_objext conftest.$ac_ext
7045
7046 fi
7047 echo "$as_me:7047: result: $cf_cv_posix_c_source" >&5
7048 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7049
7050 if test "$cf_cv_posix_c_source" != no ; then
7051         CFLAGS="$cf_trim_CFLAGS"
7052         CPPFLAGS="$cf_trim_CPPFLAGS"
7053
7054 cf_fix_cppflags=no
7055 cf_new_cflags=
7056 cf_new_cppflags=
7057 cf_new_extra_cppflags=
7058
7059 for cf_add_cflags in $cf_cv_posix_c_source
7060 do
7061 case $cf_fix_cppflags in
7062 no)
7063         case $cf_add_cflags in #(vi
7064         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7065                 case $cf_add_cflags in
7066                 -D*)
7067                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7068
7069                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7070                                 && test -z "${cf_tst_cflags}" \
7071                                 && cf_fix_cppflags=yes
7072
7073                         if test $cf_fix_cppflags = yes ; then
7074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7075                                 continue
7076                         elif test "${cf_tst_cflags}" = "\"'" ; then
7077                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7078                                 continue
7079                         fi
7080                         ;;
7081                 esac
7082                 case "$CPPFLAGS" in
7083                 *$cf_add_cflags) #(vi
7084                         ;;
7085                 *) #(vi
7086                         case $cf_add_cflags in #(vi
7087                         -D*)
7088                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7089
7090 CPPFLAGS=`echo "$CPPFLAGS" | \
7091         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7092                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7093
7094                                 ;;
7095                         esac
7096                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7097                         ;;
7098                 esac
7099                 ;;
7100         *)
7101                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7102                 ;;
7103         esac
7104         ;;
7105 yes)
7106         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7107
7108         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7109
7110         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7111                 && test -z "${cf_tst_cflags}" \
7112                 && cf_fix_cppflags=no
7113         ;;
7114 esac
7115 done
7116
7117 if test -n "$cf_new_cflags" ; then
7118
7119         CFLAGS="$CFLAGS $cf_new_cflags"
7120 fi
7121
7122 if test -n "$cf_new_cppflags" ; then
7123
7124         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7125 fi
7126
7127 if test -n "$cf_new_extra_cppflags" ; then
7128
7129         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7130 fi
7131
7132 fi
7133
7134         ;;
7135 esac
7136
7137 if test -n "$cf_xopen_source" ; then
7138
7139 cf_fix_cppflags=no
7140 cf_new_cflags=
7141 cf_new_cppflags=
7142 cf_new_extra_cppflags=
7143
7144 for cf_add_cflags in $cf_xopen_source
7145 do
7146 case $cf_fix_cppflags in
7147 no)
7148         case $cf_add_cflags in #(vi
7149         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7150                 case $cf_add_cflags in
7151                 -D*)
7152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7153
7154                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7155                                 && test -z "${cf_tst_cflags}" \
7156                                 && cf_fix_cppflags=yes
7157
7158                         if test $cf_fix_cppflags = yes ; then
7159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7160                                 continue
7161                         elif test "${cf_tst_cflags}" = "\"'" ; then
7162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7163                                 continue
7164                         fi
7165                         ;;
7166                 esac
7167                 case "$CPPFLAGS" in
7168                 *$cf_add_cflags) #(vi
7169                         ;;
7170                 *) #(vi
7171                         case $cf_add_cflags in #(vi
7172                         -D*)
7173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7174
7175 CPPFLAGS=`echo "$CPPFLAGS" | \
7176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7178
7179                                 ;;
7180                         esac
7181                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7182                         ;;
7183                 esac
7184                 ;;
7185         *)
7186                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7187                 ;;
7188         esac
7189         ;;
7190 yes)
7191         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7192
7193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7194
7195         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7196                 && test -z "${cf_tst_cflags}" \
7197                 && cf_fix_cppflags=no
7198         ;;
7199 esac
7200 done
7201
7202 if test -n "$cf_new_cflags" ; then
7203
7204         CFLAGS="$CFLAGS $cf_new_cflags"
7205 fi
7206
7207 if test -n "$cf_new_cppflags" ; then
7208
7209         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7210 fi
7211
7212 if test -n "$cf_new_extra_cppflags" ; then
7213
7214         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7215 fi
7216
7217 fi
7218
7219 # Work around breakage on OS X
7220
7221 echo "$as_me:7221: checking if SIGWINCH is defined" >&5
7222 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7223 if test "${cf_cv_define_sigwinch+set}" = set; then
7224   echo $ECHO_N "(cached) $ECHO_C" >&6
7225 else
7226
7227         cat >conftest.$ac_ext <<_ACEOF
7228 #line 7228 "configure"
7229 #include "confdefs.h"
7230
7231 #include <sys/types.h>
7232 #include <sys/signal.h>
7233
7234 int
7235 main ()
7236 {
7237 int x = SIGWINCH
7238   ;
7239   return 0;
7240 }
7241 _ACEOF
7242 rm -f conftest.$ac_objext
7243 if { (eval echo "$as_me:7243: \"$ac_compile\"") >&5
7244   (eval $ac_compile) 2>&5
7245   ac_status=$?
7246   echo "$as_me:7246: \$? = $ac_status" >&5
7247   (exit $ac_status); } &&
7248          { ac_try='test -s conftest.$ac_objext'
7249   { (eval echo "$as_me:7249: \"$ac_try\"") >&5
7250   (eval $ac_try) 2>&5
7251   ac_status=$?
7252   echo "$as_me:7252: \$? = $ac_status" >&5
7253   (exit $ac_status); }; }; then
7254   cf_cv_define_sigwinch=yes
7255 else
7256   echo "$as_me: failed program was:" >&5
7257 cat conftest.$ac_ext >&5
7258 cat >conftest.$ac_ext <<_ACEOF
7259 #line 7259 "configure"
7260 #include "confdefs.h"
7261
7262 #undef _XOPEN_SOURCE
7263 #undef _POSIX_SOURCE
7264 #undef _POSIX_C_SOURCE
7265 #include <sys/types.h>
7266 #include <sys/signal.h>
7267
7268 int
7269 main ()
7270 {
7271 int x = SIGWINCH
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_define_sigwinch=maybe
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cf_cv_define_sigwinch=no
7293 fi
7294 rm -f conftest.$ac_objext conftest.$ac_ext
7295
7296 fi
7297 rm -f conftest.$ac_objext conftest.$ac_ext
7298
7299 fi
7300 echo "$as_me:7300: result: $cf_cv_define_sigwinch" >&5
7301 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7302
7303 if test "$cf_cv_define_sigwinch" = maybe ; then
7304 echo "$as_me:7304: checking for actual SIGWINCH definition" >&5
7305 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7306 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7307   echo $ECHO_N "(cached) $ECHO_C" >&6
7308 else
7309
7310 cf_cv_fixup_sigwinch=unknown
7311 cf_sigwinch=32
7312 while test $cf_sigwinch != 1
7313 do
7314         cat >conftest.$ac_ext <<_ACEOF
7315 #line 7315 "configure"
7316 #include "confdefs.h"
7317
7318 #undef _XOPEN_SOURCE
7319 #undef _POSIX_SOURCE
7320 #undef _POSIX_C_SOURCE
7321 #include <sys/types.h>
7322 #include <sys/signal.h>
7323
7324 int
7325 main ()
7326 {
7327
7328 #if SIGWINCH != $cf_sigwinch
7329 make an error
7330 #endif
7331 int x = SIGWINCH
7332   ;
7333   return 0;
7334 }
7335 _ACEOF
7336 rm -f conftest.$ac_objext
7337 if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
7338   (eval $ac_compile) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } &&
7342          { ac_try='test -s conftest.$ac_objext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   cf_cv_fixup_sigwinch=$cf_sigwinch
7349          break
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 fi
7354 rm -f conftest.$ac_objext conftest.$ac_ext
7355
7356 cf_sigwinch=`expr $cf_sigwinch - 1`
7357 done
7358
7359 fi
7360 echo "$as_me:7360: result: $cf_cv_fixup_sigwinch" >&5
7361 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7362
7363         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7364                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7365         fi
7366 fi
7367
7368 # Checks for CODESET support.
7369
7370   echo "$as_me:7370: checking for nl_langinfo and CODESET" >&5
7371 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7372 if test "${am_cv_langinfo_codeset+set}" = set; then
7373   echo $ECHO_N "(cached) $ECHO_C" >&6
7374 else
7375   cat >conftest.$ac_ext <<_ACEOF
7376 #line 7376 "configure"
7377 #include "confdefs.h"
7378 #include <langinfo.h>
7379 int
7380 main ()
7381 {
7382 char* cs = nl_langinfo(CODESET);
7383   ;
7384   return 0;
7385 }
7386 _ACEOF
7387 rm -f conftest.$ac_objext conftest$ac_exeext
7388 if { (eval echo "$as_me:7388: \"$ac_link\"") >&5
7389   (eval $ac_link) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest$ac_exeext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   am_cv_langinfo_codeset=yes
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 am_cv_langinfo_codeset=no
7404 fi
7405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7406
7407 fi
7408 echo "$as_me:7408: result: $am_cv_langinfo_codeset" >&5
7409 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7410   if test $am_cv_langinfo_codeset = yes; then
7411
7412 cat >>confdefs.h <<\EOF
7413 #define HAVE_LANGINFO_CODESET 1
7414 EOF
7415
7416   fi
7417
7418 # use these variables to work around a defect in gcc's fixincludes.
7419 NCURSES_OK_WCHAR_T=
7420 NCURSES_OK_WINT_T=
7421
7422 echo "$as_me:7422: checking if you want wide-character code" >&5
7423 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7424
7425 # Check whether --enable-widec or --disable-widec was given.
7426 if test "${enable_widec+set}" = set; then
7427   enableval="$enable_widec"
7428   with_widec=$enableval
7429 else
7430   with_widec=no
7431 fi;
7432 echo "$as_me:7432: result: $with_widec" >&5
7433 echo "${ECHO_T}$with_widec" >&6
7434 if test "$with_widec" = yes ; then
7435         LIB_SUFFIX="w${LIB_SUFFIX}"
7436         cat >>confdefs.h <<\EOF
7437 #define USE_WIDEC_SUPPORT 1
7438 EOF
7439
7440         case "$CFLAGS $CPPFLAGS" in #(vi
7441         *-D_XOPEN_SOURCE=500) #(vi
7442                 ;;
7443         *)
7444
7445 echo "$as_me:7445: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7446 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7447 cat >conftest.$ac_ext <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7450 #include <sys/types.h>
7451
7452 int
7453 main ()
7454 {
7455
7456 #ifndef _XOPEN_SOURCE_EXTENDED
7457 make an error
7458 #endif
7459   ;
7460   return 0;
7461 }
7462 _ACEOF
7463 rm -f conftest.$ac_objext
7464 if { (eval echo "$as_me:7464: \"$ac_compile\"") >&5
7465   (eval $ac_compile) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -s conftest.$ac_objext'
7470   { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); }; }; then
7475   cf_result=no
7476 else
7477   echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 cf_result=yes
7480 fi
7481 rm -f conftest.$ac_objext conftest.$ac_ext
7482 echo "$as_me:7482: result: $cf_result" >&5
7483 echo "${ECHO_T}$cf_result" >&6
7484
7485 if test "$cf_result" = yes ; then
7486         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7487 elif test "x" != "x" ; then
7488         echo "$as_me:7488: checking checking for compatible value versus " >&5
7489 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7490         cat >conftest.$ac_ext <<_ACEOF
7491 #line 7491 "configure"
7492 #include "confdefs.h"
7493 #include <sys/types.h>
7494
7495 int
7496 main ()
7497 {
7498
7499 #if _XOPEN_SOURCE_EXTENDED- < 0
7500 make an error
7501 #endif
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518   cf_result=yes
7519 else
7520   echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7522 cf_result=no
7523 fi
7524 rm -f conftest.$ac_objext conftest.$ac_ext
7525         echo "$as_me:7525: result: $cf_result" >&5
7526 echo "${ECHO_T}$cf_result" >&6
7527         if test "$cf_result" = no ; then
7528                 # perhaps we can override it - try...
7529                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7530         fi
7531 fi
7532
7533                 ;;
7534         esac
7535
7536         # with_overwrite=no
7537         NCURSES_CH_T=cchar_t
7538
7539 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7540 do
7541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7542 echo "$as_me:7542: checking for $ac_func" >&5
7543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7544 if eval "test \"\${$as_ac_var+set}\" = set"; then
7545   echo $ECHO_N "(cached) $ECHO_C" >&6
7546 else
7547   cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 /* System header to define __stub macros and hopefully few prototypes,
7551     which can conflict with char $ac_func (); below.  */
7552 #include <assert.h>
7553 /* Override any gcc2 internal prototype to avoid an error.  */
7554 #ifdef __cplusplus
7555 extern "C"
7556 #endif
7557 /* We use char because int might match the return type of a gcc2
7558    builtin and then its argument prototype would still apply.  */
7559 char $ac_func ();
7560 char (*f) ();
7561
7562 int
7563 main ()
7564 {
7565 /* The GNU C library defines this for functions which it implements
7566     to always fail with ENOSYS.  Some functions are actually named
7567     something starting with __ and the normal name is an alias.  */
7568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7569 choke me
7570 #else
7571 f = $ac_func;
7572 #endif
7573
7574   ;
7575   return 0;
7576 }
7577 _ACEOF
7578 rm -f conftest.$ac_objext conftest$ac_exeext
7579 if { (eval echo "$as_me:7579: \"$ac_link\"") >&5
7580   (eval $ac_link) 2>&5
7581   ac_status=$?
7582   echo "$as_me:7582: \$? = $ac_status" >&5
7583   (exit $ac_status); } &&
7584          { ac_try='test -s conftest$ac_exeext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   eval "$as_ac_var=yes"
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 eval "$as_ac_var=no"
7595 fi
7596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7597 fi
7598 echo "$as_me:7598: result: `eval echo '${'$as_ac_var'}'`" >&5
7599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7600 if test `eval echo '${'$as_ac_var'}'` = yes; then
7601   cat >>confdefs.h <<EOF
7602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7603 EOF
7604
7605 fi
7606 done
7607
7608         if test "$ac_cv_func_putwc" != yes ; then
7609
7610 echo "$as_me:7610: checking for multibyte character support" >&5
7611 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7612 if test "${cf_cv_utf8_lib+set}" = set; then
7613   echo $ECHO_N "(cached) $ECHO_C" >&6
7614 else
7615
7616         cf_save_LIBS="$LIBS"
7617         cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620
7621 #include <stdlib.h>
7622 int
7623 main ()
7624 {
7625 putwc(0,0);
7626   ;
7627   return 0;
7628 }
7629 _ACEOF
7630 rm -f conftest.$ac_objext conftest$ac_exeext
7631 if { (eval echo "$as_me:7631: \"$ac_link\"") >&5
7632   (eval $ac_link) 2>&5
7633   ac_status=$?
7634   echo "$as_me:7634: \$? = $ac_status" >&5
7635   (exit $ac_status); } &&
7636          { ac_try='test -s conftest$ac_exeext'
7637   { (eval echo "$as_me:7637: \"$ac_try\"") >&5
7638   (eval $ac_try) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); }; }; then
7642   cf_cv_utf8_lib=yes
7643 else
7644   echo "$as_me: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646
7647 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7648 # will be set on completion of the AC_TRY_LINK below.
7649 cf_cv_header_path_utf8=
7650 cf_cv_library_path_utf8=
7651
7652 echo "${as_me-configure}:7652: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7653
7654 cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657
7658 #include <libutf8.h>
7659 int
7660 main ()
7661 {
7662 putwc(0,0);
7663   ;
7664   return 0;
7665 }
7666 _ACEOF
7667 rm -f conftest.$ac_objext conftest$ac_exeext
7668 if { (eval echo "$as_me:7668: \"$ac_link\"") >&5
7669   (eval $ac_link) 2>&5
7670   ac_status=$?
7671   echo "$as_me:7671: \$? = $ac_status" >&5
7672   (exit $ac_status); } &&
7673          { ac_try='test -s conftest$ac_exeext'
7674   { (eval echo "$as_me:7674: \"$ac_try\"") >&5
7675   (eval $ac_try) 2>&5
7676   ac_status=$?
7677   echo "$as_me:7677: \$? = $ac_status" >&5
7678   (exit $ac_status); }; }; then
7679
7680         cf_cv_find_linkage_utf8=yes
7681
7682 else
7683   echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7685
7686 cf_save_LIBS="$LIBS"
7687 LIBS="-lutf8  $cf_save_LIBS"
7688
7689 cat >conftest.$ac_ext <<_ACEOF
7690 #line 7690 "configure"
7691 #include "confdefs.h"
7692
7693 #include <libutf8.h>
7694 int
7695 main ()
7696 {
7697 putwc(0,0);
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f conftest.$ac_objext conftest$ac_exeext
7703 if { (eval echo "$as_me:7703: \"$ac_link\"") >&5
7704   (eval $ac_link) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit $ac_status); } &&
7708          { ac_try='test -s conftest$ac_exeext'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit $ac_status); }; }; then
7714
7715         cf_cv_find_linkage_utf8=yes
7716         cf_cv_library_file_utf8="-lutf8"
7717
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721
7722     cf_cv_find_linkage_utf8=no
7723         LIBS="$cf_save_LIBS"
7724
7725     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7726
7727 echo "${as_me-configure}:7727: testing find linkage for utf8 library ..." 1>&5
7728
7729 echo "${as_me-configure}:7729: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7730
7731     cf_save_CPPFLAGS="$CPPFLAGS"
7732     cf_test_CPPFLAGS="$CPPFLAGS"
7733
7734 cf_search=
7735
7736 # collect the current set of include-directories from compiler flags
7737 cf_header_path_list=""
7738 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7739         for cf_header_path in $CPPFLAGS $CFLAGS
7740         do
7741                 case $cf_header_path in #(vi
7742                 -I*)
7743                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7744                         cf_header_path_list="$cf_header_path_list $cf_header_path"
7745                         ;;
7746                 esac
7747         done
7748 fi
7749
7750 # add the variations for the package we are looking for
7751
7752 cf_search=
7753
7754 test "/usr" != "$prefix" && \
7755 test -d "/usr" && \
7756 (test $prefix = NONE || test -d $prefix) && {
7757         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7758         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7759         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7760         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7761         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7762         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7763 }
7764
7765 test "$prefix" != "NONE" && \
7766 test -d "$prefix" && \
7767  {
7768         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7769         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7770         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7771         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7772         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7773         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7774 }
7775
7776 test "/usr/local" != "$prefix" && \
7777 test -d "/usr/local" && \
7778 (test $prefix = NONE || test -d $prefix) && {
7779         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7780         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7781         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7782         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7783         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7784         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7785 }
7786
7787 test "/opt" != "$prefix" && \
7788 test -d "/opt" && \
7789 (test $prefix = NONE || test -d $prefix) && {
7790         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7791         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7792         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7793         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7794         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7795         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7796 }
7797
7798 test "$HOME" != "$prefix" && \
7799 test -d "$HOME" && \
7800 (test $prefix = NONE || test -d $prefix) && {
7801         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7802         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7803         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7804         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7805         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7806         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7807 }
7808
7809 test "$includedir" != NONE && \
7810 test "$includedir" != "/usr/include" && \
7811 test -d "$includedir" && {
7812         test -d $includedir &&    cf_search="$cf_search $includedir"
7813         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7814 }
7815
7816 test "$oldincludedir" != NONE && \
7817 test "$oldincludedir" != "/usr/include" && \
7818 test -d "$oldincludedir" && {
7819         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7820         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7821 }
7822
7823 cf_search="$cf_search $cf_header_path_list"
7824
7825     for cf_cv_header_path_utf8 in $cf_search
7826     do
7827       if test -d $cf_cv_header_path_utf8 ; then
7828         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7829
7830 echo "${as_me-configure}:7830: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7831
7832         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7833         cat >conftest.$ac_ext <<_ACEOF
7834 #line 7834 "configure"
7835 #include "confdefs.h"
7836
7837 #include <libutf8.h>
7838 int
7839 main ()
7840 {
7841 putwc(0,0);
7842   ;
7843   return 0;
7844 }
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); } &&
7852          { ac_try='test -s conftest.$ac_objext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858
7859             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7860
7861 echo "${as_me-configure}:7861: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7862
7863             cf_cv_find_linkage_utf8=maybe
7864             cf_test_CPPFLAGS="$CPPFLAGS"
7865             break
7866 else
7867   echo "$as_me: failed program was:" >&5
7868 cat conftest.$ac_ext >&5
7869
7870             CPPFLAGS="$cf_save_CPPFLAGS"
7871
7872 fi
7873 rm -f conftest.$ac_objext conftest.$ac_ext
7874       fi
7875     done
7876
7877     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7878
7879 echo "${as_me-configure}:7879: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7880
7881       cf_save_LIBS="$LIBS"
7882       cf_save_LDFLAGS="$LDFLAGS"
7883
7884       if test "$cf_cv_find_linkage_utf8" != yes ; then
7885
7886 cf_search=
7887 cf_library_path_list=""
7888 if test -n "${LDFLAGS}${LIBS}" ; then
7889         for cf_library_path in $LDFLAGS $LIBS
7890         do
7891                 case $cf_library_path in #(vi
7892                 -L*)
7893                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7894
7895 test "$cf_library_path" != "NONE" && \
7896 test -d "$cf_library_path" && \
7897  {
7898         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7899         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7900         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7901         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7902         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7903         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7904 }
7905
7906                         cf_library_path_list="$cf_library_path_list $cf_search"
7907                         ;;
7908                 esac
7909         done
7910 fi
7911
7912 cf_search=
7913
7914 test "/usr" != "$prefix" && \
7915 test -d "/usr" && \
7916 (test $prefix = NONE || test -d $prefix) && {
7917         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7918         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7919         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7920         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7921         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7922         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7923 }
7924
7925 test "$prefix" != "NONE" && \
7926 test -d "$prefix" && \
7927  {
7928         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7929         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7930         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7931         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7932         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7933         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7934 }
7935
7936 test "/usr/local" != "$prefix" && \
7937 test -d "/usr/local" && \
7938 (test $prefix = NONE || test -d $prefix) && {
7939         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7940         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7941         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7942         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7943         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7944         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7945 }
7946
7947 test "/opt" != "$prefix" && \
7948 test -d "/opt" && \
7949 (test $prefix = NONE || test -d $prefix) && {
7950         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7951         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7952         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7953         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7954         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7955         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7956 }
7957
7958 test "$HOME" != "$prefix" && \
7959 test -d "$HOME" && \
7960 (test $prefix = NONE || test -d $prefix) && {
7961         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7962         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7963         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7964         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7965         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7966         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7967 }
7968
7969 cf_search="$cf_library_path_list $cf_search"
7970
7971         for cf_cv_library_path_utf8 in $cf_search
7972         do
7973           if test -d $cf_cv_library_path_utf8 ; then
7974             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7975
7976 echo "${as_me-configure}:7976: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7977
7978             CPPFLAGS="$cf_test_CPPFLAGS"
7979             LIBS="-lutf8  $cf_save_LIBS"
7980             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7981             cat >conftest.$ac_ext <<_ACEOF
7982 #line 7982 "configure"
7983 #include "confdefs.h"
7984
7985 #include <libutf8.h>
7986 int
7987 main ()
7988 {
7989 putwc(0,0);
7990   ;
7991   return 0;
7992 }
7993 _ACEOF
7994 rm -f conftest.$ac_objext conftest$ac_exeext
7995 if { (eval echo "$as_me:7995: \"$ac_link\"") >&5
7996   (eval $ac_link) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); } &&
8000          { ac_try='test -s conftest$ac_exeext'
8001   { (eval echo "$as_me:8001: \"$ac_try\"") >&5
8002   (eval $ac_try) 2>&5
8003   ac_status=$?
8004   echo "$as_me:8004: \$? = $ac_status" >&5
8005   (exit $ac_status); }; }; then
8006
8007                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8008
8009 echo "${as_me-configure}:8009: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8010
8011                 cf_cv_find_linkage_utf8=yes
8012                 cf_cv_library_file_utf8="-lutf8"
8013                 break
8014 else
8015   echo "$as_me: failed program was:" >&5
8016 cat conftest.$ac_ext >&5
8017
8018                 CPPFLAGS="$cf_save_CPPFLAGS"
8019                 LIBS="$cf_save_LIBS"
8020                 LDFLAGS="$cf_save_LDFLAGS"
8021
8022 fi
8023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8024           fi
8025         done
8026         LIBS="$cf_save_LIBS"
8027         CPPFLAGS="$cf_save_CPPFLAGS"
8028         LDFLAGS="$cf_save_LDFLAGS"
8029       fi
8030
8031     else
8032       cf_cv_find_linkage_utf8=no
8033     fi
8034
8035 fi
8036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8037
8038 fi
8039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8040
8041 if test "$cf_cv_find_linkage_utf8" = yes ; then
8042 cf_cv_utf8_lib=add-on
8043 else
8044 cf_cv_utf8_lib=no
8045 fi
8046
8047 fi
8048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8049 fi
8050 echo "$as_me:8050: result: $cf_cv_utf8_lib" >&5
8051 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8052
8053 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8054 # ncurses/ncursesw:
8055 if test "$cf_cv_utf8_lib" = "add-on" ; then
8056         cat >>confdefs.h <<\EOF
8057 #define HAVE_LIBUTF8_H 1
8058 EOF
8059
8060 if test -n "$cf_cv_header_path_utf8" ; then
8061   for cf_add_incdir in $cf_cv_header_path_utf8
8062   do
8063         while test $cf_add_incdir != /usr/include
8064         do
8065           if test -d $cf_add_incdir
8066           then
8067                 cf_have_incdir=no
8068                 if test -n "$CFLAGS$CPPFLAGS" ; then
8069                   # a loop is needed to ensure we can add subdirs of existing dirs
8070                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8071                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8072                           cf_have_incdir=yes; break
8073                         fi
8074                   done
8075                 fi
8076
8077                 if test "$cf_have_incdir" = no ; then
8078                   if test "$cf_add_incdir" = /usr/local/include ; then
8079                         if test "$GCC" = yes
8080                         then
8081                           cf_save_CPPFLAGS=$CPPFLAGS
8082                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8083                           cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <stdio.h>
8087 int
8088 main ()
8089 {
8090 printf("Hello")
8091   ;
8092   return 0;
8093 }
8094 _ACEOF
8095 rm -f conftest.$ac_objext
8096 if { (eval echo "$as_me:8096: \"$ac_compile\"") >&5
8097   (eval $ac_compile) 2>&5
8098   ac_status=$?
8099   echo "$as_me:8099: \$? = $ac_status" >&5
8100   (exit $ac_status); } &&
8101          { ac_try='test -s conftest.$ac_objext'
8102   { (eval echo "$as_me:8102: \"$ac_try\"") >&5
8103   (eval $ac_try) 2>&5
8104   ac_status=$?
8105   echo "$as_me:8105: \$? = $ac_status" >&5
8106   (exit $ac_status); }; }; then
8107   :
8108 else
8109   echo "$as_me: failed program was:" >&5
8110 cat conftest.$ac_ext >&5
8111 cf_have_incdir=yes
8112 fi
8113 rm -f conftest.$ac_objext conftest.$ac_ext
8114                           CPPFLAGS=$cf_save_CPPFLAGS
8115                         fi
8116                   fi
8117                 fi
8118
8119                 if test "$cf_have_incdir" = no ; then
8120                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8121
8122 echo "${as_me-configure}:8122: testing adding $cf_add_incdir to include-path ..." 1>&5
8123
8124                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8125
8126                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8127                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8128                   cf_add_incdir="$cf_top_incdir"
8129                 else
8130                   break
8131                 fi
8132           fi
8133         done
8134   done
8135 fi
8136
8137 if test -n "$cf_cv_library_path_utf8" ; then
8138   for cf_add_libdir in $cf_cv_library_path_utf8
8139   do
8140     if test $cf_add_libdir = /usr/lib ; then
8141       :
8142     elif test -d $cf_add_libdir
8143     then
8144       cf_have_libdir=no
8145       if test -n "$LDFLAGS$LIBS" ; then
8146         # a loop is needed to ensure we can add subdirs of existing dirs
8147         for cf_test_libdir in $LDFLAGS $LIBS ; do
8148           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8149             cf_have_libdir=yes; break
8150           fi
8151         done
8152       fi
8153       if test "$cf_have_libdir" = no ; then
8154         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8155
8156 echo "${as_me-configure}:8156: testing adding $cf_add_libdir to library-path ..." 1>&5
8157
8158         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8159       fi
8160     fi
8161   done
8162 fi
8163
8164         LIBS="$cf_cv_library_file_utf8 $LIBS"
8165 fi
8166
8167                 if test "$cf_cv_utf8_lib" != no ; then
8168                         NCURSES_LIBUTF8=1
8169                 fi
8170         fi
8171
8172 # This is needed on Tru64 5.0 to declare mbstate_t
8173 echo "$as_me:8173: checking if we must include wchar.h to declare mbstate_t" >&5
8174 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8175 if test "${cf_cv_mbstate_t+set}" = set; then
8176   echo $ECHO_N "(cached) $ECHO_C" >&6
8177 else
8178
8179 cat >conftest.$ac_ext <<_ACEOF
8180 #line 8180 "configure"
8181 #include "confdefs.h"
8182
8183 #include <stdlib.h>
8184 #include <stdarg.h>
8185 #include <stdio.h>
8186 #ifdef HAVE_LIBUTF8_H
8187 #include <libutf8.h>
8188 #endif
8189 int
8190 main ()
8191 {
8192 mbstate_t state
8193   ;
8194   return 0;
8195 }
8196 _ACEOF
8197 rm -f conftest.$ac_objext
8198 if { (eval echo "$as_me:8198: \"$ac_compile\"") >&5
8199   (eval $ac_compile) 2>&5
8200   ac_status=$?
8201   echo "$as_me:8201: \$? = $ac_status" >&5
8202   (exit $ac_status); } &&
8203          { ac_try='test -s conftest.$ac_objext'
8204   { (eval echo "$as_me:8204: \"$ac_try\"") >&5
8205   (eval $ac_try) 2>&5
8206   ac_status=$?
8207   echo "$as_me:8207: \$? = $ac_status" >&5
8208   (exit $ac_status); }; }; then
8209   cf_cv_mbstate_t=no
8210 else
8211   echo "$as_me: failed program was:" >&5
8212 cat conftest.$ac_ext >&5
8213 cat >conftest.$ac_ext <<_ACEOF
8214 #line 8214 "configure"
8215 #include "confdefs.h"
8216
8217 #include <stdlib.h>
8218 #include <stdarg.h>
8219 #include <stdio.h>
8220 #include <wchar.h>
8221 #ifdef HAVE_LIBUTF8_H
8222 #include <libutf8.h>
8223 #endif
8224 int
8225 main ()
8226 {
8227 mbstate_t value
8228   ;
8229   return 0;
8230 }
8231 _ACEOF
8232 rm -f conftest.$ac_objext
8233 if { (eval echo "$as_me:8233: \"$ac_compile\"") >&5
8234   (eval $ac_compile) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); } &&
8238          { ac_try='test -s conftest.$ac_objext'
8239   { (eval echo "$as_me:8239: \"$ac_try\"") >&5
8240   (eval $ac_try) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit $ac_status); }; }; then
8244   cf_cv_mbstate_t=yes
8245 else
8246   echo "$as_me: failed program was:" >&5
8247 cat conftest.$ac_ext >&5
8248 cf_cv_mbstate_t=unknown
8249 fi
8250 rm -f conftest.$ac_objext conftest.$ac_ext
8251 fi
8252 rm -f conftest.$ac_objext conftest.$ac_ext
8253 fi
8254 echo "$as_me:8254: result: $cf_cv_mbstate_t" >&5
8255 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8256
8257 if test "$cf_cv_mbstate_t" = yes ; then
8258         cat >>confdefs.h <<\EOF
8259 #define NEED_WCHAR_H 1
8260 EOF
8261
8262         NEED_WCHAR_H=1
8263 fi
8264
8265 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8266 if test "$cf_cv_mbstate_t" = unknown ; then
8267         NCURSES_MBSTATE_T=1
8268 fi
8269
8270 # This is needed on Tru64 5.0 to declare wchar_t
8271 echo "$as_me:8271: checking if we must include wchar.h to declare wchar_t" >&5
8272 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8273 if test "${cf_cv_wchar_t+set}" = set; then
8274   echo $ECHO_N "(cached) $ECHO_C" >&6
8275 else
8276
8277 cat >conftest.$ac_ext <<_ACEOF
8278 #line 8278 "configure"
8279 #include "confdefs.h"
8280
8281 #include <stdlib.h>
8282 #include <stdarg.h>
8283 #include <stdio.h>
8284 #ifdef HAVE_LIBUTF8_H
8285 #include <libutf8.h>
8286 #endif
8287 int
8288 main ()
8289 {
8290 wchar_t state
8291   ;
8292   return 0;
8293 }
8294 _ACEOF
8295 rm -f conftest.$ac_objext
8296 if { (eval echo "$as_me:8296: \"$ac_compile\"") >&5
8297   (eval $ac_compile) 2>&5
8298   ac_status=$?
8299   echo "$as_me:8299: \$? = $ac_status" >&5
8300   (exit $ac_status); } &&
8301          { ac_try='test -s conftest.$ac_objext'
8302   { (eval echo "$as_me:8302: \"$ac_try\"") >&5
8303   (eval $ac_try) 2>&5
8304   ac_status=$?
8305   echo "$as_me:8305: \$? = $ac_status" >&5
8306   (exit $ac_status); }; }; then
8307   cf_cv_wchar_t=no
8308 else
8309   echo "$as_me: failed program was:" >&5
8310 cat conftest.$ac_ext >&5
8311 cat >conftest.$ac_ext <<_ACEOF
8312 #line 8312 "configure"
8313 #include "confdefs.h"
8314
8315 #include <stdlib.h>
8316 #include <stdarg.h>
8317 #include <stdio.h>
8318 #include <wchar.h>
8319 #ifdef HAVE_LIBUTF8_H
8320 #include <libutf8.h>
8321 #endif
8322 int
8323 main ()
8324 {
8325 wchar_t value
8326   ;
8327   return 0;
8328 }
8329 _ACEOF
8330 rm -f conftest.$ac_objext
8331 if { (eval echo "$as_me:8331: \"$ac_compile\"") >&5
8332   (eval $ac_compile) 2>&5
8333   ac_status=$?
8334   echo "$as_me:8334: \$? = $ac_status" >&5
8335   (exit $ac_status); } &&
8336          { ac_try='test -s conftest.$ac_objext'
8337   { (eval echo "$as_me:8337: \"$ac_try\"") >&5
8338   (eval $ac_try) 2>&5
8339   ac_status=$?
8340   echo "$as_me:8340: \$? = $ac_status" >&5
8341   (exit $ac_status); }; }; then
8342   cf_cv_wchar_t=yes
8343 else
8344   echo "$as_me: failed program was:" >&5
8345 cat conftest.$ac_ext >&5
8346 cf_cv_wchar_t=unknown
8347 fi
8348 rm -f conftest.$ac_objext conftest.$ac_ext
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351 fi
8352 echo "$as_me:8352: result: $cf_cv_wchar_t" >&5
8353 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8354
8355 if test "$cf_cv_wchar_t" = yes ; then
8356         cat >>confdefs.h <<\EOF
8357 #define NEED_WCHAR_H 1
8358 EOF
8359
8360         NEED_WCHAR_H=1
8361 fi
8362
8363 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8364 if test "$cf_cv_wchar_t" = unknown ; then
8365         NCURSES_WCHAR_T=1
8366 fi
8367
8368 # if we find wchar_t in either place, use substitution to provide a fallback.
8369 if test "$cf_cv_wchar_t" != unknown ; then
8370         NCURSES_OK_WCHAR_T=1
8371 fi
8372
8373 # This is needed on Tru64 5.0 to declare wint_t
8374 echo "$as_me:8374: checking if we must include wchar.h to declare wint_t" >&5
8375 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8376 if test "${cf_cv_wint_t+set}" = set; then
8377   echo $ECHO_N "(cached) $ECHO_C" >&6
8378 else
8379
8380 cat >conftest.$ac_ext <<_ACEOF
8381 #line 8381 "configure"
8382 #include "confdefs.h"
8383
8384 #include <stdlib.h>
8385 #include <stdarg.h>
8386 #include <stdio.h>
8387 #ifdef HAVE_LIBUTF8_H
8388 #include <libutf8.h>
8389 #endif
8390 int
8391 main ()
8392 {
8393 wint_t state
8394   ;
8395   return 0;
8396 }
8397 _ACEOF
8398 rm -f conftest.$ac_objext
8399 if { (eval echo "$as_me:8399: \"$ac_compile\"") >&5
8400   (eval $ac_compile) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit $ac_status); } &&
8404          { ac_try='test -s conftest.$ac_objext'
8405   { (eval echo "$as_me:8405: \"$ac_try\"") >&5
8406   (eval $ac_try) 2>&5
8407   ac_status=$?
8408   echo "$as_me:8408: \$? = $ac_status" >&5
8409   (exit $ac_status); }; }; then
8410   cf_cv_wint_t=no
8411 else
8412   echo "$as_me: failed program was:" >&5
8413 cat conftest.$ac_ext >&5
8414 cat >conftest.$ac_ext <<_ACEOF
8415 #line 8415 "configure"
8416 #include "confdefs.h"
8417
8418 #include <stdlib.h>
8419 #include <stdarg.h>
8420 #include <stdio.h>
8421 #include <wchar.h>
8422 #ifdef HAVE_LIBUTF8_H
8423 #include <libutf8.h>
8424 #endif
8425 int
8426 main ()
8427 {
8428 wint_t value
8429   ;
8430   return 0;
8431 }
8432 _ACEOF
8433 rm -f conftest.$ac_objext
8434 if { (eval echo "$as_me:8434: \"$ac_compile\"") >&5
8435   (eval $ac_compile) 2>&5
8436   ac_status=$?
8437   echo "$as_me:8437: \$? = $ac_status" >&5
8438   (exit $ac_status); } &&
8439          { ac_try='test -s conftest.$ac_objext'
8440   { (eval echo "$as_me:8440: \"$ac_try\"") >&5
8441   (eval $ac_try) 2>&5
8442   ac_status=$?
8443   echo "$as_me:8443: \$? = $ac_status" >&5
8444   (exit $ac_status); }; }; then
8445   cf_cv_wint_t=yes
8446 else
8447   echo "$as_me: failed program was:" >&5
8448 cat conftest.$ac_ext >&5
8449 cf_cv_wint_t=unknown
8450 fi
8451 rm -f conftest.$ac_objext conftest.$ac_ext
8452 fi
8453 rm -f conftest.$ac_objext conftest.$ac_ext
8454 fi
8455 echo "$as_me:8455: result: $cf_cv_wint_t" >&5
8456 echo "${ECHO_T}$cf_cv_wint_t" >&6
8457
8458 if test "$cf_cv_wint_t" = yes ; then
8459         cat >>confdefs.h <<\EOF
8460 #define NEED_WCHAR_H 1
8461 EOF
8462
8463         NEED_WCHAR_H=1
8464 fi
8465
8466 # if we do not find wint_t in either place, use substitution to provide a fallback.
8467 if test "$cf_cv_wint_t" = unknown ; then
8468         NCURSES_WINT_T=1
8469 fi
8470
8471 # if we find wint_t in either place, use substitution to provide a fallback.
8472 if test "$cf_cv_wint_t" != unknown ; then
8473         NCURSES_OK_WINT_T=1
8474 fi
8475
8476         if test "$NCURSES_MBSTATE_T" != 0; then
8477                 cat >>confdefs.h <<\EOF
8478 #define NEED_MBSTATE_T_DEF 1
8479 EOF
8480
8481         fi
8482 fi
8483
8484 ###   use option --disable-lp64 to allow long chtype
8485 case $cf_cv_abi_version in
8486 [345]*)
8487         default_with_lp64=no
8488         ;;
8489 *)
8490         default_with_lp64=yes
8491         ;;
8492 esac
8493
8494 echo "$as_me:8494: checking whether to enable _LP64 definition in curses.h" >&5
8495 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8496
8497 # Check whether --enable-lp64 or --disable-lp64 was given.
8498 if test "${enable_lp64+set}" = set; then
8499   enableval="$enable_lp64"
8500   with_lp64=$enableval
8501 else
8502   with_lp64=$default_with_lp64
8503 fi;
8504 echo "$as_me:8504: result: $with_lp64" >&5
8505 echo "${ECHO_T}$with_lp64" >&6
8506
8507 if test "$with_lp64" = yes ; then
8508         cf_cv_enable_lp64=1
8509 else
8510         cf_cv_enable_lp64=0
8511 fi
8512
8513 # Check whether --enable-largefile or --disable-largefile was given.
8514 if test "${enable_largefile+set}" = set; then
8515   enableval="$enable_largefile"
8516
8517 fi;
8518 if test "$enable_largefile" != no; then
8519
8520   echo "$as_me:8520: checking for special C compiler options needed for large files" >&5
8521 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8522 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8523   echo $ECHO_N "(cached) $ECHO_C" >&6
8524 else
8525   ac_cv_sys_largefile_CC=no
8526      if test "$GCC" != yes; then
8527        ac_save_CC=$CC
8528        while :; do
8529          # IRIX 6.2 and later do not support large files by default,
8530          # so use the C compiler's -n32 option if that helps.
8531          cat >conftest.$ac_ext <<_ACEOF
8532 #line 8532 "configure"
8533 #include "confdefs.h"
8534 #include <sys/types.h>
8535  /* Check that off_t can represent 2**63 - 1 correctly.
8536     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8537     since some C++ compilers masquerading as C compilers
8538     incorrectly reject 9223372036854775807.  */
8539 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8540   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8541                        && LARGE_OFF_T % 2147483647 == 1)
8542                       ? 1 : -1];
8543 int
8544 main ()
8545 {
8546
8547   ;
8548   return 0;
8549 }
8550 _ACEOF
8551          rm -f conftest.$ac_objext
8552 if { (eval echo "$as_me:8552: \"$ac_compile\"") >&5
8553   (eval $ac_compile) 2>&5
8554   ac_status=$?
8555   echo "$as_me:8555: \$? = $ac_status" >&5
8556   (exit $ac_status); } &&
8557          { ac_try='test -s conftest.$ac_objext'
8558   { (eval echo "$as_me:8558: \"$ac_try\"") >&5
8559   (eval $ac_try) 2>&5
8560   ac_status=$?
8561   echo "$as_me:8561: \$? = $ac_status" >&5
8562   (exit $ac_status); }; }; then
8563   break
8564 else
8565   echo "$as_me: failed program was:" >&5
8566 cat conftest.$ac_ext >&5
8567 fi
8568 rm -f conftest.$ac_objext
8569          CC="$CC -n32"
8570          rm -f conftest.$ac_objext
8571 if { (eval echo "$as_me:8571: \"$ac_compile\"") >&5
8572   (eval $ac_compile) 2>&5
8573   ac_status=$?
8574   echo "$as_me:8574: \$? = $ac_status" >&5
8575   (exit $ac_status); } &&
8576          { ac_try='test -s conftest.$ac_objext'
8577   { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8578   (eval $ac_try) 2>&5
8579   ac_status=$?
8580   echo "$as_me:8580: \$? = $ac_status" >&5
8581   (exit $ac_status); }; }; then
8582   ac_cv_sys_largefile_CC=' -n32'; break
8583 else
8584   echo "$as_me: failed program was:" >&5
8585 cat conftest.$ac_ext >&5
8586 fi
8587 rm -f conftest.$ac_objext
8588          break
8589        done
8590        CC=$ac_save_CC
8591        rm -f conftest.$ac_ext
8592     fi
8593 fi
8594 echo "$as_me:8594: result: $ac_cv_sys_largefile_CC" >&5
8595 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8596   if test "$ac_cv_sys_largefile_CC" != no; then
8597     CC=$CC$ac_cv_sys_largefile_CC
8598   fi
8599
8600   echo "$as_me:8600: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8601 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8602 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8603   echo $ECHO_N "(cached) $ECHO_C" >&6
8604 else
8605   while :; do
8606   ac_cv_sys_file_offset_bits=no
8607   cat >conftest.$ac_ext <<_ACEOF
8608 #line 8608 "configure"
8609 #include "confdefs.h"
8610 #include <sys/types.h>
8611  /* Check that off_t can represent 2**63 - 1 correctly.
8612     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8613     since some C++ compilers masquerading as C compilers
8614     incorrectly reject 9223372036854775807.  */
8615 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8616   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8617                        && LARGE_OFF_T % 2147483647 == 1)
8618                       ? 1 : -1];
8619 int
8620 main ()
8621 {
8622
8623   ;
8624   return 0;
8625 }
8626 _ACEOF
8627 rm -f conftest.$ac_objext
8628 if { (eval echo "$as_me:8628: \"$ac_compile\"") >&5
8629   (eval $ac_compile) 2>&5
8630   ac_status=$?
8631   echo "$as_me:8631: \$? = $ac_status" >&5
8632   (exit $ac_status); } &&
8633          { ac_try='test -s conftest.$ac_objext'
8634   { (eval echo "$as_me:8634: \"$ac_try\"") >&5
8635   (eval $ac_try) 2>&5
8636   ac_status=$?
8637   echo "$as_me:8637: \$? = $ac_status" >&5
8638   (exit $ac_status); }; }; then
8639   break
8640 else
8641   echo "$as_me: failed program was:" >&5
8642 cat conftest.$ac_ext >&5
8643 fi
8644 rm -f conftest.$ac_objext conftest.$ac_ext
8645   cat >conftest.$ac_ext <<_ACEOF
8646 #line 8646 "configure"
8647 #include "confdefs.h"
8648 #define _FILE_OFFSET_BITS 64
8649 #include <sys/types.h>
8650  /* Check that off_t can represent 2**63 - 1 correctly.
8651     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8652     since some C++ compilers masquerading as C compilers
8653     incorrectly reject 9223372036854775807.  */
8654 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8655   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8656                        && LARGE_OFF_T % 2147483647 == 1)
8657                       ? 1 : -1];
8658 int
8659 main ()
8660 {
8661
8662   ;
8663   return 0;
8664 }
8665 _ACEOF
8666 rm -f conftest.$ac_objext
8667 if { (eval echo "$as_me:8667: \"$ac_compile\"") >&5
8668   (eval $ac_compile) 2>&5
8669   ac_status=$?
8670   echo "$as_me:8670: \$? = $ac_status" >&5
8671   (exit $ac_status); } &&
8672          { ac_try='test -s conftest.$ac_objext'
8673   { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8674   (eval $ac_try) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit $ac_status); }; }; then
8678   ac_cv_sys_file_offset_bits=64; break
8679 else
8680   echo "$as_me: failed program was:" >&5
8681 cat conftest.$ac_ext >&5
8682 fi
8683 rm -f conftest.$ac_objext conftest.$ac_ext
8684   break
8685 done
8686 fi
8687 echo "$as_me:8687: result: $ac_cv_sys_file_offset_bits" >&5
8688 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8689 if test "$ac_cv_sys_file_offset_bits" != no; then
8690
8691 cat >>confdefs.h <<EOF
8692 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8693 EOF
8694
8695 fi
8696 rm -f conftest*
8697   echo "$as_me:8697: checking for _LARGE_FILES value needed for large files" >&5
8698 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8699 if test "${ac_cv_sys_large_files+set}" = set; then
8700   echo $ECHO_N "(cached) $ECHO_C" >&6
8701 else
8702   while :; do
8703   ac_cv_sys_large_files=no
8704   cat >conftest.$ac_ext <<_ACEOF
8705 #line 8705 "configure"
8706 #include "confdefs.h"
8707 #include <sys/types.h>
8708  /* Check that off_t can represent 2**63 - 1 correctly.
8709     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8710     since some C++ compilers masquerading as C compilers
8711     incorrectly reject 9223372036854775807.  */
8712 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8713   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8714                        && LARGE_OFF_T % 2147483647 == 1)
8715                       ? 1 : -1];
8716 int
8717 main ()
8718 {
8719
8720   ;
8721   return 0;
8722 }
8723 _ACEOF
8724 rm -f conftest.$ac_objext
8725 if { (eval echo "$as_me:8725: \"$ac_compile\"") >&5
8726   (eval $ac_compile) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); } &&
8730          { ac_try='test -s conftest.$ac_objext'
8731   { (eval echo "$as_me:8731: \"$ac_try\"") >&5
8732   (eval $ac_try) 2>&5
8733   ac_status=$?
8734   echo "$as_me:8734: \$? = $ac_status" >&5
8735   (exit $ac_status); }; }; then
8736   break
8737 else
8738   echo "$as_me: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
8740 fi
8741 rm -f conftest.$ac_objext conftest.$ac_ext
8742   cat >conftest.$ac_ext <<_ACEOF
8743 #line 8743 "configure"
8744 #include "confdefs.h"
8745 #define _LARGE_FILES 1
8746 #include <sys/types.h>
8747  /* Check that off_t can represent 2**63 - 1 correctly.
8748     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8749     since some C++ compilers masquerading as C compilers
8750     incorrectly reject 9223372036854775807.  */
8751 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8752   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8753                        && LARGE_OFF_T % 2147483647 == 1)
8754                       ? 1 : -1];
8755 int
8756 main ()
8757 {
8758
8759   ;
8760   return 0;
8761 }
8762 _ACEOF
8763 rm -f conftest.$ac_objext
8764 if { (eval echo "$as_me:8764: \"$ac_compile\"") >&5
8765   (eval $ac_compile) 2>&5
8766   ac_status=$?
8767   echo "$as_me:8767: \$? = $ac_status" >&5
8768   (exit $ac_status); } &&
8769          { ac_try='test -s conftest.$ac_objext'
8770   { (eval echo "$as_me:8770: \"$ac_try\"") >&5
8771   (eval $ac_try) 2>&5
8772   ac_status=$?
8773   echo "$as_me:8773: \$? = $ac_status" >&5
8774   (exit $ac_status); }; }; then
8775   ac_cv_sys_large_files=1; break
8776 else
8777   echo "$as_me: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8779 fi
8780 rm -f conftest.$ac_objext conftest.$ac_ext
8781   break
8782 done
8783 fi
8784 echo "$as_me:8784: result: $ac_cv_sys_large_files" >&5
8785 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8786 if test "$ac_cv_sys_large_files" != no; then
8787
8788 cat >>confdefs.h <<EOF
8789 #define _LARGE_FILES $ac_cv_sys_large_files
8790 EOF
8791
8792 fi
8793 rm -f conftest*
8794 fi
8795
8796     if test "$enable_largefile" != no ; then
8797         echo "$as_me:8797: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8798 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8799 if test "${ac_cv_sys_largefile_source+set}" = set; then
8800   echo $ECHO_N "(cached) $ECHO_C" >&6
8801 else
8802   while :; do
8803   ac_cv_sys_largefile_source=no
8804   cat >conftest.$ac_ext <<_ACEOF
8805 #line 8805 "configure"
8806 #include "confdefs.h"
8807 #include <stdio.h>
8808 int
8809 main ()
8810 {
8811 return !fseeko;
8812   ;
8813   return 0;
8814 }
8815 _ACEOF
8816 rm -f conftest.$ac_objext
8817 if { (eval echo "$as_me:8817: \"$ac_compile\"") >&5
8818   (eval $ac_compile) 2>&5
8819   ac_status=$?
8820   echo "$as_me:8820: \$? = $ac_status" >&5
8821   (exit $ac_status); } &&
8822          { ac_try='test -s conftest.$ac_objext'
8823   { (eval echo "$as_me:8823: \"$ac_try\"") >&5
8824   (eval $ac_try) 2>&5
8825   ac_status=$?
8826   echo "$as_me:8826: \$? = $ac_status" >&5
8827   (exit $ac_status); }; }; then
8828   break
8829 else
8830   echo "$as_me: failed program was:" >&5
8831 cat conftest.$ac_ext >&5
8832 fi
8833 rm -f conftest.$ac_objext conftest.$ac_ext
8834   cat >conftest.$ac_ext <<_ACEOF
8835 #line 8835 "configure"
8836 #include "confdefs.h"
8837 #define _LARGEFILE_SOURCE 1
8838 #include <stdio.h>
8839 int
8840 main ()
8841 {
8842 return !fseeko;
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   ac_cv_sys_largefile_source=1; break
8860 else
8861   echo "$as_me: failed program was:" >&5
8862 cat conftest.$ac_ext >&5
8863 fi
8864 rm -f conftest.$ac_objext conftest.$ac_ext
8865   break
8866 done
8867 fi
8868 echo "$as_me:8868: result: $ac_cv_sys_largefile_source" >&5
8869 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8870 if test "$ac_cv_sys_largefile_source" != no; then
8871
8872 cat >>confdefs.h <<EOF
8873 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8874 EOF
8875
8876 fi
8877 rm -f conftest*
8878
8879 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8880 # in glibc 2.1.3, but that breaks too many other things.
8881 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8882 echo "$as_me:8882: checking for fseeko" >&5
8883 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8884 if test "${ac_cv_func_fseeko+set}" = set; then
8885   echo $ECHO_N "(cached) $ECHO_C" >&6
8886 else
8887   cat >conftest.$ac_ext <<_ACEOF
8888 #line 8888 "configure"
8889 #include "confdefs.h"
8890 #include <stdio.h>
8891 int
8892 main ()
8893 {
8894 return fseeko && fseeko (stdin, 0, 0);
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 rm -f conftest.$ac_objext conftest$ac_exeext
8900 if { (eval echo "$as_me:8900: \"$ac_link\"") >&5
8901   (eval $ac_link) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); } &&
8905          { ac_try='test -s conftest$ac_exeext'
8906   { (eval echo "$as_me:8906: \"$ac_try\"") >&5
8907   (eval $ac_try) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); }; }; then
8911   ac_cv_func_fseeko=yes
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8915 ac_cv_func_fseeko=no
8916 fi
8917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8918 fi
8919 echo "$as_me:8919: result: $ac_cv_func_fseeko" >&5
8920 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8921 if test $ac_cv_func_fseeko = yes; then
8922
8923 cat >>confdefs.h <<\EOF
8924 #define HAVE_FSEEKO 1
8925 EOF
8926
8927 fi
8928
8929         # Normally we would collect these definitions in the config.h,
8930         # but (like _XOPEN_SOURCE), some environments rely on having these
8931         # defined before any of the system headers are included.  Another
8932         # case comes up with C++, e.g., on AIX the compiler compiles the
8933         # header files by themselves before looking at the body files it is
8934         # told to compile.  For ncurses, those header files do not include
8935         # the config.h
8936         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8937         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8938         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8939
8940         echo "$as_me:8940: checking whether to use struct dirent64" >&5
8941 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8942 if test "${cf_cv_struct_dirent64+set}" = set; then
8943   echo $ECHO_N "(cached) $ECHO_C" >&6
8944 else
8945
8946                 cat >conftest.$ac_ext <<_ACEOF
8947 #line 8947 "configure"
8948 #include "confdefs.h"
8949
8950 #include <sys/types.h>
8951 #include <dirent.h>
8952
8953 int
8954 main ()
8955 {
8956
8957                 /* if transitional largefile support is setup, this is true */
8958                 extern struct dirent64 * readdir(DIR *);
8959                 struct dirent64 *x = readdir((DIR *)0);
8960                 struct dirent *y = readdir((DIR *)0);
8961                 int z = x - y;
8962
8963   ;
8964   return 0;
8965 }
8966 _ACEOF
8967 rm -f conftest.$ac_objext
8968 if { (eval echo "$as_me:8968: \"$ac_compile\"") >&5
8969   (eval $ac_compile) 2>&5
8970   ac_status=$?
8971   echo "$as_me:8971: \$? = $ac_status" >&5
8972   (exit $ac_status); } &&
8973          { ac_try='test -s conftest.$ac_objext'
8974   { (eval echo "$as_me:8974: \"$ac_try\"") >&5
8975   (eval $ac_try) 2>&5
8976   ac_status=$?
8977   echo "$as_me:8977: \$? = $ac_status" >&5
8978   (exit $ac_status); }; }; then
8979   cf_cv_struct_dirent64=yes
8980 else
8981   echo "$as_me: failed program was:" >&5
8982 cat conftest.$ac_ext >&5
8983 cf_cv_struct_dirent64=no
8984 fi
8985 rm -f conftest.$ac_objext conftest.$ac_ext
8986
8987 fi
8988 echo "$as_me:8988: result: $cf_cv_struct_dirent64" >&5
8989 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8990         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8991 #define HAVE_STRUCT_DIRENT64 1
8992 EOF
8993
8994     fi
8995
8996 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8997 echo "$as_me:8997: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8998 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8999
9000 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9001 if test "${enable_tparm_varargs+set}" = set; then
9002   enableval="$enable_tparm_varargs"
9003   with_tparm_varargs=$enableval
9004 else
9005   with_tparm_varargs=yes
9006 fi;
9007 echo "$as_me:9007: result: $with_tparm_varargs" >&5
9008 echo "${ECHO_T}$with_tparm_varargs" >&6
9009 NCURSES_TPARM_VARARGS=0
9010 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9011
9012 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9013 if test "$with_ticlib" != no ; then
9014 echo "$as_me:9014: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9015 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9016
9017 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9018 if test "${enable_tic_depends+set}" = set; then
9019   enableval="$enable_tic_depends"
9020   with_tic_depends=$enableval
9021 else
9022   with_tic_depends=yes
9023 fi;
9024 echo "$as_me:9024: result: $with_tic_depends" >&5
9025 echo "${ECHO_T}$with_tic_depends" >&6
9026 else
9027         with_tic_depends=no
9028 fi
9029
9030 ###   use option --with-bool to override bool's type
9031 echo "$as_me:9031: checking for type of bool" >&5
9032 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9033
9034 # Check whether --with-bool or --without-bool was given.
9035 if test "${with_bool+set}" = set; then
9036   withval="$with_bool"
9037   NCURSES_BOOL="$withval"
9038 else
9039   NCURSES_BOOL=auto
9040 fi;
9041 echo "$as_me:9041: result: $NCURSES_BOOL" >&5
9042 echo "${ECHO_T}$NCURSES_BOOL" >&6
9043
9044 echo "$as_me:9044: checking for alternate terminal capabilities file" >&5
9045 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9046
9047 # Check whether --with-caps or --without-caps was given.
9048 if test "${with_caps+set}" = set; then
9049   withval="$with_caps"
9050   TERMINFO_CAPS=Caps.$withval
9051 else
9052   TERMINFO_CAPS=Caps
9053 fi;
9054 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9055 echo "$as_me:9055: result: $TERMINFO_CAPS" >&5
9056 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9057
9058 ###   use option --with-chtype to override chtype's type
9059 echo "$as_me:9059: checking for type of chtype" >&5
9060 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9061
9062 # Check whether --with-chtype or --without-chtype was given.
9063 if test "${with_chtype+set}" = set; then
9064   withval="$with_chtype"
9065   NCURSES_CHTYPE="$withval"
9066 else
9067   NCURSES_CHTYPE=auto
9068 fi;
9069 echo "$as_me:9069: result: $NCURSES_CHTYPE" >&5
9070 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9071
9072 ###   use option --with-ospeed to override ospeed's type
9073 echo "$as_me:9073: checking for type of ospeed" >&5
9074 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9075
9076 # Check whether --with-ospeed or --without-ospeed was given.
9077 if test "${with_ospeed+set}" = set; then
9078   withval="$with_ospeed"
9079   NCURSES_OSPEED="$withval"
9080 else
9081   NCURSES_OSPEED=short
9082 fi;
9083 echo "$as_me:9083: result: $NCURSES_OSPEED" >&5
9084 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9085
9086 ###   use option --with-mmask-t to override mmask_t's type
9087 echo "$as_me:9087: checking for type of mmask_t" >&5
9088 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9089
9090 # Check whether --with-mmask-t or --without-mmask-t was given.
9091 if test "${with_mmask_t+set}" = set; then
9092   withval="$with_mmask_t"
9093   NCURSES_MMASK_T="$withval"
9094 else
9095   NCURSES_MMASK_T=auto
9096 fi;
9097 echo "$as_me:9097: result: $NCURSES_MMASK_T" >&5
9098 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9099
9100 ###   use option --with-ccharw-max to override CCHARW_MAX size
9101 echo "$as_me:9101: checking for size CCHARW_MAX" >&5
9102 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9103
9104 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9105 if test "${with_ccharw_max+set}" = set; then
9106   withval="$with_ccharw_max"
9107   NCURSES_CCHARW_MAX="$withval"
9108 else
9109   NCURSES_CCHARW_MAX=5
9110 fi;
9111 echo "$as_me:9111: result: $NCURSES_CCHARW_MAX" >&5
9112 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9113
9114 ### Enable compiling-in rcs id's
9115 echo "$as_me:9115: checking if RCS identifiers should be compiled-in" >&5
9116 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9117
9118 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9119 if test "${with_rcs_ids+set}" = set; then
9120   withval="$with_rcs_ids"
9121   with_rcs_ids=$withval
9122 else
9123   with_rcs_ids=no
9124 fi;
9125 echo "$as_me:9125: result: $with_rcs_ids" >&5
9126 echo "${ECHO_T}$with_rcs_ids" >&6
9127 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9128 #define USE_RCS_IDS 1
9129 EOF
9130
9131 ###############################################################################
9132
9133 echo "$as_me:9133: checking format of man-pages" >&5
9134 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9135
9136 # Check whether --with-manpage-format or --without-manpage-format was given.
9137 if test "${with_manpage_format+set}" = set; then
9138   withval="$with_manpage_format"
9139   MANPAGE_FORMAT=$withval
9140 else
9141   MANPAGE_FORMAT=unknown
9142 fi;
9143
9144 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9145 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9146
9147 cf_unknown=
9148
9149 case $MANPAGE_FORMAT in
9150 unknown)
9151   if test -z "$MANPATH" ; then
9152     MANPATH="/usr/man:/usr/share/man"
9153   fi
9154
9155   # look for the 'date' man-page (it's most likely to be installed!)
9156   MANPAGE_FORMAT=
9157   cf_preform=no
9158   cf_catonly=yes
9159   cf_example=date
9160
9161   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9162   for cf_dir in $MANPATH; do
9163     test -z "$cf_dir" && cf_dir=/usr/man
9164     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
9165     do
9166       cf_test=`echo $cf_name | sed -e 's/*//'`
9167       if test "x$cf_test" = "x$cf_name" ; then
9168
9169         case "$cf_name" in
9170         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9171         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9172         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9173         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9174         esac
9175
9176         case "$cf_name" in
9177         $cf_dir/man*)
9178           cf_catonly=no
9179           ;;
9180         $cf_dir/cat*)
9181           cf_preform=yes
9182           ;;
9183         esac
9184         break
9185       fi
9186
9187       # if we found a match in either man* or cat*, stop looking
9188       if test -n "$MANPAGE_FORMAT" ; then
9189         cf_found=no
9190         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9191         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9192         case "$cf_name" in
9193         $cf_dir/cat*)
9194           cf_found=yes
9195           ;;
9196         esac
9197         test $cf_found=yes && break
9198       fi
9199     done
9200     # only check the first directory in $MANPATH where we find manpages
9201     if test -n "$MANPAGE_FORMAT" ; then
9202        break
9203     fi
9204   done
9205   # if we did not find the example, just assume it is normal
9206   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9207   IFS="$ac_save_ifs"
9208   ;;
9209 *)
9210   for cf_option in $MANPAGE_FORMAT; do
9211      case $cf_option in #(vi
9212      gzip|compress|BSDI|normal|formatted|catonly)
9213        ;;
9214      *)
9215        cf_unknown="$cf_unknown $cf_option"
9216        ;;
9217      esac
9218   done
9219   ;;
9220 esac
9221
9222 echo "$as_me:9222: result: $MANPAGE_FORMAT" >&5
9223 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9224 if test -n "$cf_unknown" ; then
9225   { echo "$as_me:9225: WARNING: Unexpected manpage-format $cf_unknown" >&5
9226 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9227 fi
9228
9229 echo "$as_me:9229: checking for manpage renaming" >&5
9230 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9231
9232 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9233 if test "${with_manpage_renames+set}" = set; then
9234   withval="$with_manpage_renames"
9235   MANPAGE_RENAMES=$withval
9236 else
9237   MANPAGE_RENAMES=yes
9238 fi;
9239
9240 case ".$MANPAGE_RENAMES" in #(vi
9241 .no) #(vi
9242   ;;
9243 .|.yes)
9244   # Debian 'man' program?
9245   if test -f /etc/debian_version ; then
9246     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9247   else
9248     MANPAGE_RENAMES=no
9249   fi
9250   ;;
9251 esac
9252
9253 if test "$MANPAGE_RENAMES" != no ; then
9254   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9255     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9256   elif test ! -f $MANPAGE_RENAMES ; then
9257     { { echo "$as_me:9257: error: not a filename: $MANPAGE_RENAMES" >&5
9258 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9259    { (exit 1); exit 1; }; }
9260   fi
9261
9262   test ! -d man && mkdir man
9263
9264   # Construct a sed-script to perform renaming within man-pages
9265   if test -n "$MANPAGE_RENAMES" ; then
9266     test ! -d man && mkdir man
9267     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9268   fi
9269 fi
9270
9271 echo "$as_me:9271: result: $MANPAGE_RENAMES" >&5
9272 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9273
9274 echo "$as_me:9274: checking if manpage aliases will be installed" >&5
9275 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9276
9277 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9278 if test "${with_manpage_aliases+set}" = set; then
9279   withval="$with_manpage_aliases"
9280   MANPAGE_ALIASES=$withval
9281 else
9282   MANPAGE_ALIASES=yes
9283 fi;
9284
9285 echo "$as_me:9285: result: $MANPAGE_ALIASES" >&5
9286 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9287
9288 if test "$LN_S" = "ln -s"; then
9289         cf_use_symlinks=yes
9290 else
9291         cf_use_symlinks=no
9292 fi
9293
9294 MANPAGE_SYMLINKS=no
9295 if test "$MANPAGE_ALIASES" = yes ; then
9296 echo "$as_me:9296: checking if manpage symlinks should be used" >&5
9297 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9298
9299 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9300 if test "${with_manpage_symlinks+set}" = set; then
9301   withval="$with_manpage_symlinks"
9302   MANPAGE_SYMLINKS=$withval
9303 else
9304   MANPAGE_SYMLINKS=$cf_use_symlinks
9305 fi;
9306
9307 if test "$$cf_use_symlinks" = no; then
9308 if test "$MANPAGE_SYMLINKS" = yes ; then
9309         { echo "$as_me:9309: WARNING: cannot make symlinks" >&5
9310 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9311         MANPAGE_SYMLINKS=no
9312 fi
9313 fi
9314
9315 echo "$as_me:9315: result: $MANPAGE_SYMLINKS" >&5
9316 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9317 fi
9318
9319 echo "$as_me:9319: checking for manpage tbl" >&5
9320 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9321
9322 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9323 if test "${with_manpage_tbl+set}" = set; then
9324   withval="$with_manpage_tbl"
9325   MANPAGE_TBL=$withval
9326 else
9327   MANPAGE_TBL=no
9328 fi;
9329
9330 echo "$as_me:9330: result: $MANPAGE_TBL" >&5
9331 echo "${ECHO_T}$MANPAGE_TBL" >&6
9332
9333   if test "$prefix" = "NONE" ; then
9334      cf_prefix="$ac_default_prefix"
9335   else
9336      cf_prefix="$prefix"
9337   fi
9338
9339   case "$MANPAGE_FORMAT" in # (vi
9340   *catonly*) # (vi
9341     cf_format=yes
9342     cf_inboth=no
9343     ;;
9344   *formatted*) # (vi
9345     cf_format=yes
9346     cf_inboth=yes
9347     ;;
9348   *)
9349     cf_format=no
9350     cf_inboth=no
9351     ;;
9352   esac
9353
9354 test ! -d man && mkdir man
9355
9356 cf_so_strip=
9357 cf_compress=
9358 case "$MANPAGE_FORMAT" in #(vi
9359 *compress*) #(vi
9360         cf_so_strip="Z"
9361         cf_compress=compress
9362   ;;
9363 *gzip*) #(vi
9364         cf_so_strip="gz"
9365         cf_compress=gzip
9366   ;;
9367 esac
9368
9369 cf_edit_man=./edit_man.sh
9370 cf_man_alias=`pwd`/man_alias.sed
9371
9372 cat >$cf_edit_man <<CF_EOF
9373 #! /bin/sh
9374 # this script is generated by the configure-script CF_MAN_PAGES macro.
9375
9376 prefix="$cf_prefix"
9377 datadir="$datadir"
9378
9379 NCURSES_MAJOR="$NCURSES_MAJOR"
9380 NCURSES_MINOR="$NCURSES_MINOR"
9381 NCURSES_PATCH="$NCURSES_PATCH"
9382
9383 NCURSES_OSPEED="$NCURSES_OSPEED"
9384 TERMINFO="$TERMINFO"
9385
9386 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9387
9388 INSTALL="$INSTALL"
9389 INSTALL_DATA="$INSTALL_DATA"
9390
9391 transform="$program_transform_name"
9392
9393 TMP=\${TMPDIR-/tmp}/man\$\$
9394 trap "rm -f \$TMP" 0 1 2 5 15
9395
9396 form=\$1
9397 shift || exit 1
9398
9399 verb=\$1
9400 shift || exit 1
9401
9402 mandir=\$1
9403 shift || exit 1
9404
9405 srcdir=\$1
9406 top_srcdir=\$srcdir/..
9407 shift || exit 1
9408
9409 if test "\$form" = normal ; then
9410         if test "$cf_format" = yes ; then
9411         if test "$cf_inboth" = no ; then
9412                 sh \$0 format \$verb \$mandir \$srcdir \$*
9413                 exit $?
9414         fi
9415         fi
9416         cf_subdir=\$mandir/man
9417         cf_tables=$MANPAGE_TBL
9418 else
9419         cf_subdir=\$mandir/cat
9420         cf_tables=yes
9421 fi
9422
9423 # process the list of source-files
9424 for i in \$* ; do
9425 case \$i in #(vi
9426 *.orig|*.rej) ;; #(vi
9427 *.[0-9]*)
9428         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9429         if test \$verb = installing ; then
9430         if test ! -d \$cf_subdir\${section} ; then
9431                 \$MKDIRS \$cf_subdir\$section
9432         fi
9433         fi
9434
9435         # replace variables in man page
9436         if test ! -f $cf_man_alias ; then
9437 cat >>$cf_man_alias <<-CF_EOF2
9438                 s,@DATADIR@,\$datadir,g
9439                 s,@TERMINFO@,\$TERMINFO,g
9440                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9441                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9442                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9443                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9444 CF_EOF
9445
9446         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9447         do
9448                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9449                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9450 cat >>$cf_edit_man <<-CF_EOF
9451                 s,@$cf_NAME@,$cf_name,g
9452 CF_EOF
9453         done
9454
9455 cat >>$cf_edit_man <<CF_EOF
9456 CF_EOF2
9457                 echo "...made $cf_man_alias"
9458         fi
9459
9460         aliases=
9461         cf_source=\`basename \$i\`
9462         inalias=\$cf_source
9463         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9464         if test ! -f \$inalias ; then
9465                 echo .. skipped \$cf_source
9466                 continue
9467         fi
9468 CF_EOF
9469
9470 if test "$MANPAGE_ALIASES" != no ; then
9471 cat >>$cf_edit_man <<CF_EOF
9472         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9473 CF_EOF
9474 fi
9475
9476 if test "$MANPAGE_RENAMES" = no ; then
9477 cat >>$cf_edit_man <<CF_EOF
9478         # perform program transformations for section 1 man pages
9479         if test \$section = 1 ; then
9480                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9481         else
9482                 cf_target=\$cf_subdir\${section}/\$cf_source
9483         fi
9484 CF_EOF
9485 else
9486 cat >>$cf_edit_man <<CF_EOF
9487         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9488         if test -z "\$cf_target" ; then
9489                 echo '? missing rename for '\$cf_source
9490                 cf_target="\$cf_source"
9491         fi
9492         cf_target="\$cf_subdir\${section}/\${cf_target}"
9493
9494 CF_EOF
9495 fi
9496
9497 cat >>$cf_edit_man <<CF_EOF
9498         sed     -f $cf_man_alias \\
9499 CF_EOF
9500
9501 if test -f $MANPAGE_RENAMES ; then
9502 cat >>$cf_edit_man <<CF_EOF
9503                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9504 CF_EOF
9505 else
9506 cat >>$cf_edit_man <<CF_EOF
9507                 < \$i >\$TMP
9508 CF_EOF
9509 fi
9510
9511 cat >>$cf_edit_man <<CF_EOF
9512 if test \$cf_tables = yes ; then
9513         tbl \$TMP >\$TMP.out
9514         mv \$TMP.out \$TMP
9515 fi
9516 CF_EOF
9517
9518 if test $with_curses_h != yes ; then
9519 cat >>$cf_edit_man <<CF_EOF
9520         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9521         mv \$TMP.out \$TMP
9522 CF_EOF
9523 fi
9524
9525 cat >>$cf_edit_man <<CF_EOF
9526         if test \$form = format ; then
9527                 nroff -man \$TMP >\$TMP.out
9528                 mv \$TMP.out \$TMP
9529         fi
9530 CF_EOF
9531
9532 if test -n "$cf_compress" ; then
9533 cat >>$cf_edit_man <<CF_EOF
9534         if test \$verb = installing ; then
9535         if ( $cf_compress -f \$TMP )
9536         then
9537                 mv \$TMP.$cf_so_strip \$TMP
9538         fi
9539         fi
9540         cf_target="\$cf_target.$cf_so_strip"
9541 CF_EOF
9542 fi
9543
9544 case "$MANPAGE_FORMAT" in #(vi
9545 *BSDI*)
9546 cat >>$cf_edit_man <<CF_EOF
9547         if test \$form = format ; then
9548                 # BSDI installs only .0 suffixes in the cat directories
9549                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9550         fi
9551 CF_EOF
9552   ;;
9553 esac
9554
9555 cat >>$cf_edit_man <<CF_EOF
9556         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9557         if test \$verb = installing ; then
9558                 echo \$verb \$cf_target
9559                 \$INSTALL_DATA \$TMP \$cf_target
9560                 test -d \$cf_subdir\${section} &&
9561                 test -n "\$aliases" && (
9562                         cd \$cf_subdir\${section} && (
9563                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9564                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9565                                 cf_target=\`basename \$cf_target\`
9566                                 for cf_alias in \$aliases
9567                                 do
9568                                         if test \$section = 1 ; then
9569                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9570                                         fi
9571
9572                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9573                                                 if test -f \$cf_alias\${suffix} ; then
9574                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9575                                                         then
9576                                                                 continue
9577                                                         fi
9578                                                 fi
9579                                                 echo .. \$verb alias \$cf_alias\${suffix}
9580                                                 rm -f \$cf_alias\${suffix}
9581                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9582                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9583                                                 echo ".so \$cf_source" >\$TMP
9584 CF_EOF
9585 if test -n "$cf_compress" ; then
9586 cat >>$cf_edit_man <<CF_EOF
9587                                                 if test -n "$cf_so_strip" ; then
9588                                                         $cf_compress -f \$TMP
9589                                                         mv \$TMP.$cf_so_strip \$TMP
9590                                                 fi
9591 CF_EOF
9592 fi
9593 cat >>$cf_edit_man <<CF_EOF
9594                                                 echo .. \$verb alias \$cf_alias\${suffix}
9595                                                 rm -f \$cf_alias\${suffix}
9596                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9597                                         fi
9598                                 done
9599                         )
9600                 )
9601         elif test \$verb = removing ; then
9602                 test -f \$cf_target && (
9603                         echo \$verb \$cf_target
9604                         rm -f \$cf_target
9605                 )
9606                 test -d \$cf_subdir\${section} &&
9607                 test -n "\$aliases" && (
9608                         cd \$cf_subdir\${section} && (
9609                                 for cf_alias in \$aliases
9610                                 do
9611                                         if test \$section = 1 ; then
9612                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9613                                         fi
9614
9615                                         echo .. \$verb alias \$cf_alias\${suffix}
9616                                         rm -f \$cf_alias\${suffix}
9617                                 done
9618                         )
9619                 )
9620         else
9621 #               echo ".hy 0"
9622                 cat \$TMP
9623         fi
9624         ;;
9625 esac
9626 done
9627
9628 if test $cf_inboth = yes ; then
9629 if test \$form != format ; then
9630         sh \$0 format \$verb \$mandir \$srcdir \$*
9631 fi
9632 fi
9633
9634 exit 0
9635 CF_EOF
9636 chmod 755 $cf_edit_man
9637
9638 ###############################################################################
9639
9640 ### Note that some functions (such as const) are normally disabled anyway.
9641 echo "$as_me:9641: checking if you want to build with function extensions" >&5
9642 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9643
9644 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9645 if test "${enable_ext_funcs+set}" = set; then
9646   enableval="$enable_ext_funcs"
9647   with_ext_funcs=$enableval
9648 else
9649   with_ext_funcs=yes
9650 fi;
9651 echo "$as_me:9651: result: $with_ext_funcs" >&5
9652 echo "${ECHO_T}$with_ext_funcs" >&6
9653 if test "$with_ext_funcs" = yes ; then
9654         NCURSES_EXT_FUNCS=1
9655         cat >>confdefs.h <<\EOF
9656 #define HAVE_CURSES_VERSION 1
9657 EOF
9658
9659         cat >>confdefs.h <<\EOF
9660 #define HAVE_HAS_KEY 1
9661 EOF
9662
9663         cat >>confdefs.h <<\EOF
9664 #define HAVE_RESIZETERM 1
9665 EOF
9666
9667         cat >>confdefs.h <<\EOF
9668 #define HAVE_RESIZE_TERM 1
9669 EOF
9670
9671         cat >>confdefs.h <<\EOF
9672 #define HAVE_USE_DEFAULT_COLORS 1
9673 EOF
9674
9675         cat >>confdefs.h <<\EOF
9676 #define HAVE_WRESIZE 1
9677 EOF
9678
9679         cat >>confdefs.h <<\EOF
9680 #define NCURSES_EXT_FUNCS 1
9681 EOF
9682
9683         GENERATED_EXT_FUNCS=generated
9684 else
9685         NCURSES_EXT_FUNCS=0
9686         GENERATED_EXT_FUNCS=
9687 fi
9688
9689 echo "$as_me:9689: checking if you want to build with experimental SCREEN extensions" >&5
9690 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9691
9692 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9693 if test "${enable_sp_funcs+set}" = set; then
9694   enableval="$enable_sp_funcs"
9695   with_sp_funcs=$enableval
9696 else
9697   with_sp_funcs=no
9698 fi;
9699 echo "$as_me:9699: result: $with_sp_funcs" >&5
9700 echo "${ECHO_T}$with_sp_funcs" >&6
9701 if test "$with_sp_funcs" = yes ; then
9702         NCURSES_SP_FUNCS=1
9703         cat >>confdefs.h <<\EOF
9704 #define NCURSES_SP_FUNCS 1
9705 EOF
9706
9707         GENERATED_SP_FUNCS=generated
9708 else
9709         NCURSES_SP_FUNCS=0
9710         GENERATED_SP_FUNCS=
9711 fi
9712
9713 echo "$as_me:9713: checking if you want to build with experimental terminal-driver" >&5
9714 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9715
9716 # Check whether --enable-term-driver or --disable-term-driver was given.
9717 if test "${enable_term_driver+set}" = set; then
9718   enableval="$enable_term_driver"
9719   with_term_driver=$enableval
9720 else
9721   with_term_driver=no
9722 fi;
9723 echo "$as_me:9723: result: $with_term_driver" >&5
9724 echo "${ECHO_T}$with_term_driver" >&6
9725 if test "$with_term_driver" = yes ; then
9726         cat >>confdefs.h <<\EOF
9727 #define USE_TERM_DRIVER 1
9728 EOF
9729
9730         if test "$with_sp_funcs" != yes ; then
9731                 { { echo "$as_me:9731: error: The term-driver option relies upon sp-funcs" >&5
9732 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9733    { (exit 1); exit 1; }; }
9734         fi
9735 fi
9736
9737 ###   use option --enable-const to turn on use of const beyond that in XSI.
9738 echo "$as_me:9738: checking for extended use of const keyword" >&5
9739 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9740
9741 # Check whether --enable-const or --disable-const was given.
9742 if test "${enable_const+set}" = set; then
9743   enableval="$enable_const"
9744   with_ext_const=$enableval
9745 else
9746   with_ext_const=no
9747 fi;
9748 echo "$as_me:9748: result: $with_ext_const" >&5
9749 echo "${ECHO_T}$with_ext_const" >&6
9750 NCURSES_CONST='/*nothing*/'
9751 if test "$with_ext_const" = yes ; then
9752         NCURSES_CONST=const
9753 fi
9754
9755 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9756 echo "$as_me:9756: checking if you want to use extended colors" >&5
9757 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9758
9759 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9760 if test "${enable_ext_colors+set}" = set; then
9761   enableval="$enable_ext_colors"
9762   with_ext_colors=$enableval
9763 else
9764   with_ext_colors=no
9765 fi;
9766 echo "$as_me:9766: result: $with_ext_colors" >&5
9767 echo "${ECHO_T}$with_ext_colors" >&6
9768 NCURSES_EXT_COLORS=0
9769 if test "$with_ext_colors" = yes ; then
9770         if test "$with_widec" != yes ; then
9771                 { { echo "$as_me:9771: error: This option applies only to wide-character library" >&5
9772 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9773    { (exit 1); exit 1; }; }
9774         else
9775                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9776
9777 if test "${with_abi_version+set}" != set; then
9778         case $cf_cv_rel_version in
9779         5.*)
9780                 cf_cv_rel_version=6.0
9781                 cf_cv_abi_version=6
9782                 { echo "$as_me:9782: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9783 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9784                 ;;
9785         esac
9786 fi
9787
9788         fi
9789         NCURSES_EXT_COLORS=1
9790         cat >>confdefs.h <<\EOF
9791 #define NCURSES_EXT_COLORS 1
9792 EOF
9793
9794 fi
9795
9796 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9797 echo "$as_me:9797: checking if you want to use extended mouse encoding" >&5
9798 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9799
9800 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9801 if test "${enable_ext_mouse+set}" = set; then
9802   enableval="$enable_ext_mouse"
9803   with_ext_mouse=$enableval
9804 else
9805   with_ext_mouse=no
9806 fi;
9807 echo "$as_me:9807: result: $with_ext_mouse" >&5
9808 echo "${ECHO_T}$with_ext_mouse" >&6
9809 NCURSES_MOUSE_VERSION=1
9810 if test "$with_ext_mouse" = yes ; then
9811         NCURSES_MOUSE_VERSION=2
9812
9813 if test "${with_abi_version+set}" != set; then
9814         case $cf_cv_rel_version in
9815         5.*)
9816                 cf_cv_rel_version=6.0
9817                 cf_cv_abi_version=6
9818                 { echo "$as_me:9818: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9819 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9820                 ;;
9821         esac
9822 fi
9823
9824 fi
9825
9826 echo "$as_me:9826: checking if you want \$NCURSES_NO_PADDING code" >&5
9827 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9828
9829 # Check whether --enable-no-padding or --disable-no-padding was given.
9830 if test "${enable_no_padding+set}" = set; then
9831   enableval="$enable_no_padding"
9832   with_no_padding=$enableval
9833 else
9834   with_no_padding=$with_ext_funcs
9835 fi;
9836 echo "$as_me:9836: result: $with_no_padding" >&5
9837 echo "${ECHO_T}$with_no_padding" >&6
9838 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9839 #define NCURSES_NO_PADDING 1
9840 EOF
9841
9842 echo "$as_me:9842: checking for ANSI C header files" >&5
9843 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9844 if test "${ac_cv_header_stdc+set}" = set; then
9845   echo $ECHO_N "(cached) $ECHO_C" >&6
9846 else
9847   cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <stdlib.h>
9851 #include <stdarg.h>
9852 #include <string.h>
9853 #include <float.h>
9854
9855 _ACEOF
9856 if { (eval echo "$as_me:9856: \"$ac_cpp conftest.$ac_ext\"") >&5
9857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9858   ac_status=$?
9859   egrep -v '^ *\+' conftest.er1 >conftest.err
9860   rm -f conftest.er1
9861   cat conftest.err >&5
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); } >/dev/null; then
9864   if test -s conftest.err; then
9865     ac_cpp_err=$ac_c_preproc_warn_flag
9866   else
9867     ac_cpp_err=
9868   fi
9869 else
9870   ac_cpp_err=yes
9871 fi
9872 if test -z "$ac_cpp_err"; then
9873   ac_cv_header_stdc=yes
9874 else
9875   echo "$as_me: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   ac_cv_header_stdc=no
9878 fi
9879 rm -f conftest.err conftest.$ac_ext
9880
9881 if test $ac_cv_header_stdc = yes; then
9882   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9883   cat >conftest.$ac_ext <<_ACEOF
9884 #line 9884 "configure"
9885 #include "confdefs.h"
9886 #include <string.h>
9887
9888 _ACEOF
9889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9890   egrep "memchr" >/dev/null 2>&1; then
9891   :
9892 else
9893   ac_cv_header_stdc=no
9894 fi
9895 rm -f conftest*
9896
9897 fi
9898
9899 if test $ac_cv_header_stdc = yes; then
9900   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9901   cat >conftest.$ac_ext <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904 #include <stdlib.h>
9905
9906 _ACEOF
9907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9908   egrep "free" >/dev/null 2>&1; then
9909   :
9910 else
9911   ac_cv_header_stdc=no
9912 fi
9913 rm -f conftest*
9914
9915 fi
9916
9917 if test $ac_cv_header_stdc = yes; then
9918   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9919   if test "$cross_compiling" = yes; then
9920   :
9921 else
9922   cat >conftest.$ac_ext <<_ACEOF
9923 #line 9923 "configure"
9924 #include "confdefs.h"
9925 #include <ctype.h>
9926 #if ((' ' & 0x0FF) == 0x020)
9927 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9928 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9929 #else
9930 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9931                      || ('j' <= (c) && (c) <= 'r') \
9932                      || ('s' <= (c) && (c) <= 'z'))
9933 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9934 #endif
9935
9936 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9937 int
9938 main ()
9939 {
9940   int i;
9941   for (i = 0; i < 256; i++)
9942     if (XOR (islower (i), ISLOWER (i))
9943         || toupper (i) != TOUPPER (i))
9944       $ac_main_return(2);
9945   $ac_main_return (0);
9946 }
9947 _ACEOF
9948 rm -f conftest$ac_exeext
9949 if { (eval echo "$as_me:9949: \"$ac_link\"") >&5
9950   (eval $ac_link) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9954   { (eval echo "$as_me:9954: \"$ac_try\"") >&5
9955   (eval $ac_try) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit $ac_status); }; }; then
9959   :
9960 else
9961   echo "$as_me: program exited with status $ac_status" >&5
9962 echo "$as_me: failed program was:" >&5
9963 cat conftest.$ac_ext >&5
9964 ac_cv_header_stdc=no
9965 fi
9966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9967 fi
9968 fi
9969 fi
9970 echo "$as_me:9970: result: $ac_cv_header_stdc" >&5
9971 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9972 if test $ac_cv_header_stdc = yes; then
9973
9974 cat >>confdefs.h <<\EOF
9975 #define STDC_HEADERS 1
9976 EOF
9977
9978 fi
9979
9980 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9981
9982 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9983                   inttypes.h stdint.h unistd.h
9984 do
9985 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9986 echo "$as_me:9986: checking for $ac_header" >&5
9987 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991   cat >conftest.$ac_ext <<_ACEOF
9992 #line 9992 "configure"
9993 #include "confdefs.h"
9994 $ac_includes_default
9995 #include <$ac_header>
9996 _ACEOF
9997 rm -f conftest.$ac_objext
9998 if { (eval echo "$as_me:9998: \"$ac_compile\"") >&5
9999   (eval $ac_compile) 2>&5
10000   ac_status=$?
10001   echo "$as_me:10001: \$? = $ac_status" >&5
10002   (exit $ac_status); } &&
10003          { ac_try='test -s conftest.$ac_objext'
10004   { (eval echo "$as_me:10004: \"$ac_try\"") >&5
10005   (eval $ac_try) 2>&5
10006   ac_status=$?
10007   echo "$as_me:10007: \$? = $ac_status" >&5
10008   (exit $ac_status); }; }; then
10009   eval "$as_ac_Header=yes"
10010 else
10011   echo "$as_me: failed program was:" >&5
10012 cat conftest.$ac_ext >&5
10013 eval "$as_ac_Header=no"
10014 fi
10015 rm -f conftest.$ac_objext conftest.$ac_ext
10016 fi
10017 echo "$as_me:10017: result: `eval echo '${'$as_ac_Header'}'`" >&5
10018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10020   cat >>confdefs.h <<EOF
10021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10022 EOF
10023
10024 fi
10025 done
10026
10027 echo "$as_me:10027: checking for signed char" >&5
10028 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10029 if test "${ac_cv_type_signed_char+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 else
10032   cat >conftest.$ac_ext <<_ACEOF
10033 #line 10033 "configure"
10034 #include "confdefs.h"
10035 $ac_includes_default
10036 int
10037 main ()
10038 {
10039 if ((signed char *) 0)
10040   return 0;
10041 if (sizeof (signed char))
10042   return 0;
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f conftest.$ac_objext
10048 if { (eval echo "$as_me:10048: \"$ac_compile\"") >&5
10049   (eval $ac_compile) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); } &&
10053          { ac_try='test -s conftest.$ac_objext'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); }; }; then
10059   ac_cv_type_signed_char=yes
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat conftest.$ac_ext >&5
10063 ac_cv_type_signed_char=no
10064 fi
10065 rm -f conftest.$ac_objext conftest.$ac_ext
10066 fi
10067 echo "$as_me:10067: result: $ac_cv_type_signed_char" >&5
10068 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10069
10070 echo "$as_me:10070: checking size of signed char" >&5
10071 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10072 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10073   echo $ECHO_N "(cached) $ECHO_C" >&6
10074 else
10075   if test "$ac_cv_type_signed_char" = yes; then
10076   if test "$cross_compiling" = yes; then
10077   # Depending upon the size, compute the lo and hi bounds.
10078 cat >conftest.$ac_ext <<_ACEOF
10079 #line 10079 "configure"
10080 #include "confdefs.h"
10081 $ac_includes_default
10082 int
10083 main ()
10084 {
10085 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10086   ;
10087   return 0;
10088 }
10089 _ACEOF
10090 rm -f conftest.$ac_objext
10091 if { (eval echo "$as_me:10091: \"$ac_compile\"") >&5
10092   (eval $ac_compile) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); } &&
10096          { ac_try='test -s conftest.$ac_objext'
10097   { (eval echo "$as_me:10097: \"$ac_try\"") >&5
10098   (eval $ac_try) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit $ac_status); }; }; then
10102   ac_lo=0 ac_mid=0
10103   while :; do
10104     cat >conftest.$ac_ext <<_ACEOF
10105 #line 10105 "configure"
10106 #include "confdefs.h"
10107 $ac_includes_default
10108 int
10109 main ()
10110 {
10111 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 rm -f conftest.$ac_objext
10117 if { (eval echo "$as_me:10117: \"$ac_compile\"") >&5
10118   (eval $ac_compile) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit $ac_status); } &&
10122          { ac_try='test -s conftest.$ac_objext'
10123   { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124   (eval $ac_try) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit $ac_status); }; }; then
10128   ac_hi=$ac_mid; break
10129 else
10130   echo "$as_me: failed program was:" >&5
10131 cat conftest.$ac_ext >&5
10132 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10133 fi
10134 rm -f conftest.$ac_objext conftest.$ac_ext
10135   done
10136 else
10137   echo "$as_me: failed program was:" >&5
10138 cat conftest.$ac_ext >&5
10139 ac_hi=-1 ac_mid=-1
10140   while :; do
10141     cat >conftest.$ac_ext <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144 $ac_includes_default
10145 int
10146 main ()
10147 {
10148 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 rm -f conftest.$ac_objext
10154 if { (eval echo "$as_me:10154: \"$ac_compile\"") >&5
10155   (eval $ac_compile) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit $ac_status); } &&
10159          { ac_try='test -s conftest.$ac_objext'
10160   { (eval echo "$as_me:10160: \"$ac_try\"") >&5
10161   (eval $ac_try) 2>&5
10162   ac_status=$?
10163   echo "$as_me:10163: \$? = $ac_status" >&5
10164   (exit $ac_status); }; }; then
10165   ac_lo=$ac_mid; break
10166 else
10167   echo "$as_me: failed program was:" >&5
10168 cat conftest.$ac_ext >&5
10169 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10170 fi
10171 rm -f conftest.$ac_objext conftest.$ac_ext
10172   done
10173 fi
10174 rm -f conftest.$ac_objext conftest.$ac_ext
10175 # Binary search between lo and hi bounds.
10176 while test "x$ac_lo" != "x$ac_hi"; do
10177   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10178   cat >conftest.$ac_ext <<_ACEOF
10179 #line 10179 "configure"
10180 #include "confdefs.h"
10181 $ac_includes_default
10182 int
10183 main ()
10184 {
10185 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10186   ;
10187   return 0;
10188 }
10189 _ACEOF
10190 rm -f conftest.$ac_objext
10191 if { (eval echo "$as_me:10191: \"$ac_compile\"") >&5
10192   (eval $ac_compile) 2>&5
10193   ac_status=$?
10194   echo "$as_me:10194: \$? = $ac_status" >&5
10195   (exit $ac_status); } &&
10196          { ac_try='test -s conftest.$ac_objext'
10197   { (eval echo "$as_me:10197: \"$ac_try\"") >&5
10198   (eval $ac_try) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit $ac_status); }; }; then
10202   ac_hi=$ac_mid
10203 else
10204   echo "$as_me: failed program was:" >&5
10205 cat conftest.$ac_ext >&5
10206 ac_lo=`expr $ac_mid + 1`
10207 fi
10208 rm -f conftest.$ac_objext conftest.$ac_ext
10209 done
10210 ac_cv_sizeof_signed_char=$ac_lo
10211 else
10212   if test "$cross_compiling" = yes; then
10213   { { echo "$as_me:10213: error: cannot run test program while cross compiling" >&5
10214 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10215    { (exit 1); exit 1; }; }
10216 else
10217   cat >conftest.$ac_ext <<_ACEOF
10218 #line 10218 "configure"
10219 #include "confdefs.h"
10220 $ac_includes_default
10221 int
10222 main ()
10223 {
10224 FILE *f = fopen ("conftest.val", "w");
10225 if (!f)
10226   $ac_main_return (1);
10227 fprintf (f, "%d", (sizeof (signed char)));
10228 fclose (f);
10229   ;
10230   return 0;
10231 }
10232 _ACEOF
10233 rm -f conftest$ac_exeext
10234 if { (eval echo "$as_me:10234: \"$ac_link\"") >&5
10235   (eval $ac_link) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10239   { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240   (eval $ac_try) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); }; }; then
10244   ac_cv_sizeof_signed_char=`cat conftest.val`
10245 else
10246   echo "$as_me: program exited with status $ac_status" >&5
10247 echo "$as_me: failed program was:" >&5
10248 cat conftest.$ac_ext >&5
10249 fi
10250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10251 fi
10252 fi
10253 rm -f conftest.val
10254 else
10255   ac_cv_sizeof_signed_char=0
10256 fi
10257 fi
10258 echo "$as_me:10258: result: $ac_cv_sizeof_signed_char" >&5
10259 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10260 cat >>confdefs.h <<EOF
10261 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10262 EOF
10263
10264 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10265         NCURSES_SBOOL="signed char"
10266 else
10267         NCURSES_SBOOL="char"
10268 fi
10269 echo "$as_me:10269: checking if you want to use signed Boolean array in term.h" >&5
10270 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10271
10272 # Check whether --enable-signed-char or --disable-signed-char was given.
10273 if test "${enable_signed_char+set}" = set; then
10274   enableval="$enable_signed_char"
10275   with_signed_char=$enableval
10276 else
10277   with_signed_char=no
10278 fi;
10279 echo "$as_me:10279: result: $with_signed_char" >&5
10280 echo "${ECHO_T}$with_signed_char" >&6
10281 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10282
10283 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10284 echo "$as_me:10284: checking if you want SIGWINCH handler" >&5
10285 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10286
10287 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10288 if test "${enable_sigwinch+set}" = set; then
10289   enableval="$enable_sigwinch"
10290   with_sigwinch=$enableval
10291 else
10292   with_sigwinch=$with_ext_funcs
10293 fi;
10294 echo "$as_me:10294: result: $with_sigwinch" >&5
10295 echo "${ECHO_T}$with_sigwinch" >&6
10296 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10297 #define USE_SIGWINCH 1
10298 EOF
10299
10300 ###   use option --enable-tcap-names to allow user to define new capabilities
10301 echo "$as_me:10301: checking if you want user-definable terminal capabilities like termcap" >&5
10302 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10303
10304 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10305 if test "${enable_tcap_names+set}" = set; then
10306   enableval="$enable_tcap_names"
10307   with_tcap_names=$enableval
10308 else
10309   with_tcap_names=$with_ext_funcs
10310 fi;
10311 echo "$as_me:10311: result: $with_tcap_names" >&5
10312 echo "${ECHO_T}$with_tcap_names" >&6
10313 NCURSES_XNAMES=0
10314 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10315
10316 ###############################################################################
10317 # These options are relatively safe to experiment with.
10318
10319 echo "$as_me:10319: checking if you want all development code" >&5
10320 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10321
10322 # Check whether --with-develop or --without-develop was given.
10323 if test "${with_develop+set}" = set; then
10324   withval="$with_develop"
10325   with_develop=$withval
10326 else
10327   with_develop=no
10328 fi;
10329 echo "$as_me:10329: result: $with_develop" >&5
10330 echo "${ECHO_T}$with_develop" >&6
10331
10332 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10333 echo "$as_me:10333: checking if you want hard-tabs code" >&5
10334 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10335
10336 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10337 if test "${enable_hard_tabs+set}" = set; then
10338   enableval="$enable_hard_tabs"
10339
10340 else
10341   enable_hard_tabs=$with_develop
10342 fi;
10343 echo "$as_me:10343: result: $enable_hard_tabs" >&5
10344 echo "${ECHO_T}$enable_hard_tabs" >&6
10345 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10346 #define USE_HARD_TABS 1
10347 EOF
10348
10349 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10350 echo "$as_me:10350: checking if you want limited support for xmc" >&5
10351 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10352
10353 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10354 if test "${enable_xmc_glitch+set}" = set; then
10355   enableval="$enable_xmc_glitch"
10356
10357 else
10358   enable_xmc_glitch=$with_develop
10359 fi;
10360 echo "$as_me:10360: result: $enable_xmc_glitch" >&5
10361 echo "${ECHO_T}$enable_xmc_glitch" >&6
10362 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10363 #define USE_XMC_SUPPORT 1
10364 EOF
10365
10366 ###############################################################################
10367 # These are just experimental, probably should not be in a package:
10368
10369 echo "$as_me:10369: checking if you do not want to assume colors are white-on-black" >&5
10370 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10371
10372 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10373 if test "${enable_assumed_color+set}" = set; then
10374   enableval="$enable_assumed_color"
10375   with_assumed_color=$enableval
10376 else
10377   with_assumed_color=yes
10378 fi;
10379 echo "$as_me:10379: result: $with_assumed_color" >&5
10380 echo "${ECHO_T}$with_assumed_color" >&6
10381 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10382 #define USE_ASSUMED_COLOR 1
10383 EOF
10384
10385 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10386 echo "$as_me:10386: checking if you want hashmap scrolling-optimization code" >&5
10387 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10388
10389 # Check whether --enable-hashmap or --disable-hashmap was given.
10390 if test "${enable_hashmap+set}" = set; then
10391   enableval="$enable_hashmap"
10392   with_hashmap=$enableval
10393 else
10394   with_hashmap=yes
10395 fi;
10396 echo "$as_me:10396: result: $with_hashmap" >&5
10397 echo "${ECHO_T}$with_hashmap" >&6
10398 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10399 #define USE_HASHMAP 1
10400 EOF
10401
10402 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10403 echo "$as_me:10403: checking if you want colorfgbg code" >&5
10404 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10405
10406 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10407 if test "${enable_colorfgbg+set}" = set; then
10408   enableval="$enable_colorfgbg"
10409   with_colorfgbg=$enableval
10410 else
10411   with_colorfgbg=no
10412 fi;
10413 echo "$as_me:10413: result: $with_colorfgbg" >&5
10414 echo "${ECHO_T}$with_colorfgbg" >&6
10415 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10416 #define USE_COLORFGBG 1
10417 EOF
10418
10419 ###   use option --enable-interop to turn on use of bindings used for interop
10420 echo "$as_me:10420: checking if you want interop bindings" >&5
10421 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10422
10423 # Check whether --enable-interop or --disable-interop was given.
10424 if test "${enable_interop+set}" = set; then
10425   enableval="$enable_interop"
10426   with_exp_interop=$enableval
10427 else
10428   with_exp_interop=no
10429 fi;
10430 echo "$as_me:10430: result: $with_exp_interop" >&5
10431 echo "${ECHO_T}$with_exp_interop" >&6
10432
10433 NCURSES_INTEROP_FUNCS=0
10434 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10435
10436 # This is still experimental (20080329), but should ultimately be moved to
10437 # the script-block --with-normal, etc.
10438
10439 echo "$as_me:10439: checking if you want to link with the pthread library" >&5
10440 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10441
10442 # Check whether --with-pthread or --without-pthread was given.
10443 if test "${with_pthread+set}" = set; then
10444   withval="$with_pthread"
10445   with_pthread=$withval
10446 else
10447   with_pthread=no
10448 fi;
10449 echo "$as_me:10449: result: $with_pthread" >&5
10450 echo "${ECHO_T}$with_pthread" >&6
10451
10452 if test "$with_pthread" != no ; then
10453     echo "$as_me:10453: checking for pthread.h" >&5
10454 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10455 if test "${ac_cv_header_pthread_h+set}" = set; then
10456   echo $ECHO_N "(cached) $ECHO_C" >&6
10457 else
10458   cat >conftest.$ac_ext <<_ACEOF
10459 #line 10459 "configure"
10460 #include "confdefs.h"
10461 #include <pthread.h>
10462 _ACEOF
10463 if { (eval echo "$as_me:10463: \"$ac_cpp conftest.$ac_ext\"") >&5
10464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10465   ac_status=$?
10466   egrep -v '^ *\+' conftest.er1 >conftest.err
10467   rm -f conftest.er1
10468   cat conftest.err >&5
10469   echo "$as_me:10469: \$? = $ac_status" >&5
10470   (exit $ac_status); } >/dev/null; then
10471   if test -s conftest.err; then
10472     ac_cpp_err=$ac_c_preproc_warn_flag
10473   else
10474     ac_cpp_err=
10475   fi
10476 else
10477   ac_cpp_err=yes
10478 fi
10479 if test -z "$ac_cpp_err"; then
10480   ac_cv_header_pthread_h=yes
10481 else
10482   echo "$as_me: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   ac_cv_header_pthread_h=no
10485 fi
10486 rm -f conftest.err conftest.$ac_ext
10487 fi
10488 echo "$as_me:10488: result: $ac_cv_header_pthread_h" >&5
10489 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10490 if test $ac_cv_header_pthread_h = yes; then
10491
10492         cat >>confdefs.h <<\EOF
10493 #define HAVE_PTHREADS_H 1
10494 EOF
10495
10496         echo "$as_me:10496: checking if we can link with the pthread library" >&5
10497 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10498         cf_save_LIBS="$LIBS"
10499         LIBS="-lpthread $LIBS"
10500         cat >conftest.$ac_ext <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503
10504 #include <pthread.h>
10505
10506 int
10507 main ()
10508 {
10509
10510         int rc = pthread_create(0,0,0,0);
10511
10512   ;
10513   return 0;
10514 }
10515 _ACEOF
10516 rm -f conftest.$ac_objext conftest$ac_exeext
10517 if { (eval echo "$as_me:10517: \"$ac_link\"") >&5
10518   (eval $ac_link) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); } &&
10522          { ac_try='test -s conftest$ac_exeext'
10523   { (eval echo "$as_me:10523: \"$ac_try\"") >&5
10524   (eval $ac_try) 2>&5
10525   ac_status=$?
10526   echo "$as_me:10526: \$? = $ac_status" >&5
10527   (exit $ac_status); }; }; then
10528   with_pthread=yes
10529 else
10530   echo "$as_me: failed program was:" >&5
10531 cat conftest.$ac_ext >&5
10532 with_pthread=no
10533 fi
10534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10535         LIBS="$cf_save_LIBS"
10536         echo "$as_me:10536: result: $with_pthread" >&5
10537 echo "${ECHO_T}$with_pthread" >&6
10538
10539         if test "$with_pthread" = yes ; then
10540             LIBS="-lpthread $LIBS"
10541             cat >>confdefs.h <<\EOF
10542 #define HAVE_LIBPTHREADS 1
10543 EOF
10544
10545         else
10546             { { echo "$as_me:10546: error: Cannot link with pthread library" >&5
10547 echo "$as_me: error: Cannot link with pthread library" >&2;}
10548    { (exit 1); exit 1; }; }
10549         fi
10550
10551 fi
10552
10553 fi
10554
10555 echo "$as_me:10555: checking if you want to use weak-symbols for pthreads" >&5
10556 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10557
10558 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10559 if test "${enable_weak_symbols+set}" = set; then
10560   enableval="$enable_weak_symbols"
10561   use_weak_symbols=$withval
10562 else
10563   use_weak_symbols=no
10564 fi;
10565 echo "$as_me:10565: result: $use_weak_symbols" >&5
10566 echo "${ECHO_T}$use_weak_symbols" >&6
10567 if test "$use_weak_symbols" = yes ; then
10568
10569 echo "$as_me:10569: checking if $CC supports weak symbols" >&5
10570 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10571 if test "${cf_cv_weak_symbols+set}" = set; then
10572   echo $ECHO_N "(cached) $ECHO_C" >&6
10573 else
10574
10575 cat >conftest.$ac_ext <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10578
10579 #include <stdio.h>
10580 int
10581 main ()
10582 {
10583
10584 #if defined(__GNUC__)
10585 #  if defined __USE_ISOC99
10586 #    define _cat_pragma(exp)    _Pragma(#exp)
10587 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10588 #  else
10589 #    define _weak_pragma(exp)
10590 #  endif
10591 #  define _declare(name)        __extension__ extern __typeof__(name) name
10592 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10593 #endif
10594
10595 weak_symbol(fopen);
10596
10597   ;
10598   return 0;
10599 }
10600 _ACEOF
10601 rm -f conftest.$ac_objext
10602 if { (eval echo "$as_me:10602: \"$ac_compile\"") >&5
10603   (eval $ac_compile) 2>&5
10604   ac_status=$?
10605   echo "$as_me:10605: \$? = $ac_status" >&5
10606   (exit $ac_status); } &&
10607          { ac_try='test -s conftest.$ac_objext'
10608   { (eval echo "$as_me:10608: \"$ac_try\"") >&5
10609   (eval $ac_try) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); }; }; then
10613   cf_cv_weak_symbols=yes
10614 else
10615   echo "$as_me: failed program was:" >&5
10616 cat conftest.$ac_ext >&5
10617 cf_cv_weak_symbols=no
10618 fi
10619 rm -f conftest.$ac_objext conftest.$ac_ext
10620
10621 fi
10622 echo "$as_me:10622: result: $cf_cv_weak_symbols" >&5
10623 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10624
10625 else
10626     cf_cv_weak_symbols=no
10627 fi
10628
10629 if test $cf_cv_weak_symbols = yes ; then
10630     cat >>confdefs.h <<\EOF
10631 #define USE_WEAK_SYMBOLS 1
10632 EOF
10633
10634 fi
10635
10636 PTHREAD=
10637 if test "$with_pthread" = "yes" ; then
10638     cat >>confdefs.h <<\EOF
10639 #define USE_PTHREADS 1
10640 EOF
10641
10642     enable_reentrant=yes
10643     if test $cf_cv_weak_symbols = yes ; then
10644         PTHREAD=-lpthread
10645     fi
10646 fi
10647
10648 # Reentrant code has to be opaque; there's little advantage to making ncurses
10649 # opaque outside of that, so there is no --enable-opaque option.  We can use
10650 # this option without --with-pthreads, but this will be always set for
10651 # pthreads.
10652 echo "$as_me:10652: checking if you want experimental reentrant code" >&5
10653 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10654
10655 # Check whether --enable-reentrant or --disable-reentrant was given.
10656 if test "${enable_reentrant+set}" = set; then
10657   enableval="$enable_reentrant"
10658   with_reentrant=$enableval
10659 else
10660   with_reentrant=no
10661 fi;
10662 echo "$as_me:10662: result: $with_reentrant" >&5
10663 echo "${ECHO_T}$with_reentrant" >&6
10664 if test "$with_reentrant" = yes ; then
10665         cf_cv_enable_reentrant=1
10666         cf_cv_enable_opaque="NCURSES_INTERNALS"
10667         NCURSES_OPAQUE=1
10668         NCURSES_SIZE_T=int
10669         if test $cf_cv_weak_symbols = yes ; then
10670
10671 # remove pthread library from $LIBS
10672 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10673
10674         else
10675                 LIB_SUFFIX="t${LIB_SUFFIX}"
10676         fi
10677         cat >>confdefs.h <<\EOF
10678 #define USE_REENTRANT 1
10679 EOF
10680
10681 if test "${with_abi_version+set}" != set; then
10682         case $cf_cv_rel_version in
10683         5.*)
10684                 cf_cv_rel_version=6.0
10685                 cf_cv_abi_version=6
10686                 { echo "$as_me:10686: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10687 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10688                 ;;
10689         esac
10690 fi
10691
10692 else
10693         cf_cv_enable_reentrant=0
10694         cf_cv_enable_opaque="NCURSES_OPAQUE"
10695         NCURSES_OPAQUE=0
10696         NCURSES_SIZE_T=short
10697 fi
10698
10699 ### Allow using a different wrap-prefix
10700 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10701         echo "$as_me:10701: checking for prefix used to wrap public variables" >&5
10702 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10703
10704 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10705 if test "${with_wrap_prefix+set}" = set; then
10706   withval="$with_wrap_prefix"
10707   NCURSES_WRAP_PREFIX=$withval
10708 else
10709   NCURSES_WRAP_PREFIX=_nc_
10710 fi;
10711         echo "$as_me:10711: result: $NCURSES_WRAP_PREFIX" >&5
10712 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10713 else
10714         NCURSES_WRAP_PREFIX=_nc_
10715 fi
10716
10717 cat >>confdefs.h <<EOF
10718 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10719 EOF
10720
10721 echo "$as_me:10721: checking if you want experimental safe-sprintf code" >&5
10722 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10723
10724 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10725 if test "${enable_safe_sprintf+set}" = set; then
10726   enableval="$enable_safe_sprintf"
10727   with_safe_sprintf=$enableval
10728 else
10729   with_safe_sprintf=no
10730 fi;
10731 echo "$as_me:10731: result: $with_safe_sprintf" >&5
10732 echo "${ECHO_T}$with_safe_sprintf" >&6
10733 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10734 #define USE_SAFE_SPRINTF 1
10735 EOF
10736
10737 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10738 # when hashmap is used scroll hints are useless
10739 if test "$with_hashmap" = no ; then
10740 echo "$as_me:10740: checking if you want to experiment without scrolling-hints code" >&5
10741 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10742
10743 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10744 if test "${enable_scroll_hints+set}" = set; then
10745   enableval="$enable_scroll_hints"
10746   with_scroll_hints=$enableval
10747 else
10748   with_scroll_hints=yes
10749 fi;
10750 echo "$as_me:10750: result: $with_scroll_hints" >&5
10751 echo "${ECHO_T}$with_scroll_hints" >&6
10752 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10753 #define USE_SCROLL_HINTS 1
10754 EOF
10755
10756 fi
10757
10758 echo "$as_me:10758: checking if you want experimental wgetch-events code" >&5
10759 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10760
10761 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10762 if test "${enable_wgetch_events+set}" = set; then
10763   enableval="$enable_wgetch_events"
10764   with_wgetch_events=$enableval
10765 else
10766   with_wgetch_events=no
10767 fi;
10768 echo "$as_me:10768: result: $with_wgetch_events" >&5
10769 echo "${ECHO_T}$with_wgetch_events" >&6
10770 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10771 #define NCURSES_WGETCH_EVENTS 1
10772 EOF
10773
10774 ###############################################################################
10775
10776 ###     use option --disable-echo to suppress full display compiling commands
10777 echo "$as_me:10777: checking if you want to display full commands during build" >&5
10778 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10779
10780 # Check whether --enable-echo or --disable-echo was given.
10781 if test "${enable_echo+set}" = set; then
10782   enableval="$enable_echo"
10783   with_echo=$enableval
10784 else
10785   with_echo=yes
10786 fi;
10787 if test "$with_echo" = yes; then
10788         ECHO_LINK=
10789 else
10790         ECHO_LINK='@ echo linking $@ ... ;'
10791         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10792         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10793 fi
10794 echo "$as_me:10794: result: $with_echo" >&5
10795 echo "${ECHO_T}$with_echo" >&6
10796
10797 ###     use option --enable-warnings to turn on all gcc warnings
10798 echo "$as_me:10798: checking if you want to see compiler warnings" >&5
10799 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10800
10801 # Check whether --enable-warnings or --disable-warnings was given.
10802 if test "${enable_warnings+set}" = set; then
10803   enableval="$enable_warnings"
10804   with_warnings=$enableval
10805 fi;
10806 echo "$as_me:10806: result: $with_warnings" >&5
10807 echo "${ECHO_T}$with_warnings" >&6
10808
10809 if test "x$with_warnings" = "xyes"; then
10810         ADAFLAGS="$ADAFLAGS -gnatg"
10811
10812 INTEL_COMPILER=no
10813
10814 if test "$GCC" = yes ; then
10815         case $host_os in
10816         linux*|gnu*)
10817                 echo "$as_me:10817: checking if this is really Intel C compiler" >&5
10818 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10819                 cf_save_CFLAGS="$CFLAGS"
10820                 CFLAGS="$CFLAGS -no-gcc"
10821                 cat >conftest.$ac_ext <<_ACEOF
10822 #line 10822 "configure"
10823 #include "confdefs.h"
10824
10825 int
10826 main ()
10827 {
10828
10829 #ifdef __INTEL_COMPILER
10830 #else
10831 make an error
10832 #endif
10833
10834   ;
10835   return 0;
10836 }
10837 _ACEOF
10838 rm -f conftest.$ac_objext
10839 if { (eval echo "$as_me:10839: \"$ac_compile\"") >&5
10840   (eval $ac_compile) 2>&5
10841   ac_status=$?
10842   echo "$as_me:10842: \$? = $ac_status" >&5
10843   (exit $ac_status); } &&
10844          { ac_try='test -s conftest.$ac_objext'
10845   { (eval echo "$as_me:10845: \"$ac_try\"") >&5
10846   (eval $ac_try) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); }; }; then
10850   INTEL_COMPILER=yes
10851 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10852
10853 else
10854   echo "$as_me: failed program was:" >&5
10855 cat conftest.$ac_ext >&5
10856 fi
10857 rm -f conftest.$ac_objext conftest.$ac_ext
10858                 CFLAGS="$cf_save_CFLAGS"
10859                 echo "$as_me:10859: result: $INTEL_COMPILER" >&5
10860 echo "${ECHO_T}$INTEL_COMPILER" >&6
10861                 ;;
10862         esac
10863 fi
10864
10865 cat > conftest.$ac_ext <<EOF
10866 #line 10866 "${as_me-configure}"
10867 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10868 EOF
10869
10870 if test "$INTEL_COMPILER" = yes
10871 then
10872 # The "-wdXXX" options suppress warnings:
10873 # remark #1419: external declaration in primary source file
10874 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10875 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10876 # remark #193: zero used for undefined preprocessing identifier
10877 # remark #593: variable "curs_sb_left_arrow" was set but never used
10878 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10879 # remark #869: parameter "tw" was never referenced
10880 # remark #981: operands are evaluated in unspecified order
10881 # warning #279: controlling expression is constant
10882
10883         { echo "$as_me:10883: checking for $CC warning options..." >&5
10884 echo "$as_me: checking for $CC warning options..." >&6;}
10885         cf_save_CFLAGS="$CFLAGS"
10886         EXTRA_CFLAGS="-Wall"
10887         for cf_opt in \
10888                 wd1419 \
10889                 wd1683 \
10890                 wd1684 \
10891                 wd193 \
10892                 wd593 \
10893                 wd279 \
10894                 wd810 \
10895                 wd869 \
10896                 wd981
10897         do
10898                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10899                 if { (eval echo "$as_me:10899: \"$ac_compile\"") >&5
10900   (eval $ac_compile) 2>&5
10901   ac_status=$?
10902   echo "$as_me:10902: \$? = $ac_status" >&5
10903   (exit $ac_status); }; then
10904                         test -n "$verbose" && echo "$as_me:10904: result: ... -$cf_opt" >&5
10905 echo "${ECHO_T}... -$cf_opt" >&6
10906                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10907                 fi
10908         done
10909         CFLAGS="$cf_save_CFLAGS"
10910
10911 elif test "$GCC" = yes
10912 then
10913         { echo "$as_me:10913: checking for $CC warning options..." >&5
10914 echo "$as_me: checking for $CC warning options..." >&6;}
10915         cf_save_CFLAGS="$CFLAGS"
10916         EXTRA_CFLAGS=
10917         cf_warn_CONST=""
10918         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10919         for cf_opt in W Wall \
10920                 Wbad-function-cast \
10921                 Wcast-align \
10922                 Wcast-qual \
10923                 Winline \
10924                 Wmissing-declarations \
10925                 Wmissing-prototypes \
10926                 Wnested-externs \
10927                 Wpointer-arith \
10928                 Wshadow \
10929                 Wstrict-prototypes \
10930                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10931         do
10932                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10933                 if { (eval echo "$as_me:10933: \"$ac_compile\"") >&5
10934   (eval $ac_compile) 2>&5
10935   ac_status=$?
10936   echo "$as_me:10936: \$? = $ac_status" >&5
10937   (exit $ac_status); }; then
10938                         test -n "$verbose" && echo "$as_me:10938: result: ... -$cf_opt" >&5
10939 echo "${ECHO_T}... -$cf_opt" >&6
10940                         case $cf_opt in #(vi
10941                         Wcast-qual) #(vi
10942                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10943                                 ;;
10944                         Winline) #(vi
10945                                 case $GCC_VERSION in
10946                                 [34].*)
10947                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10948
10949 echo "${as_me-configure}:10949: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10950
10951                                         continue;;
10952                                 esac
10953                                 ;;
10954                         esac
10955                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10956                 fi
10957         done
10958         CFLAGS="$cf_save_CFLAGS"
10959 fi
10960 rm -f conftest*
10961
10962         if test "$cf_with_cxx" = yes ; then
10963
10964 INTEL_CPLUSPLUS=no
10965
10966 if test "$GCC" = yes ; then
10967         case $host_os in
10968         linux*|gnu*)
10969                 echo "$as_me:10969: checking if this is really Intel C++ compiler" >&5
10970 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10971                 cf_save_CFLAGS="$CXXFLAGS"
10972                 CXXFLAGS="$CXXFLAGS -no-gcc"
10973                 cat >conftest.$ac_ext <<_ACEOF
10974 #line 10974 "configure"
10975 #include "confdefs.h"
10976
10977 int
10978 main ()
10979 {
10980
10981 #ifdef __INTEL_COMPILER
10982 #else
10983 make an error
10984 #endif
10985
10986   ;
10987   return 0;
10988 }
10989 _ACEOF
10990 rm -f conftest.$ac_objext
10991 if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
10992   (eval $ac_compile) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit $ac_status); } &&
10996          { ac_try='test -s conftest.$ac_objext'
10997   { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:11000: \$? = $ac_status" >&5
11001   (exit $ac_status); }; }; then
11002   INTEL_CPLUSPLUS=yes
11003 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11004
11005 else
11006   echo "$as_me: failed program was:" >&5
11007 cat conftest.$ac_ext >&5
11008 fi
11009 rm -f conftest.$ac_objext conftest.$ac_ext
11010                 CXXFLAGS="$cf_save_CFLAGS"
11011                 echo "$as_me:11011: result: $INTEL_CPLUSPLUS" >&5
11012 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11013                 ;;
11014         esac
11015 fi
11016
11017 ac_ext=cc
11018 ac_cpp='$CXXCPP $CPPFLAGS'
11019 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11020 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11021 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11022 ac_main_return=return
11023
11024 cat > conftest.$ac_ext <<EOF
11025 #line 11025 "configure"
11026 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11027 EOF
11028
11029 if test "$INTEL_CPLUSPLUS" = yes
11030 then
11031 # The "-wdXXX" options suppress warnings:
11032 # remark #1419: external declaration in primary source file
11033 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11034 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11035 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11036 # remark #193: zero used for undefined preprocessing identifier
11037 # remark #593: variable "curs_sb_left_arrow" was set but never used
11038 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11039 # remark #869: parameter "tw" was never referenced
11040 # remark #981: operands are evaluated in unspecified order
11041 # warning #269: invalid format string conversion
11042
11043         { echo "$as_me:11043: checking for $CC warning options..." >&5
11044 echo "$as_me: checking for $CC warning options..." >&6;}
11045         cf_save_CXXFLAGS="$CXXFLAGS"
11046         EXTRA_CXXFLAGS="-Wall"
11047         for cf_opt in \
11048                 wd1419 \
11049                 wd1682 \
11050                 wd1683 \
11051                 wd1684 \
11052                 wd193 \
11053                 wd279 \
11054                 wd593 \
11055                 wd810 \
11056                 wd869 \
11057                 wd981
11058         do
11059                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11060                 if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061   (eval $ac_compile) 2>&5
11062   ac_status=$?
11063   echo "$as_me:11063: \$? = $ac_status" >&5
11064   (exit $ac_status); }; then
11065                         test -n "$verbose" && echo "$as_me:11065: result: ... -$cf_opt" >&5
11066 echo "${ECHO_T}... -$cf_opt" >&6
11067                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11068                 fi
11069         done
11070         CXXFLAGS="$cf_save_CXXFLAGS"
11071
11072 elif test "$GXX" = yes
11073 then
11074         { echo "$as_me:11074: checking for $CXX warning options..." >&5
11075 echo "$as_me: checking for $CXX warning options..." >&6;}
11076         cf_save_CXXFLAGS="$CXXFLAGS"
11077         EXTRA_CXXFLAGS="-W -Wall"
11078         cf_gxx_extra_warnings=""
11079         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11080         case "$GCC_VERSION" in
11081         [1-2].*)
11082                 ;;
11083         *)
11084                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11085                 ;;
11086         esac
11087         for cf_opt in \
11088                 Wabi \
11089                 fabi-version=0 \
11090                 Woverloaded-virtual \
11091                 Wsign-promo \
11092                 Wsynth \
11093                 Wold-style-cast \
11094                 Wcast-align \
11095                 Wcast-qual \
11096                 Wmissing-prototypes \
11097                 Wpointer-arith \
11098                 Wshadow \
11099                 Wstrict-prototypes \
11100                 Wundef $cf_gxx_extra_warnings Wno-unused
11101         do
11102                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11103                 if { (eval echo "$as_me:11103: \"$ac_compile\"") >&5
11104   (eval $ac_compile) 2>&5
11105   ac_status=$?
11106   echo "$as_me:11106: \$? = $ac_status" >&5
11107   (exit $ac_status); }; then
11108                         test -n "$verbose" && echo "$as_me:11108: result: ... -$cf_opt" >&5
11109 echo "${ECHO_T}... -$cf_opt" >&6
11110                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11111                 else
11112                         test -n "$verbose" && echo "$as_me:11112: result: ... no -$cf_opt" >&5
11113 echo "${ECHO_T}... no -$cf_opt" >&6
11114                 fi
11115         done
11116         CXXFLAGS="$cf_save_CXXFLAGS"
11117 fi
11118
11119 rm -f conftest*
11120 ac_ext=c
11121 ac_cpp='$CPP $CPPFLAGS'
11122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11125 ac_main_return=return
11126
11127         fi
11128 fi
11129
11130 if test "$GCC" = yes
11131 then
11132 cat > conftest.i <<EOF
11133 #ifndef GCC_PRINTF
11134 #define GCC_PRINTF 0
11135 #endif
11136 #ifndef GCC_SCANF
11137 #define GCC_SCANF 0
11138 #endif
11139 #ifndef GCC_NORETURN
11140 #define GCC_NORETURN /* nothing */
11141 #endif
11142 #ifndef GCC_UNUSED
11143 #define GCC_UNUSED /* nothing */
11144 #endif
11145 EOF
11146 if test "$GCC" = yes
11147 then
11148         { echo "$as_me:11148: checking for $CC __attribute__ directives..." >&5
11149 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11150 cat > conftest.$ac_ext <<EOF
11151 #line 11151 "${as_me-configure}"
11152 #include "confdefs.h"
11153 #include "conftest.h"
11154 #include "conftest.i"
11155 #if     GCC_PRINTF
11156 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11157 #else
11158 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11159 #endif
11160 #if     GCC_SCANF
11161 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11162 #else
11163 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11164 #endif
11165 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11166 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11167 extern void foo(void) GCC_NORETURN;
11168 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11169 EOF
11170         cf_printf_attribute=no
11171         cf_scanf_attribute=no
11172         for cf_attribute in scanf printf unused noreturn
11173         do
11174
11175 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11176
11177                 cf_directive="__attribute__(($cf_attribute))"
11178                 echo "checking for $CC $cf_directive" 1>&5
11179
11180                 case $cf_attribute in #(vi
11181                 printf) #(vi
11182                         cf_printf_attribute=yes
11183                         cat >conftest.h <<EOF
11184 #define GCC_$cf_ATTRIBUTE 1
11185 EOF
11186                         ;;
11187                 scanf) #(vi
11188                         cf_scanf_attribute=yes
11189                         cat >conftest.h <<EOF
11190 #define GCC_$cf_ATTRIBUTE 1
11191 EOF
11192                         ;;
11193                 *) #(vi
11194                         cat >conftest.h <<EOF
11195 #define GCC_$cf_ATTRIBUTE $cf_directive
11196 EOF
11197                         ;;
11198                 esac
11199
11200                 if { (eval echo "$as_me:11200: \"$ac_compile\"") >&5
11201   (eval $ac_compile) 2>&5
11202   ac_status=$?
11203   echo "$as_me:11203: \$? = $ac_status" >&5
11204   (exit $ac_status); }; then
11205                         test -n "$verbose" && echo "$as_me:11205: result: ... $cf_attribute" >&5
11206 echo "${ECHO_T}... $cf_attribute" >&6
11207                         cat conftest.h >>confdefs.h
11208                         case $cf_attribute in #(vi
11209                         printf) #(vi
11210                                 if test "$cf_printf_attribute" = no ; then
11211                                         cat >>confdefs.h <<EOF
11212 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11213 EOF
11214                                 else
11215                                         cat >>confdefs.h <<EOF
11216 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11217 EOF
11218                                 fi
11219                                 ;;
11220                         scanf) #(vi
11221                                 if test "$cf_scanf_attribute" = no ; then
11222                                         cat >>confdefs.h <<EOF
11223 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11224 EOF
11225                                 else
11226                                         cat >>confdefs.h <<EOF
11227 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11228 EOF
11229                                 fi
11230                                 ;;
11231                         esac
11232                 fi
11233         done
11234 else
11235         fgrep define conftest.i >>confdefs.h
11236 fi
11237 rm -rf conftest*
11238 fi
11239
11240 ###     use option --enable-assertions to turn on generation of assertion code
11241 echo "$as_me:11241: checking if you want to enable runtime assertions" >&5
11242 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11243
11244 # Check whether --enable-assertions or --disable-assertions was given.
11245 if test "${enable_assertions+set}" = set; then
11246   enableval="$enable_assertions"
11247   with_assertions=$enableval
11248 else
11249   with_assertions=no
11250 fi;
11251 echo "$as_me:11251: result: $with_assertions" >&5
11252 echo "${ECHO_T}$with_assertions" >&6
11253 if test -n "$GCC"
11254 then
11255         if test "$with_assertions" = no
11256         then
11257                 cat >>confdefs.h <<\EOF
11258 #define NDEBUG 1
11259 EOF
11260
11261                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11262         else
11263                 ADAFLAGS="$ADAFLAGS -gnata"
11264         fi
11265 fi
11266
11267 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11268
11269 echo "$as_me:11269: checking if you want to use dmalloc for testing" >&5
11270 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11271
11272 # Check whether --with-dmalloc or --without-dmalloc was given.
11273 if test "${with_dmalloc+set}" = set; then
11274   withval="$with_dmalloc"
11275   cat >>confdefs.h <<\EOF
11276 #define USE_DMALLOC 1
11277 EOF
11278
11279         : ${with_cflags:=-g}
11280         : ${with_no_leaks:=yes}
11281          with_dmalloc=yes
11282 else
11283   with_dmalloc=
11284 fi;
11285 echo "$as_me:11285: result: ${with_dmalloc:-no}" >&5
11286 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11287
11288 case .$with_cflags in #(vi
11289 .*-g*)
11290         case .$CFLAGS in #(vi
11291         .*-g*) #(vi
11292                 ;;
11293         *)
11294
11295 cf_fix_cppflags=no
11296 cf_new_cflags=
11297 cf_new_cppflags=
11298 cf_new_extra_cppflags=
11299
11300 for cf_add_cflags in -g
11301 do
11302 case $cf_fix_cppflags in
11303 no)
11304         case $cf_add_cflags in #(vi
11305         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11306                 case $cf_add_cflags in
11307                 -D*)
11308                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11309
11310                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11311                                 && test -z "${cf_tst_cflags}" \
11312                                 && cf_fix_cppflags=yes
11313
11314                         if test $cf_fix_cppflags = yes ; then
11315                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11316                                 continue
11317                         elif test "${cf_tst_cflags}" = "\"'" ; then
11318                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11319                                 continue
11320                         fi
11321                         ;;
11322                 esac
11323                 case "$CPPFLAGS" in
11324                 *$cf_add_cflags) #(vi
11325                         ;;
11326                 *) #(vi
11327                         case $cf_add_cflags in #(vi
11328                         -D*)
11329                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11330
11331 CPPFLAGS=`echo "$CPPFLAGS" | \
11332         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11333                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11334
11335                                 ;;
11336                         esac
11337                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11338                         ;;
11339                 esac
11340                 ;;
11341         *)
11342                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11343                 ;;
11344         esac
11345         ;;
11346 yes)
11347         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11348
11349         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11350
11351         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11352                 && test -z "${cf_tst_cflags}" \
11353                 && cf_fix_cppflags=no
11354         ;;
11355 esac
11356 done
11357
11358 if test -n "$cf_new_cflags" ; then
11359
11360         CFLAGS="$CFLAGS $cf_new_cflags"
11361 fi
11362
11363 if test -n "$cf_new_cppflags" ; then
11364
11365         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11366 fi
11367
11368 if test -n "$cf_new_extra_cppflags" ; then
11369
11370         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11371 fi
11372
11373                 ;;
11374         esac
11375         ;;
11376 esac
11377
11378 if test "$with_dmalloc" = yes ; then
11379         echo "$as_me:11379: checking for dmalloc.h" >&5
11380 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11381 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11382   echo $ECHO_N "(cached) $ECHO_C" >&6
11383 else
11384   cat >conftest.$ac_ext <<_ACEOF
11385 #line 11385 "configure"
11386 #include "confdefs.h"
11387 #include <dmalloc.h>
11388 _ACEOF
11389 if { (eval echo "$as_me:11389: \"$ac_cpp conftest.$ac_ext\"") >&5
11390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11391   ac_status=$?
11392   egrep -v '^ *\+' conftest.er1 >conftest.err
11393   rm -f conftest.er1
11394   cat conftest.err >&5
11395   echo "$as_me:11395: \$? = $ac_status" >&5
11396   (exit $ac_status); } >/dev/null; then
11397   if test -s conftest.err; then
11398     ac_cpp_err=$ac_c_preproc_warn_flag
11399   else
11400     ac_cpp_err=
11401   fi
11402 else
11403   ac_cpp_err=yes
11404 fi
11405 if test -z "$ac_cpp_err"; then
11406   ac_cv_header_dmalloc_h=yes
11407 else
11408   echo "$as_me: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   ac_cv_header_dmalloc_h=no
11411 fi
11412 rm -f conftest.err conftest.$ac_ext
11413 fi
11414 echo "$as_me:11414: result: $ac_cv_header_dmalloc_h" >&5
11415 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11416 if test $ac_cv_header_dmalloc_h = yes; then
11417
11418 echo "$as_me:11418: checking for dmalloc_debug in -ldmalloc" >&5
11419 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11420 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11421   echo $ECHO_N "(cached) $ECHO_C" >&6
11422 else
11423   ac_check_lib_save_LIBS=$LIBS
11424 LIBS="-ldmalloc  $LIBS"
11425 cat >conftest.$ac_ext <<_ACEOF
11426 #line 11426 "configure"
11427 #include "confdefs.h"
11428
11429 /* Override any gcc2 internal prototype to avoid an error.  */
11430 #ifdef __cplusplus
11431 extern "C"
11432 #endif
11433 /* We use char because int might match the return type of a gcc2
11434    builtin and then its argument prototype would still apply.  */
11435 char dmalloc_debug ();
11436 int
11437 main ()
11438 {
11439 dmalloc_debug ();
11440   ;
11441   return 0;
11442 }
11443 _ACEOF
11444 rm -f conftest.$ac_objext conftest$ac_exeext
11445 if { (eval echo "$as_me:11445: \"$ac_link\"") >&5
11446   (eval $ac_link) 2>&5
11447   ac_status=$?
11448   echo "$as_me:11448: \$? = $ac_status" >&5
11449   (exit $ac_status); } &&
11450          { ac_try='test -s conftest$ac_exeext'
11451   { (eval echo "$as_me:11451: \"$ac_try\"") >&5
11452   (eval $ac_try) 2>&5
11453   ac_status=$?
11454   echo "$as_me:11454: \$? = $ac_status" >&5
11455   (exit $ac_status); }; }; then
11456   ac_cv_lib_dmalloc_dmalloc_debug=yes
11457 else
11458   echo "$as_me: failed program was:" >&5
11459 cat conftest.$ac_ext >&5
11460 ac_cv_lib_dmalloc_dmalloc_debug=no
11461 fi
11462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11463 LIBS=$ac_check_lib_save_LIBS
11464 fi
11465 echo "$as_me:11465: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11466 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11467 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11468   cat >>confdefs.h <<EOF
11469 #define HAVE_LIBDMALLOC 1
11470 EOF
11471
11472   LIBS="-ldmalloc $LIBS"
11473
11474 fi
11475
11476 fi
11477
11478 fi
11479
11480 echo "$as_me:11480: checking if you want to use dbmalloc for testing" >&5
11481 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11482
11483 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11484 if test "${with_dbmalloc+set}" = set; then
11485   withval="$with_dbmalloc"
11486   cat >>confdefs.h <<\EOF
11487 #define USE_DBMALLOC 1
11488 EOF
11489
11490         : ${with_cflags:=-g}
11491         : ${with_no_leaks:=yes}
11492          with_dbmalloc=yes
11493 else
11494   with_dbmalloc=
11495 fi;
11496 echo "$as_me:11496: result: ${with_dbmalloc:-no}" >&5
11497 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11498
11499 case .$with_cflags in #(vi
11500 .*-g*)
11501         case .$CFLAGS in #(vi
11502         .*-g*) #(vi
11503                 ;;
11504         *)
11505
11506 cf_fix_cppflags=no
11507 cf_new_cflags=
11508 cf_new_cppflags=
11509 cf_new_extra_cppflags=
11510
11511 for cf_add_cflags in -g
11512 do
11513 case $cf_fix_cppflags in
11514 no)
11515         case $cf_add_cflags in #(vi
11516         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11517                 case $cf_add_cflags in
11518                 -D*)
11519                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11520
11521                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11522                                 && test -z "${cf_tst_cflags}" \
11523                                 && cf_fix_cppflags=yes
11524
11525                         if test $cf_fix_cppflags = yes ; then
11526                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11527                                 continue
11528                         elif test "${cf_tst_cflags}" = "\"'" ; then
11529                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11530                                 continue
11531                         fi
11532                         ;;
11533                 esac
11534                 case "$CPPFLAGS" in
11535                 *$cf_add_cflags) #(vi
11536                         ;;
11537                 *) #(vi
11538                         case $cf_add_cflags in #(vi
11539                         -D*)
11540                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11541
11542 CPPFLAGS=`echo "$CPPFLAGS" | \
11543         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11544                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11545
11546                                 ;;
11547                         esac
11548                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11549                         ;;
11550                 esac
11551                 ;;
11552         *)
11553                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11554                 ;;
11555         esac
11556         ;;
11557 yes)
11558         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11559
11560         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11561
11562         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11563                 && test -z "${cf_tst_cflags}" \
11564                 && cf_fix_cppflags=no
11565         ;;
11566 esac
11567 done
11568
11569 if test -n "$cf_new_cflags" ; then
11570
11571         CFLAGS="$CFLAGS $cf_new_cflags"
11572 fi
11573
11574 if test -n "$cf_new_cppflags" ; then
11575
11576         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11577 fi
11578
11579 if test -n "$cf_new_extra_cppflags" ; then
11580
11581         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11582 fi
11583
11584                 ;;
11585         esac
11586         ;;
11587 esac
11588
11589 if test "$with_dbmalloc" = yes ; then
11590         echo "$as_me:11590: checking for dbmalloc.h" >&5
11591 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11592 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11593   echo $ECHO_N "(cached) $ECHO_C" >&6
11594 else
11595   cat >conftest.$ac_ext <<_ACEOF
11596 #line 11596 "configure"
11597 #include "confdefs.h"
11598 #include <dbmalloc.h>
11599 _ACEOF
11600 if { (eval echo "$as_me:11600: \"$ac_cpp conftest.$ac_ext\"") >&5
11601   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11602   ac_status=$?
11603   egrep -v '^ *\+' conftest.er1 >conftest.err
11604   rm -f conftest.er1
11605   cat conftest.err >&5
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit $ac_status); } >/dev/null; then
11608   if test -s conftest.err; then
11609     ac_cpp_err=$ac_c_preproc_warn_flag
11610   else
11611     ac_cpp_err=
11612   fi
11613 else
11614   ac_cpp_err=yes
11615 fi
11616 if test -z "$ac_cpp_err"; then
11617   ac_cv_header_dbmalloc_h=yes
11618 else
11619   echo "$as_me: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   ac_cv_header_dbmalloc_h=no
11622 fi
11623 rm -f conftest.err conftest.$ac_ext
11624 fi
11625 echo "$as_me:11625: result: $ac_cv_header_dbmalloc_h" >&5
11626 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11627 if test $ac_cv_header_dbmalloc_h = yes; then
11628
11629 echo "$as_me:11629: checking for debug_malloc in -ldbmalloc" >&5
11630 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11631 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11632   echo $ECHO_N "(cached) $ECHO_C" >&6
11633 else
11634   ac_check_lib_save_LIBS=$LIBS
11635 LIBS="-ldbmalloc  $LIBS"
11636 cat >conftest.$ac_ext <<_ACEOF
11637 #line 11637 "configure"
11638 #include "confdefs.h"
11639
11640 /* Override any gcc2 internal prototype to avoid an error.  */
11641 #ifdef __cplusplus
11642 extern "C"
11643 #endif
11644 /* We use char because int might match the return type of a gcc2
11645    builtin and then its argument prototype would still apply.  */
11646 char debug_malloc ();
11647 int
11648 main ()
11649 {
11650 debug_malloc ();
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 rm -f conftest.$ac_objext conftest$ac_exeext
11656 if { (eval echo "$as_me:11656: \"$ac_link\"") >&5
11657   (eval $ac_link) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); } &&
11661          { ac_try='test -s conftest$ac_exeext'
11662   { (eval echo "$as_me:11662: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:11665: \$? = $ac_status" >&5
11666   (exit $ac_status); }; }; then
11667   ac_cv_lib_dbmalloc_debug_malloc=yes
11668 else
11669   echo "$as_me: failed program was:" >&5
11670 cat conftest.$ac_ext >&5
11671 ac_cv_lib_dbmalloc_debug_malloc=no
11672 fi
11673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11674 LIBS=$ac_check_lib_save_LIBS
11675 fi
11676 echo "$as_me:11676: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11677 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11678 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11679   cat >>confdefs.h <<EOF
11680 #define HAVE_LIBDBMALLOC 1
11681 EOF
11682
11683   LIBS="-ldbmalloc $LIBS"
11684
11685 fi
11686
11687 fi
11688
11689 fi
11690
11691 echo "$as_me:11691: checking if you want to use valgrind for testing" >&5
11692 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11693
11694 # Check whether --with-valgrind or --without-valgrind was given.
11695 if test "${with_valgrind+set}" = set; then
11696   withval="$with_valgrind"
11697   cat >>confdefs.h <<\EOF
11698 #define USE_VALGRIND 1
11699 EOF
11700
11701         : ${with_cflags:=-g}
11702         : ${with_no_leaks:=yes}
11703          with_valgrind=yes
11704 else
11705   with_valgrind=
11706 fi;
11707 echo "$as_me:11707: result: ${with_valgrind:-no}" >&5
11708 echo "${ECHO_T}${with_valgrind:-no}" >&6
11709
11710 case .$with_cflags in #(vi
11711 .*-g*)
11712         case .$CFLAGS in #(vi
11713         .*-g*) #(vi
11714                 ;;
11715         *)
11716
11717 cf_fix_cppflags=no
11718 cf_new_cflags=
11719 cf_new_cppflags=
11720 cf_new_extra_cppflags=
11721
11722 for cf_add_cflags in -g
11723 do
11724 case $cf_fix_cppflags in
11725 no)
11726         case $cf_add_cflags in #(vi
11727         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11728                 case $cf_add_cflags in
11729                 -D*)
11730                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11731
11732                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11733                                 && test -z "${cf_tst_cflags}" \
11734                                 && cf_fix_cppflags=yes
11735
11736                         if test $cf_fix_cppflags = yes ; then
11737                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11738                                 continue
11739                         elif test "${cf_tst_cflags}" = "\"'" ; then
11740                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11741                                 continue
11742                         fi
11743                         ;;
11744                 esac
11745                 case "$CPPFLAGS" in
11746                 *$cf_add_cflags) #(vi
11747                         ;;
11748                 *) #(vi
11749                         case $cf_add_cflags in #(vi
11750                         -D*)
11751                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11752
11753 CPPFLAGS=`echo "$CPPFLAGS" | \
11754         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11755                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11756
11757                                 ;;
11758                         esac
11759                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11760                         ;;
11761                 esac
11762                 ;;
11763         *)
11764                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11765                 ;;
11766         esac
11767         ;;
11768 yes)
11769         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11770
11771         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11772
11773         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11774                 && test -z "${cf_tst_cflags}" \
11775                 && cf_fix_cppflags=no
11776         ;;
11777 esac
11778 done
11779
11780 if test -n "$cf_new_cflags" ; then
11781
11782         CFLAGS="$CFLAGS $cf_new_cflags"
11783 fi
11784
11785 if test -n "$cf_new_cppflags" ; then
11786
11787         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11788 fi
11789
11790 if test -n "$cf_new_extra_cppflags" ; then
11791
11792         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11793 fi
11794
11795                 ;;
11796         esac
11797         ;;
11798 esac
11799
11800 echo "$as_me:11800: checking if you want to perform memory-leak testing" >&5
11801 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11802
11803 # Check whether --enable-leaks or --disable-leaks was given.
11804 if test "${enable_leaks+set}" = set; then
11805   enableval="$enable_leaks"
11806   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11807 else
11808   : ${with_no_leaks:=no}
11809 fi;
11810 echo "$as_me:11810: result: $with_no_leaks" >&5
11811 echo "${ECHO_T}$with_no_leaks" >&6
11812
11813 if test "$with_no_leaks" = yes ; then
11814         cat >>confdefs.h <<\EOF
11815 #define NO_LEAKS 1
11816 EOF
11817
11818 fi
11819
11820 cat >>confdefs.h <<\EOF
11821 #define HAVE_NC_ALLOC_H 1
11822 EOF
11823
11824 ###     use option --enable-expanded to generate certain macros as functions
11825
11826 # Check whether --enable-expanded or --disable-expanded was given.
11827 if test "${enable_expanded+set}" = set; then
11828   enableval="$enable_expanded"
11829   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11830 #define NCURSES_EXPANDED 1
11831 EOF
11832
11833 fi;
11834
11835 ###     use option --disable-macros to suppress macros in favor of functions
11836
11837 # Check whether --enable-macros or --disable-macros was given.
11838 if test "${enable_macros+set}" = set; then
11839   enableval="$enable_macros"
11840   test "$enableval" = no && cat >>confdefs.h <<\EOF
11841 #define NCURSES_NOMACROS 1
11842 EOF
11843
11844 fi;
11845
11846 # Normally we only add trace() to the debug-library.  Allow this to be
11847 # extended to all models of the ncurses library:
11848 cf_all_traces=no
11849 case "$CFLAGS $CPPFLAGS" in
11850 *-DTRACE*)
11851         cf_all_traces=yes
11852         ;;
11853 esac
11854
11855 echo "$as_me:11855: checking whether to add trace feature to all models" >&5
11856 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11857
11858 # Check whether --with-trace or --without-trace was given.
11859 if test "${with_trace+set}" = set; then
11860   withval="$with_trace"
11861   cf_with_trace=$withval
11862 else
11863   cf_with_trace=$cf_all_traces
11864 fi;
11865 echo "$as_me:11865: result: $cf_with_trace" >&5
11866 echo "${ECHO_T}$cf_with_trace" >&6
11867
11868 if test "$cf_with_trace" = yes ; then
11869         LIB_TRACING=all
11870         ADA_TRACE=TRUE
11871
11872 cf_fix_cppflags=no
11873 cf_new_cflags=
11874 cf_new_cppflags=
11875 cf_new_extra_cppflags=
11876
11877 for cf_add_cflags in -DTRACE
11878 do
11879 case $cf_fix_cppflags in
11880 no)
11881         case $cf_add_cflags in #(vi
11882         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11883                 case $cf_add_cflags in
11884                 -D*)
11885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11886
11887                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11888                                 && test -z "${cf_tst_cflags}" \
11889                                 && cf_fix_cppflags=yes
11890
11891                         if test $cf_fix_cppflags = yes ; then
11892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11893                                 continue
11894                         elif test "${cf_tst_cflags}" = "\"'" ; then
11895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11896                                 continue
11897                         fi
11898                         ;;
11899                 esac
11900                 case "$CPPFLAGS" in
11901                 *$cf_add_cflags) #(vi
11902                         ;;
11903                 *) #(vi
11904                         case $cf_add_cflags in #(vi
11905                         -D*)
11906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11907
11908 CPPFLAGS=`echo "$CPPFLAGS" | \
11909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11911
11912                                 ;;
11913                         esac
11914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11915                         ;;
11916                 esac
11917                 ;;
11918         *)
11919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11920                 ;;
11921         esac
11922         ;;
11923 yes)
11924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11925
11926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11927
11928         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11929                 && test -z "${cf_tst_cflags}" \
11930                 && cf_fix_cppflags=no
11931         ;;
11932 esac
11933 done
11934
11935 if test -n "$cf_new_cflags" ; then
11936
11937         CFLAGS="$CFLAGS $cf_new_cflags"
11938 fi
11939
11940 if test -n "$cf_new_cppflags" ; then
11941
11942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11943 fi
11944
11945 if test -n "$cf_new_extra_cppflags" ; then
11946
11947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11948 fi
11949
11950 else
11951         LIB_TRACING=DEBUG
11952         ADA_TRACE=FALSE
11953 fi
11954
11955 ###     Checks for libraries.
11956 case $cf_cv_system_name in #(vi
11957 *mingw32*) #(vi
11958         ;;
11959 *)
11960 echo "$as_me:11960: checking for gettimeofday" >&5
11961 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11962 if test "${ac_cv_func_gettimeofday+set}" = set; then
11963   echo $ECHO_N "(cached) $ECHO_C" >&6
11964 else
11965   cat >conftest.$ac_ext <<_ACEOF
11966 #line 11966 "configure"
11967 #include "confdefs.h"
11968 /* System header to define __stub macros and hopefully few prototypes,
11969     which can conflict with char gettimeofday (); below.  */
11970 #include <assert.h>
11971 /* Override any gcc2 internal prototype to avoid an error.  */
11972 #ifdef __cplusplus
11973 extern "C"
11974 #endif
11975 /* We use char because int might match the return type of a gcc2
11976    builtin and then its argument prototype would still apply.  */
11977 char gettimeofday ();
11978 char (*f) ();
11979
11980 int
11981 main ()
11982 {
11983 /* The GNU C library defines this for functions which it implements
11984     to always fail with ENOSYS.  Some functions are actually named
11985     something starting with __ and the normal name is an alias.  */
11986 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11987 choke me
11988 #else
11989 f = gettimeofday;
11990 #endif
11991
11992   ;
11993   return 0;
11994 }
11995 _ACEOF
11996 rm -f conftest.$ac_objext conftest$ac_exeext
11997 if { (eval echo "$as_me:11997: \"$ac_link\"") >&5
11998   (eval $ac_link) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit $ac_status); } &&
12002          { ac_try='test -s conftest$ac_exeext'
12003   { (eval echo "$as_me:12003: \"$ac_try\"") >&5
12004   (eval $ac_try) 2>&5
12005   ac_status=$?
12006   echo "$as_me:12006: \$? = $ac_status" >&5
12007   (exit $ac_status); }; }; then
12008   ac_cv_func_gettimeofday=yes
12009 else
12010   echo "$as_me: failed program was:" >&5
12011 cat conftest.$ac_ext >&5
12012 ac_cv_func_gettimeofday=no
12013 fi
12014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12015 fi
12016 echo "$as_me:12016: result: $ac_cv_func_gettimeofday" >&5
12017 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12018 if test $ac_cv_func_gettimeofday = yes; then
12019   cat >>confdefs.h <<\EOF
12020 #define HAVE_GETTIMEOFDAY 1
12021 EOF
12022
12023 else
12024
12025 echo "$as_me:12025: checking for gettimeofday in -lbsd" >&5
12026 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12027 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12028   echo $ECHO_N "(cached) $ECHO_C" >&6
12029 else
12030   ac_check_lib_save_LIBS=$LIBS
12031 LIBS="-lbsd  $LIBS"
12032 cat >conftest.$ac_ext <<_ACEOF
12033 #line 12033 "configure"
12034 #include "confdefs.h"
12035
12036 /* Override any gcc2 internal prototype to avoid an error.  */
12037 #ifdef __cplusplus
12038 extern "C"
12039 #endif
12040 /* We use char because int might match the return type of a gcc2
12041    builtin and then its argument prototype would still apply.  */
12042 char gettimeofday ();
12043 int
12044 main ()
12045 {
12046 gettimeofday ();
12047   ;
12048   return 0;
12049 }
12050 _ACEOF
12051 rm -f conftest.$ac_objext conftest$ac_exeext
12052 if { (eval echo "$as_me:12052: \"$ac_link\"") >&5
12053   (eval $ac_link) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); } &&
12057          { ac_try='test -s conftest$ac_exeext'
12058   { (eval echo "$as_me:12058: \"$ac_try\"") >&5
12059   (eval $ac_try) 2>&5
12060   ac_status=$?
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); }; }; then
12063   ac_cv_lib_bsd_gettimeofday=yes
12064 else
12065   echo "$as_me: failed program was:" >&5
12066 cat conftest.$ac_ext >&5
12067 ac_cv_lib_bsd_gettimeofday=no
12068 fi
12069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12070 LIBS=$ac_check_lib_save_LIBS
12071 fi
12072 echo "$as_me:12072: result: $ac_cv_lib_bsd_gettimeofday" >&5
12073 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12074 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12075   cat >>confdefs.h <<\EOF
12076 #define HAVE_GETTIMEOFDAY 1
12077 EOF
12078
12079         LIBS="$LIBS -lbsd"
12080 fi
12081
12082 fi
12083         ;;
12084 esac
12085
12086 echo "$as_me:12086: checking if -lm needed for math functions" >&5
12087 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12088 if test "${cf_cv_need_libm+set}" = set; then
12089   echo $ECHO_N "(cached) $ECHO_C" >&6
12090 else
12091
12092         cat >conftest.$ac_ext <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095
12096         #include <stdio.h>
12097         #include <math.h>
12098
12099 int
12100 main ()
12101 {
12102 double x = rand(); printf("result = %g\n", sin(x))
12103   ;
12104   return 0;
12105 }
12106 _ACEOF
12107 rm -f conftest.$ac_objext conftest$ac_exeext
12108 if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
12109   (eval $ac_link) 2>&5
12110   ac_status=$?
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); } &&
12113          { ac_try='test -s conftest$ac_exeext'
12114   { (eval echo "$as_me:12114: \"$ac_try\"") >&5
12115   (eval $ac_try) 2>&5
12116   ac_status=$?
12117   echo "$as_me:12117: \$? = $ac_status" >&5
12118   (exit $ac_status); }; }; then
12119   cf_cv_need_libm=no
12120 else
12121   echo "$as_me: failed program was:" >&5
12122 cat conftest.$ac_ext >&5
12123 cf_cv_need_libm=yes
12124 fi
12125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12126 fi
12127 echo "$as_me:12127: result: $cf_cv_need_libm" >&5
12128 echo "${ECHO_T}$cf_cv_need_libm" >&6
12129 if test "$cf_cv_need_libm" = yes
12130 then
12131 MATH_LIB=-lm
12132 fi
12133
12134 ###     Checks for header files.
12135 echo "$as_me:12135: checking for ANSI C header files" >&5
12136 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12137 if test "${ac_cv_header_stdc+set}" = set; then
12138   echo $ECHO_N "(cached) $ECHO_C" >&6
12139 else
12140   cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143 #include <stdlib.h>
12144 #include <stdarg.h>
12145 #include <string.h>
12146 #include <float.h>
12147
12148 _ACEOF
12149 if { (eval echo "$as_me:12149: \"$ac_cpp conftest.$ac_ext\"") >&5
12150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12151   ac_status=$?
12152   egrep -v '^ *\+' conftest.er1 >conftest.err
12153   rm -f conftest.er1
12154   cat conftest.err >&5
12155   echo "$as_me:12155: \$? = $ac_status" >&5
12156   (exit $ac_status); } >/dev/null; then
12157   if test -s conftest.err; then
12158     ac_cpp_err=$ac_c_preproc_warn_flag
12159   else
12160     ac_cpp_err=
12161   fi
12162 else
12163   ac_cpp_err=yes
12164 fi
12165 if test -z "$ac_cpp_err"; then
12166   ac_cv_header_stdc=yes
12167 else
12168   echo "$as_me: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   ac_cv_header_stdc=no
12171 fi
12172 rm -f conftest.err conftest.$ac_ext
12173
12174 if test $ac_cv_header_stdc = yes; then
12175   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12176   cat >conftest.$ac_ext <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179 #include <string.h>
12180
12181 _ACEOF
12182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12183   egrep "memchr" >/dev/null 2>&1; then
12184   :
12185 else
12186   ac_cv_header_stdc=no
12187 fi
12188 rm -f conftest*
12189
12190 fi
12191
12192 if test $ac_cv_header_stdc = yes; then
12193   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12194   cat >conftest.$ac_ext <<_ACEOF
12195 #line 12195 "configure"
12196 #include "confdefs.h"
12197 #include <stdlib.h>
12198
12199 _ACEOF
12200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12201   egrep "free" >/dev/null 2>&1; then
12202   :
12203 else
12204   ac_cv_header_stdc=no
12205 fi
12206 rm -f conftest*
12207
12208 fi
12209
12210 if test $ac_cv_header_stdc = yes; then
12211   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12212   if test "$cross_compiling" = yes; then
12213   :
12214 else
12215   cat >conftest.$ac_ext <<_ACEOF
12216 #line 12216 "configure"
12217 #include "confdefs.h"
12218 #include <ctype.h>
12219 #if ((' ' & 0x0FF) == 0x020)
12220 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12221 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12222 #else
12223 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12224                      || ('j' <= (c) && (c) <= 'r') \
12225                      || ('s' <= (c) && (c) <= 'z'))
12226 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12227 #endif
12228
12229 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12230 int
12231 main ()
12232 {
12233   int i;
12234   for (i = 0; i < 256; i++)
12235     if (XOR (islower (i), ISLOWER (i))
12236         || toupper (i) != TOUPPER (i))
12237       $ac_main_return(2);
12238   $ac_main_return (0);
12239 }
12240 _ACEOF
12241 rm -f conftest$ac_exeext
12242 if { (eval echo "$as_me:12242: \"$ac_link\"") >&5
12243   (eval $ac_link) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12247   { (eval echo "$as_me:12247: \"$ac_try\"") >&5
12248   (eval $ac_try) 2>&5
12249   ac_status=$?
12250   echo "$as_me:12250: \$? = $ac_status" >&5
12251   (exit $ac_status); }; }; then
12252   :
12253 else
12254   echo "$as_me: program exited with status $ac_status" >&5
12255 echo "$as_me: failed program was:" >&5
12256 cat conftest.$ac_ext >&5
12257 ac_cv_header_stdc=no
12258 fi
12259 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12260 fi
12261 fi
12262 fi
12263 echo "$as_me:12263: result: $ac_cv_header_stdc" >&5
12264 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12265 if test $ac_cv_header_stdc = yes; then
12266
12267 cat >>confdefs.h <<\EOF
12268 #define STDC_HEADERS 1
12269 EOF
12270
12271 fi
12272
12273 ac_header_dirent=no
12274 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12275   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12276 echo "$as_me:12276: checking for $ac_hdr that defines DIR" >&5
12277 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12278 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12279   echo $ECHO_N "(cached) $ECHO_C" >&6
12280 else
12281   cat >conftest.$ac_ext <<_ACEOF
12282 #line 12282 "configure"
12283 #include "confdefs.h"
12284 #include <sys/types.h>
12285 #include <$ac_hdr>
12286
12287 int
12288 main ()
12289 {
12290 if ((DIR *) 0)
12291 return 0;
12292   ;
12293   return 0;
12294 }
12295 _ACEOF
12296 rm -f conftest.$ac_objext
12297 if { (eval echo "$as_me:12297: \"$ac_compile\"") >&5
12298   (eval $ac_compile) 2>&5
12299   ac_status=$?
12300   echo "$as_me:12300: \$? = $ac_status" >&5
12301   (exit $ac_status); } &&
12302          { ac_try='test -s conftest.$ac_objext'
12303   { (eval echo "$as_me:12303: \"$ac_try\"") >&5
12304   (eval $ac_try) 2>&5
12305   ac_status=$?
12306   echo "$as_me:12306: \$? = $ac_status" >&5
12307   (exit $ac_status); }; }; then
12308   eval "$as_ac_Header=yes"
12309 else
12310   echo "$as_me: failed program was:" >&5
12311 cat conftest.$ac_ext >&5
12312 eval "$as_ac_Header=no"
12313 fi
12314 rm -f conftest.$ac_objext conftest.$ac_ext
12315 fi
12316 echo "$as_me:12316: result: `eval echo '${'$as_ac_Header'}'`" >&5
12317 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12318 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12319   cat >>confdefs.h <<EOF
12320 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12321 EOF
12322
12323 ac_header_dirent=$ac_hdr; break
12324 fi
12325
12326 done
12327 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12328 if test $ac_header_dirent = dirent.h; then
12329   echo "$as_me:12329: checking for opendir in -ldir" >&5
12330 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12331 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12332   echo $ECHO_N "(cached) $ECHO_C" >&6
12333 else
12334   ac_check_lib_save_LIBS=$LIBS
12335 LIBS="-ldir  $LIBS"
12336 cat >conftest.$ac_ext <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12339
12340 /* Override any gcc2 internal prototype to avoid an error.  */
12341 #ifdef __cplusplus
12342 extern "C"
12343 #endif
12344 /* We use char because int might match the return type of a gcc2
12345    builtin and then its argument prototype would still apply.  */
12346 char opendir ();
12347 int
12348 main ()
12349 {
12350 opendir ();
12351   ;
12352   return 0;
12353 }
12354 _ACEOF
12355 rm -f conftest.$ac_objext conftest$ac_exeext
12356 if { (eval echo "$as_me:12356: \"$ac_link\"") >&5
12357   (eval $ac_link) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); } &&
12361          { ac_try='test -s conftest$ac_exeext'
12362   { (eval echo "$as_me:12362: \"$ac_try\"") >&5
12363   (eval $ac_try) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); }; }; then
12367   ac_cv_lib_dir_opendir=yes
12368 else
12369   echo "$as_me: failed program was:" >&5
12370 cat conftest.$ac_ext >&5
12371 ac_cv_lib_dir_opendir=no
12372 fi
12373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12374 LIBS=$ac_check_lib_save_LIBS
12375 fi
12376 echo "$as_me:12376: result: $ac_cv_lib_dir_opendir" >&5
12377 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12378 if test $ac_cv_lib_dir_opendir = yes; then
12379   LIBS="$LIBS -ldir"
12380 fi
12381
12382 else
12383   echo "$as_me:12383: checking for opendir in -lx" >&5
12384 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12385 if test "${ac_cv_lib_x_opendir+set}" = set; then
12386   echo $ECHO_N "(cached) $ECHO_C" >&6
12387 else
12388   ac_check_lib_save_LIBS=$LIBS
12389 LIBS="-lx  $LIBS"
12390 cat >conftest.$ac_ext <<_ACEOF
12391 #line 12391 "configure"
12392 #include "confdefs.h"
12393
12394 /* Override any gcc2 internal prototype to avoid an error.  */
12395 #ifdef __cplusplus
12396 extern "C"
12397 #endif
12398 /* We use char because int might match the return type of a gcc2
12399    builtin and then its argument prototype would still apply.  */
12400 char opendir ();
12401 int
12402 main ()
12403 {
12404 opendir ();
12405   ;
12406   return 0;
12407 }
12408 _ACEOF
12409 rm -f conftest.$ac_objext conftest$ac_exeext
12410 if { (eval echo "$as_me:12410: \"$ac_link\"") >&5
12411   (eval $ac_link) 2>&5
12412   ac_status=$?
12413   echo "$as_me:12413: \$? = $ac_status" >&5
12414   (exit $ac_status); } &&
12415          { ac_try='test -s conftest$ac_exeext'
12416   { (eval echo "$as_me:12416: \"$ac_try\"") >&5
12417   (eval $ac_try) 2>&5
12418   ac_status=$?
12419   echo "$as_me:12419: \$? = $ac_status" >&5
12420   (exit $ac_status); }; }; then
12421   ac_cv_lib_x_opendir=yes
12422 else
12423   echo "$as_me: failed program was:" >&5
12424 cat conftest.$ac_ext >&5
12425 ac_cv_lib_x_opendir=no
12426 fi
12427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12428 LIBS=$ac_check_lib_save_LIBS
12429 fi
12430 echo "$as_me:12430: result: $ac_cv_lib_x_opendir" >&5
12431 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12432 if test $ac_cv_lib_x_opendir = yes; then
12433   LIBS="$LIBS -lx"
12434 fi
12435
12436 fi
12437
12438 echo "$as_me:12438: checking whether time.h and sys/time.h may both be included" >&5
12439 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12440 if test "${ac_cv_header_time+set}" = set; then
12441   echo $ECHO_N "(cached) $ECHO_C" >&6
12442 else
12443   cat >conftest.$ac_ext <<_ACEOF
12444 #line 12444 "configure"
12445 #include "confdefs.h"
12446 #include <sys/types.h>
12447 #include <sys/time.h>
12448 #include <time.h>
12449
12450 int
12451 main ()
12452 {
12453 if ((struct tm *) 0)
12454 return 0;
12455   ;
12456   return 0;
12457 }
12458 _ACEOF
12459 rm -f conftest.$ac_objext
12460 if { (eval echo "$as_me:12460: \"$ac_compile\"") >&5
12461   (eval $ac_compile) 2>&5
12462   ac_status=$?
12463   echo "$as_me:12463: \$? = $ac_status" >&5
12464   (exit $ac_status); } &&
12465          { ac_try='test -s conftest.$ac_objext'
12466   { (eval echo "$as_me:12466: \"$ac_try\"") >&5
12467   (eval $ac_try) 2>&5
12468   ac_status=$?
12469   echo "$as_me:12469: \$? = $ac_status" >&5
12470   (exit $ac_status); }; }; then
12471   ac_cv_header_time=yes
12472 else
12473   echo "$as_me: failed program was:" >&5
12474 cat conftest.$ac_ext >&5
12475 ac_cv_header_time=no
12476 fi
12477 rm -f conftest.$ac_objext conftest.$ac_ext
12478 fi
12479 echo "$as_me:12479: result: $ac_cv_header_time" >&5
12480 echo "${ECHO_T}$ac_cv_header_time" >&6
12481 if test $ac_cv_header_time = yes; then
12482
12483 cat >>confdefs.h <<\EOF
12484 #define TIME_WITH_SYS_TIME 1
12485 EOF
12486
12487 fi
12488
12489 cf_regex_func=no
12490
12491 echo "$as_me:12491: checking for regcomp" >&5
12492 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12493 if test "${ac_cv_func_regcomp+set}" = set; then
12494   echo $ECHO_N "(cached) $ECHO_C" >&6
12495 else
12496   cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499 /* System header to define __stub macros and hopefully few prototypes,
12500     which can conflict with char regcomp (); below.  */
12501 #include <assert.h>
12502 /* Override any gcc2 internal prototype to avoid an error.  */
12503 #ifdef __cplusplus
12504 extern "C"
12505 #endif
12506 /* We use char because int might match the return type of a gcc2
12507    builtin and then its argument prototype would still apply.  */
12508 char regcomp ();
12509 char (*f) ();
12510
12511 int
12512 main ()
12513 {
12514 /* The GNU C library defines this for functions which it implements
12515     to always fail with ENOSYS.  Some functions are actually named
12516     something starting with __ and the normal name is an alias.  */
12517 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12518 choke me
12519 #else
12520 f = regcomp;
12521 #endif
12522
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 rm -f conftest.$ac_objext conftest$ac_exeext
12528 if { (eval echo "$as_me:12528: \"$ac_link\"") >&5
12529   (eval $ac_link) 2>&5
12530   ac_status=$?
12531   echo "$as_me:12531: \$? = $ac_status" >&5
12532   (exit $ac_status); } &&
12533          { ac_try='test -s conftest$ac_exeext'
12534   { (eval echo "$as_me:12534: \"$ac_try\"") >&5
12535   (eval $ac_try) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); }; }; then
12539   ac_cv_func_regcomp=yes
12540 else
12541   echo "$as_me: failed program was:" >&5
12542 cat conftest.$ac_ext >&5
12543 ac_cv_func_regcomp=no
12544 fi
12545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12546 fi
12547 echo "$as_me:12547: result: $ac_cv_func_regcomp" >&5
12548 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12549 if test $ac_cv_func_regcomp = yes; then
12550   cf_regex_func=regcomp
12551 else
12552
12553         for cf_regex_lib in regex re
12554         do
12555                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12556 echo "$as_me:12556: checking for regcomp in -l$cf_regex_lib" >&5
12557 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12558 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12559   echo $ECHO_N "(cached) $ECHO_C" >&6
12560 else
12561   ac_check_lib_save_LIBS=$LIBS
12562 LIBS="-l$cf_regex_lib  $LIBS"
12563 cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566
12567 /* Override any gcc2 internal prototype to avoid an error.  */
12568 #ifdef __cplusplus
12569 extern "C"
12570 #endif
12571 /* We use char because int might match the return type of a gcc2
12572    builtin and then its argument prototype would still apply.  */
12573 char regcomp ();
12574 int
12575 main ()
12576 {
12577 regcomp ();
12578   ;
12579   return 0;
12580 }
12581 _ACEOF
12582 rm -f conftest.$ac_objext conftest$ac_exeext
12583 if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
12584   (eval $ac_link) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); } &&
12588          { ac_try='test -s conftest$ac_exeext'
12589   { (eval echo "$as_me:12589: \"$ac_try\"") >&5
12590   (eval $ac_try) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); }; }; then
12594   eval "$as_ac_Lib=yes"
12595 else
12596   echo "$as_me: failed program was:" >&5
12597 cat conftest.$ac_ext >&5
12598 eval "$as_ac_Lib=no"
12599 fi
12600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12601 LIBS=$ac_check_lib_save_LIBS
12602 fi
12603 echo "$as_me:12603: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12604 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12605 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12606
12607                                 LIBS="-l$cf_regex_lib $LIBS"
12608                                 cf_regex_func=regcomp
12609                                 break
12610 fi
12611
12612         done
12613
12614 fi
12615
12616 if test "$cf_regex_func" = no ; then
12617         echo "$as_me:12617: checking for compile" >&5
12618 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12619 if test "${ac_cv_func_compile+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622   cat >conftest.$ac_ext <<_ACEOF
12623 #line 12623 "configure"
12624 #include "confdefs.h"
12625 /* System header to define __stub macros and hopefully few prototypes,
12626     which can conflict with char compile (); below.  */
12627 #include <assert.h>
12628 /* Override any gcc2 internal prototype to avoid an error.  */
12629 #ifdef __cplusplus
12630 extern "C"
12631 #endif
12632 /* We use char because int might match the return type of a gcc2
12633    builtin and then its argument prototype would still apply.  */
12634 char compile ();
12635 char (*f) ();
12636
12637 int
12638 main ()
12639 {
12640 /* The GNU C library defines this for functions which it implements
12641     to always fail with ENOSYS.  Some functions are actually named
12642     something starting with __ and the normal name is an alias.  */
12643 #if defined (__stub_compile) || defined (__stub___compile)
12644 choke me
12645 #else
12646 f = compile;
12647 #endif
12648
12649   ;
12650   return 0;
12651 }
12652 _ACEOF
12653 rm -f conftest.$ac_objext conftest$ac_exeext
12654 if { (eval echo "$as_me:12654: \"$ac_link\"") >&5
12655   (eval $ac_link) 2>&5
12656   ac_status=$?
12657   echo "$as_me:12657: \$? = $ac_status" >&5
12658   (exit $ac_status); } &&
12659          { ac_try='test -s conftest$ac_exeext'
12660   { (eval echo "$as_me:12660: \"$ac_try\"") >&5
12661   (eval $ac_try) 2>&5
12662   ac_status=$?
12663   echo "$as_me:12663: \$? = $ac_status" >&5
12664   (exit $ac_status); }; }; then
12665   ac_cv_func_compile=yes
12666 else
12667   echo "$as_me: failed program was:" >&5
12668 cat conftest.$ac_ext >&5
12669 ac_cv_func_compile=no
12670 fi
12671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12672 fi
12673 echo "$as_me:12673: result: $ac_cv_func_compile" >&5
12674 echo "${ECHO_T}$ac_cv_func_compile" >&6
12675 if test $ac_cv_func_compile = yes; then
12676   cf_regex_func=compile
12677 else
12678
12679                 echo "$as_me:12679: checking for compile in -lgen" >&5
12680 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12681 if test "${ac_cv_lib_gen_compile+set}" = set; then
12682   echo $ECHO_N "(cached) $ECHO_C" >&6
12683 else
12684   ac_check_lib_save_LIBS=$LIBS
12685 LIBS="-lgen  $LIBS"
12686 cat >conftest.$ac_ext <<_ACEOF
12687 #line 12687 "configure"
12688 #include "confdefs.h"
12689
12690 /* Override any gcc2 internal prototype to avoid an error.  */
12691 #ifdef __cplusplus
12692 extern "C"
12693 #endif
12694 /* We use char because int might match the return type of a gcc2
12695    builtin and then its argument prototype would still apply.  */
12696 char compile ();
12697 int
12698 main ()
12699 {
12700 compile ();
12701   ;
12702   return 0;
12703 }
12704 _ACEOF
12705 rm -f conftest.$ac_objext conftest$ac_exeext
12706 if { (eval echo "$as_me:12706: \"$ac_link\"") >&5
12707   (eval $ac_link) 2>&5
12708   ac_status=$?
12709   echo "$as_me:12709: \$? = $ac_status" >&5
12710   (exit $ac_status); } &&
12711          { ac_try='test -s conftest$ac_exeext'
12712   { (eval echo "$as_me:12712: \"$ac_try\"") >&5
12713   (eval $ac_try) 2>&5
12714   ac_status=$?
12715   echo "$as_me:12715: \$? = $ac_status" >&5
12716   (exit $ac_status); }; }; then
12717   ac_cv_lib_gen_compile=yes
12718 else
12719   echo "$as_me: failed program was:" >&5
12720 cat conftest.$ac_ext >&5
12721 ac_cv_lib_gen_compile=no
12722 fi
12723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12724 LIBS=$ac_check_lib_save_LIBS
12725 fi
12726 echo "$as_me:12726: result: $ac_cv_lib_gen_compile" >&5
12727 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12728 if test $ac_cv_lib_gen_compile = yes; then
12729
12730                                 LIBS="-lgen $LIBS"
12731                                 cf_regex_func=compile
12732 fi
12733
12734 fi
12735
12736 fi
12737
12738 if test "$cf_regex_func" = no ; then
12739         { echo "$as_me:12739: WARNING: cannot find regular expression library" >&5
12740 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12741 fi
12742
12743 echo "$as_me:12743: checking for regular-expression headers" >&5
12744 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12745 if test "${cf_cv_regex_hdrs+set}" = set; then
12746   echo $ECHO_N "(cached) $ECHO_C" >&6
12747 else
12748
12749 cf_cv_regex_hdrs=no
12750 case $cf_regex_func in #(vi
12751 compile) #(vi
12752         for cf_regex_hdr in regexp.h regexpr.h
12753         do
12754                 cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757 #include <$cf_regex_hdr>
12758 int
12759 main ()
12760 {
12761
12762                         char *p = compile("", "", "", 0);
12763                         int x = step("", "");
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext conftest$ac_exeext
12770 if { (eval echo "$as_me:12770: \"$ac_link\"") >&5
12771   (eval $ac_link) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); } &&
12775          { ac_try='test -s conftest$ac_exeext'
12776   { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); }; }; then
12781
12782                         cf_cv_regex_hdrs=$cf_regex_hdr
12783                         break
12784
12785 else
12786   echo "$as_me: failed program was:" >&5
12787 cat conftest.$ac_ext >&5
12788 fi
12789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12790         done
12791         ;;
12792 *)
12793         for cf_regex_hdr in regex.h
12794         do
12795                 cat >conftest.$ac_ext <<_ACEOF
12796 #line 12796 "configure"
12797 #include "confdefs.h"
12798 #include <sys/types.h>
12799 #include <$cf_regex_hdr>
12800 int
12801 main ()
12802 {
12803
12804                         regex_t *p;
12805                         int x = regcomp(p, "", 0);
12806                         int y = regexec(p, "", 0, 0, 0);
12807                         regfree(p);
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext conftest$ac_exeext
12814 if { (eval echo "$as_me:12814: \"$ac_link\"") >&5
12815   (eval $ac_link) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest$ac_exeext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825
12826                         cf_cv_regex_hdrs=$cf_regex_hdr
12827                         break
12828
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 fi
12833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12834         done
12835         ;;
12836 esac
12837
12838 fi
12839 echo "$as_me:12839: result: $cf_cv_regex_hdrs" >&5
12840 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12841
12842 case $cf_cv_regex_hdrs in #(vi
12843     no)        { echo "$as_me:12843: WARNING: no regular expression header found" >&5
12844 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12845     regex.h)   cat >>confdefs.h <<\EOF
12846 #define HAVE_REGEX_H_FUNCS 1
12847 EOF
12848  ;; #(vi
12849     regexp.h)  cat >>confdefs.h <<\EOF
12850 #define HAVE_REGEXP_H_FUNCS 1
12851 EOF
12852  ;; #(vi
12853     regexpr.h) cat >>confdefs.h <<\EOF
12854 #define HAVE_REGEXPR_H_FUNCS 1
12855 EOF
12856  ;;
12857 esac
12858
12859 for ac_header in \
12860 fcntl.h \
12861 getopt.h \
12862 limits.h \
12863 locale.h \
12864 poll.h \
12865 sys/bsdtypes.h \
12866 sys/ioctl.h \
12867 sys/param.h \
12868 sys/poll.h \
12869 sys/select.h \
12870 sys/time.h \
12871 sys/times.h \
12872 ttyent.h \
12873 unistd.h \
12874 wctype.h \
12875
12876 do
12877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12878 echo "$as_me:12878: checking for $ac_header" >&5
12879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12881   echo $ECHO_N "(cached) $ECHO_C" >&6
12882 else
12883   cat >conftest.$ac_ext <<_ACEOF
12884 #line 12884 "configure"
12885 #include "confdefs.h"
12886 #include <$ac_header>
12887 _ACEOF
12888 if { (eval echo "$as_me:12888: \"$ac_cpp conftest.$ac_ext\"") >&5
12889   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12890   ac_status=$?
12891   egrep -v '^ *\+' conftest.er1 >conftest.err
12892   rm -f conftest.er1
12893   cat conftest.err >&5
12894   echo "$as_me:12894: \$? = $ac_status" >&5
12895   (exit $ac_status); } >/dev/null; then
12896   if test -s conftest.err; then
12897     ac_cpp_err=$ac_c_preproc_warn_flag
12898   else
12899     ac_cpp_err=
12900   fi
12901 else
12902   ac_cpp_err=yes
12903 fi
12904 if test -z "$ac_cpp_err"; then
12905   eval "$as_ac_Header=yes"
12906 else
12907   echo "$as_me: failed program was:" >&5
12908   cat conftest.$ac_ext >&5
12909   eval "$as_ac_Header=no"
12910 fi
12911 rm -f conftest.err conftest.$ac_ext
12912 fi
12913 echo "$as_me:12913: result: `eval echo '${'$as_ac_Header'}'`" >&5
12914 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12915 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12916   cat >>confdefs.h <<EOF
12917 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12918 EOF
12919
12920 fi
12921 done
12922
12923 # check for ISC (this may also define _POSIX_SOURCE)
12924 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12925 if test "$ISC" = yes ; then
12926
12927 echo "$as_me:12927: checking for main in -lcposix" >&5
12928 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12929 if test "${ac_cv_lib_cposix_main+set}" = set; then
12930   echo $ECHO_N "(cached) $ECHO_C" >&6
12931 else
12932   ac_check_lib_save_LIBS=$LIBS
12933 LIBS="-lcposix  $LIBS"
12934 cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937
12938 int
12939 main ()
12940 {
12941 main ();
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext conftest$ac_exeext
12947 if { (eval echo "$as_me:12947: \"$ac_link\"") >&5
12948   (eval $ac_link) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit $ac_status); } &&
12952          { ac_try='test -s conftest$ac_exeext'
12953   { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954   (eval $ac_try) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); }; }; then
12958   ac_cv_lib_cposix_main=yes
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat conftest.$ac_ext >&5
12962 ac_cv_lib_cposix_main=no
12963 fi
12964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12965 LIBS=$ac_check_lib_save_LIBS
12966 fi
12967 echo "$as_me:12967: result: $ac_cv_lib_cposix_main" >&5
12968 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12969 if test $ac_cv_lib_cposix_main = yes; then
12970   cat >>confdefs.h <<EOF
12971 #define HAVE_LIBCPOSIX 1
12972 EOF
12973
12974   LIBS="-lcposix $LIBS"
12975
12976 fi
12977
12978         echo "$as_me:12978: checking for bzero in -linet" >&5
12979 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12980 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12981   echo $ECHO_N "(cached) $ECHO_C" >&6
12982 else
12983   ac_check_lib_save_LIBS=$LIBS
12984 LIBS="-linet  $LIBS"
12985 cat >conftest.$ac_ext <<_ACEOF
12986 #line 12986 "configure"
12987 #include "confdefs.h"
12988
12989 /* Override any gcc2 internal prototype to avoid an error.  */
12990 #ifdef __cplusplus
12991 extern "C"
12992 #endif
12993 /* We use char because int might match the return type of a gcc2
12994    builtin and then its argument prototype would still apply.  */
12995 char bzero ();
12996 int
12997 main ()
12998 {
12999 bzero ();
13000   ;
13001   return 0;
13002 }
13003 _ACEOF
13004 rm -f conftest.$ac_objext conftest$ac_exeext
13005 if { (eval echo "$as_me:13005: \"$ac_link\"") >&5
13006   (eval $ac_link) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); } &&
13010          { ac_try='test -s conftest$ac_exeext'
13011   { (eval echo "$as_me:13011: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:13014: \$? = $ac_status" >&5
13015   (exit $ac_status); }; }; then
13016   ac_cv_lib_inet_bzero=yes
13017 else
13018   echo "$as_me: failed program was:" >&5
13019 cat conftest.$ac_ext >&5
13020 ac_cv_lib_inet_bzero=no
13021 fi
13022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13023 LIBS=$ac_check_lib_save_LIBS
13024 fi
13025 echo "$as_me:13025: result: $ac_cv_lib_inet_bzero" >&5
13026 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13027 if test $ac_cv_lib_inet_bzero = yes; then
13028   LIBS="$LIBS -linet"
13029 fi
13030 fi
13031
13032 echo "$as_me:13032: checking if sys/time.h works with sys/select.h" >&5
13033 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13034 if test "${cf_cv_sys_time_select+set}" = set; then
13035   echo $ECHO_N "(cached) $ECHO_C" >&6
13036 else
13037
13038 cat >conftest.$ac_ext <<_ACEOF
13039 #line 13039 "configure"
13040 #include "confdefs.h"
13041
13042 #include <sys/types.h>
13043 #ifdef HAVE_SYS_TIME_H
13044 #include <sys/time.h>
13045 #endif
13046 #ifdef HAVE_SYS_SELECT_H
13047 #include <sys/select.h>
13048 #endif
13049
13050 int
13051 main ()
13052 {
13053
13054   ;
13055   return 0;
13056 }
13057 _ACEOF
13058 rm -f conftest.$ac_objext
13059 if { (eval echo "$as_me:13059: \"$ac_compile\"") >&5
13060   (eval $ac_compile) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit $ac_status); } &&
13064          { ac_try='test -s conftest.$ac_objext'
13065   { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066   (eval $ac_try) 2>&5
13067   ac_status=$?
13068   echo "$as_me:13068: \$? = $ac_status" >&5
13069   (exit $ac_status); }; }; then
13070   cf_cv_sys_time_select=yes
13071 else
13072   echo "$as_me: failed program was:" >&5
13073 cat conftest.$ac_ext >&5
13074 cf_cv_sys_time_select=no
13075 fi
13076 rm -f conftest.$ac_objext conftest.$ac_ext
13077
13078 fi
13079
13080 echo "$as_me:13080: result: $cf_cv_sys_time_select" >&5
13081 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13082 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13083 #define HAVE_SYS_TIME_SELECT 1
13084 EOF
13085
13086 ###     checks for compiler characteristics
13087 ac_ext=c
13088 ac_cpp='$CPP $CPPFLAGS'
13089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13092 ac_main_return=return
13093
13094 echo "$as_me:13094: checking for $CC option to accept ANSI C" >&5
13095 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13096 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   ac_cv_prog_cc_stdc=no
13100 ac_save_CC=$CC
13101 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104 #include <stdarg.h>
13105 #include <stdio.h>
13106 #include <sys/types.h>
13107 #include <sys/stat.h>
13108 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13109 struct buf { int x; };
13110 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13111 static char *e (p, i)
13112      char **p;
13113      int i;
13114 {
13115   return p[i];
13116 }
13117 static char *f (char * (*g) (char **, int), char **p, ...)
13118 {
13119   char *s;
13120   va_list v;
13121   va_start (v,p);
13122   s = g (p, va_arg (v,int));
13123   va_end (v);
13124   return s;
13125 }
13126 int test (int i, double x);
13127 struct s1 {int (*f) (int a);};
13128 struct s2 {int (*f) (double a);};
13129 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13130 int argc;
13131 char **argv;
13132 int
13133 main ()
13134 {
13135 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13136   ;
13137   return 0;
13138 }
13139 _ACEOF
13140 # Don't try gcc -ansi; that turns off useful extensions and
13141 # breaks some systems' header files.
13142 # AIX                   -qlanglvl=ansi
13143 # Ultrix and OSF/1      -std1
13144 # HP-UX 10.20 and later -Ae
13145 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13146 # SVR4                  -Xc -D__EXTENSIONS__
13147 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13148 do
13149   CC="$ac_save_CC $ac_arg"
13150   rm -f conftest.$ac_objext
13151 if { (eval echo "$as_me:13151: \"$ac_compile\"") >&5
13152   (eval $ac_compile) 2>&5
13153   ac_status=$?
13154   echo "$as_me:13154: \$? = $ac_status" >&5
13155   (exit $ac_status); } &&
13156          { ac_try='test -s conftest.$ac_objext'
13157   { (eval echo "$as_me:13157: \"$ac_try\"") >&5
13158   (eval $ac_try) 2>&5
13159   ac_status=$?
13160   echo "$as_me:13160: \$? = $ac_status" >&5
13161   (exit $ac_status); }; }; then
13162   ac_cv_prog_cc_stdc=$ac_arg
13163 break
13164 else
13165   echo "$as_me: failed program was:" >&5
13166 cat conftest.$ac_ext >&5
13167 fi
13168 rm -f conftest.$ac_objext
13169 done
13170 rm -f conftest.$ac_ext conftest.$ac_objext
13171 CC=$ac_save_CC
13172
13173 fi
13174
13175 case "x$ac_cv_prog_cc_stdc" in
13176   x|xno)
13177     echo "$as_me:13177: result: none needed" >&5
13178 echo "${ECHO_T}none needed" >&6 ;;
13179   *)
13180     echo "$as_me:13180: result: $ac_cv_prog_cc_stdc" >&5
13181 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13182     CC="$CC $ac_cv_prog_cc_stdc" ;;
13183 esac
13184
13185 echo "$as_me:13185: checking for an ANSI C-conforming const" >&5
13186 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13187 if test "${ac_cv_c_const+set}" = set; then
13188   echo $ECHO_N "(cached) $ECHO_C" >&6
13189 else
13190   cat >conftest.$ac_ext <<_ACEOF
13191 #line 13191 "configure"
13192 #include "confdefs.h"
13193
13194 int
13195 main ()
13196 {
13197 /* FIXME: Include the comments suggested by Paul. */
13198 #ifndef __cplusplus
13199   /* Ultrix mips cc rejects this.  */
13200   typedef int charset[2];
13201   const charset x;
13202   /* SunOS 4.1.1 cc rejects this.  */
13203   char const *const *ccp;
13204   char **p;
13205   /* NEC SVR4.0.2 mips cc rejects this.  */
13206   struct point {int x, y;};
13207   static struct point const zero = {0,0};
13208   /* AIX XL C 1.02.0.0 rejects this.
13209      It does not let you subtract one const X* pointer from another in
13210      an arm of an if-expression whose if-part is not a constant
13211      expression */
13212   const char *g = "string";
13213   ccp = &g + (g ? g-g : 0);
13214   /* HPUX 7.0 cc rejects these. */
13215   ++ccp;
13216   p = (char**) ccp;
13217   ccp = (char const *const *) p;
13218   { /* SCO 3.2v4 cc rejects this.  */
13219     char *t;
13220     char const *s = 0 ? (char *) 0 : (char const *) 0;
13221
13222     *t++ = 0;
13223   }
13224   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13225     int x[] = {25, 17};
13226     const int *foo = &x[0];
13227     ++foo;
13228   }
13229   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13230     typedef const int *iptr;
13231     iptr p = 0;
13232     ++p;
13233   }
13234   { /* AIX XL C 1.02.0.0 rejects this saying
13235        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13236     struct s { int j; const int *ap[3]; };
13237     struct s *b; b->j = 5;
13238   }
13239   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13240     const int foo = 10;
13241   }
13242 #endif
13243
13244   ;
13245   return 0;
13246 }
13247 _ACEOF
13248 rm -f conftest.$ac_objext
13249 if { (eval echo "$as_me:13249: \"$ac_compile\"") >&5
13250   (eval $ac_compile) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit $ac_status); } &&
13254          { ac_try='test -s conftest.$ac_objext'
13255   { (eval echo "$as_me:13255: \"$ac_try\"") >&5
13256   (eval $ac_try) 2>&5
13257   ac_status=$?
13258   echo "$as_me:13258: \$? = $ac_status" >&5
13259   (exit $ac_status); }; }; then
13260   ac_cv_c_const=yes
13261 else
13262   echo "$as_me: failed program was:" >&5
13263 cat conftest.$ac_ext >&5
13264 ac_cv_c_const=no
13265 fi
13266 rm -f conftest.$ac_objext conftest.$ac_ext
13267 fi
13268 echo "$as_me:13268: result: $ac_cv_c_const" >&5
13269 echo "${ECHO_T}$ac_cv_c_const" >&6
13270 if test $ac_cv_c_const = no; then
13271
13272 cat >>confdefs.h <<\EOF
13273 #define const
13274 EOF
13275
13276 fi
13277
13278 echo "$as_me:13278: checking for inline" >&5
13279 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13280 if test "${ac_cv_c_inline+set}" = set; then
13281   echo $ECHO_N "(cached) $ECHO_C" >&6
13282 else
13283   ac_cv_c_inline=no
13284 for ac_kw in inline __inline__ __inline; do
13285   cat >conftest.$ac_ext <<_ACEOF
13286 #line 13286 "configure"
13287 #include "confdefs.h"
13288 #ifndef __cplusplus
13289 static $ac_kw int static_foo () {return 0; }
13290 $ac_kw int foo () {return 0; }
13291 #endif
13292
13293 _ACEOF
13294 rm -f conftest.$ac_objext
13295 if { (eval echo "$as_me:13295: \"$ac_compile\"") >&5
13296   (eval $ac_compile) 2>&5
13297   ac_status=$?
13298   echo "$as_me:13298: \$? = $ac_status" >&5
13299   (exit $ac_status); } &&
13300          { ac_try='test -s conftest.$ac_objext'
13301   { (eval echo "$as_me:13301: \"$ac_try\"") >&5
13302   (eval $ac_try) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); }; }; then
13306   ac_cv_c_inline=$ac_kw; break
13307 else
13308   echo "$as_me: failed program was:" >&5
13309 cat conftest.$ac_ext >&5
13310 fi
13311 rm -f conftest.$ac_objext conftest.$ac_ext
13312 done
13313
13314 fi
13315 echo "$as_me:13315: result: $ac_cv_c_inline" >&5
13316 echo "${ECHO_T}$ac_cv_c_inline" >&6
13317 case $ac_cv_c_inline in
13318   inline | yes) ;;
13319   no)
13320 cat >>confdefs.h <<\EOF
13321 #define inline
13322 EOF
13323  ;;
13324   *)  cat >>confdefs.h <<EOF
13325 #define inline $ac_cv_c_inline
13326 EOF
13327  ;;
13328 esac
13329
13330 NCURSES_INLINE=
13331 if test "$ac_cv_c_inline" != no ; then
13332   NCURSES_INLINE=inline
13333   if test "$INTEL_COMPILER" = yes
13334   then
13335     :
13336   elif test "$GCC" = yes
13337   then
13338     echo "$as_me:13338: checking if $CC supports options to tune inlining" >&5
13339 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13340 if test "${cf_cv_gcc_inline+set}" = set; then
13341   echo $ECHO_N "(cached) $ECHO_C" >&6
13342 else
13343
13344       cf_save_CFLAGS=$CFLAGS
13345       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13346       cat >conftest.$ac_ext <<_ACEOF
13347 #line 13347 "configure"
13348 #include "confdefs.h"
13349 inline int foo(void) { return 1; }
13350 int
13351 main ()
13352 {
13353 ${cf_cv_main_return:-return} foo()
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 rm -f conftest.$ac_objext
13359 if { (eval echo "$as_me:13359: \"$ac_compile\"") >&5
13360   (eval $ac_compile) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); } &&
13364          { ac_try='test -s conftest.$ac_objext'
13365   { (eval echo "$as_me:13365: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); }; }; then
13370   cf_cv_gcc_inline=yes
13371 else
13372   echo "$as_me: failed program was:" >&5
13373 cat conftest.$ac_ext >&5
13374 cf_cv_gcc_inline=no
13375 fi
13376 rm -f conftest.$ac_objext conftest.$ac_ext
13377       CFLAGS=$cf_save_CFLAGS
13378
13379 fi
13380 echo "$as_me:13380: result: $cf_cv_gcc_inline" >&5
13381 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13382     if test "$cf_cv_gcc_inline" = yes ; then
13383
13384 cf_fix_cppflags=no
13385 cf_new_cflags=
13386 cf_new_cppflags=
13387 cf_new_extra_cppflags=
13388
13389 for cf_add_cflags in --param max-inline-insns-single=1200
13390 do
13391 case $cf_fix_cppflags in
13392 no)
13393         case $cf_add_cflags in #(vi
13394         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13395                 case $cf_add_cflags in
13396                 -D*)
13397                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13398
13399                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13400                                 && test -z "${cf_tst_cflags}" \
13401                                 && cf_fix_cppflags=yes
13402
13403                         if test $cf_fix_cppflags = yes ; then
13404                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13405                                 continue
13406                         elif test "${cf_tst_cflags}" = "\"'" ; then
13407                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13408                                 continue
13409                         fi
13410                         ;;
13411                 esac
13412                 case "$CPPFLAGS" in
13413                 *$cf_add_cflags) #(vi
13414                         ;;
13415                 *) #(vi
13416                         case $cf_add_cflags in #(vi
13417                         -D*)
13418                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13419
13420 CPPFLAGS=`echo "$CPPFLAGS" | \
13421         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13422                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13423
13424                                 ;;
13425                         esac
13426                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13427                         ;;
13428                 esac
13429                 ;;
13430         *)
13431                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13432                 ;;
13433         esac
13434         ;;
13435 yes)
13436         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13437
13438         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13439
13440         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13441                 && test -z "${cf_tst_cflags}" \
13442                 && cf_fix_cppflags=no
13443         ;;
13444 esac
13445 done
13446
13447 if test -n "$cf_new_cflags" ; then
13448
13449         CFLAGS="$CFLAGS $cf_new_cflags"
13450 fi
13451
13452 if test -n "$cf_new_cppflags" ; then
13453
13454         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13455 fi
13456
13457 if test -n "$cf_new_extra_cppflags" ; then
13458
13459         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13460 fi
13461
13462     fi
13463   fi
13464 fi
13465
13466 echo "$as_me:13466: checking for signal global datatype" >&5
13467 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13468 if test "${cf_cv_sig_atomic_t+set}" = set; then
13469   echo $ECHO_N "(cached) $ECHO_C" >&6
13470 else
13471
13472         for cf_type in \
13473                 "volatile sig_atomic_t" \
13474                 "sig_atomic_t" \
13475                 "int"
13476         do
13477         cat >conftest.$ac_ext <<_ACEOF
13478 #line 13478 "configure"
13479 #include "confdefs.h"
13480
13481 #include <sys/types.h>
13482 #include <signal.h>
13483 #include <stdio.h>
13484
13485 extern $cf_type x;
13486 $cf_type x;
13487 static void handler(int sig)
13488 {
13489         x = 5;
13490 }
13491 int
13492 main ()
13493 {
13494 signal(SIGINT, handler);
13495                  x = 1
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 rm -f conftest.$ac_objext
13501 if { (eval echo "$as_me:13501: \"$ac_compile\"") >&5
13502   (eval $ac_compile) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); } &&
13506          { ac_try='test -s conftest.$ac_objext'
13507   { (eval echo "$as_me:13507: \"$ac_try\"") >&5
13508   (eval $ac_try) 2>&5
13509   ac_status=$?
13510   echo "$as_me:13510: \$? = $ac_status" >&5
13511   (exit $ac_status); }; }; then
13512   cf_cv_sig_atomic_t=$cf_type
13513 else
13514   echo "$as_me: failed program was:" >&5
13515 cat conftest.$ac_ext >&5
13516 cf_cv_sig_atomic_t=no
13517 fi
13518 rm -f conftest.$ac_objext conftest.$ac_ext
13519                 test "$cf_cv_sig_atomic_t" != no && break
13520         done
13521
13522 fi
13523
13524 echo "$as_me:13524: result: $cf_cv_sig_atomic_t" >&5
13525 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13526 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13527 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13528 EOF
13529
13530 if test $NCURSES_CHTYPE = auto ; then
13531
13532 echo "$as_me:13532: checking for type of chtype" >&5
13533 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13534 if test "${cf_cv_typeof_chtype+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537
13538                 if test "$cross_compiling" = yes; then
13539   cf_cv_typeof_chtype=long
13540 else
13541   cat >conftest.$ac_ext <<_ACEOF
13542 #line 13542 "configure"
13543 #include "confdefs.h"
13544
13545 #define WANT_BITS 31
13546 #include <stdio.h>
13547 int main()
13548 {
13549         FILE *fp = fopen("cf_test.out", "w");
13550         if (fp != 0) {
13551                 char *result = "long";
13552                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13553                         int n;
13554                         unsigned int x, y;
13555                         for (n = 0; n < WANT_BITS; n++) {
13556                                 x = (1 << n);
13557                                 y = (x >> n);
13558                                 if (y != 1 || x == 0) {
13559                                         x = 0;
13560                                         break;
13561                                 }
13562                         }
13563                         /*
13564                          * If x is nonzero, an int is big enough for the bits
13565                          * that we want.
13566                          */
13567                         result = (x != 0) ? "int" : "long";
13568                 }
13569                 fputs(result, fp);
13570                 fclose(fp);
13571         }
13572         ${cf_cv_main_return:-return}(0);
13573 }
13574
13575 _ACEOF
13576 rm -f conftest$ac_exeext
13577 if { (eval echo "$as_me:13577: \"$ac_link\"") >&5
13578   (eval $ac_link) 2>&5
13579   ac_status=$?
13580   echo "$as_me:13580: \$? = $ac_status" >&5
13581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13582   { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583   (eval $ac_try) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); }; }; then
13587   cf_cv_typeof_chtype=`cat cf_test.out`
13588 else
13589   echo "$as_me: program exited with status $ac_status" >&5
13590 echo "$as_me: failed program was:" >&5
13591 cat conftest.$ac_ext >&5
13592 cf_cv_typeof_chtype=long
13593 fi
13594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13595 fi
13596                 rm -f cf_test.out
13597
13598 fi
13599
13600 echo "$as_me:13600: result: $cf_cv_typeof_chtype" >&5
13601 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13602
13603 cat >>confdefs.h <<EOF
13604 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13605 EOF
13606
13607 else
13608         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13609 fi
13610 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13611
13612 echo "$as_me:13612: checking if unsigned literals are legal" >&5
13613 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13614 if test "${cf_cv_unsigned_literals+set}" = set; then
13615   echo $ECHO_N "(cached) $ECHO_C" >&6
13616 else
13617
13618         cat >conftest.$ac_ext <<_ACEOF
13619 #line 13619 "configure"
13620 #include "confdefs.h"
13621
13622 int
13623 main ()
13624 {
13625 long x = 1L + 1UL + 1U + 1
13626   ;
13627   return 0;
13628 }
13629 _ACEOF
13630 rm -f conftest.$ac_objext
13631 if { (eval echo "$as_me:13631: \"$ac_compile\"") >&5
13632   (eval $ac_compile) 2>&5
13633   ac_status=$?
13634   echo "$as_me:13634: \$? = $ac_status" >&5
13635   (exit $ac_status); } &&
13636          { ac_try='test -s conftest.$ac_objext'
13637   { (eval echo "$as_me:13637: \"$ac_try\"") >&5
13638   (eval $ac_try) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); }; }; then
13642   cf_cv_unsigned_literals=yes
13643 else
13644   echo "$as_me: failed program was:" >&5
13645 cat conftest.$ac_ext >&5
13646 cf_cv_unsigned_literals=no
13647 fi
13648 rm -f conftest.$ac_objext conftest.$ac_ext
13649
13650 fi
13651
13652 echo "$as_me:13652: result: $cf_cv_unsigned_literals" >&5
13653 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13654
13655 cf_cv_1UL="1"
13656 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13657 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13658
13659 if test $NCURSES_MMASK_T = auto ; then
13660         cf_cv_typeof_mmask_t=long
13661 else
13662         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13663 fi
13664 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13665
13666 ###     Checks for external-data
13667
13668 echo "$as_me:13668: checking if external errno is declared" >&5
13669 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13670 if test "${cf_cv_dcl_errno+set}" = set; then
13671   echo $ECHO_N "(cached) $ECHO_C" >&6
13672 else
13673
13674     cat >conftest.$ac_ext <<_ACEOF
13675 #line 13675 "configure"
13676 #include "confdefs.h"
13677
13678 #ifdef HAVE_STDLIB_H
13679 #include <stdlib.h>
13680 #endif
13681 #include <stdio.h>
13682 #include <sys/types.h>
13683 #include <errno.h>
13684 int
13685 main ()
13686 {
13687 int x = (int) errno
13688   ;
13689   return 0;
13690 }
13691 _ACEOF
13692 rm -f conftest.$ac_objext
13693 if { (eval echo "$as_me:13693: \"$ac_compile\"") >&5
13694   (eval $ac_compile) 2>&5
13695   ac_status=$?
13696   echo "$as_me:13696: \$? = $ac_status" >&5
13697   (exit $ac_status); } &&
13698          { ac_try='test -s conftest.$ac_objext'
13699   { (eval echo "$as_me:13699: \"$ac_try\"") >&5
13700   (eval $ac_try) 2>&5
13701   ac_status=$?
13702   echo "$as_me:13702: \$? = $ac_status" >&5
13703   (exit $ac_status); }; }; then
13704   cf_cv_dcl_errno=yes
13705 else
13706   echo "$as_me: failed program was:" >&5
13707 cat conftest.$ac_ext >&5
13708 cf_cv_dcl_errno=no
13709 fi
13710 rm -f conftest.$ac_objext conftest.$ac_ext
13711
13712 fi
13713 echo "$as_me:13713: result: $cf_cv_dcl_errno" >&5
13714 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13715
13716 if test "$cf_cv_dcl_errno" = no ; then
13717
13718 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13719
13720     cat >>confdefs.h <<EOF
13721 #define $cf_result 1
13722 EOF
13723
13724 fi
13725
13726 # It's possible (for near-UNIX clones) that the data doesn't exist
13727
13728 echo "$as_me:13728: checking if external errno exists" >&5
13729 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13730 if test "${cf_cv_have_errno+set}" = set; then
13731   echo $ECHO_N "(cached) $ECHO_C" >&6
13732 else
13733
13734     cat >conftest.$ac_ext <<_ACEOF
13735 #line 13735 "configure"
13736 #include "confdefs.h"
13737
13738 #undef errno
13739 extern int errno;
13740
13741 int
13742 main ()
13743 {
13744 errno = 2
13745   ;
13746   return 0;
13747 }
13748 _ACEOF
13749 rm -f conftest.$ac_objext conftest$ac_exeext
13750 if { (eval echo "$as_me:13750: \"$ac_link\"") >&5
13751   (eval $ac_link) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit $ac_status); } &&
13755          { ac_try='test -s conftest$ac_exeext'
13756   { (eval echo "$as_me:13756: \"$ac_try\"") >&5
13757   (eval $ac_try) 2>&5
13758   ac_status=$?
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit $ac_status); }; }; then
13761   cf_cv_have_errno=yes
13762 else
13763   echo "$as_me: failed program was:" >&5
13764 cat conftest.$ac_ext >&5
13765 cf_cv_have_errno=no
13766 fi
13767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13768
13769 fi
13770 echo "$as_me:13770: result: $cf_cv_have_errno" >&5
13771 echo "${ECHO_T}$cf_cv_have_errno" >&6
13772
13773 if test "$cf_cv_have_errno" = yes ; then
13774
13775 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13776
13777     cat >>confdefs.h <<EOF
13778 #define $cf_result 1
13779 EOF
13780
13781 fi
13782
13783 echo "$as_me:13783: checking if data-only library module links" >&5
13784 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13785 if test "${cf_cv_link_dataonly+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788
13789         rm -f conftest.a
13790         cat >conftest.$ac_ext <<EOF
13791 #line 13791 "configure"
13792 int     testdata[3] = { 123, 456, 789 };
13793 EOF
13794         if { (eval echo "$as_me:13794: \"$ac_compile\"") >&5
13795   (eval $ac_compile) 2>&5
13796   ac_status=$?
13797   echo "$as_me:13797: \$? = $ac_status" >&5
13798   (exit $ac_status); } ; then
13799                 mv conftest.o data.o && \
13800                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13801         fi
13802         rm -f conftest.$ac_ext data.o
13803         cat >conftest.$ac_ext <<EOF
13804 #line 13804 "configure"
13805 int     testfunc()
13806 {
13807 #if defined(NeXT)
13808         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13809 #else
13810         extern int testdata[3];
13811         return testdata[0] == 123
13812            &&  testdata[1] == 456
13813            &&  testdata[2] == 789;
13814 #endif
13815 }
13816 EOF
13817         if { (eval echo "$as_me:13817: \"$ac_compile\"") >&5
13818   (eval $ac_compile) 2>&5
13819   ac_status=$?
13820   echo "$as_me:13820: \$? = $ac_status" >&5
13821   (exit $ac_status); }; then
13822                 mv conftest.o func.o && \
13823                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13824         fi
13825         rm -f conftest.$ac_ext func.o
13826         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13827         cf_saveLIBS="$LIBS"
13828         LIBS="conftest.a $LIBS"
13829         if test "$cross_compiling" = yes; then
13830   cf_cv_link_dataonly=unknown
13831 else
13832   cat >conftest.$ac_ext <<_ACEOF
13833 #line 13833 "configure"
13834 #include "confdefs.h"
13835
13836         int main()
13837         {
13838                 extern int testfunc();
13839                 ${cf_cv_main_return:-return} (!testfunc());
13840         }
13841
13842 _ACEOF
13843 rm -f conftest$ac_exeext
13844 if { (eval echo "$as_me:13844: \"$ac_link\"") >&5
13845   (eval $ac_link) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit $ac_status); }; }; then
13854   cf_cv_link_dataonly=yes
13855 else
13856   echo "$as_me: program exited with status $ac_status" >&5
13857 echo "$as_me: failed program was:" >&5
13858 cat conftest.$ac_ext >&5
13859 cf_cv_link_dataonly=no
13860 fi
13861 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13862 fi
13863         LIBS="$cf_saveLIBS"
13864
13865 fi
13866
13867 echo "$as_me:13867: result: $cf_cv_link_dataonly" >&5
13868 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13869
13870 if test "$cf_cv_link_dataonly" = no ; then
13871         cat >>confdefs.h <<\EOF
13872 #define BROKEN_LINKER 1
13873 EOF
13874
13875         BROKEN_LINKER=1
13876 fi
13877
13878 ###     Checks for library functions.
13879
13880 for ac_func in \
13881 getcwd \
13882 getegid \
13883 geteuid \
13884 getttynam \
13885 issetugid \
13886 poll \
13887 remove \
13888 select \
13889 setbuf \
13890 setbuffer \
13891 setvbuf \
13892 sigaction \
13893 sigvec \
13894 strdup \
13895 strstr \
13896 tcgetpgrp \
13897 times \
13898 vsnprintf \
13899
13900 do
13901 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13902 echo "$as_me:13902: checking for $ac_func" >&5
13903 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13904 if eval "test \"\${$as_ac_var+set}\" = set"; then
13905   echo $ECHO_N "(cached) $ECHO_C" >&6
13906 else
13907   cat >conftest.$ac_ext <<_ACEOF
13908 #line 13908 "configure"
13909 #include "confdefs.h"
13910 /* System header to define __stub macros and hopefully few prototypes,
13911     which can conflict with char $ac_func (); below.  */
13912 #include <assert.h>
13913 /* Override any gcc2 internal prototype to avoid an error.  */
13914 #ifdef __cplusplus
13915 extern "C"
13916 #endif
13917 /* We use char because int might match the return type of a gcc2
13918    builtin and then its argument prototype would still apply.  */
13919 char $ac_func ();
13920 char (*f) ();
13921
13922 int
13923 main ()
13924 {
13925 /* The GNU C library defines this for functions which it implements
13926     to always fail with ENOSYS.  Some functions are actually named
13927     something starting with __ and the normal name is an alias.  */
13928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13929 choke me
13930 #else
13931 f = $ac_func;
13932 #endif
13933
13934   ;
13935   return 0;
13936 }
13937 _ACEOF
13938 rm -f conftest.$ac_objext conftest$ac_exeext
13939 if { (eval echo "$as_me:13939: \"$ac_link\"") >&5
13940   (eval $ac_link) 2>&5
13941   ac_status=$?
13942   echo "$as_me:13942: \$? = $ac_status" >&5
13943   (exit $ac_status); } &&
13944          { ac_try='test -s conftest$ac_exeext'
13945   { (eval echo "$as_me:13945: \"$ac_try\"") >&5
13946   (eval $ac_try) 2>&5
13947   ac_status=$?
13948   echo "$as_me:13948: \$? = $ac_status" >&5
13949   (exit $ac_status); }; }; then
13950   eval "$as_ac_var=yes"
13951 else
13952   echo "$as_me: failed program was:" >&5
13953 cat conftest.$ac_ext >&5
13954 eval "$as_ac_var=no"
13955 fi
13956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13957 fi
13958 echo "$as_me:13958: result: `eval echo '${'$as_ac_var'}'`" >&5
13959 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13960 if test `eval echo '${'$as_ac_var'}'` = yes; then
13961   cat >>confdefs.h <<EOF
13962 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13963 EOF
13964
13965 fi
13966 done
13967
13968 if test "$with_getcap" = "yes" ; then
13969
13970 echo "$as_me:13970: checking for terminal-capability database functions" >&5
13971 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13972 if test "${cf_cv_cgetent+set}" = set; then
13973   echo $ECHO_N "(cached) $ECHO_C" >&6
13974 else
13975
13976 cat >conftest.$ac_ext <<_ACEOF
13977 #line 13977 "configure"
13978 #include "confdefs.h"
13979
13980 #include <stdlib.h>
13981 int
13982 main ()
13983 {
13984
13985         char temp[128];
13986         char *buf = temp;
13987         char *db_array = temp;
13988         cgetent(&buf, /* int *, */ &db_array, "vt100");
13989         cgetcap(buf, "tc", '=');
13990         cgetmatch(buf, "tc");
13991
13992   ;
13993   return 0;
13994 }
13995 _ACEOF
13996 rm -f conftest.$ac_objext conftest$ac_exeext
13997 if { (eval echo "$as_me:13997: \"$ac_link\"") >&5
13998   (eval $ac_link) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); } &&
14002          { ac_try='test -s conftest$ac_exeext'
14003   { (eval echo "$as_me:14003: \"$ac_try\"") >&5
14004   (eval $ac_try) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit $ac_status); }; }; then
14008   cf_cv_cgetent=yes
14009 else
14010   echo "$as_me: failed program was:" >&5
14011 cat conftest.$ac_ext >&5
14012 cf_cv_cgetent=no
14013 fi
14014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14015
14016 fi
14017
14018 echo "$as_me:14018: result: $cf_cv_cgetent" >&5
14019 echo "${ECHO_T}$cf_cv_cgetent" >&6
14020 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14021 #define HAVE_BSD_CGETENT 1
14022 EOF
14023
14024 fi
14025
14026 echo "$as_me:14026: checking for isascii" >&5
14027 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14028 if test "${cf_cv_have_isascii+set}" = set; then
14029   echo $ECHO_N "(cached) $ECHO_C" >&6
14030 else
14031
14032         cat >conftest.$ac_ext <<_ACEOF
14033 #line 14033 "configure"
14034 #include "confdefs.h"
14035 #include <ctype.h>
14036 int
14037 main ()
14038 {
14039 int x = isascii(' ')
14040   ;
14041   return 0;
14042 }
14043 _ACEOF
14044 rm -f conftest.$ac_objext conftest$ac_exeext
14045 if { (eval echo "$as_me:14045: \"$ac_link\"") >&5
14046   (eval $ac_link) 2>&5
14047   ac_status=$?
14048   echo "$as_me:14048: \$? = $ac_status" >&5
14049   (exit $ac_status); } &&
14050          { ac_try='test -s conftest$ac_exeext'
14051   { (eval echo "$as_me:14051: \"$ac_try\"") >&5
14052   (eval $ac_try) 2>&5
14053   ac_status=$?
14054   echo "$as_me:14054: \$? = $ac_status" >&5
14055   (exit $ac_status); }; }; then
14056   cf_cv_have_isascii=yes
14057 else
14058   echo "$as_me: failed program was:" >&5
14059 cat conftest.$ac_ext >&5
14060 cf_cv_have_isascii=no
14061 fi
14062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14063
14064 fi
14065 echo "$as_me:14065: result: $cf_cv_have_isascii" >&5
14066 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14067 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14068 #define HAVE_ISASCII 1
14069 EOF
14070
14071 if test "$ac_cv_func_sigaction" = yes; then
14072 echo "$as_me:14072: checking whether sigaction needs _POSIX_SOURCE" >&5
14073 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14074 cat >conftest.$ac_ext <<_ACEOF
14075 #line 14075 "configure"
14076 #include "confdefs.h"
14077
14078 #include <sys/types.h>
14079 #include <signal.h>
14080 int
14081 main ()
14082 {
14083 struct sigaction act
14084   ;
14085   return 0;
14086 }
14087 _ACEOF
14088 rm -f conftest.$ac_objext
14089 if { (eval echo "$as_me:14089: \"$ac_compile\"") >&5
14090   (eval $ac_compile) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit $ac_status); } &&
14094          { ac_try='test -s conftest.$ac_objext'
14095   { (eval echo "$as_me:14095: \"$ac_try\"") >&5
14096   (eval $ac_try) 2>&5
14097   ac_status=$?
14098   echo "$as_me:14098: \$? = $ac_status" >&5
14099   (exit $ac_status); }; }; then
14100   sigact_bad=no
14101 else
14102   echo "$as_me: failed program was:" >&5
14103 cat conftest.$ac_ext >&5
14104
14105 cat >conftest.$ac_ext <<_ACEOF
14106 #line 14106 "configure"
14107 #include "confdefs.h"
14108
14109 #define _POSIX_SOURCE
14110 #include <sys/types.h>
14111 #include <signal.h>
14112 int
14113 main ()
14114 {
14115 struct sigaction act
14116   ;
14117   return 0;
14118 }
14119 _ACEOF
14120 rm -f conftest.$ac_objext
14121 if { (eval echo "$as_me:14121: \"$ac_compile\"") >&5
14122   (eval $ac_compile) 2>&5
14123   ac_status=$?
14124   echo "$as_me:14124: \$? = $ac_status" >&5
14125   (exit $ac_status); } &&
14126          { ac_try='test -s conftest.$ac_objext'
14127   { (eval echo "$as_me:14127: \"$ac_try\"") >&5
14128   (eval $ac_try) 2>&5
14129   ac_status=$?
14130   echo "$as_me:14130: \$? = $ac_status" >&5
14131   (exit $ac_status); }; }; then
14132   sigact_bad=yes
14133          cat >>confdefs.h <<\EOF
14134 #define SVR4_ACTION 1
14135 EOF
14136
14137 else
14138   echo "$as_me: failed program was:" >&5
14139 cat conftest.$ac_ext >&5
14140 sigact_bad=unknown
14141 fi
14142 rm -f conftest.$ac_objext conftest.$ac_ext
14143 fi
14144 rm -f conftest.$ac_objext conftest.$ac_ext
14145 echo "$as_me:14145: result: $sigact_bad" >&5
14146 echo "${ECHO_T}$sigact_bad" >&6
14147 fi
14148
14149 echo "$as_me:14149: checking if nanosleep really works" >&5
14150 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14151 if test "${cf_cv_func_nanosleep+set}" = set; then
14152   echo $ECHO_N "(cached) $ECHO_C" >&6
14153 else
14154
14155 if test "$cross_compiling" = yes; then
14156   cf_cv_func_nanosleep=unknown
14157 else
14158   cat >conftest.$ac_ext <<_ACEOF
14159 #line 14159 "configure"
14160 #include "confdefs.h"
14161
14162 #include <stdio.h>
14163 #include <errno.h>
14164 #include <time.h>
14165
14166 #ifdef HAVE_SYS_TIME_H
14167 #include <sys/time.h>
14168 #endif
14169
14170 int main() {
14171         struct timespec ts1, ts2;
14172         int code;
14173         ts1.tv_sec  = 0;
14174         ts1.tv_nsec = 750000000;
14175         ts2.tv_sec  = 0;
14176         ts2.tv_nsec = 0;
14177         errno = 0;
14178         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14179         ${cf_cv_main_return:-return}(code != 0);
14180 }
14181
14182 _ACEOF
14183 rm -f conftest$ac_exeext
14184 if { (eval echo "$as_me:14184: \"$ac_link\"") >&5
14185   (eval $ac_link) 2>&5
14186   ac_status=$?
14187   echo "$as_me:14187: \$? = $ac_status" >&5
14188   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14189   { (eval echo "$as_me:14189: \"$ac_try\"") >&5
14190   (eval $ac_try) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); }; }; then
14194   cf_cv_func_nanosleep=yes
14195 else
14196   echo "$as_me: program exited with status $ac_status" >&5
14197 echo "$as_me: failed program was:" >&5
14198 cat conftest.$ac_ext >&5
14199 cf_cv_func_nanosleep=no
14200 fi
14201 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14202 fi
14203 fi
14204 echo "$as_me:14204: result: $cf_cv_func_nanosleep" >&5
14205 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14206
14207 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14208 #define HAVE_NANOSLEEP 1
14209 EOF
14210
14211 for ac_header in \
14212 termio.h \
14213 termios.h \
14214 unistd.h \
14215
14216 do
14217 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14218 echo "$as_me:14218: checking for $ac_header" >&5
14219 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14220 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14221   echo $ECHO_N "(cached) $ECHO_C" >&6
14222 else
14223   cat >conftest.$ac_ext <<_ACEOF
14224 #line 14224 "configure"
14225 #include "confdefs.h"
14226 #include <$ac_header>
14227 _ACEOF
14228 if { (eval echo "$as_me:14228: \"$ac_cpp conftest.$ac_ext\"") >&5
14229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14230   ac_status=$?
14231   egrep -v '^ *\+' conftest.er1 >conftest.err
14232   rm -f conftest.er1
14233   cat conftest.err >&5
14234   echo "$as_me:14234: \$? = $ac_status" >&5
14235   (exit $ac_status); } >/dev/null; then
14236   if test -s conftest.err; then
14237     ac_cpp_err=$ac_c_preproc_warn_flag
14238   else
14239     ac_cpp_err=
14240   fi
14241 else
14242   ac_cpp_err=yes
14243 fi
14244 if test -z "$ac_cpp_err"; then
14245   eval "$as_ac_Header=yes"
14246 else
14247   echo "$as_me: failed program was:" >&5
14248   cat conftest.$ac_ext >&5
14249   eval "$as_ac_Header=no"
14250 fi
14251 rm -f conftest.err conftest.$ac_ext
14252 fi
14253 echo "$as_me:14253: result: `eval echo '${'$as_ac_Header'}'`" >&5
14254 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14255 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14256   cat >>confdefs.h <<EOF
14257 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14258 EOF
14259
14260 fi
14261 done
14262
14263 if test "$ISC" = yes ; then
14264
14265 for ac_header in sys/termio.h
14266 do
14267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14268 echo "$as_me:14268: checking for $ac_header" >&5
14269 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14270 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14271   echo $ECHO_N "(cached) $ECHO_C" >&6
14272 else
14273   cat >conftest.$ac_ext <<_ACEOF
14274 #line 14274 "configure"
14275 #include "confdefs.h"
14276 #include <$ac_header>
14277 _ACEOF
14278 if { (eval echo "$as_me:14278: \"$ac_cpp conftest.$ac_ext\"") >&5
14279   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14280   ac_status=$?
14281   egrep -v '^ *\+' conftest.er1 >conftest.err
14282   rm -f conftest.er1
14283   cat conftest.err >&5
14284   echo "$as_me:14284: \$? = $ac_status" >&5
14285   (exit $ac_status); } >/dev/null; then
14286   if test -s conftest.err; then
14287     ac_cpp_err=$ac_c_preproc_warn_flag
14288   else
14289     ac_cpp_err=
14290   fi
14291 else
14292   ac_cpp_err=yes
14293 fi
14294 if test -z "$ac_cpp_err"; then
14295   eval "$as_ac_Header=yes"
14296 else
14297   echo "$as_me: failed program was:" >&5
14298   cat conftest.$ac_ext >&5
14299   eval "$as_ac_Header=no"
14300 fi
14301 rm -f conftest.err conftest.$ac_ext
14302 fi
14303 echo "$as_me:14303: result: `eval echo '${'$as_ac_Header'}'`" >&5
14304 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14305 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14306   cat >>confdefs.h <<EOF
14307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14308 EOF
14309
14310 fi
14311 done
14312
14313 fi
14314 if test "$ac_cv_header_termios_h" = yes ; then
14315         case "$CFLAGS $CPPFLAGS" in
14316         *-D_POSIX_SOURCE*)
14317                 termios_bad=dunno ;;
14318         *)      termios_bad=maybe ;;
14319         esac
14320         if test "$termios_bad" = maybe ; then
14321         echo "$as_me:14321: checking whether termios.h needs _POSIX_SOURCE" >&5
14322 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14323         cat >conftest.$ac_ext <<_ACEOF
14324 #line 14324 "configure"
14325 #include "confdefs.h"
14326 #include <termios.h>
14327 int
14328 main ()
14329 {
14330 struct termios foo; int x = foo.c_iflag
14331   ;
14332   return 0;
14333 }
14334 _ACEOF
14335 rm -f conftest.$ac_objext
14336 if { (eval echo "$as_me:14336: \"$ac_compile\"") >&5
14337   (eval $ac_compile) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); } &&
14341          { ac_try='test -s conftest.$ac_objext'
14342   { (eval echo "$as_me:14342: \"$ac_try\"") >&5
14343   (eval $ac_try) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit $ac_status); }; }; then
14347   termios_bad=no
14348 else
14349   echo "$as_me: failed program was:" >&5
14350 cat conftest.$ac_ext >&5
14351
14352                 cat >conftest.$ac_ext <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355
14356 #define _POSIX_SOURCE
14357 #include <termios.h>
14358 int
14359 main ()
14360 {
14361 struct termios foo; int x = foo.c_iflag
14362   ;
14363   return 0;
14364 }
14365 _ACEOF
14366 rm -f conftest.$ac_objext
14367 if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368   (eval $ac_compile) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); } &&
14372          { ac_try='test -s conftest.$ac_objext'
14373   { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374   (eval $ac_try) 2>&5
14375   ac_status=$?
14376   echo "$as_me:14376: \$? = $ac_status" >&5
14377   (exit $ac_status); }; }; then
14378   termios_bad=unknown
14379 else
14380   echo "$as_me: failed program was:" >&5
14381 cat conftest.$ac_ext >&5
14382 termios_bad=yes cat >>confdefs.h <<\EOF
14383 #define SVR4_TERMIO 1
14384 EOF
14385
14386 fi
14387 rm -f conftest.$ac_objext conftest.$ac_ext
14388
14389 fi
14390 rm -f conftest.$ac_objext conftest.$ac_ext
14391         echo "$as_me:14391: result: $termios_bad" >&5
14392 echo "${ECHO_T}$termios_bad" >&6
14393         fi
14394 fi
14395
14396 echo "$as_me:14396: checking for tcgetattr" >&5
14397 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14398 if test "${cf_cv_have_tcgetattr+set}" = set; then
14399   echo $ECHO_N "(cached) $ECHO_C" >&6
14400 else
14401
14402 cat >conftest.$ac_ext <<_ACEOF
14403 #line 14403 "configure"
14404 #include "confdefs.h"
14405
14406 #include <sys/types.h>
14407 #ifdef HAVE_UNISTD_H
14408 #include <unistd.h>
14409 #endif
14410 #ifdef HAVE_TERMIOS_H
14411 #include <termios.h>
14412 #define TTY struct termios
14413 #else
14414 #ifdef HAVE_TERMIO_H
14415 #include <termio.h>
14416 #define TTY struct termio
14417 #endif
14418 #endif
14419
14420 int
14421 main ()
14422 {
14423
14424 TTY foo;
14425 tcgetattr(1, &foo);
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f conftest.$ac_objext conftest$ac_exeext
14431 if { (eval echo "$as_me:14431: \"$ac_link\"") >&5
14432   (eval $ac_link) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); } &&
14436          { ac_try='test -s conftest$ac_exeext'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   cf_cv_have_tcgetattr=yes
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 cat conftest.$ac_ext >&5
14446 cf_cv_have_tcgetattr=no
14447 fi
14448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14449 fi
14450 echo "$as_me:14450: result: $cf_cv_have_tcgetattr" >&5
14451 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14452 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14453 #define HAVE_TCGETATTR 1
14454 EOF
14455
14456 echo "$as_me:14456: checking for vsscanf function or workaround" >&5
14457 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14458 if test "${cf_cv_func_vsscanf+set}" = set; then
14459   echo $ECHO_N "(cached) $ECHO_C" >&6
14460 else
14461
14462 cat >conftest.$ac_ext <<_ACEOF
14463 #line 14463 "configure"
14464 #include "confdefs.h"
14465
14466 #include <stdarg.h>
14467 #include <stdio.h>
14468 int
14469 main ()
14470 {
14471
14472         va_list ap;
14473         vsscanf("from", "%d", ap)
14474   ;
14475   return 0;
14476 }
14477 _ACEOF
14478 rm -f conftest.$ac_objext conftest$ac_exeext
14479 if { (eval echo "$as_me:14479: \"$ac_link\"") >&5
14480   (eval $ac_link) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); } &&
14484          { ac_try='test -s conftest$ac_exeext'
14485   { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486   (eval $ac_try) 2>&5
14487   ac_status=$?
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); }; }; then
14490   cf_cv_func_vsscanf=vsscanf
14491 else
14492   echo "$as_me: failed program was:" >&5
14493 cat conftest.$ac_ext >&5
14494
14495 cat >conftest.$ac_ext <<_ACEOF
14496 #line 14496 "configure"
14497 #include "confdefs.h"
14498
14499 #include <stdarg.h>
14500 #include <stdio.h>
14501 int
14502 main ()
14503 {
14504
14505     FILE strbuf;
14506     char *str = "from";
14507
14508     strbuf._flag = _IOREAD;
14509     strbuf._ptr = strbuf._base = (unsigned char *) str;
14510     strbuf._cnt = strlen(str);
14511     strbuf._file = _NFILE;
14512     return (vfscanf(&strbuf, "%d", ap))
14513   ;
14514   return 0;
14515 }
14516 _ACEOF
14517 rm -f conftest.$ac_objext conftest$ac_exeext
14518 if { (eval echo "$as_me:14518: \"$ac_link\"") >&5
14519   (eval $ac_link) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); } &&
14523          { ac_try='test -s conftest$ac_exeext'
14524   { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525   (eval $ac_try) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); }; }; then
14529   cf_cv_func_vsscanf=vfscanf
14530 else
14531   echo "$as_me: failed program was:" >&5
14532 cat conftest.$ac_ext >&5
14533
14534 cat >conftest.$ac_ext <<_ACEOF
14535 #line 14535 "configure"
14536 #include "confdefs.h"
14537
14538 #include <stdarg.h>
14539 #include <stdio.h>
14540 int
14541 main ()
14542 {
14543
14544     FILE strbuf;
14545     char *str = "from";
14546
14547     strbuf._flag = _IOREAD;
14548     strbuf._ptr = strbuf._base = (unsigned char *) str;
14549     strbuf._cnt = strlen(str);
14550     strbuf._file = _NFILE;
14551     return (_doscan(&strbuf, "%d", ap))
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 rm -f conftest.$ac_objext conftest$ac_exeext
14557 if { (eval echo "$as_me:14557: \"$ac_link\"") >&5
14558   (eval $ac_link) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); } &&
14562          { ac_try='test -s conftest$ac_exeext'
14563   { (eval echo "$as_me:14563: \"$ac_try\"") >&5
14564   (eval $ac_try) 2>&5
14565   ac_status=$?
14566   echo "$as_me:14566: \$? = $ac_status" >&5
14567   (exit $ac_status); }; }; then
14568   cf_cv_func_vsscanf=_doscan
14569 else
14570   echo "$as_me: failed program was:" >&5
14571 cat conftest.$ac_ext >&5
14572
14573 cf_cv_func_vsscanf=no
14574 fi
14575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14576 fi
14577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14578 fi
14579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14580 fi
14581 echo "$as_me:14581: result: $cf_cv_func_vsscanf" >&5
14582 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14583
14584 case $cf_cv_func_vsscanf in #(vi
14585 vsscanf) cat >>confdefs.h <<\EOF
14586 #define HAVE_VSSCANF 1
14587 EOF
14588 ;; #(vi
14589 vfscanf) cat >>confdefs.h <<\EOF
14590 #define HAVE_VFSCANF 1
14591 EOF
14592 ;; #(vi
14593 _doscan) cat >>confdefs.h <<\EOF
14594 #define HAVE__DOSCAN 1
14595 EOF
14596 ;;
14597 esac
14598
14599 echo "$as_me:14599: checking for working mkstemp" >&5
14600 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14601 if test "${cf_cv_func_mkstemp+set}" = set; then
14602   echo $ECHO_N "(cached) $ECHO_C" >&6
14603 else
14604
14605 rm -f conftest*
14606 if test "$cross_compiling" = yes; then
14607   echo "$as_me:14607: checking for mkstemp" >&5
14608 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14609 if test "${ac_cv_func_mkstemp+set}" = set; then
14610   echo $ECHO_N "(cached) $ECHO_C" >&6
14611 else
14612   cat >conftest.$ac_ext <<_ACEOF
14613 #line 14613 "configure"
14614 #include "confdefs.h"
14615 /* System header to define __stub macros and hopefully few prototypes,
14616     which can conflict with char mkstemp (); below.  */
14617 #include <assert.h>
14618 /* Override any gcc2 internal prototype to avoid an error.  */
14619 #ifdef __cplusplus
14620 extern "C"
14621 #endif
14622 /* We use char because int might match the return type of a gcc2
14623    builtin and then its argument prototype would still apply.  */
14624 char mkstemp ();
14625 char (*f) ();
14626
14627 int
14628 main ()
14629 {
14630 /* The GNU C library defines this for functions which it implements
14631     to always fail with ENOSYS.  Some functions are actually named
14632     something starting with __ and the normal name is an alias.  */
14633 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14634 choke me
14635 #else
14636 f = mkstemp;
14637 #endif
14638
14639   ;
14640   return 0;
14641 }
14642 _ACEOF
14643 rm -f conftest.$ac_objext conftest$ac_exeext
14644 if { (eval echo "$as_me:14644: \"$ac_link\"") >&5
14645   (eval $ac_link) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); } &&
14649          { ac_try='test -s conftest$ac_exeext'
14650   { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651   (eval $ac_try) 2>&5
14652   ac_status=$?
14653   echo "$as_me:14653: \$? = $ac_status" >&5
14654   (exit $ac_status); }; }; then
14655   ac_cv_func_mkstemp=yes
14656 else
14657   echo "$as_me: failed program was:" >&5
14658 cat conftest.$ac_ext >&5
14659 ac_cv_func_mkstemp=no
14660 fi
14661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14662 fi
14663 echo "$as_me:14663: result: $ac_cv_func_mkstemp" >&5
14664 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14665
14666 else
14667   cat >conftest.$ac_ext <<_ACEOF
14668 #line 14668 "configure"
14669 #include "confdefs.h"
14670
14671 #include <sys/types.h>
14672 #include <stdlib.h>
14673 #include <stdio.h>
14674 #include <string.h>
14675 #include <sys/stat.h>
14676 int main()
14677 {
14678         char *tmpl = "conftestXXXXXX";
14679         char name[2][80];
14680         int n;
14681         int result = 0;
14682         int fd;
14683         struct stat sb;
14684
14685         umask(077);
14686         for (n = 0; n < 2; ++n) {
14687                 strcpy(name[n], tmpl);
14688                 if ((fd = mkstemp(name[n])) >= 0) {
14689                         if (!strcmp(name[n], tmpl)
14690                          || stat(name[n], &sb) != 0
14691                          || (sb.st_mode & S_IFMT) != S_IFREG
14692                          || (sb.st_mode & 077) != 0) {
14693                                 result = 1;
14694                         }
14695                         close(fd);
14696                 }
14697         }
14698         if (result == 0
14699          && !strcmp(name[0], name[1]))
14700                 result = 1;
14701         ${cf_cv_main_return:-return}(result);
14702 }
14703
14704 _ACEOF
14705 rm -f conftest$ac_exeext
14706 if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
14707   (eval $ac_link) 2>&5
14708   ac_status=$?
14709   echo "$as_me:14709: \$? = $ac_status" >&5
14710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14711   { (eval echo "$as_me:14711: \"$ac_try\"") >&5
14712   (eval $ac_try) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); }; }; then
14716   cf_cv_func_mkstemp=yes
14717
14718 else
14719   echo "$as_me: program exited with status $ac_status" >&5
14720 echo "$as_me: failed program was:" >&5
14721 cat conftest.$ac_ext >&5
14722 cf_cv_func_mkstemp=no
14723
14724 fi
14725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14726 fi
14727
14728 fi
14729 echo "$as_me:14729: result: $cf_cv_func_mkstemp" >&5
14730 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14731 if test "$cf_cv_func_mkstemp" = yes ; then
14732         cat >>confdefs.h <<\EOF
14733 #define HAVE_MKSTEMP 1
14734 EOF
14735
14736 fi
14737
14738 # setup for prototype of fallback for vsscanf()
14739
14740 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14741         HAVE_VSSCANF=1
14742 else
14743         HAVE_VSSCANF=0
14744 fi
14745
14746 if test "$cross_compiling" = yes ; then
14747         { echo "$as_me:14747: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14748 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14749 else
14750         echo "$as_me:14750: checking whether setvbuf arguments are reversed" >&5
14751 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14752 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14753   echo $ECHO_N "(cached) $ECHO_C" >&6
14754 else
14755   if test "$cross_compiling" = yes; then
14756   { { echo "$as_me:14756: error: cannot run test program while cross compiling" >&5
14757 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14758    { (exit 1); exit 1; }; }
14759 else
14760   cat >conftest.$ac_ext <<_ACEOF
14761 #line 14761 "configure"
14762 #include "confdefs.h"
14763 #include <stdio.h>
14764 /* If setvbuf has the reversed format, exit 0. */
14765 int
14766 main ()
14767 {
14768   /* This call has the arguments reversed.
14769      A reversed system may check and see that the address of main
14770      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14771   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14772     $ac_main_return(1);
14773   putc('\r', stdout);
14774   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14775 }
14776 _ACEOF
14777 rm -f conftest$ac_exeext
14778 if { (eval echo "$as_me:14778: \"$ac_link\"") >&5
14779   (eval $ac_link) 2>&5
14780   ac_status=$?
14781   echo "$as_me:14781: \$? = $ac_status" >&5
14782   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14783   { (eval echo "$as_me:14783: \"$ac_try\"") >&5
14784   (eval $ac_try) 2>&5
14785   ac_status=$?
14786   echo "$as_me:14786: \$? = $ac_status" >&5
14787   (exit $ac_status); }; }; then
14788   ac_cv_func_setvbuf_reversed=yes
14789 else
14790   echo "$as_me: program exited with status $ac_status" >&5
14791 echo "$as_me: failed program was:" >&5
14792 cat conftest.$ac_ext >&5
14793 ac_cv_func_setvbuf_reversed=no
14794 fi
14795 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14796 fi
14797 rm -f core core.* *.core
14798 fi
14799 echo "$as_me:14799: result: $ac_cv_func_setvbuf_reversed" >&5
14800 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14801 if test $ac_cv_func_setvbuf_reversed = yes; then
14802
14803 cat >>confdefs.h <<\EOF
14804 #define SETVBUF_REVERSED 1
14805 EOF
14806
14807 fi
14808
14809 fi
14810 echo "$as_me:14810: checking return type of signal handlers" >&5
14811 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14812 if test "${ac_cv_type_signal+set}" = set; then
14813   echo $ECHO_N "(cached) $ECHO_C" >&6
14814 else
14815   cat >conftest.$ac_ext <<_ACEOF
14816 #line 14816 "configure"
14817 #include "confdefs.h"
14818 #include <sys/types.h>
14819 #include <signal.h>
14820 #ifdef signal
14821 # undef signal
14822 #endif
14823 #ifdef __cplusplus
14824 extern "C" void (*signal (int, void (*)(int)))(int);
14825 #else
14826 void (*signal ()) ();
14827 #endif
14828
14829 int
14830 main ()
14831 {
14832 int i;
14833   ;
14834   return 0;
14835 }
14836 _ACEOF
14837 rm -f conftest.$ac_objext
14838 if { (eval echo "$as_me:14838: \"$ac_compile\"") >&5
14839   (eval $ac_compile) 2>&5
14840   ac_status=$?
14841   echo "$as_me:14841: \$? = $ac_status" >&5
14842   (exit $ac_status); } &&
14843          { ac_try='test -s conftest.$ac_objext'
14844   { (eval echo "$as_me:14844: \"$ac_try\"") >&5
14845   (eval $ac_try) 2>&5
14846   ac_status=$?
14847   echo "$as_me:14847: \$? = $ac_status" >&5
14848   (exit $ac_status); }; }; then
14849   ac_cv_type_signal=void
14850 else
14851   echo "$as_me: failed program was:" >&5
14852 cat conftest.$ac_ext >&5
14853 ac_cv_type_signal=int
14854 fi
14855 rm -f conftest.$ac_objext conftest.$ac_ext
14856 fi
14857 echo "$as_me:14857: result: $ac_cv_type_signal" >&5
14858 echo "${ECHO_T}$ac_cv_type_signal" >&6
14859
14860 cat >>confdefs.h <<EOF
14861 #define RETSIGTYPE $ac_cv_type_signal
14862 EOF
14863
14864 echo "$as_me:14864: checking for type sigaction_t" >&5
14865 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14866 if test "${cf_cv_type_sigaction+set}" = set; then
14867   echo $ECHO_N "(cached) $ECHO_C" >&6
14868 else
14869
14870         cat >conftest.$ac_ext <<_ACEOF
14871 #line 14871 "configure"
14872 #include "confdefs.h"
14873
14874 #include <signal.h>
14875 int
14876 main ()
14877 {
14878 sigaction_t x
14879   ;
14880   return 0;
14881 }
14882 _ACEOF
14883 rm -f conftest.$ac_objext
14884 if { (eval echo "$as_me:14884: \"$ac_compile\"") >&5
14885   (eval $ac_compile) 2>&5
14886   ac_status=$?
14887   echo "$as_me:14887: \$? = $ac_status" >&5
14888   (exit $ac_status); } &&
14889          { ac_try='test -s conftest.$ac_objext'
14890   { (eval echo "$as_me:14890: \"$ac_try\"") >&5
14891   (eval $ac_try) 2>&5
14892   ac_status=$?
14893   echo "$as_me:14893: \$? = $ac_status" >&5
14894   (exit $ac_status); }; }; then
14895   cf_cv_type_sigaction=yes
14896 else
14897   echo "$as_me: failed program was:" >&5
14898 cat conftest.$ac_ext >&5
14899 cf_cv_type_sigaction=no
14900 fi
14901 rm -f conftest.$ac_objext conftest.$ac_ext
14902 fi
14903
14904 echo "$as_me:14904: result: $cf_cv_type_sigaction" >&5
14905 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14906 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14907 #define HAVE_TYPE_SIGACTION 1
14908 EOF
14909
14910 echo "$as_me:14910: checking declaration of size-change" >&5
14911 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14912 if test "${cf_cv_sizechange+set}" = set; then
14913   echo $ECHO_N "(cached) $ECHO_C" >&6
14914 else
14915
14916     cf_cv_sizechange=unknown
14917     cf_save_CPPFLAGS="$CPPFLAGS"
14918
14919 for cf_opts in "" "NEED_PTEM_H"
14920 do
14921
14922     CPPFLAGS="$cf_save_CPPFLAGS"
14923     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14924     cat >conftest.$ac_ext <<_ACEOF
14925 #line 14925 "configure"
14926 #include "confdefs.h"
14927 #include <sys/types.h>
14928 #ifdef HAVE_TERMIOS_H
14929 #include <termios.h>
14930 #else
14931 #ifdef HAVE_TERMIO_H
14932 #include <termio.h>
14933 #endif
14934 #endif
14935 #ifdef NEED_PTEM_H
14936 /* This is a workaround for SCO:  they neglected to define struct winsize in
14937  * termios.h -- it's only in termio.h and ptem.h
14938  */
14939 #include        <sys/stream.h>
14940 #include        <sys/ptem.h>
14941 #endif
14942 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14943 #include <sys/ioctl.h>
14944 #endif
14945
14946 int
14947 main ()
14948 {
14949
14950 #ifdef TIOCGSIZE
14951         struct ttysize win;     /* FIXME: what system is this? */
14952         int y = win.ts_lines;
14953         int x = win.ts_cols;
14954 #else
14955 #ifdef TIOCGWINSZ
14956         struct winsize win;
14957         int y = win.ws_row;
14958         int x = win.ws_col;
14959 #else
14960         no TIOCGSIZE or TIOCGWINSZ
14961 #endif /* TIOCGWINSZ */
14962 #endif /* TIOCGSIZE */
14963
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 rm -f conftest.$ac_objext
14969 if { (eval echo "$as_me:14969: \"$ac_compile\"") >&5
14970   (eval $ac_compile) 2>&5
14971   ac_status=$?
14972   echo "$as_me:14972: \$? = $ac_status" >&5
14973   (exit $ac_status); } &&
14974          { ac_try='test -s conftest.$ac_objext'
14975   { (eval echo "$as_me:14975: \"$ac_try\"") >&5
14976   (eval $ac_try) 2>&5
14977   ac_status=$?
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit $ac_status); }; }; then
14980   cf_cv_sizechange=yes
14981 else
14982   echo "$as_me: failed program was:" >&5
14983 cat conftest.$ac_ext >&5
14984 cf_cv_sizechange=no
14985 fi
14986 rm -f conftest.$ac_objext conftest.$ac_ext
14987
14988         CPPFLAGS="$cf_save_CPPFLAGS"
14989         if test "$cf_cv_sizechange" = yes ; then
14990                 echo "size-change succeeded ($cf_opts)" >&5
14991                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14992                 break
14993         fi
14994 done
14995
14996 fi
14997 echo "$as_me:14997: result: $cf_cv_sizechange" >&5
14998 echo "${ECHO_T}$cf_cv_sizechange" >&6
14999 if test "$cf_cv_sizechange" != no ; then
15000         cat >>confdefs.h <<\EOF
15001 #define HAVE_SIZECHANGE 1
15002 EOF
15003
15004         case $cf_cv_sizechange in #(vi
15005         NEED*)
15006                 cat >>confdefs.h <<EOF
15007 #define $cf_cv_sizechange  1
15008 EOF
15009
15010                 ;;
15011         esac
15012 fi
15013
15014 echo "$as_me:15014: checking for memmove" >&5
15015 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15016 if test "${ac_cv_func_memmove+set}" = set; then
15017   echo $ECHO_N "(cached) $ECHO_C" >&6
15018 else
15019   cat >conftest.$ac_ext <<_ACEOF
15020 #line 15020 "configure"
15021 #include "confdefs.h"
15022 /* System header to define __stub macros and hopefully few prototypes,
15023     which can conflict with char memmove (); below.  */
15024 #include <assert.h>
15025 /* Override any gcc2 internal prototype to avoid an error.  */
15026 #ifdef __cplusplus
15027 extern "C"
15028 #endif
15029 /* We use char because int might match the return type of a gcc2
15030    builtin and then its argument prototype would still apply.  */
15031 char memmove ();
15032 char (*f) ();
15033
15034 int
15035 main ()
15036 {
15037 /* The GNU C library defines this for functions which it implements
15038     to always fail with ENOSYS.  Some functions are actually named
15039     something starting with __ and the normal name is an alias.  */
15040 #if defined (__stub_memmove) || defined (__stub___memmove)
15041 choke me
15042 #else
15043 f = memmove;
15044 #endif
15045
15046   ;
15047   return 0;
15048 }
15049 _ACEOF
15050 rm -f conftest.$ac_objext conftest$ac_exeext
15051 if { (eval echo "$as_me:15051: \"$ac_link\"") >&5
15052   (eval $ac_link) 2>&5
15053   ac_status=$?
15054   echo "$as_me:15054: \$? = $ac_status" >&5
15055   (exit $ac_status); } &&
15056          { ac_try='test -s conftest$ac_exeext'
15057   { (eval echo "$as_me:15057: \"$ac_try\"") >&5
15058   (eval $ac_try) 2>&5
15059   ac_status=$?
15060   echo "$as_me:15060: \$? = $ac_status" >&5
15061   (exit $ac_status); }; }; then
15062   ac_cv_func_memmove=yes
15063 else
15064   echo "$as_me: failed program was:" >&5
15065 cat conftest.$ac_ext >&5
15066 ac_cv_func_memmove=no
15067 fi
15068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15069 fi
15070 echo "$as_me:15070: result: $ac_cv_func_memmove" >&5
15071 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15072 if test $ac_cv_func_memmove = yes; then
15073   :
15074 else
15075
15076 echo "$as_me:15076: checking for bcopy" >&5
15077 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15078 if test "${ac_cv_func_bcopy+set}" = set; then
15079   echo $ECHO_N "(cached) $ECHO_C" >&6
15080 else
15081   cat >conftest.$ac_ext <<_ACEOF
15082 #line 15082 "configure"
15083 #include "confdefs.h"
15084 /* System header to define __stub macros and hopefully few prototypes,
15085     which can conflict with char bcopy (); below.  */
15086 #include <assert.h>
15087 /* Override any gcc2 internal prototype to avoid an error.  */
15088 #ifdef __cplusplus
15089 extern "C"
15090 #endif
15091 /* We use char because int might match the return type of a gcc2
15092    builtin and then its argument prototype would still apply.  */
15093 char bcopy ();
15094 char (*f) ();
15095
15096 int
15097 main ()
15098 {
15099 /* The GNU C library defines this for functions which it implements
15100     to always fail with ENOSYS.  Some functions are actually named
15101     something starting with __ and the normal name is an alias.  */
15102 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15103 choke me
15104 #else
15105 f = bcopy;
15106 #endif
15107
15108   ;
15109   return 0;
15110 }
15111 _ACEOF
15112 rm -f conftest.$ac_objext conftest$ac_exeext
15113 if { (eval echo "$as_me:15113: \"$ac_link\"") >&5
15114   (eval $ac_link) 2>&5
15115   ac_status=$?
15116   echo "$as_me:15116: \$? = $ac_status" >&5
15117   (exit $ac_status); } &&
15118          { ac_try='test -s conftest$ac_exeext'
15119   { (eval echo "$as_me:15119: \"$ac_try\"") >&5
15120   (eval $ac_try) 2>&5
15121   ac_status=$?
15122   echo "$as_me:15122: \$? = $ac_status" >&5
15123   (exit $ac_status); }; }; then
15124   ac_cv_func_bcopy=yes
15125 else
15126   echo "$as_me: failed program was:" >&5
15127 cat conftest.$ac_ext >&5
15128 ac_cv_func_bcopy=no
15129 fi
15130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15131 fi
15132 echo "$as_me:15132: result: $ac_cv_func_bcopy" >&5
15133 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15134 if test $ac_cv_func_bcopy = yes; then
15135
15136         echo "$as_me:15136: checking if bcopy does overlapping moves" >&5
15137 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15138 if test "${cf_cv_good_bcopy+set}" = set; then
15139   echo $ECHO_N "(cached) $ECHO_C" >&6
15140 else
15141
15142                 if test "$cross_compiling" = yes; then
15143   cf_cv_good_bcopy=unknown
15144 else
15145   cat >conftest.$ac_ext <<_ACEOF
15146 #line 15146 "configure"
15147 #include "confdefs.h"
15148
15149 int main() {
15150         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15151         char temp[40];
15152         bcopy(data, temp, sizeof(data));
15153         bcopy(temp+10, temp, 15);
15154         bcopy(temp+5, temp+15, 10);
15155         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15156 }
15157
15158 _ACEOF
15159 rm -f conftest$ac_exeext
15160 if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
15161   (eval $ac_link) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15165   { (eval echo "$as_me:15165: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:15168: \$? = $ac_status" >&5
15169   (exit $ac_status); }; }; then
15170   cf_cv_good_bcopy=yes
15171 else
15172   echo "$as_me: program exited with status $ac_status" >&5
15173 echo "$as_me: failed program was:" >&5
15174 cat conftest.$ac_ext >&5
15175 cf_cv_good_bcopy=no
15176 fi
15177 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15178 fi
15179
15180 fi
15181 echo "$as_me:15181: result: $cf_cv_good_bcopy" >&5
15182 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15183
15184 else
15185   cf_cv_good_bcopy=no
15186 fi
15187
15188         if test "$cf_cv_good_bcopy" = yes ; then
15189                 cat >>confdefs.h <<\EOF
15190 #define USE_OK_BCOPY 1
15191 EOF
15192
15193         else
15194                 cat >>confdefs.h <<\EOF
15195 #define USE_MY_MEMMOVE 1
15196 EOF
15197
15198         fi
15199
15200 fi
15201
15202 echo "$as_me:15202: checking if poll really works" >&5
15203 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15204 if test "${cf_cv_working_poll+set}" = set; then
15205   echo $ECHO_N "(cached) $ECHO_C" >&6
15206 else
15207
15208 if test "$cross_compiling" = yes; then
15209   cf_cv_working_poll=unknown
15210 else
15211   cat >conftest.$ac_ext <<_ACEOF
15212 #line 15212 "configure"
15213 #include "confdefs.h"
15214
15215 #include <stdio.h>
15216 #ifdef HAVE_POLL_H
15217 #include <poll.h>
15218 #else
15219 #include <sys/poll.h>
15220 #endif
15221 int main() {
15222         struct pollfd myfds;
15223         int ret;
15224
15225         myfds.fd = 0;
15226         myfds.events = POLLIN;
15227
15228         ret = poll(&myfds, 1, 100);
15229         ${cf_cv_main_return:-return}(ret != 0);
15230 }
15231 _ACEOF
15232 rm -f conftest$ac_exeext
15233 if { (eval echo "$as_me:15233: \"$ac_link\"") >&5
15234   (eval $ac_link) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15238   { (eval echo "$as_me:15238: \"$ac_try\"") >&5
15239   (eval $ac_try) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); }; }; then
15243   cf_cv_working_poll=yes
15244 else
15245   echo "$as_me: program exited with status $ac_status" >&5
15246 echo "$as_me: failed program was:" >&5
15247 cat conftest.$ac_ext >&5
15248 cf_cv_working_poll=no
15249 fi
15250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15251 fi
15252 fi
15253 echo "$as_me:15253: result: $cf_cv_working_poll" >&5
15254 echo "${ECHO_T}$cf_cv_working_poll" >&6
15255 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15256 #define HAVE_WORKING_POLL 1
15257 EOF
15258
15259 echo "$as_me:15259: checking for va_copy" >&5
15260 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15261 if test "${cf_cv_have_va_copy+set}" = set; then
15262   echo $ECHO_N "(cached) $ECHO_C" >&6
15263 else
15264
15265 cat >conftest.$ac_ext <<_ACEOF
15266 #line 15266 "configure"
15267 #include "confdefs.h"
15268
15269 #include <stdarg.h>
15270
15271 int
15272 main ()
15273 {
15274
15275         static va_list dst;
15276         static va_list src;
15277         va_copy(dst, src)
15278   ;
15279   return 0;
15280 }
15281 _ACEOF
15282 rm -f conftest.$ac_objext conftest$ac_exeext
15283 if { (eval echo "$as_me:15283: \"$ac_link\"") >&5
15284   (eval $ac_link) 2>&5
15285   ac_status=$?
15286   echo "$as_me:15286: \$? = $ac_status" >&5
15287   (exit $ac_status); } &&
15288          { ac_try='test -s conftest$ac_exeext'
15289   { (eval echo "$as_me:15289: \"$ac_try\"") >&5
15290   (eval $ac_try) 2>&5
15291   ac_status=$?
15292   echo "$as_me:15292: \$? = $ac_status" >&5
15293   (exit $ac_status); }; }; then
15294   cf_cv_have_va_copy=yes
15295 else
15296   echo "$as_me: failed program was:" >&5
15297 cat conftest.$ac_ext >&5
15298 cf_cv_have_va_copy=no
15299 fi
15300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15301 fi
15302 echo "$as_me:15302: result: $cf_cv_have_va_copy" >&5
15303 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15304
15305 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15306 #define HAVE_VA_COPY 1
15307 EOF
15308
15309 echo "$as_me:15309: checking for __va_copy" >&5
15310 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15311 if test "${cf_cv_have___va_copy+set}" = set; then
15312   echo $ECHO_N "(cached) $ECHO_C" >&6
15313 else
15314
15315 cat >conftest.$ac_ext <<_ACEOF
15316 #line 15316 "configure"
15317 #include "confdefs.h"
15318
15319 #include <stdarg.h>
15320
15321 int
15322 main ()
15323 {
15324
15325         static va_list dst;
15326         static va_list src;
15327         __va_copy(dst, src)
15328   ;
15329   return 0;
15330 }
15331 _ACEOF
15332 rm -f conftest.$ac_objext conftest$ac_exeext
15333 if { (eval echo "$as_me:15333: \"$ac_link\"") >&5
15334   (eval $ac_link) 2>&5
15335   ac_status=$?
15336   echo "$as_me:15336: \$? = $ac_status" >&5
15337   (exit $ac_status); } &&
15338          { ac_try='test -s conftest$ac_exeext'
15339   { (eval echo "$as_me:15339: \"$ac_try\"") >&5
15340   (eval $ac_try) 2>&5
15341   ac_status=$?
15342   echo "$as_me:15342: \$? = $ac_status" >&5
15343   (exit $ac_status); }; }; then
15344   cf_cv_have___va_copy=yes
15345 else
15346   echo "$as_me: failed program was:" >&5
15347 cat conftest.$ac_ext >&5
15348 cf_cv_have___va_copy=no
15349 fi
15350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15351 fi
15352 echo "$as_me:15352: result: $cf_cv_have___va_copy" >&5
15353 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15354
15355 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15356 #define HAVE___VA_COPY 1
15357 EOF
15358
15359 echo "$as_me:15359: checking for pid_t" >&5
15360 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15361 if test "${ac_cv_type_pid_t+set}" = set; then
15362   echo $ECHO_N "(cached) $ECHO_C" >&6
15363 else
15364   cat >conftest.$ac_ext <<_ACEOF
15365 #line 15365 "configure"
15366 #include "confdefs.h"
15367 $ac_includes_default
15368 int
15369 main ()
15370 {
15371 if ((pid_t *) 0)
15372   return 0;
15373 if (sizeof (pid_t))
15374   return 0;
15375   ;
15376   return 0;
15377 }
15378 _ACEOF
15379 rm -f conftest.$ac_objext
15380 if { (eval echo "$as_me:15380: \"$ac_compile\"") >&5
15381   (eval $ac_compile) 2>&5
15382   ac_status=$?
15383   echo "$as_me:15383: \$? = $ac_status" >&5
15384   (exit $ac_status); } &&
15385          { ac_try='test -s conftest.$ac_objext'
15386   { (eval echo "$as_me:15386: \"$ac_try\"") >&5
15387   (eval $ac_try) 2>&5
15388   ac_status=$?
15389   echo "$as_me:15389: \$? = $ac_status" >&5
15390   (exit $ac_status); }; }; then
15391   ac_cv_type_pid_t=yes
15392 else
15393   echo "$as_me: failed program was:" >&5
15394 cat conftest.$ac_ext >&5
15395 ac_cv_type_pid_t=no
15396 fi
15397 rm -f conftest.$ac_objext conftest.$ac_ext
15398 fi
15399 echo "$as_me:15399: result: $ac_cv_type_pid_t" >&5
15400 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15401 if test $ac_cv_type_pid_t = yes; then
15402   :
15403 else
15404
15405 cat >>confdefs.h <<EOF
15406 #define pid_t int
15407 EOF
15408
15409 fi
15410
15411 for ac_header in unistd.h vfork.h
15412 do
15413 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15414 echo "$as_me:15414: checking for $ac_header" >&5
15415 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15416 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15417   echo $ECHO_N "(cached) $ECHO_C" >&6
15418 else
15419   cat >conftest.$ac_ext <<_ACEOF
15420 #line 15420 "configure"
15421 #include "confdefs.h"
15422 #include <$ac_header>
15423 _ACEOF
15424 if { (eval echo "$as_me:15424: \"$ac_cpp conftest.$ac_ext\"") >&5
15425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15426   ac_status=$?
15427   egrep -v '^ *\+' conftest.er1 >conftest.err
15428   rm -f conftest.er1
15429   cat conftest.err >&5
15430   echo "$as_me:15430: \$? = $ac_status" >&5
15431   (exit $ac_status); } >/dev/null; then
15432   if test -s conftest.err; then
15433     ac_cpp_err=$ac_c_preproc_warn_flag
15434   else
15435     ac_cpp_err=
15436   fi
15437 else
15438   ac_cpp_err=yes
15439 fi
15440 if test -z "$ac_cpp_err"; then
15441   eval "$as_ac_Header=yes"
15442 else
15443   echo "$as_me: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   eval "$as_ac_Header=no"
15446 fi
15447 rm -f conftest.err conftest.$ac_ext
15448 fi
15449 echo "$as_me:15449: result: `eval echo '${'$as_ac_Header'}'`" >&5
15450 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15451 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15452   cat >>confdefs.h <<EOF
15453 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15454 EOF
15455
15456 fi
15457 done
15458
15459 for ac_func in fork vfork
15460 do
15461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15462 echo "$as_me:15462: checking for $ac_func" >&5
15463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15464 if eval "test \"\${$as_ac_var+set}\" = set"; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   cat >conftest.$ac_ext <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470 /* System header to define __stub macros and hopefully few prototypes,
15471     which can conflict with char $ac_func (); below.  */
15472 #include <assert.h>
15473 /* Override any gcc2 internal prototype to avoid an error.  */
15474 #ifdef __cplusplus
15475 extern "C"
15476 #endif
15477 /* We use char because int might match the return type of a gcc2
15478    builtin and then its argument prototype would still apply.  */
15479 char $ac_func ();
15480 char (*f) ();
15481
15482 int
15483 main ()
15484 {
15485 /* The GNU C library defines this for functions which it implements
15486     to always fail with ENOSYS.  Some functions are actually named
15487     something starting with __ and the normal name is an alias.  */
15488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15489 choke me
15490 #else
15491 f = $ac_func;
15492 #endif
15493
15494   ;
15495   return 0;
15496 }
15497 _ACEOF
15498 rm -f conftest.$ac_objext conftest$ac_exeext
15499 if { (eval echo "$as_me:15499: \"$ac_link\"") >&5
15500   (eval $ac_link) 2>&5
15501   ac_status=$?
15502   echo "$as_me:15502: \$? = $ac_status" >&5
15503   (exit $ac_status); } &&
15504          { ac_try='test -s conftest$ac_exeext'
15505   { (eval echo "$as_me:15505: \"$ac_try\"") >&5
15506   (eval $ac_try) 2>&5
15507   ac_status=$?
15508   echo "$as_me:15508: \$? = $ac_status" >&5
15509   (exit $ac_status); }; }; then
15510   eval "$as_ac_var=yes"
15511 else
15512   echo "$as_me: failed program was:" >&5
15513 cat conftest.$ac_ext >&5
15514 eval "$as_ac_var=no"
15515 fi
15516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15517 fi
15518 echo "$as_me:15518: result: `eval echo '${'$as_ac_var'}'`" >&5
15519 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15520 if test `eval echo '${'$as_ac_var'}'` = yes; then
15521   cat >>confdefs.h <<EOF
15522 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15523 EOF
15524
15525 fi
15526 done
15527
15528 ac_cv_func_fork_works=$ac_cv_func_fork
15529 if test "x$ac_cv_func_fork" = xyes; then
15530   echo "$as_me:15530: checking for working fork" >&5
15531 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15532 if test "${ac_cv_func_fork_works+set}" = set; then
15533   echo $ECHO_N "(cached) $ECHO_C" >&6
15534 else
15535   if test "$cross_compiling" = yes; then
15536   ac_cv_func_fork_works=cross
15537 else
15538   cat >conftest.$ac_ext <<_ACEOF
15539 /* By Rüdiger Kuhlmann. */
15540       #include <sys/types.h>
15541       #if HAVE_UNISTD_H
15542       # include <unistd.h>
15543       #endif
15544       /* Some systems only have a dummy stub for fork() */
15545       int main ()
15546       {
15547         if (fork() < 0)
15548           $ac_main_return (1);
15549         $ac_main_return (0);
15550       }
15551 _ACEOF
15552 rm -f conftest$ac_exeext
15553 if { (eval echo "$as_me:15553: \"$ac_link\"") >&5
15554   (eval $ac_link) 2>&5
15555   ac_status=$?
15556   echo "$as_me:15556: \$? = $ac_status" >&5
15557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15558   { (eval echo "$as_me:15558: \"$ac_try\"") >&5
15559   (eval $ac_try) 2>&5
15560   ac_status=$?
15561   echo "$as_me:15561: \$? = $ac_status" >&5
15562   (exit $ac_status); }; }; then
15563   ac_cv_func_fork_works=yes
15564 else
15565   echo "$as_me: program exited with status $ac_status" >&5
15566 echo "$as_me: failed program was:" >&5
15567 cat conftest.$ac_ext >&5
15568 ac_cv_func_fork_works=no
15569 fi
15570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15571 fi
15572 fi
15573 echo "$as_me:15573: result: $ac_cv_func_fork_works" >&5
15574 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15575
15576 fi
15577 if test "x$ac_cv_func_fork_works" = xcross; then
15578   case $host in
15579     *-*-amigaos* | *-*-msdosdjgpp*)
15580       # Override, as these systems have only a dummy fork() stub
15581       ac_cv_func_fork_works=no
15582       ;;
15583     *)
15584       ac_cv_func_fork_works=yes
15585       ;;
15586   esac
15587   { echo "$as_me:15587: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15588 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15589 fi
15590 ac_cv_func_vfork_works=$ac_cv_func_vfork
15591 if test "x$ac_cv_func_vfork" = xyes; then
15592   echo "$as_me:15592: checking for working vfork" >&5
15593 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15594 if test "${ac_cv_func_vfork_works+set}" = set; then
15595   echo $ECHO_N "(cached) $ECHO_C" >&6
15596 else
15597   if test "$cross_compiling" = yes; then
15598   ac_cv_func_vfork_works=cross
15599 else
15600   cat >conftest.$ac_ext <<_ACEOF
15601 #line 15601 "configure"
15602 #include "confdefs.h"
15603 /* Thanks to Paul Eggert for this test.  */
15604 #include <stdio.h>
15605 #include <sys/types.h>
15606 #include <sys/stat.h>
15607 #if HAVE_UNISTD_H
15608 # include <unistd.h>
15609 #endif
15610 #if HAVE_VFORK_H
15611 # include <vfork.h>
15612 #endif
15613 /* On some sparc systems, changes by the child to local and incoming
15614    argument registers are propagated back to the parent.  The compiler
15615    is told about this with #include <vfork.h>, but some compilers
15616    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15617    static variable whose address is put into a register that is
15618    clobbered by the vfork.  */
15619 static
15620 #ifdef __cplusplus
15621 sparc_address_test (int arg)
15622 # else
15623 sparc_address_test (arg) int arg;
15624 #endif
15625 {
15626   static pid_t child;
15627   if (!child) {
15628     child = vfork ();
15629     if (child < 0) {
15630       perror ("vfork");
15631       _exit(2);
15632     }
15633     if (!child) {
15634       arg = getpid();
15635       write(-1, "", 0);
15636       _exit (arg);
15637     }
15638   }
15639 }
15640
15641 int
15642 main ()
15643 {
15644   pid_t parent = getpid ();
15645   pid_t child;
15646
15647   sparc_address_test ();
15648
15649   child = vfork ();
15650
15651   if (child == 0) {
15652     /* Here is another test for sparc vfork register problems.  This
15653        test uses lots of local variables, at least as many local
15654        variables as main has allocated so far including compiler
15655        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15656        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15657        reuse the register of parent for one of the local variables,
15658        since it will think that parent can't possibly be used any more
15659        in this routine.  Assigning to the local variable will thus
15660        munge parent in the parent process.  */
15661     pid_t
15662       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15663       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15664     /* Convince the compiler that p..p7 are live; otherwise, it might
15665        use the same hardware register for all 8 local variables.  */
15666     if (p != p1 || p != p2 || p != p3 || p != p4
15667         || p != p5 || p != p6 || p != p7)
15668       _exit(1);
15669
15670     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15671        from child file descriptors.  If the child closes a descriptor
15672        before it execs or exits, this munges the parent's descriptor
15673        as well.  Test for this by closing stdout in the child.  */
15674     _exit(close(fileno(stdout)) != 0);
15675   } else {
15676     int status;
15677     struct stat st;
15678
15679     while (wait(&status) != child)
15680       ;
15681     $ac_main_return(
15682          /* Was there some problem with vforking?  */
15683          child < 0
15684
15685          /* Did the child fail?  (This shouldn't happen.)  */
15686          || status
15687
15688          /* Did the vfork/compiler bug occur?  */
15689          || parent != getpid()
15690
15691          /* Did the file descriptor bug occur?  */
15692          || fstat(fileno(stdout), &st) != 0
15693          );
15694   }
15695 }
15696 _ACEOF
15697 rm -f conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699   (eval $ac_link) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15703   { (eval echo "$as_me:15703: \"$ac_try\"") >&5
15704   (eval $ac_try) 2>&5
15705   ac_status=$?
15706   echo "$as_me:15706: \$? = $ac_status" >&5
15707   (exit $ac_status); }; }; then
15708   ac_cv_func_vfork_works=yes
15709 else
15710   echo "$as_me: program exited with status $ac_status" >&5
15711 echo "$as_me: failed program was:" >&5
15712 cat conftest.$ac_ext >&5
15713 ac_cv_func_vfork_works=no
15714 fi
15715 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15716 fi
15717 fi
15718 echo "$as_me:15718: result: $ac_cv_func_vfork_works" >&5
15719 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15720
15721 fi;
15722 if test "x$ac_cv_func_fork_works" = xcross; then
15723   ac_cv_func_vfork_works=ac_cv_func_vfork
15724   { echo "$as_me:15724: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15725 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15726 fi
15727
15728 if test "x$ac_cv_func_vfork_works" = xyes; then
15729
15730 cat >>confdefs.h <<\EOF
15731 #define HAVE_WORKING_VFORK 1
15732 EOF
15733
15734 else
15735
15736 cat >>confdefs.h <<\EOF
15737 #define vfork fork
15738 EOF
15739
15740 fi
15741 if test "x$ac_cv_func_fork_works" = xyes; then
15742
15743 cat >>confdefs.h <<\EOF
15744 #define HAVE_WORKING_FORK 1
15745 EOF
15746
15747 fi
15748
15749 # special check for test/ditto.c
15750
15751 echo "$as_me:15751: checking for openpty in -lutil" >&5
15752 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15753 if test "${ac_cv_lib_util_openpty+set}" = set; then
15754   echo $ECHO_N "(cached) $ECHO_C" >&6
15755 else
15756   ac_check_lib_save_LIBS=$LIBS
15757 LIBS="-lutil  $LIBS"
15758 cat >conftest.$ac_ext <<_ACEOF
15759 #line 15759 "configure"
15760 #include "confdefs.h"
15761
15762 /* Override any gcc2 internal prototype to avoid an error.  */
15763 #ifdef __cplusplus
15764 extern "C"
15765 #endif
15766 /* We use char because int might match the return type of a gcc2
15767    builtin and then its argument prototype would still apply.  */
15768 char openpty ();
15769 int
15770 main ()
15771 {
15772 openpty ();
15773   ;
15774   return 0;
15775 }
15776 _ACEOF
15777 rm -f conftest.$ac_objext conftest$ac_exeext
15778 if { (eval echo "$as_me:15778: \"$ac_link\"") >&5
15779   (eval $ac_link) 2>&5
15780   ac_status=$?
15781   echo "$as_me:15781: \$? = $ac_status" >&5
15782   (exit $ac_status); } &&
15783          { ac_try='test -s conftest$ac_exeext'
15784   { (eval echo "$as_me:15784: \"$ac_try\"") >&5
15785   (eval $ac_try) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); }; }; then
15789   ac_cv_lib_util_openpty=yes
15790 else
15791   echo "$as_me: failed program was:" >&5
15792 cat conftest.$ac_ext >&5
15793 ac_cv_lib_util_openpty=no
15794 fi
15795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15796 LIBS=$ac_check_lib_save_LIBS
15797 fi
15798 echo "$as_me:15798: result: $ac_cv_lib_util_openpty" >&5
15799 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15800 if test $ac_cv_lib_util_openpty = yes; then
15801   cf_cv_lib_util=yes
15802 else
15803   cf_cv_lib_util=no
15804 fi
15805
15806 echo "$as_me:15806: checking for openpty header" >&5
15807 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15808 if test "${cf_cv_func_openpty+set}" = set; then
15809   echo $ECHO_N "(cached) $ECHO_C" >&6
15810 else
15811
15812     cf_save_LIBS="$LIBS"
15813     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15814     for cf_header in pty.h libutil.h util.h
15815     do
15816     cat >conftest.$ac_ext <<_ACEOF
15817 #line 15817 "configure"
15818 #include "confdefs.h"
15819
15820 #include <$cf_header>
15821
15822 int
15823 main ()
15824 {
15825
15826     int x = openpty((int *)0, (int *)0, (char *)0,
15827                    (struct termios *)0, (struct winsize *)0);
15828
15829   ;
15830   return 0;
15831 }
15832 _ACEOF
15833 rm -f conftest.$ac_objext conftest$ac_exeext
15834 if { (eval echo "$as_me:15834: \"$ac_link\"") >&5
15835   (eval $ac_link) 2>&5
15836   ac_status=$?
15837   echo "$as_me:15837: \$? = $ac_status" >&5
15838   (exit $ac_status); } &&
15839          { ac_try='test -s conftest$ac_exeext'
15840   { (eval echo "$as_me:15840: \"$ac_try\"") >&5
15841   (eval $ac_try) 2>&5
15842   ac_status=$?
15843   echo "$as_me:15843: \$? = $ac_status" >&5
15844   (exit $ac_status); }; }; then
15845
15846         cf_cv_func_openpty=$cf_header
15847         break
15848
15849 else
15850   echo "$as_me: failed program was:" >&5
15851 cat conftest.$ac_ext >&5
15852
15853         cf_cv_func_openpty=no
15854
15855 fi
15856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15857     done
15858     LIBS="$cf_save_LIBS"
15859
15860 fi
15861 echo "$as_me:15861: result: $cf_cv_func_openpty" >&5
15862 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15863
15864 if test "$cf_cv_func_openpty" != no ; then
15865     cat >>confdefs.h <<EOF
15866 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15867 EOF
15868
15869     cat >>confdefs.h <<\EOF
15870 #define USE_XTERM_PTY 1
15871 EOF
15872
15873     if test "$cf_cv_lib_util" = yes ; then
15874         TEST_LIBS="-lutil $TEST_LIBS"
15875     fi
15876 fi
15877
15878 if test "$with_hashed_db" != no ; then
15879         cat >>confdefs.h <<\EOF
15880 #define USE_HASHED_DB 1
15881 EOF
15882
15883 case $with_hashed_db in #(vi
15884 yes|*able*) #(vi
15885     ;;
15886 *)
15887     if test -d "$with_hashed_db" ; then
15888
15889 if test -n "$with_hashed_db/include" ; then
15890   for cf_add_incdir in $with_hashed_db/include
15891   do
15892         while test $cf_add_incdir != /usr/include
15893         do
15894           if test -d $cf_add_incdir
15895           then
15896                 cf_have_incdir=no
15897                 if test -n "$CFLAGS$CPPFLAGS" ; then
15898                   # a loop is needed to ensure we can add subdirs of existing dirs
15899                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15900                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15901                           cf_have_incdir=yes; break
15902                         fi
15903                   done
15904                 fi
15905
15906                 if test "$cf_have_incdir" = no ; then
15907                   if test "$cf_add_incdir" = /usr/local/include ; then
15908                         if test "$GCC" = yes
15909                         then
15910                           cf_save_CPPFLAGS=$CPPFLAGS
15911                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15912                           cat >conftest.$ac_ext <<_ACEOF
15913 #line 15913 "configure"
15914 #include "confdefs.h"
15915 #include <stdio.h>
15916 int
15917 main ()
15918 {
15919 printf("Hello")
15920   ;
15921   return 0;
15922 }
15923 _ACEOF
15924 rm -f conftest.$ac_objext
15925 if { (eval echo "$as_me:15925: \"$ac_compile\"") >&5
15926   (eval $ac_compile) 2>&5
15927   ac_status=$?
15928   echo "$as_me:15928: \$? = $ac_status" >&5
15929   (exit $ac_status); } &&
15930          { ac_try='test -s conftest.$ac_objext'
15931   { (eval echo "$as_me:15931: \"$ac_try\"") >&5
15932   (eval $ac_try) 2>&5
15933   ac_status=$?
15934   echo "$as_me:15934: \$? = $ac_status" >&5
15935   (exit $ac_status); }; }; then
15936   :
15937 else
15938   echo "$as_me: failed program was:" >&5
15939 cat conftest.$ac_ext >&5
15940 cf_have_incdir=yes
15941 fi
15942 rm -f conftest.$ac_objext conftest.$ac_ext
15943                           CPPFLAGS=$cf_save_CPPFLAGS
15944                         fi
15945                   fi
15946                 fi
15947
15948                 if test "$cf_have_incdir" = no ; then
15949                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15950
15951 echo "${as_me-configure}:15951: testing adding $cf_add_incdir to include-path ..." 1>&5
15952
15953                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15954
15955                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15956                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15957                   cf_add_incdir="$cf_top_incdir"
15958                 else
15959                   break
15960                 fi
15961           fi
15962         done
15963   done
15964 fi
15965
15966 if test -n "$with_hashed_db/lib" ; then
15967   for cf_add_libdir in $with_hashed_db/lib
15968   do
15969     if test $cf_add_libdir = /usr/lib ; then
15970       :
15971     elif test -d $cf_add_libdir
15972     then
15973       cf_have_libdir=no
15974       if test -n "$LDFLAGS$LIBS" ; then
15975         # a loop is needed to ensure we can add subdirs of existing dirs
15976         for cf_test_libdir in $LDFLAGS $LIBS ; do
15977           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15978             cf_have_libdir=yes; break
15979           fi
15980         done
15981       fi
15982       if test "$cf_have_libdir" = no ; then
15983         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15984
15985 echo "${as_me-configure}:15985: testing adding $cf_add_libdir to library-path ..." 1>&5
15986
15987         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15988       fi
15989     fi
15990   done
15991 fi
15992
15993     fi
15994 esac
15995
15996 echo "$as_me:15996: checking for db.h" >&5
15997 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
15998 if test "${ac_cv_header_db_h+set}" = set; then
15999   echo $ECHO_N "(cached) $ECHO_C" >&6
16000 else
16001   cat >conftest.$ac_ext <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16004 #include <db.h>
16005 _ACEOF
16006 if { (eval echo "$as_me:16006: \"$ac_cpp conftest.$ac_ext\"") >&5
16007   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16008   ac_status=$?
16009   egrep -v '^ *\+' conftest.er1 >conftest.err
16010   rm -f conftest.er1
16011   cat conftest.err >&5
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); } >/dev/null; then
16014   if test -s conftest.err; then
16015     ac_cpp_err=$ac_c_preproc_warn_flag
16016   else
16017     ac_cpp_err=
16018   fi
16019 else
16020   ac_cpp_err=yes
16021 fi
16022 if test -z "$ac_cpp_err"; then
16023   ac_cv_header_db_h=yes
16024 else
16025   echo "$as_me: failed program was:" >&5
16026   cat conftest.$ac_ext >&5
16027   ac_cv_header_db_h=no
16028 fi
16029 rm -f conftest.err conftest.$ac_ext
16030 fi
16031 echo "$as_me:16031: result: $ac_cv_header_db_h" >&5
16032 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16033 if test $ac_cv_header_db_h = yes; then
16034
16035 echo "$as_me:16035: checking for version of db" >&5
16036 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16037 if test "${cf_cv_hashed_db_version+set}" = set; then
16038   echo $ECHO_N "(cached) $ECHO_C" >&6
16039 else
16040
16041 cf_cv_hashed_db_version=unknown
16042
16043 for cf_db_version in 1 2 3 4 5
16044 do
16045
16046 echo "${as_me-configure}:16046: testing checking for db version $cf_db_version ..." 1>&5
16047
16048         cat >conftest.$ac_ext <<_ACEOF
16049 #line 16049 "configure"
16050 #include "confdefs.h"
16051
16052 $ac_includes_default
16053 #include <db.h>
16054
16055 #ifdef DB_VERSION_MAJOR
16056         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16057 #if $cf_db_version == DB_VERSION_MAJOR
16058         /* ok */
16059 #else
16060         make an error
16061 #endif
16062 #else
16063 #if $cf_db_version == 1
16064         /* ok: assuming this is DB 1.8.5 */
16065 #else
16066         make an error
16067 #endif
16068 #endif
16069
16070 int
16071 main ()
16072 {
16073 DBT *foo = 0
16074   ;
16075   return 0;
16076 }
16077 _ACEOF
16078 rm -f conftest.$ac_objext
16079 if { (eval echo "$as_me:16079: \"$ac_compile\"") >&5
16080   (eval $ac_compile) 2>&5
16081   ac_status=$?
16082   echo "$as_me:16082: \$? = $ac_status" >&5
16083   (exit $ac_status); } &&
16084          { ac_try='test -s conftest.$ac_objext'
16085   { (eval echo "$as_me:16085: \"$ac_try\"") >&5
16086   (eval $ac_try) 2>&5
16087   ac_status=$?
16088   echo "$as_me:16088: \$? = $ac_status" >&5
16089   (exit $ac_status); }; }; then
16090
16091         cf_cv_hashed_db_version=$cf_db_version
16092         break
16093
16094 else
16095   echo "$as_me: failed program was:" >&5
16096 cat conftest.$ac_ext >&5
16097 fi
16098 rm -f conftest.$ac_objext conftest.$ac_ext
16099 done
16100
16101 fi
16102 echo "$as_me:16102: result: $cf_cv_hashed_db_version" >&5
16103 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16104
16105 if test "$cf_cv_hashed_db_version" = unknown ; then
16106         { { echo "$as_me:16106: error: Cannot determine version of db" >&5
16107 echo "$as_me: error: Cannot determine version of db" >&2;}
16108    { (exit 1); exit 1; }; }
16109 else
16110
16111 echo "$as_me:16111: checking for db libraries" >&5
16112 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16113 if test "${cf_cv_hashed_db_libs+set}" = set; then
16114   echo $ECHO_N "(cached) $ECHO_C" >&6
16115 else
16116
16117 cf_cv_hashed_db_libs=unknown
16118 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16119 do
16120         cf_save_libs="$LIBS"
16121         if test -n "$cf_db_libs"; then
16122                 LIBS="-l$cf_db_libs $LIBS"
16123         fi
16124
16125 echo "${as_me-configure}:16125: testing checking for library "$cf_db_libs" ..." 1>&5
16126
16127         cat >conftest.$ac_ext <<_ACEOF
16128 #line 16128 "configure"
16129 #include "confdefs.h"
16130
16131 $ac_includes_default
16132 #include <db.h>
16133
16134 int
16135 main ()
16136 {
16137
16138         char *path = "/tmp/foo";
16139 #ifdef DB_VERSION_MAJOR
16140 #if DB_VERSION_MAJOR >= 4
16141         DB *result = 0;
16142         db_create(&result, NULL, 0);
16143         result->open(result,
16144                 NULL,
16145                 path,
16146                 path,
16147                 DB_HASH,
16148                 DB_CREATE,
16149                 0644);
16150 #elif DB_VERSION_MAJOR >= 3
16151         DB *result = 0;
16152         db_create(&result, NULL, 0);
16153         result->open(result,
16154                 path,
16155                 path,
16156                 DB_HASH,
16157                 DB_CREATE,
16158                 0644);
16159 #elif DB_VERSION_MAJOR >= 2
16160         DB *result = 0;
16161         db_open(path,
16162                 DB_HASH,
16163                 DB_CREATE,
16164                 0644,
16165                 (DB_ENV *) 0,
16166                 (DB_INFO *) 0,
16167                 &result);
16168 #endif /* DB_VERSION_MAJOR */
16169 #else
16170         DB *result = dbopen(path,
16171                      2,
16172                      0644,
16173                      DB_HASH,
16174                      0);
16175 #endif
16176         ${cf_cv_main_return:-return}(result != 0)
16177
16178   ;
16179   return 0;
16180 }
16181 _ACEOF
16182 rm -f conftest.$ac_objext conftest$ac_exeext
16183 if { (eval echo "$as_me:16183: \"$ac_link\"") >&5
16184   (eval $ac_link) 2>&5
16185   ac_status=$?
16186   echo "$as_me:16186: \$? = $ac_status" >&5
16187   (exit $ac_status); } &&
16188          { ac_try='test -s conftest$ac_exeext'
16189   { (eval echo "$as_me:16189: \"$ac_try\"") >&5
16190   (eval $ac_try) 2>&5
16191   ac_status=$?
16192   echo "$as_me:16192: \$? = $ac_status" >&5
16193   (exit $ac_status); }; }; then
16194
16195         if test -n "$cf_db_libs" ; then
16196                 cf_cv_hashed_db_libs=$cf_db_libs
16197         else
16198                 cf_cv_hashed_db_libs=default
16199         fi
16200         LIBS="$cf_save_libs"
16201         break
16202
16203 else
16204   echo "$as_me: failed program was:" >&5
16205 cat conftest.$ac_ext >&5
16206 fi
16207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16208         LIBS="$cf_save_libs"
16209 done
16210
16211 fi
16212 echo "$as_me:16212: result: $cf_cv_hashed_db_libs" >&5
16213 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16214
16215         if test "$cf_cv_hashed_db_libs" = unknown ; then
16216                 { { echo "$as_me:16216: error: Cannot determine library for db" >&5
16217 echo "$as_me: error: Cannot determine library for db" >&2;}
16218    { (exit 1); exit 1; }; }
16219         elif test "$cf_cv_hashed_db_libs" != default ; then
16220                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16221         fi
16222 fi
16223
16224 else
16225
16226         { { echo "$as_me:16226: error: Cannot find db.h" >&5
16227 echo "$as_me: error: Cannot find db.h" >&2;}
16228    { (exit 1); exit 1; }; }
16229
16230 fi
16231
16232 fi
16233
16234 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16235         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16236         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16237 fi
16238
16239 # Just in case, check if the C compiler has a bool type.
16240
16241 echo "$as_me:16241: checking if we should include stdbool.h" >&5
16242 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16243
16244 if test "${cf_cv_header_stdbool_h+set}" = set; then
16245   echo $ECHO_N "(cached) $ECHO_C" >&6
16246 else
16247
16248         cat >conftest.$ac_ext <<_ACEOF
16249 #line 16249 "configure"
16250 #include "confdefs.h"
16251
16252 int
16253 main ()
16254 {
16255 bool foo = false
16256   ;
16257   return 0;
16258 }
16259 _ACEOF
16260 rm -f conftest.$ac_objext
16261 if { (eval echo "$as_me:16261: \"$ac_compile\"") >&5
16262   (eval $ac_compile) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); } &&
16266          { ac_try='test -s conftest.$ac_objext'
16267   { (eval echo "$as_me:16267: \"$ac_try\"") >&5
16268   (eval $ac_try) 2>&5
16269   ac_status=$?
16270   echo "$as_me:16270: \$? = $ac_status" >&5
16271   (exit $ac_status); }; }; then
16272   cf_cv_header_stdbool_h=0
16273 else
16274   echo "$as_me: failed program was:" >&5
16275 cat conftest.$ac_ext >&5
16276 cat >conftest.$ac_ext <<_ACEOF
16277 #line 16277 "configure"
16278 #include "confdefs.h"
16279
16280 #ifndef __BEOS__
16281 #include <stdbool.h>
16282 #endif
16283
16284 int
16285 main ()
16286 {
16287 bool foo = false
16288   ;
16289   return 0;
16290 }
16291 _ACEOF
16292 rm -f conftest.$ac_objext
16293 if { (eval echo "$as_me:16293: \"$ac_compile\"") >&5
16294   (eval $ac_compile) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); } &&
16298          { ac_try='test -s conftest.$ac_objext'
16299   { (eval echo "$as_me:16299: \"$ac_try\"") >&5
16300   (eval $ac_try) 2>&5
16301   ac_status=$?
16302   echo "$as_me:16302: \$? = $ac_status" >&5
16303   (exit $ac_status); }; }; then
16304   cf_cv_header_stdbool_h=1
16305 else
16306   echo "$as_me: failed program was:" >&5
16307 cat conftest.$ac_ext >&5
16308 cf_cv_header_stdbool_h=0
16309 fi
16310 rm -f conftest.$ac_objext conftest.$ac_ext
16311 fi
16312 rm -f conftest.$ac_objext conftest.$ac_ext
16313 fi
16314
16315 if test "$cf_cv_header_stdbool_h" = 1
16316 then    echo "$as_me:16316: result: yes" >&5
16317 echo "${ECHO_T}yes" >&6
16318 else    echo "$as_me:16318: result: no" >&5
16319 echo "${ECHO_T}no" >&6
16320 fi
16321
16322 echo "$as_me:16322: checking for builtin bool type" >&5
16323 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16324
16325 if test "${cf_cv_cc_bool_type+set}" = set; then
16326   echo $ECHO_N "(cached) $ECHO_C" >&6
16327 else
16328
16329         cat >conftest.$ac_ext <<_ACEOF
16330 #line 16330 "configure"
16331 #include "confdefs.h"
16332
16333 #include <stdio.h>
16334 #include <sys/types.h>
16335
16336 int
16337 main ()
16338 {
16339 bool x = false
16340   ;
16341   return 0;
16342 }
16343 _ACEOF
16344 rm -f conftest.$ac_objext
16345 if { (eval echo "$as_me:16345: \"$ac_compile\"") >&5
16346   (eval $ac_compile) 2>&5
16347   ac_status=$?
16348   echo "$as_me:16348: \$? = $ac_status" >&5
16349   (exit $ac_status); } &&
16350          { ac_try='test -s conftest.$ac_objext'
16351   { (eval echo "$as_me:16351: \"$ac_try\"") >&5
16352   (eval $ac_try) 2>&5
16353   ac_status=$?
16354   echo "$as_me:16354: \$? = $ac_status" >&5
16355   (exit $ac_status); }; }; then
16356   cf_cv_cc_bool_type=1
16357 else
16358   echo "$as_me: failed program was:" >&5
16359 cat conftest.$ac_ext >&5
16360 cf_cv_cc_bool_type=0
16361 fi
16362 rm -f conftest.$ac_objext conftest.$ac_ext
16363
16364 fi
16365
16366 if test "$cf_cv_cc_bool_type" = 1
16367 then    echo "$as_me:16367: result: yes" >&5
16368 echo "${ECHO_T}yes" >&6
16369 else    echo "$as_me:16369: result: no" >&5
16370 echo "${ECHO_T}no" >&6
16371 fi
16372
16373 # Check for C++ compiler characteristics (and ensure that it's there!)
16374 if test -n "$CXX" ; then
16375         ac_ext=cc
16376 ac_cpp='$CXXCPP $CPPFLAGS'
16377 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16378 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16379 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16380 ac_main_return=return
16381
16382 if test -n "$GXX" ; then
16383 case $cf_cv_system_name in #(vi
16384 os2*) #(vi
16385         cf_stdcpp_libname=stdcpp
16386         ;;
16387 *)
16388         cf_stdcpp_libname=stdc++
16389         ;;
16390 esac
16391 echo "$as_me:16391: checking for library $cf_stdcpp_libname" >&5
16392 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16393 if test "${cf_cv_libstdcpp+set}" = set; then
16394   echo $ECHO_N "(cached) $ECHO_C" >&6
16395 else
16396
16397         cf_save="$LIBS"
16398         LIBS="-l$cf_stdcpp_libname $LIBS"
16399 cat >conftest.$ac_ext <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16402
16403 #include <strstream.h>
16404 int
16405 main ()
16406 {
16407
16408 char buf[80];
16409 strstreambuf foo(buf, sizeof(buf))
16410
16411   ;
16412   return 0;
16413 }
16414 _ACEOF
16415 rm -f conftest.$ac_objext conftest$ac_exeext
16416 if { (eval echo "$as_me:16416: \"$ac_link\"") >&5
16417   (eval $ac_link) 2>&5
16418   ac_status=$?
16419   echo "$as_me:16419: \$? = $ac_status" >&5
16420   (exit $ac_status); } &&
16421          { ac_try='test -s conftest$ac_exeext'
16422   { (eval echo "$as_me:16422: \"$ac_try\"") >&5
16423   (eval $ac_try) 2>&5
16424   ac_status=$?
16425   echo "$as_me:16425: \$? = $ac_status" >&5
16426   (exit $ac_status); }; }; then
16427   cf_cv_libstdcpp=yes
16428 else
16429   echo "$as_me: failed program was:" >&5
16430 cat conftest.$ac_ext >&5
16431 cf_cv_libstdcpp=no
16432 fi
16433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16434         LIBS="$cf_save"
16435
16436 fi
16437 echo "$as_me:16437: result: $cf_cv_libstdcpp" >&5
16438 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16439 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
16440 fi
16441
16442         echo "$as_me:16442: checking whether $CXX understands -c and -o together" >&5
16443 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16444 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16445   echo $ECHO_N "(cached) $ECHO_C" >&6
16446 else
16447
16448 cat > conftest.$ac_ext <<CF_EOF
16449 #include <stdio.h>
16450 int main()
16451 {
16452         ${cf_cv_main_return:-return}(0);
16453 }
16454 CF_EOF
16455 # We do the test twice because some compilers refuse to overwrite an
16456 # existing .o file with -o, though they will create one.
16457 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16458 if { (eval echo "$as_me:16458: \"$ac_try\"") >&5
16459   (eval $ac_try) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463   test -f conftest2.$ac_objext && { (eval echo "$as_me:16463: \"$ac_try\"") >&5
16464   (eval $ac_try) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit $ac_status); };
16468 then
16469   eval cf_cv_prog_CXX_c_o=yes
16470 else
16471   eval cf_cv_prog_CXX_c_o=no
16472 fi
16473 rm -f conftest*
16474
16475 fi
16476 if test $cf_cv_prog_CXX_c_o = yes; then
16477   echo "$as_me:16477: result: yes" >&5
16478 echo "${ECHO_T}yes" >&6
16479 else
16480   echo "$as_me:16480: result: no" >&5
16481 echo "${ECHO_T}no" >&6
16482 fi
16483
16484         case $GXX_VERSION in
16485         1*|2.0-6*)
16486                 cf_cxx_library=yes
16487                 ;;
16488         *-2.7*|2.7*)
16489
16490 cf_cxx_library=unknown
16491 case $cf_cv_system_name in #(vi
16492 os2*) #(vi
16493         cf_gpp_libname=gpp
16494         ;;
16495 *)
16496         cf_gpp_libname=g++
16497         ;;
16498 esac
16499 if test "$GXX" = yes; then
16500         echo "$as_me:16500: checking for lib$cf_gpp_libname" >&5
16501 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16502         cf_save="$LIBS"
16503         LIBS="-l$cf_gpp_libname $LIBS"
16504         cat >conftest.$ac_ext <<_ACEOF
16505 #line 16505 "configure"
16506 #include "confdefs.h"
16507
16508 #include <$cf_gpp_libname/builtin.h>
16509
16510 int
16511 main ()
16512 {
16513 two_arg_error_handler_t foo2 = lib_error_handler
16514   ;
16515   return 0;
16516 }
16517 _ACEOF
16518 rm -f conftest.$ac_objext conftest$ac_exeext
16519 if { (eval echo "$as_me:16519: \"$ac_link\"") >&5
16520   (eval $ac_link) 2>&5
16521   ac_status=$?
16522   echo "$as_me:16522: \$? = $ac_status" >&5
16523   (exit $ac_status); } &&
16524          { ac_try='test -s conftest$ac_exeext'
16525   { (eval echo "$as_me:16525: \"$ac_try\"") >&5
16526   (eval $ac_try) 2>&5
16527   ac_status=$?
16528   echo "$as_me:16528: \$? = $ac_status" >&5
16529   (exit $ac_status); }; }; then
16530   cf_cxx_library=yes
16531          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16532          if test "$cf_gpp_libname" = cpp ; then
16533             cat >>confdefs.h <<\EOF
16534 #define HAVE_GPP_BUILTIN_H 1
16535 EOF
16536
16537          else
16538             cat >>confdefs.h <<\EOF
16539 #define HAVE_GXX_BUILTIN_H 1
16540 EOF
16541
16542          fi
16543 else
16544   echo "$as_me: failed program was:" >&5
16545 cat conftest.$ac_ext >&5
16546 cat >conftest.$ac_ext <<_ACEOF
16547 #line 16547 "configure"
16548 #include "confdefs.h"
16549
16550 #include <builtin.h>
16551
16552 int
16553 main ()
16554 {
16555 two_arg_error_handler_t foo2 = lib_error_handler
16556   ;
16557   return 0;
16558 }
16559 _ACEOF
16560 rm -f conftest.$ac_objext conftest$ac_exeext
16561 if { (eval echo "$as_me:16561: \"$ac_link\"") >&5
16562   (eval $ac_link) 2>&5
16563   ac_status=$?
16564   echo "$as_me:16564: \$? = $ac_status" >&5
16565   (exit $ac_status); } &&
16566          { ac_try='test -s conftest$ac_exeext'
16567   { (eval echo "$as_me:16567: \"$ac_try\"") >&5
16568   (eval $ac_try) 2>&5
16569   ac_status=$?
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); }; }; then
16572   cf_cxx_library=yes
16573          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16574          cat >>confdefs.h <<\EOF
16575 #define HAVE_BUILTIN_H 1
16576 EOF
16577
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 cat conftest.$ac_ext >&5
16581 cf_cxx_library=no
16582 fi
16583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16584 fi
16585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16586         LIBS="$cf_save"
16587         echo "$as_me:16587: result: $cf_cxx_library" >&5
16588 echo "${ECHO_T}$cf_cxx_library" >&6
16589 fi
16590
16591                 ;;
16592         *)
16593                 cf_cxx_library=no
16594                 ;;
16595         esac
16596
16597         ac_ext=cc
16598 ac_cpp='$CXXCPP $CPPFLAGS'
16599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16602 ac_main_return=return
16603 echo "$as_me:16603: checking how to run the C++ preprocessor" >&5
16604 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16605 if test -z "$CXXCPP"; then
16606   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16607   echo $ECHO_N "(cached) $ECHO_C" >&6
16608 else
16609       # Double quotes because CXXCPP needs to be expanded
16610     for CXXCPP in "$CXX -E" "/lib/cpp"
16611     do
16612       ac_preproc_ok=false
16613 for ac_cxx_preproc_warn_flag in '' yes
16614 do
16615   # Use a header file that comes with gcc, so configuring glibc
16616   # with a fresh cross-compiler works.
16617   # On the NeXT, cc -E runs the code through the compiler's parser,
16618   # not just through cpp. "Syntax error" is here to catch this case.
16619   cat >conftest.$ac_ext <<_ACEOF
16620 #line 16620 "configure"
16621 #include "confdefs.h"
16622 #include <assert.h>
16623                      Syntax error
16624 _ACEOF
16625 if { (eval echo "$as_me:16625: \"$ac_cpp conftest.$ac_ext\"") >&5
16626   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16627   ac_status=$?
16628   egrep -v '^ *\+' conftest.er1 >conftest.err
16629   rm -f conftest.er1
16630   cat conftest.err >&5
16631   echo "$as_me:16631: \$? = $ac_status" >&5
16632   (exit $ac_status); } >/dev/null; then
16633   if test -s conftest.err; then
16634     ac_cpp_err=$ac_cxx_preproc_warn_flag
16635   else
16636     ac_cpp_err=
16637   fi
16638 else
16639   ac_cpp_err=yes
16640 fi
16641 if test -z "$ac_cpp_err"; then
16642   :
16643 else
16644   echo "$as_me: failed program was:" >&5
16645   cat conftest.$ac_ext >&5
16646   # Broken: fails on valid input.
16647 continue
16648 fi
16649 rm -f conftest.err conftest.$ac_ext
16650
16651   # OK, works on sane cases.  Now check whether non-existent headers
16652   # can be detected and how.
16653   cat >conftest.$ac_ext <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656 #include <ac_nonexistent.h>
16657 _ACEOF
16658 if { (eval echo "$as_me:16658: \"$ac_cpp conftest.$ac_ext\"") >&5
16659   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16660   ac_status=$?
16661   egrep -v '^ *\+' conftest.er1 >conftest.err
16662   rm -f conftest.er1
16663   cat conftest.err >&5
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit $ac_status); } >/dev/null; then
16666   if test -s conftest.err; then
16667     ac_cpp_err=$ac_cxx_preproc_warn_flag
16668   else
16669     ac_cpp_err=
16670   fi
16671 else
16672   ac_cpp_err=yes
16673 fi
16674 if test -z "$ac_cpp_err"; then
16675   # Broken: success on invalid input.
16676 continue
16677 else
16678   echo "$as_me: failed program was:" >&5
16679   cat conftest.$ac_ext >&5
16680   # Passes both tests.
16681 ac_preproc_ok=:
16682 break
16683 fi
16684 rm -f conftest.err conftest.$ac_ext
16685
16686 done
16687 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16688 rm -f conftest.err conftest.$ac_ext
16689 if $ac_preproc_ok; then
16690   break
16691 fi
16692
16693     done
16694     ac_cv_prog_CXXCPP=$CXXCPP
16695
16696 fi
16697   CXXCPP=$ac_cv_prog_CXXCPP
16698 else
16699   ac_cv_prog_CXXCPP=$CXXCPP
16700 fi
16701 echo "$as_me:16701: result: $CXXCPP" >&5
16702 echo "${ECHO_T}$CXXCPP" >&6
16703 ac_preproc_ok=false
16704 for ac_cxx_preproc_warn_flag in '' yes
16705 do
16706   # Use a header file that comes with gcc, so configuring glibc
16707   # with a fresh cross-compiler works.
16708   # On the NeXT, cc -E runs the code through the compiler's parser,
16709   # not just through cpp. "Syntax error" is here to catch this case.
16710   cat >conftest.$ac_ext <<_ACEOF
16711 #line 16711 "configure"
16712 #include "confdefs.h"
16713 #include <assert.h>
16714                      Syntax error
16715 _ACEOF
16716 if { (eval echo "$as_me:16716: \"$ac_cpp conftest.$ac_ext\"") >&5
16717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16718   ac_status=$?
16719   egrep -v '^ *\+' conftest.er1 >conftest.err
16720   rm -f conftest.er1
16721   cat conftest.err >&5
16722   echo "$as_me:16722: \$? = $ac_status" >&5
16723   (exit $ac_status); } >/dev/null; then
16724   if test -s conftest.err; then
16725     ac_cpp_err=$ac_cxx_preproc_warn_flag
16726   else
16727     ac_cpp_err=
16728   fi
16729 else
16730   ac_cpp_err=yes
16731 fi
16732 if test -z "$ac_cpp_err"; then
16733   :
16734 else
16735   echo "$as_me: failed program was:" >&5
16736   cat conftest.$ac_ext >&5
16737   # Broken: fails on valid input.
16738 continue
16739 fi
16740 rm -f conftest.err conftest.$ac_ext
16741
16742   # OK, works on sane cases.  Now check whether non-existent headers
16743   # can be detected and how.
16744   cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747 #include <ac_nonexistent.h>
16748 _ACEOF
16749 if { (eval echo "$as_me:16749: \"$ac_cpp conftest.$ac_ext\"") >&5
16750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16751   ac_status=$?
16752   egrep -v '^ *\+' conftest.er1 >conftest.err
16753   rm -f conftest.er1
16754   cat conftest.err >&5
16755   echo "$as_me:16755: \$? = $ac_status" >&5
16756   (exit $ac_status); } >/dev/null; then
16757   if test -s conftest.err; then
16758     ac_cpp_err=$ac_cxx_preproc_warn_flag
16759   else
16760     ac_cpp_err=
16761   fi
16762 else
16763   ac_cpp_err=yes
16764 fi
16765 if test -z "$ac_cpp_err"; then
16766   # Broken: success on invalid input.
16767 continue
16768 else
16769   echo "$as_me: failed program was:" >&5
16770   cat conftest.$ac_ext >&5
16771   # Passes both tests.
16772 ac_preproc_ok=:
16773 break
16774 fi
16775 rm -f conftest.err conftest.$ac_ext
16776
16777 done
16778 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16779 rm -f conftest.err conftest.$ac_ext
16780 if $ac_preproc_ok; then
16781   :
16782 else
16783   { { echo "$as_me:16783: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16784 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16785    { (exit 1); exit 1; }; }
16786 fi
16787
16788 ac_ext=cc
16789 ac_cpp='$CXXCPP $CPPFLAGS'
16790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16793 ac_main_return=return
16794
16795 for ac_header in iostream typeinfo
16796 do
16797 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16798 echo "$as_me:16798: checking for $ac_header" >&5
16799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16801   echo $ECHO_N "(cached) $ECHO_C" >&6
16802 else
16803   cat >conftest.$ac_ext <<_ACEOF
16804 #line 16804 "configure"
16805 #include "confdefs.h"
16806 #include <$ac_header>
16807 _ACEOF
16808 if { (eval echo "$as_me:16808: \"$ac_cpp conftest.$ac_ext\"") >&5
16809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16810   ac_status=$?
16811   egrep -v '^ *\+' conftest.er1 >conftest.err
16812   rm -f conftest.er1
16813   cat conftest.err >&5
16814   echo "$as_me:16814: \$? = $ac_status" >&5
16815   (exit $ac_status); } >/dev/null; then
16816   if test -s conftest.err; then
16817     ac_cpp_err=$ac_cxx_preproc_warn_flag
16818   else
16819     ac_cpp_err=
16820   fi
16821 else
16822   ac_cpp_err=yes
16823 fi
16824 if test -z "$ac_cpp_err"; then
16825   eval "$as_ac_Header=yes"
16826 else
16827   echo "$as_me: failed program was:" >&5
16828   cat conftest.$ac_ext >&5
16829   eval "$as_ac_Header=no"
16830 fi
16831 rm -f conftest.err conftest.$ac_ext
16832 fi
16833 echo "$as_me:16833: result: `eval echo '${'$as_ac_Header'}'`" >&5
16834 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16835 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16836   cat >>confdefs.h <<EOF
16837 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16838 EOF
16839
16840 fi
16841 done
16842
16843     if test x"$ac_cv_header_iostream" = xyes ; then
16844         echo "$as_me:16844: checking if iostream uses std-namespace" >&5
16845 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16846         cat >conftest.$ac_ext <<_ACEOF
16847 #line 16847 "configure"
16848 #include "confdefs.h"
16849
16850 #include <iostream>
16851 using std::endl;
16852 using std::cerr;
16853 int
16854 main ()
16855 {
16856
16857 cerr << "testing" << endl;
16858
16859   ;
16860   return 0;
16861 }
16862 _ACEOF
16863 rm -f conftest.$ac_objext
16864 if { (eval echo "$as_me:16864: \"$ac_compile\"") >&5
16865   (eval $ac_compile) 2>&5
16866   ac_status=$?
16867   echo "$as_me:16867: \$? = $ac_status" >&5
16868   (exit $ac_status); } &&
16869          { ac_try='test -s conftest.$ac_objext'
16870   { (eval echo "$as_me:16870: \"$ac_try\"") >&5
16871   (eval $ac_try) 2>&5
16872   ac_status=$?
16873   echo "$as_me:16873: \$? = $ac_status" >&5
16874   (exit $ac_status); }; }; then
16875   cf_iostream_namespace=yes
16876 else
16877   echo "$as_me: failed program was:" >&5
16878 cat conftest.$ac_ext >&5
16879 cf_iostream_namespace=no
16880 fi
16881 rm -f conftest.$ac_objext conftest.$ac_ext
16882         echo "$as_me:16882: result: $cf_iostream_namespace" >&5
16883 echo "${ECHO_T}$cf_iostream_namespace" >&6
16884         if test "$cf_iostream_namespace" = yes ; then
16885             cat >>confdefs.h <<\EOF
16886 #define IOSTREAM_NAMESPACE 1
16887 EOF
16888
16889         fi
16890     fi
16891
16892 echo "$as_me:16892: checking if we should include stdbool.h" >&5
16893 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16894
16895 if test "${cf_cv_header_stdbool_h+set}" = set; then
16896   echo $ECHO_N "(cached) $ECHO_C" >&6
16897 else
16898
16899         cat >conftest.$ac_ext <<_ACEOF
16900 #line 16900 "configure"
16901 #include "confdefs.h"
16902
16903 int
16904 main ()
16905 {
16906 bool foo = false
16907   ;
16908   return 0;
16909 }
16910 _ACEOF
16911 rm -f conftest.$ac_objext
16912 if { (eval echo "$as_me:16912: \"$ac_compile\"") >&5
16913   (eval $ac_compile) 2>&5
16914   ac_status=$?
16915   echo "$as_me:16915: \$? = $ac_status" >&5
16916   (exit $ac_status); } &&
16917          { ac_try='test -s conftest.$ac_objext'
16918   { (eval echo "$as_me:16918: \"$ac_try\"") >&5
16919   (eval $ac_try) 2>&5
16920   ac_status=$?
16921   echo "$as_me:16921: \$? = $ac_status" >&5
16922   (exit $ac_status); }; }; then
16923   cf_cv_header_stdbool_h=0
16924 else
16925   echo "$as_me: failed program was:" >&5
16926 cat conftest.$ac_ext >&5
16927 cat >conftest.$ac_ext <<_ACEOF
16928 #line 16928 "configure"
16929 #include "confdefs.h"
16930
16931 #ifndef __BEOS__
16932 #include <stdbool.h>
16933 #endif
16934
16935 int
16936 main ()
16937 {
16938 bool foo = false
16939   ;
16940   return 0;
16941 }
16942 _ACEOF
16943 rm -f conftest.$ac_objext
16944 if { (eval echo "$as_me:16944: \"$ac_compile\"") >&5
16945   (eval $ac_compile) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit $ac_status); } &&
16949          { ac_try='test -s conftest.$ac_objext'
16950   { (eval echo "$as_me:16950: \"$ac_try\"") >&5
16951   (eval $ac_try) 2>&5
16952   ac_status=$?
16953   echo "$as_me:16953: \$? = $ac_status" >&5
16954   (exit $ac_status); }; }; then
16955   cf_cv_header_stdbool_h=1
16956 else
16957   echo "$as_me: failed program was:" >&5
16958 cat conftest.$ac_ext >&5
16959 cf_cv_header_stdbool_h=0
16960 fi
16961 rm -f conftest.$ac_objext conftest.$ac_ext
16962 fi
16963 rm -f conftest.$ac_objext conftest.$ac_ext
16964 fi
16965
16966 if test "$cf_cv_header_stdbool_h" = 1
16967 then    echo "$as_me:16967: result: yes" >&5
16968 echo "${ECHO_T}yes" >&6
16969 else    echo "$as_me:16969: result: no" >&5
16970 echo "${ECHO_T}no" >&6
16971 fi
16972
16973 echo "$as_me:16973: checking for builtin bool type" >&5
16974 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16975
16976 if test "${cf_cv_builtin_bool+set}" = set; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979
16980         cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 #include <stdio.h>
16985 #include <sys/types.h>
16986
16987 int
16988 main ()
16989 {
16990 bool x = false
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 rm -f conftest.$ac_objext
16996 if { (eval echo "$as_me:16996: \"$ac_compile\"") >&5
16997   (eval $ac_compile) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); } &&
17001          { ac_try='test -s conftest.$ac_objext'
17002   { (eval echo "$as_me:17002: \"$ac_try\"") >&5
17003   (eval $ac_try) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit $ac_status); }; }; then
17007   cf_cv_builtin_bool=1
17008 else
17009   echo "$as_me: failed program was:" >&5
17010 cat conftest.$ac_ext >&5
17011 cf_cv_builtin_bool=0
17012 fi
17013 rm -f conftest.$ac_objext conftest.$ac_ext
17014
17015 fi
17016
17017 if test "$cf_cv_builtin_bool" = 1
17018 then    echo "$as_me:17018: result: yes" >&5
17019 echo "${ECHO_T}yes" >&6
17020 else    echo "$as_me:17020: result: no" >&5
17021 echo "${ECHO_T}no" >&6
17022 fi
17023
17024 echo "$as_me:17024: checking for size of bool" >&5
17025 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17026 if test "${cf_cv_type_of_bool+set}" = set; then
17027   echo $ECHO_N "(cached) $ECHO_C" >&6
17028 else
17029
17030         rm -f cf_test.out
17031         if test "$cross_compiling" = yes; then
17032   cf_cv_type_of_bool=unknown
17033 else
17034   cat >conftest.$ac_ext <<_ACEOF
17035 #line 17035 "configure"
17036 #include "confdefs.h"
17037
17038 #include <stdlib.h>
17039 #include <stdio.h>
17040
17041 #if defined(__cplusplus)
17042
17043 #ifdef HAVE_GXX_BUILTIN_H
17044 #include <g++/builtin.h>
17045 #elif HAVE_GPP_BUILTIN_H
17046 #include <gpp/builtin.h>
17047 #elif HAVE_BUILTIN_H
17048 #include <builtin.h>
17049 #endif
17050
17051 #else
17052
17053 #if $cf_cv_header_stdbool_h
17054 #include <stdbool.h>
17055 #endif
17056
17057 #endif
17058
17059 main()
17060 {
17061         FILE *fp = fopen("cf_test.out", "w");
17062         if (fp != 0) {
17063                 bool x = true;
17064                 if ((bool)(-x) >= 0)
17065                         fputs("unsigned ", fp);
17066                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17067                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17068                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17069                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17070                 fclose(fp);
17071         }
17072         ${cf_cv_main_return:-return}(0);
17073 }
17074
17075 _ACEOF
17076 rm -f conftest$ac_exeext
17077 if { (eval echo "$as_me:17077: \"$ac_link\"") >&5
17078   (eval $ac_link) 2>&5
17079   ac_status=$?
17080   echo "$as_me:17080: \$? = $ac_status" >&5
17081   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17082   { (eval echo "$as_me:17082: \"$ac_try\"") >&5
17083   (eval $ac_try) 2>&5
17084   ac_status=$?
17085   echo "$as_me:17085: \$? = $ac_status" >&5
17086   (exit $ac_status); }; }; then
17087   cf_cv_type_of_bool=`cat cf_test.out`
17088                  if test -z "$cf_cv_type_of_bool"; then
17089                    cf_cv_type_of_bool=unknown
17090                  fi
17091 else
17092   echo "$as_me: program exited with status $ac_status" >&5
17093 echo "$as_me: failed program was:" >&5
17094 cat conftest.$ac_ext >&5
17095 cf_cv_type_of_bool=unknown
17096 fi
17097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17098 fi
17099
17100 fi
17101
17102         rm -f cf_test.out
17103 echo "$as_me:17103: result: $cf_cv_type_of_bool" >&5
17104 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17105 if test "$cf_cv_type_of_bool" = unknown ; then
17106         case .$NCURSES_BOOL in #(vi
17107         .auto|.) NCURSES_BOOL=unsigned;;
17108         esac
17109         { echo "$as_me:17109: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17110 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17111         cf_cv_type_of_bool=$NCURSES_BOOL
17112 fi
17113
17114 echo "$as_me:17114: checking for special defines needed for etip.h" >&5
17115 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17116 cf_save_CXXFLAGS="$CXXFLAGS"
17117 cf_result="none"
17118 for cf_math in "" MATH_H
17119 do
17120 for cf_excp in "" MATH_EXCEPTION
17121 do
17122         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17123         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17124         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17125 cat >conftest.$ac_ext <<_ACEOF
17126 #line 17126 "configure"
17127 #include "confdefs.h"
17128
17129 #include <etip.h.in>
17130
17131 int
17132 main ()
17133 {
17134
17135   ;
17136   return 0;
17137 }
17138 _ACEOF
17139 rm -f conftest.$ac_objext
17140 if { (eval echo "$as_me:17140: \"$ac_compile\"") >&5
17141   (eval $ac_compile) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit $ac_status); } &&
17145          { ac_try='test -s conftest.$ac_objext'
17146   { (eval echo "$as_me:17146: \"$ac_try\"") >&5
17147   (eval $ac_try) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit $ac_status); }; }; then
17151
17152         test -n "$cf_math" && cat >>confdefs.h <<EOF
17153 #define ETIP_NEEDS_${cf_math} 1
17154 EOF
17155
17156         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17157 #define ETIP_NEEDS_${cf_excp} 1
17158 EOF
17159
17160         cf_result="$cf_math $cf_excp"
17161         break
17162
17163 else
17164   echo "$as_me: failed program was:" >&5
17165 cat conftest.$ac_ext >&5
17166 fi
17167 rm -f conftest.$ac_objext conftest.$ac_ext
17168 done
17169 done
17170 echo "$as_me:17170: result: $cf_result" >&5
17171 echo "${ECHO_T}$cf_result" >&6
17172 CXXFLAGS="$cf_save_CXXFLAGS"
17173
17174 if test -n "$CXX"; then
17175 echo "$as_me:17175: checking if $CXX accepts parameter initialization" >&5
17176 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17177 if test "${cf_cv_cpp_param_init+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180
17181         ac_ext=cc
17182 ac_cpp='$CXXCPP $CPPFLAGS'
17183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17184 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17186 ac_main_return=return
17187
17188         if test "$cross_compiling" = yes; then
17189   cf_cv_cpp_param_init=unknown
17190 else
17191   cat >conftest.$ac_ext <<_ACEOF
17192 #line 17192 "configure"
17193 #include "confdefs.h"
17194
17195 class TEST {
17196 private:
17197         int value;
17198 public:
17199         TEST(int x = 1);
17200         ~TEST();
17201 };
17202
17203 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17204 {
17205         value = x;
17206 }
17207 void main() { }
17208
17209 _ACEOF
17210 rm -f conftest$ac_exeext
17211 if { (eval echo "$as_me:17211: \"$ac_link\"") >&5
17212   (eval $ac_link) 2>&5
17213   ac_status=$?
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17216   { (eval echo "$as_me:17216: \"$ac_try\"") >&5
17217   (eval $ac_try) 2>&5
17218   ac_status=$?
17219   echo "$as_me:17219: \$? = $ac_status" >&5
17220   (exit $ac_status); }; }; then
17221   cf_cv_cpp_param_init=yes
17222 else
17223   echo "$as_me: program exited with status $ac_status" >&5
17224 echo "$as_me: failed program was:" >&5
17225 cat conftest.$ac_ext >&5
17226 cf_cv_cpp_param_init=no
17227 fi
17228 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17229 fi
17230         ac_ext=cc
17231 ac_cpp='$CXXCPP $CPPFLAGS'
17232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17233 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17235 ac_main_return=return
17236
17237 fi
17238 echo "$as_me:17238: result: $cf_cv_cpp_param_init" >&5
17239 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17240 fi
17241 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17242 #define CPP_HAS_PARAM_INIT 1
17243 EOF
17244
17245 if test -n "$CXX"; then
17246
17247 echo "$as_me:17247: checking if $CXX accepts static_cast" >&5
17248 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17249 if test "${cf_cv_cpp_static_cast+set}" = set; then
17250   echo $ECHO_N "(cached) $ECHO_C" >&6
17251 else
17252
17253         ac_ext=cc
17254 ac_cpp='$CXXCPP $CPPFLAGS'
17255 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17256 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17257 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17258 ac_main_return=return
17259
17260         cat >conftest.$ac_ext <<_ACEOF
17261 #line 17261 "configure"
17262 #include "confdefs.h"
17263
17264 class NCursesPanel
17265 {
17266 public:
17267   NCursesPanel(int nlines,
17268                int ncols,
17269                int begin_y = 0,
17270                int begin_x = 0)
17271   {
17272   }
17273
17274   ~NCursesPanel();
17275 };
17276
17277 template<class T> class NCursesUserPanel : public NCursesPanel
17278 {
17279 public:
17280   NCursesUserPanel (int nlines,
17281                     int ncols,
17282                     int begin_y = 0,
17283                     int begin_x = 0,
17284                     const T* p_UserData = static_cast<T*>(0))
17285     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17286   {
17287   };
17288   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17289   {
17290   };
17291
17292   virtual ~NCursesUserPanel() {};
17293 };
17294
17295 int
17296 main ()
17297 {
17298
17299         const char* p_UserData = static_cast<char*>(0)
17300   ;
17301   return 0;
17302 }
17303 _ACEOF
17304 rm -f conftest.$ac_objext
17305 if { (eval echo "$as_me:17305: \"$ac_compile\"") >&5
17306   (eval $ac_compile) 2>&5
17307   ac_status=$?
17308   echo "$as_me:17308: \$? = $ac_status" >&5
17309   (exit $ac_status); } &&
17310          { ac_try='test -s conftest.$ac_objext'
17311   { (eval echo "$as_me:17311: \"$ac_try\"") >&5
17312   (eval $ac_try) 2>&5
17313   ac_status=$?
17314   echo "$as_me:17314: \$? = $ac_status" >&5
17315   (exit $ac_status); }; }; then
17316   cf_cv_cpp_static_cast=yes
17317 else
17318   echo "$as_me: failed program was:" >&5
17319 cat conftest.$ac_ext >&5
17320 cf_cv_cpp_static_cast=no
17321 fi
17322 rm -f conftest.$ac_objext conftest.$ac_ext
17323
17324         ac_ext=cc
17325 ac_cpp='$CXXCPP $CPPFLAGS'
17326 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17327 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17328 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17329 ac_main_return=return
17330
17331 fi
17332 echo "$as_me:17332: result: $cf_cv_cpp_static_cast" >&5
17333 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17334
17335 fi
17336
17337 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17338 #define CPP_HAS_STATIC_CAST 1
17339 EOF
17340
17341         CXX_AR='$(AR)'
17342         CXX_ARFLAGS='$(ARFLAGS)'
17343         case $cf_cv_system_name in #(vi
17344         irix*) #(vi
17345             if test "$GXX" != yes ; then
17346                 CXX_AR='$(CXX)'
17347                 CXX_ARFLAGS='-ar -o'
17348             fi
17349             ;;
17350         sco3.2v5*) #(vi
17351             CXXLDFLAGS="-u main"
17352             ;;
17353         solaris2*)
17354             if test "$GXX" != yes ; then
17355                 CXX_AR='$(CXX)'
17356                 CXX_ARFLAGS='-xar -o'
17357             fi
17358             ;;
17359         esac
17360
17361 else
17362         cf_cxx_library=no
17363         cf_cv_builtin_bool=1
17364
17365         # Just because we are not configuring against C++ right now does not
17366         # mean that a user will not want to use C++.  Some distributors disable
17367         # the C++ portion of this configuration as a shortcut (or just to avoid
17368         # compiling the demo in the c++ directory).  So we need a reasonable
17369         # default for the 'bool' type.
17370         #
17371         # Caveat: since the storage of the bool type is not standardized, it
17372         # may change.
17373
17374         if test "$NCURSES_BOOL" != auto ; then
17375                 cf_cv_type_of_bool=$NCURSES_BOOL
17376                 cf_cv_header_stdbool_h=0
17377         else
17378                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17379
17380 echo "$as_me:17380: checking for size of bool" >&5
17381 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17382 if test "${cf_cv_type_of_bool+set}" = set; then
17383   echo $ECHO_N "(cached) $ECHO_C" >&6
17384 else
17385
17386         rm -f cf_test.out
17387         if test "$cross_compiling" = yes; then
17388   cf_cv_type_of_bool=unknown
17389 else
17390   cat >conftest.$ac_ext <<_ACEOF
17391 #line 17391 "configure"
17392 #include "confdefs.h"
17393
17394 #include <stdlib.h>
17395 #include <stdio.h>
17396
17397 #if defined(__cplusplus)
17398
17399 #ifdef HAVE_GXX_BUILTIN_H
17400 #include <g++/builtin.h>
17401 #elif HAVE_GPP_BUILTIN_H
17402 #include <gpp/builtin.h>
17403 #elif HAVE_BUILTIN_H
17404 #include <builtin.h>
17405 #endif
17406
17407 #else
17408
17409 #if $cf_cv_header_stdbool_h
17410 #include <stdbool.h>
17411 #endif
17412
17413 #endif
17414
17415 main()
17416 {
17417         FILE *fp = fopen("cf_test.out", "w");
17418         if (fp != 0) {
17419                 bool x = true;
17420                 if ((bool)(-x) >= 0)
17421                         fputs("unsigned ", fp);
17422                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17423                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17424                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17425                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17426                 fclose(fp);
17427         }
17428         ${cf_cv_main_return:-return}(0);
17429 }
17430
17431 _ACEOF
17432 rm -f conftest$ac_exeext
17433 if { (eval echo "$as_me:17433: \"$ac_link\"") >&5
17434   (eval $ac_link) 2>&5
17435   ac_status=$?
17436   echo "$as_me:17436: \$? = $ac_status" >&5
17437   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17438   { (eval echo "$as_me:17438: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:17441: \$? = $ac_status" >&5
17442   (exit $ac_status); }; }; then
17443   cf_cv_type_of_bool=`cat cf_test.out`
17444                  if test -z "$cf_cv_type_of_bool"; then
17445                    cf_cv_type_of_bool=unknown
17446                  fi
17447 else
17448   echo "$as_me: program exited with status $ac_status" >&5
17449 echo "$as_me: failed program was:" >&5
17450 cat conftest.$ac_ext >&5
17451 cf_cv_type_of_bool=unknown
17452 fi
17453 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17454 fi
17455
17456 fi
17457
17458         rm -f cf_test.out
17459 echo "$as_me:17459: result: $cf_cv_type_of_bool" >&5
17460 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17461 if test "$cf_cv_type_of_bool" = unknown ; then
17462         case .$NCURSES_BOOL in #(vi
17463         .auto|.) NCURSES_BOOL=unsigned;;
17464         esac
17465         { echo "$as_me:17465: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17466 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17467         cf_cv_type_of_bool=$NCURSES_BOOL
17468 fi
17469
17470                 else
17471                         echo "$as_me:17471: checking for fallback type of bool" >&5
17472 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17473                         case "$host_cpu" in #(vi
17474                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17475                         *)      cf_cv_type_of_bool=int  ;;
17476                         esac
17477                         echo "$as_me:17477: result: $cf_cv_type_of_bool" >&5
17478 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17479                 fi
17480         fi
17481 fi
17482
17483 # If the C compiler did not declare bool, and we did not determine that the C++
17484 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17485 # ncurses library use the same type as C++ bool.  Note that this allows one to
17486 # specify the type of bool in a configure-script option and postpone
17487 # integration with the C++ compiler provided that the types are compatible.
17488 USE_CXX_BOOL=1
17489 if test $cf_cv_cc_bool_type = 1
17490 then
17491         # oops: C has a bool.  Unlikely, but C++ could differ.
17492         USE_CXX_BOOL=0
17493 elif test $cf_cv_builtin_bool = 0
17494 then
17495         # C++ has no bool
17496         USE_CXX_BOOL=0
17497 else
17498         # this is the normal case
17499         USE_CXX_BOOL='defined(__cplusplus)'
17500 fi
17501
17502 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17503
17504 if test "$cf_with_ada" != "no" ; then
17505     if test "$with_libtool" != "no"; then
17506         { echo "$as_me:17506: WARNING: libtool does not support Ada - disabling feature" >&5
17507 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17508         cf_with_ada=no
17509     fi
17510 fi
17511
17512 if test "$cf_with_ada" != "no" ; then
17513 cf_ada_make=gnatmake
17514 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17515 set dummy $cf_ada_make; ac_word=$2
17516 echo "$as_me:17516: checking for $ac_word" >&5
17517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17518 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17519   echo $ECHO_N "(cached) $ECHO_C" >&6
17520 else
17521   if test -n "$gnat_exists"; then
17522   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17523 else
17524   ac_save_IFS=$IFS; IFS=$ac_path_separator
17525 ac_dummy="$PATH"
17526 for ac_dir in $ac_dummy; do
17527   IFS=$ac_save_IFS
17528   test -z "$ac_dir" && ac_dir=.
17529   $as_executable_p "$ac_dir/$ac_word" || continue
17530 ac_cv_prog_gnat_exists="yes"
17531 echo "$as_me:17531: found $ac_dir/$ac_word" >&5
17532 break
17533 done
17534
17535   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17536 fi
17537 fi
17538 gnat_exists=$ac_cv_prog_gnat_exists
17539 if test -n "$gnat_exists"; then
17540   echo "$as_me:17540: result: $gnat_exists" >&5
17541 echo "${ECHO_T}$gnat_exists" >&6
17542 else
17543   echo "$as_me:17543: result: no" >&5
17544 echo "${ECHO_T}no" >&6
17545 fi
17546
17547 if test "$ac_cv_prog_gnat_exists" = no; then
17548    cf_ada_make=
17549 else
17550
17551 echo "$as_me:17551: checking for gnat version" >&5
17552 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17553 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17554   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17555 echo "$as_me:17555: result: $cf_gnat_version" >&5
17556 echo "${ECHO_T}$cf_gnat_version" >&6
17557
17558 case $cf_gnat_version in
17559   3.1[1-9]*|3.[2-9]*|[4-9].*)
17560     cf_cv_prog_gnat_correct=yes
17561     ;;
17562   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17563      cf_cv_prog_gnat_correct=no
17564      ;;
17565 esac
17566 case $cf_gnat_version in
17567   3.[1-9]*|[4-9].*)
17568       cf_compile_generics=generics
17569       cf_generic_objects="\${GENOBJS}"
17570       ;;
17571   *)  cf_compile_generics=
17572       cf_generic_objects=
17573       ;;
17574 esac
17575
17576    # Extract the first word of "m4", so it can be a program name with args.
17577 set dummy m4; ac_word=$2
17578 echo "$as_me:17578: checking for $ac_word" >&5
17579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17580 if test "${ac_cv_prog_M4_exists+set}" = set; then
17581   echo $ECHO_N "(cached) $ECHO_C" >&6
17582 else
17583   if test -n "$M4_exists"; then
17584   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17585 else
17586   ac_save_IFS=$IFS; IFS=$ac_path_separator
17587 ac_dummy="$PATH"
17588 for ac_dir in $ac_dummy; do
17589   IFS=$ac_save_IFS
17590   test -z "$ac_dir" && ac_dir=.
17591   $as_executable_p "$ac_dir/$ac_word" || continue
17592 ac_cv_prog_M4_exists="yes"
17593 echo "$as_me:17593: found $ac_dir/$ac_word" >&5
17594 break
17595 done
17596
17597   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17598 fi
17599 fi
17600 M4_exists=$ac_cv_prog_M4_exists
17601 if test -n "$M4_exists"; then
17602   echo "$as_me:17602: result: $M4_exists" >&5
17603 echo "${ECHO_T}$M4_exists" >&6
17604 else
17605   echo "$as_me:17605: result: no" >&5
17606 echo "${ECHO_T}no" >&6
17607 fi
17608
17609    if test "$ac_cv_prog_M4_exists" = no; then
17610       cf_cv_prog_gnat_correct=no
17611       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17612    fi
17613    if test "$cf_cv_prog_gnat_correct" = yes; then
17614       echo "$as_me:17614: checking if GNAT works" >&5
17615 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17616
17617 rm -f conftest*
17618 cat >>conftest.ads <<CF_EOF
17619 procedure conftest;
17620 CF_EOF
17621 cat >>conftest.adb <<CF_EOF
17622 with Text_IO;
17623 with GNAT.OS_Lib;
17624 procedure conftest is
17625 begin
17626    Text_IO.Put ("Hello World");
17627    Text_IO.New_Line;
17628    GNAT.OS_Lib.OS_Exit (0);
17629 end conftest;
17630 CF_EOF
17631 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17632    if ( ./conftest 1>&5 2>&1 ) ; then
17633       cf_cv_prog_gnat_correct=yes
17634    else
17635       cf_cv_prog_gnat_correct=no
17636    fi
17637 else
17638    cf_cv_prog_gnat_correct=no
17639 fi
17640 rm -f conftest*
17641
17642       echo "$as_me:17642: result: $cf_cv_prog_gnat_correct" >&5
17643 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17644    fi
17645 fi
17646 if test "$cf_cv_prog_gnat_correct" = yes; then
17647    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17648
17649    echo "$as_me:17649: checking if GNAT pragma Unreferenced works" >&5
17650 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17651
17652 rm -f conftest*
17653 cat >>conftest.ads <<CF_EOF
17654 procedure conftest;
17655 CF_EOF
17656 cat >>conftest.adb <<CF_EOF
17657 with Text_IO;
17658 with GNAT.OS_Lib;
17659 procedure conftest is
17660    test : Integer;
17661    pragma Unreferenced (test);
17662 begin
17663    test := 1;
17664    Text_IO.Put ("Hello World");
17665    Text_IO.New_Line;
17666    GNAT.OS_Lib.OS_Exit (0);
17667 end conftest;
17668 CF_EOF
17669 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17670       cf_cv_pragma_unreferenced=yes
17671 else
17672    cf_cv_pragma_unreferenced=no
17673 fi
17674 rm -f conftest*
17675
17676    echo "$as_me:17676: result: $cf_cv_pragma_unreferenced" >&5
17677 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17678
17679    # if the pragma is supported, use it (needed in the Trace code).
17680    if test $cf_cv_pragma_unreferenced = yes ; then
17681       PRAGMA_UNREF=TRUE
17682    else
17683       PRAGMA_UNREF=FALSE
17684    fi
17685
17686 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17687 if test "${with_ada_compiler+set}" = set; then
17688   withval="$with_ada_compiler"
17689   cf_ada_compiler=$withval
17690 else
17691   cf_ada_compiler=gnatmake
17692 fi;
17693
17694    cf_ada_package=terminal_interface
17695
17696 # Check whether --with-ada-include or --without-ada-include was given.
17697 if test "${with_ada_include+set}" = set; then
17698   withval="$with_ada_include"
17699
17700 else
17701   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17702 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17703
17704 if test "x$prefix" != xNONE; then
17705   cf_path_syntax="$prefix"
17706 else
17707   cf_path_syntax="$ac_default_prefix"
17708 fi
17709
17710 case ".$withval" in #(vi
17711 .\$\(*\)*|.\'*\'*) #(vi
17712   ;;
17713 ..|./*|.\\*) #(vi
17714   ;;
17715 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17716   ;;
17717 .\${*prefix}*) #(vi
17718   eval withval="$withval"
17719   case ".$withval" in #(vi
17720   .NONE/*)
17721     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17722     ;;
17723   esac
17724   ;; #(vi
17725 .no|.NONE/*)
17726   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17727   ;;
17728 *)
17729   { { echo "$as_me:17729: error: expected a pathname, not \"$withval\"" >&5
17730 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17731    { (exit 1); exit 1; }; }
17732   ;;
17733 esac
17734
17735 fi
17736 ADA_INCLUDE="$withval"
17737
17738 # Check whether --with-ada-objects or --without-ada-objects was given.
17739 if test "${with_ada_objects+set}" = set; then
17740   withval="$with_ada_objects"
17741
17742 else
17743   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17744 fi; if test -n "$prefix/lib/ada/adalib" ; then
17745
17746 if test "x$prefix" != xNONE; then
17747   cf_path_syntax="$prefix"
17748 else
17749   cf_path_syntax="$ac_default_prefix"
17750 fi
17751
17752 case ".$withval" in #(vi
17753 .\$\(*\)*|.\'*\'*) #(vi
17754   ;;
17755 ..|./*|.\\*) #(vi
17756   ;;
17757 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17758   ;;
17759 .\${*prefix}*) #(vi
17760   eval withval="$withval"
17761   case ".$withval" in #(vi
17762   .NONE/*)
17763     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17764     ;;
17765   esac
17766   ;; #(vi
17767 .no|.NONE/*)
17768   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17769   ;;
17770 *)
17771   { { echo "$as_me:17771: error: expected a pathname, not \"$withval\"" >&5
17772 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17773    { (exit 1); exit 1; }; }
17774   ;;
17775 esac
17776
17777 fi
17778 ADA_OBJECTS="$withval"
17779
17780 fi
17781 fi
17782 else
17783    cf_with_ada=no
17784 fi
17785
17786 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17787 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17788 ###
17789 ### ticlib modules may be a separate library, otherwise contained in termlib.
17790 ### termlib modules may be a separate library, otherwise contained in ncurses.
17791 ###
17792 ### The of "+" or " " between the tokens controls the way the script
17793 ### chooses to split module lists into libraries.
17794 ###
17795 ### (see CF_LIB_RULES).
17796 echo "$as_me:17796: checking for library subsets" >&5
17797 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17798 LIB_SUBSETS=
17799
17800 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17801         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17802         if test "$with_ticlib" != no ; then
17803                 LIB_SUBSETS="${LIB_SUBSETS} "
17804         else
17805                 LIB_SUBSETS="${LIB_SUBSETS}+"
17806         fi
17807 fi
17808
17809 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17810 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17811
17812 if test "$with_termlib" != no ; then
17813         LIB_SUBSETS="${LIB_SUBSETS} "
17814 else
17815         LIB_SUBSETS="${LIB_SUBSETS}+"
17816 fi
17817
17818 LIB_SUBSETS="${LIB_SUBSETS}base"
17819
17820 # Most term-driver calls are to tinfo, but some like init_pair are to the
17821 # base library (so it resides in base).
17822 if test "$with_term_driver" != no ; then
17823         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17824         case $cf_cv_system_name in #(vi
17825         *mingw32*) #(vi
17826                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17827                 ;;
17828         *) #(vi
17829                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17830                 ;;
17831         esac
17832 fi
17833
17834 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17835 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17836
17837 echo "$as_me:17837: result: $LIB_SUBSETS" >&5
17838 echo "${ECHO_T}$LIB_SUBSETS" >&6
17839
17840 ### Construct the list of include-directories to be generated
17841
17842 CPPFLAGS="$CPPFLAGS -I. -I../include"
17843 if test "$srcdir" != "."; then
17844         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17845 fi
17846 if test "$GCC" != yes; then
17847         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17848 elif test "$includedir" != "/usr/include"; then
17849         if test "$includedir" = '${prefix}/include' ; then
17850                 if test $prefix != /usr ; then
17851                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17852                 fi
17853         else
17854                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17855         fi
17856 fi
17857
17858 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17859 if test "$srcdir" != "."; then
17860         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17861 fi
17862 if test "$GCC" != yes; then
17863         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17864 elif test "$includedir" != "/usr/include"; then
17865         if test "$includedir" = '${prefix}/include' ; then
17866                 if test $prefix != /usr ; then
17867                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17868                 fi
17869         else
17870                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17871         fi
17872 fi
17873
17874 ### Build up pieces for makefile rules
17875 echo "$as_me:17875: checking default library suffix" >&5
17876 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17877
17878         case $DFT_LWR_MODEL in
17879         libtool) DFT_ARG_SUFFIX=''   ;;
17880         normal)  DFT_ARG_SUFFIX=''   ;;
17881         debug)   DFT_ARG_SUFFIX='_g' ;;
17882         profile) DFT_ARG_SUFFIX='_p' ;;
17883         shared)  DFT_ARG_SUFFIX=''   ;;
17884         esac
17885         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17886 echo "$as_me:17886: result: $DFT_ARG_SUFFIX" >&5
17887 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17888
17889 echo "$as_me:17889: checking default library-dependency suffix" >&5
17890 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17891
17892         case $DFT_LWR_MODEL in #(vi
17893         libtool) #(vi
17894                 DFT_LIB_SUFFIX='.la'
17895                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17896                 ;;
17897         normal) #(vi
17898                 DFT_LIB_SUFFIX='.a'
17899                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17900                 ;;
17901         debug) #(vi
17902                 DFT_LIB_SUFFIX='_g.a'
17903                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17904                 ;;
17905         profile) #(vi
17906                 DFT_LIB_SUFFIX='_p.a'
17907                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17908                 ;;
17909         shared) #(vi
17910                 case $cf_cv_system_name in
17911                 aix[56]*) #(vi
17912                         DFT_LIB_SUFFIX='.a'
17913                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17914                         ;;
17915                 cygwin*) #(vi
17916                         DFT_LIB_SUFFIX='.dll'
17917                         DFT_DEP_SUFFIX='.dll.a'
17918                         ;;
17919                 darwin*) #(vi
17920                         DFT_LIB_SUFFIX='.dylib'
17921                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17922                         ;;
17923                 hpux*) #(vi
17924                         case $target in
17925                         ia64*) #(vi
17926                                 DFT_LIB_SUFFIX='.so'
17927                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17928                                 ;;
17929                         *) #(vi
17930                                 DFT_LIB_SUFFIX='.sl'
17931                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17932                                 ;;
17933                         esac
17934                         ;;
17935                 *)      DFT_LIB_SUFFIX='.so'
17936                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17937                         ;;
17938                 esac
17939         esac
17940         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17941         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17942 echo "$as_me:17942: result: $DFT_DEP_SUFFIX" >&5
17943 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17944
17945 echo "$as_me:17945: checking default object directory" >&5
17946 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17947
17948         case $DFT_LWR_MODEL in
17949         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17950         normal)  DFT_OBJ_SUBDIR='objects' ;;
17951         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17952         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17953         shared)
17954                 case $cf_cv_system_name in #(vi
17955                 cygwin) #(vi
17956                         DFT_OBJ_SUBDIR='objects' ;;
17957                 *)
17958                         DFT_OBJ_SUBDIR='obj_s' ;;
17959                 esac
17960         esac
17961 echo "$as_me:17961: result: $DFT_OBJ_SUBDIR" >&5
17962 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17963
17964 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17965 if test "$cf_with_cxx" = yes ; then
17966 echo "$as_me:17966: checking c++ library-dependency suffix" >&5
17967 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17968 if test "$with_libtool" != "no"; then
17969         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17970 else
17971
17972         case normal in #(vi
17973         libtool) #(vi
17974                 CXX_LIB_SUFFIX='.la'
17975                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17976                 ;;
17977         normal) #(vi
17978                 CXX_LIB_SUFFIX='.a'
17979                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17980                 ;;
17981         debug) #(vi
17982                 CXX_LIB_SUFFIX='_g.a'
17983                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17984                 ;;
17985         profile) #(vi
17986                 CXX_LIB_SUFFIX='_p.a'
17987                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17988                 ;;
17989         shared) #(vi
17990                 case $cf_cv_system_name in
17991                 aix[56]*) #(vi
17992                         CXX_LIB_SUFFIX='.a'
17993                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17994                         ;;
17995                 cygwin*) #(vi
17996                         CXX_LIB_SUFFIX='.dll'
17997                         CXX_DEP_SUFFIX='.dll.a'
17998                         ;;
17999                 darwin*) #(vi
18000                         CXX_LIB_SUFFIX='.dylib'
18001                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18002                         ;;
18003                 hpux*) #(vi
18004                         case $target in
18005                         ia64*) #(vi
18006                                 CXX_LIB_SUFFIX='.so'
18007                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18008                                 ;;
18009                         *) #(vi
18010                                 CXX_LIB_SUFFIX='.sl'
18011                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18012                                 ;;
18013                         esac
18014                         ;;
18015                 *)      CXX_LIB_SUFFIX='.so'
18016                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18017                         ;;
18018                 esac
18019         esac
18020         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18021         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18022 fi
18023 echo "$as_me:18023: result: $CXX_LIB_SUFFIX" >&5
18024 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18025
18026 fi
18027
18028 # do not want -ldl in build except as needed for -lncurses dependency
18029 if test "$with_dlsym" = yes ; then
18030 if test $DFT_LWR_MODEL = shared || \
18031    test $DFT_LWR_MODEL = libtool ; then
18032
18033 # remove dl library from $LIBS
18034 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18035
18036 fi
18037 fi
18038 ### Set up low-level terminfo dependencies for makefiles.
18039
18040 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18041 # do not need libdl
18042 TICS_LIST=
18043 if test "$with_dlsym" = yes ; then
18044
18045 # remove dl library from $SHLIB_LIST
18046 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18047
18048 fi
18049
18050 if test "$with_ticlib" != no ; then
18051
18052         if test "$with_ticlib" != yes ; then
18053                 TICS_NAME=$with_ticlib
18054                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18055                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18056                 TICS_LIB_SUFFIX="${with_ticlib}"
18057         else
18058                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18059                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18060                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18061         fi
18062         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18063 else
18064         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18065 fi
18066
18067 if test "$with_termlib" != no ; then
18068
18069         if test "$with_termlib" != yes ; then
18070                 TINFO_NAME=$with_termlib
18071                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18072                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18073                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18074                 TINFO_LIB_SUFFIX="${with_termlib}"
18075         else
18076                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18077                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18078                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18079                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18080         fi
18081
18082         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18083         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18084         if test "$DFT_LWR_MODEL" = "libtool"; then
18085                 TEST_ARGS="${TEST_DEPS}"
18086                 TEST_ARG2="${TEST_DEP2}"
18087                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18088                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18089                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18090         else
18091                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18092                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18093                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18094                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18095                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18096         fi
18097 else
18098         # the next lines are needed for linking libtic over libncurses
18099         TINFO_NAME=${LIB_NAME}
18100         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18101         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18102         if test "$with_tic_depends" = yes ; then
18103                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18104         else
18105                 TICS_LIST="$SHLIB_LIST"
18106         fi
18107
18108         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18109 fi
18110
18111 if test "$DFT_LWR_MODEL" = shared ; then
18112         case $cf_cv_system_name in #(vi
18113         cygwin*)
18114                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18115                 TINFO_SUFFIX=.dll
18116                 ;;
18117         esac
18118 fi
18119
18120 if test "$with_dlsym" = yes ; then
18121
18122 # remove dl library from $TICS_LIST
18123 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18124
18125 fi
18126
18127 if test "$DFT_LWR_MODEL" = "libtool"; then
18128     OBJEXT=lo
18129 fi
18130
18131 # needed for Ada95
18132 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18133
18134 case $DFT_LWR_MODEL in
18135 normal|debug|profile)
18136
18137 if test "$GCC" = yes ; then
18138         case $cf_cv_system_name in #(
18139         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18140                 LDFLAGS_STATIC=
18141                 LDFLAGS_SHARED=
18142                 ;;
18143     *)  #( normally, except when broken
18144         LDFLAGS_STATIC=-static
18145         LDFLAGS_SHARED=-dynamic
18146         ;;
18147     esac
18148 else
18149         case $cf_cv_system_name in #(
18150         aix[456]*)      #( from ld manpage
18151                 LDFLAGS_STATIC=-bstatic
18152                 LDFLAGS_SHARED=-bdynamic
18153                 ;;
18154         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18155                 # We could also use just "archive" and "shared".
18156                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18157                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18158                 ;;
18159         irix*)          #( from ld manpage IRIX64
18160                 LDFLAGS_STATIC=-Bstatic
18161                 LDFLAGS_SHARED=-Bdynamic
18162                 ;;
18163         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18164                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18165                 LDFLAGS_STATIC=-noso
18166                 LDFLAGS_SHARED=-so_archive
18167                 ;;
18168         solaris2*)
18169                 LDFLAGS_STATIC=-Bstatic
18170                 LDFLAGS_SHARED=-Bdynamic
18171                 ;;
18172         esac
18173 fi
18174
18175         ;;
18176 esac
18177
18178 echo "$as_me:18178: checking where we will install curses.h" >&5
18179 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18180 test "$with_overwrite" = no && \
18181 test "x$includedir" = 'x${prefix}/include' && \
18182         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18183 echo "$as_me:18183: result: $includedir" >&5
18184 echo "${ECHO_T}$includedir" >&6
18185
18186 ### Resolve a conflict between normal and wide-curses by forcing applications
18187 ### that will need libutf8 to add it to their configure script.
18188 if test "$with_overwrite" != no ; then
18189 if test "$NCURSES_LIBUTF8" = 1 ; then
18190         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18191         { echo "$as_me:18191: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18192 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18193 fi
18194 fi
18195 WITH_OVERWRITE=$with_overwrite
18196
18197 # used to separate tack out of the tree
18198 NCURSES_TREE=
18199
18200 ### predefined stuff for the test programs
18201 cat >>confdefs.h <<\EOF
18202 #define HAVE_SLK_COLOR 1
18203 EOF
18204
18205 ### Construct the list of subdirectories for which we'll customize makefiles
18206 ### with the appropriate compile-rules.
18207
18208 echo "$as_me:18208: checking for src modules" >&5
18209 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18210
18211 # dependencies and linker-arguments for test-programs
18212 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18213 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18214 if test "$DFT_LWR_MODEL" = "libtool"; then
18215         TEST_ARGS="${TEST_DEPS}"
18216         TEST_ARG2="${TEST_DEP2}"
18217 else
18218         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18219         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18220 fi
18221
18222 cf_cv_src_modules=
18223 for cf_dir in $modules_to_build
18224 do
18225         if test -f $srcdir/$cf_dir/modules; then
18226
18227                 # We may/may not have tack in the distribution, though the
18228                 # makefile is.
18229                 if test $cf_dir = tack ; then
18230                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18231                                 continue
18232                         fi
18233                 fi
18234
18235                 if test -z "$cf_cv_src_modules"; then
18236                         cf_cv_src_modules=$cf_dir
18237                 else
18238                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18239                 fi
18240
18241                 # Make the ncurses_cfg.h file record the library interface files as
18242                 # well.  These are header files that are the same name as their
18243                 # directory.  Ncurses is the only library that does not follow
18244                 # that pattern.
18245                 if test $cf_dir = tack ; then
18246                         continue
18247                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18248
18249 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18250
18251                         cat >>confdefs.h <<EOF
18252 #define HAVE_${cf_have_include}_H 1
18253 EOF
18254
18255                         cat >>confdefs.h <<EOF
18256 #define HAVE_LIB${cf_have_include} 1
18257 EOF
18258
18259                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18260                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18261                         if test "$DFT_LWR_MODEL" = "libtool"; then
18262                                 TEST_ARGS="${TEST_DEPS}"
18263                                 TEST_ARG2="${TEST_DEP2}"
18264                         else
18265                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18266                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18267                         fi
18268                 fi
18269         fi
18270 done
18271 echo "$as_me:18271: result: $cf_cv_src_modules" >&5
18272 echo "${ECHO_T}$cf_cv_src_modules" >&6
18273
18274 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18275 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18276
18277 SRC_SUBDIRS=
18278 if test "x$cf_with_manpages" != xno ; then
18279         SRC_SUBDIRS="$SRC_SUBDIRS man"
18280 fi
18281 SRC_SUBDIRS="$SRC_SUBDIRS include"
18282 for cf_dir in $cf_cv_src_modules
18283 do
18284         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18285 done
18286 SRC_SUBDIRS="$SRC_SUBDIRS test"
18287 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18288 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18289
18290 ADA_SUBDIRS=
18291 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18292         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18293         ADA_SUBDIRS="gen src samples"
18294 fi
18295
18296 SUB_MAKEFILES=
18297 for cf_dir in $SRC_SUBDIRS
18298 do
18299         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18300 done
18301
18302 if test -n "$ADA_SUBDIRS"; then
18303         for cf_dir in $ADA_SUBDIRS
18304         do
18305                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18306         done
18307
18308 fi
18309
18310 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18311    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18312    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18313 fi
18314
18315 DIRS_TO_MAKE="lib"
18316 for cf_item in $cf_list_models
18317 do
18318
18319         case $cf_item in
18320         libtool) cf_subdir='obj_lo'  ;;
18321         normal)  cf_subdir='objects' ;;
18322         debug)   cf_subdir='obj_g' ;;
18323         profile) cf_subdir='obj_p' ;;
18324         shared)
18325                 case $cf_cv_system_name in #(vi
18326                 cygwin) #(vi
18327                         cf_subdir='objects' ;;
18328                 *)
18329                         cf_subdir='obj_s' ;;
18330                 esac
18331         esac
18332
18333         for cf_item2 in $DIRS_TO_MAKE
18334         do
18335                 test $cf_item2 = $cf_subdir && break
18336         done
18337         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18338 done
18339 for cf_dir in $DIRS_TO_MAKE
18340 do
18341         test ! -d $cf_dir && mkdir $cf_dir
18342 done
18343
18344 # symbols that differ when compiling Ada95 by itself.
18345 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18346
18347 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18348
18349 # values to use as strings
18350 cat >>confdefs.h <<EOF
18351 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18352 EOF
18353
18354 cat >>confdefs.h <<EOF
18355 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18356 EOF
18357
18358 ### Now that we're done running tests, add the compiler-warnings, if any
18359
18360 cf_fix_cppflags=no
18361 cf_new_cflags=
18362 cf_new_cppflags=
18363 cf_new_extra_cppflags=
18364
18365 for cf_add_cflags in $EXTRA_CFLAGS
18366 do
18367 case $cf_fix_cppflags in
18368 no)
18369         case $cf_add_cflags in #(vi
18370         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18371                 case $cf_add_cflags in
18372                 -D*)
18373                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18374
18375                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18376                                 && test -z "${cf_tst_cflags}" \
18377                                 && cf_fix_cppflags=yes
18378
18379                         if test $cf_fix_cppflags = yes ; then
18380                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18381                                 continue
18382                         elif test "${cf_tst_cflags}" = "\"'" ; then
18383                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18384                                 continue
18385                         fi
18386                         ;;
18387                 esac
18388                 case "$CPPFLAGS" in
18389                 *$cf_add_cflags) #(vi
18390                         ;;
18391                 *) #(vi
18392                         case $cf_add_cflags in #(vi
18393                         -D*)
18394                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18395
18396 CPPFLAGS=`echo "$CPPFLAGS" | \
18397         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18398                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18399
18400                                 ;;
18401                         esac
18402                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18403                         ;;
18404                 esac
18405                 ;;
18406         *)
18407                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18408                 ;;
18409         esac
18410         ;;
18411 yes)
18412         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18413
18414         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18415
18416         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18417                 && test -z "${cf_tst_cflags}" \
18418                 && cf_fix_cppflags=no
18419         ;;
18420 esac
18421 done
18422
18423 if test -n "$cf_new_cflags" ; then
18424
18425         CFLAGS="$CFLAGS $cf_new_cflags"
18426 fi
18427
18428 if test -n "$cf_new_cppflags" ; then
18429
18430         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18431 fi
18432
18433 if test -n "$cf_new_extra_cppflags" ; then
18434
18435         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18436 fi
18437
18438 ### If we're building with rpath, try to link non-standard libs that way too.
18439 if test "$DFT_LWR_MODEL" = "shared"; then
18440
18441 echo "$as_me:18441: checking if rpath should be not be set" >&5
18442 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
18443
18444 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18445 if test "${enable_rpath_hack+set}" = set; then
18446   enableval="$enable_rpath_hack"
18447   test "$enableval" != no && enableval=yes
18448   if test "$enableval" != "yes" ; then
18449     cf_disable_rpath_hack=yes
18450   else
18451     cf_disable_rpath_hack=no
18452   fi
18453 else
18454   enableval=yes
18455   cf_disable_rpath_hack=no
18456
18457 fi;
18458 echo "$as_me:18458: result: $cf_disable_rpath_hack" >&5
18459 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18460 if test "$cf_disable_rpath_hack" = no ; then
18461
18462 echo "$as_me:18462: checking for updated LDFLAGS" >&5
18463 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18464 if test -n "$LD_RPATH_OPT" ; then
18465         echo "$as_me:18465: result: maybe" >&5
18466 echo "${ECHO_T}maybe" >&6
18467
18468         for ac_prog in ldd
18469 do
18470   # Extract the first word of "$ac_prog", so it can be a program name with args.
18471 set dummy $ac_prog; ac_word=$2
18472 echo "$as_me:18472: checking for $ac_word" >&5
18473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18474 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18475   echo $ECHO_N "(cached) $ECHO_C" >&6
18476 else
18477   if test -n "$cf_ldd_prog"; then
18478   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18479 else
18480   ac_save_IFS=$IFS; IFS=$ac_path_separator
18481 ac_dummy="$PATH"
18482 for ac_dir in $ac_dummy; do
18483   IFS=$ac_save_IFS
18484   test -z "$ac_dir" && ac_dir=.
18485   $as_executable_p "$ac_dir/$ac_word" || continue
18486 ac_cv_prog_cf_ldd_prog="$ac_prog"
18487 echo "$as_me:18487: found $ac_dir/$ac_word" >&5
18488 break
18489 done
18490
18491 fi
18492 fi
18493 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18494 if test -n "$cf_ldd_prog"; then
18495   echo "$as_me:18495: result: $cf_ldd_prog" >&5
18496 echo "${ECHO_T}$cf_ldd_prog" >&6
18497 else
18498   echo "$as_me:18498: result: no" >&5
18499 echo "${ECHO_T}no" >&6
18500 fi
18501
18502   test -n "$cf_ldd_prog" && break
18503 done
18504 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18505
18506         cf_rpath_list="/usr/lib /lib"
18507         if test "$cf_ldd_prog" != no
18508         then
18509 cat >conftest.$ac_ext <<_ACEOF
18510 #line 18510 "configure"
18511 #include "confdefs.h"
18512 #include <stdio.h>
18513 int
18514 main ()
18515 {
18516 printf("Hello");
18517   ;
18518   return 0;
18519 }
18520 _ACEOF
18521 rm -f conftest.$ac_objext conftest$ac_exeext
18522 if { (eval echo "$as_me:18522: \"$ac_link\"") >&5
18523   (eval $ac_link) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -s conftest$ac_exeext'
18528   { (eval echo "$as_me:18528: \"$ac_try\"") >&5
18529   (eval $ac_try) 2>&5
18530   ac_status=$?
18531   echo "$as_me:18531: \$? = $ac_status" >&5
18532   (exit $ac_status); }; }; then
18533   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
18534 else
18535   echo "$as_me: failed program was:" >&5
18536 cat conftest.$ac_ext >&5
18537 fi
18538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18539         fi
18540
18541         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18542
18543 echo "${as_me-configure}:18543: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18544
18545 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18546
18547 echo "${as_me-configure}:18547: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18548
18549 cf_rpath_dst=
18550 for cf_rpath_src in $LDFLAGS
18551 do
18552         case $cf_rpath_src in #(vi
18553         -L*) #(vi
18554
18555                 # check if this refers to a directory which we will ignore
18556                 cf_rpath_skip=no
18557                 if test -n "$cf_rpath_list"
18558                 then
18559                         for cf_rpath_item in $cf_rpath_list
18560                         do
18561                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18562                                 then
18563                                         cf_rpath_skip=yes
18564                                         break
18565                                 fi
18566                         done
18567                 fi
18568
18569                 if test "$cf_rpath_skip" = no
18570                 then
18571                         # transform the option
18572                         if test "$LD_RPATH_OPT" = "-R " ; then
18573                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18574                         else
18575                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18576                         fi
18577
18578                         # if we have not already added this, add it now
18579                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18580                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18581                         then
18582                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18583
18584 echo "${as_me-configure}:18584: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18585
18586                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18587                         fi
18588                 fi
18589                 ;;
18590         esac
18591         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18592 done
18593 LDFLAGS=$cf_rpath_dst
18594
18595 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18596
18597 echo "${as_me-configure}:18597: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18598
18599 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18600
18601 echo "${as_me-configure}:18601: testing ...checking LIBS $LIBS ..." 1>&5
18602
18603 cf_rpath_dst=
18604 for cf_rpath_src in $LIBS
18605 do
18606         case $cf_rpath_src in #(vi
18607         -L*) #(vi
18608
18609                 # check if this refers to a directory which we will ignore
18610                 cf_rpath_skip=no
18611                 if test -n "$cf_rpath_list"
18612                 then
18613                         for cf_rpath_item in $cf_rpath_list
18614                         do
18615                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18616                                 then
18617                                         cf_rpath_skip=yes
18618                                         break
18619                                 fi
18620                         done
18621                 fi
18622
18623                 if test "$cf_rpath_skip" = no
18624                 then
18625                         # transform the option
18626                         if test "$LD_RPATH_OPT" = "-R " ; then
18627                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18628                         else
18629                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18630                         fi
18631
18632                         # if we have not already added this, add it now
18633                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18634                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18635                         then
18636                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18637
18638 echo "${as_me-configure}:18638: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18639
18640                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18641                         fi
18642                 fi
18643                 ;;
18644         esac
18645         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18646 done
18647 LIBS=$cf_rpath_dst
18648
18649 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18650
18651 echo "${as_me-configure}:18651: testing ...checked LIBS $LIBS ..." 1>&5
18652
18653         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18654
18655 echo "${as_me-configure}:18655: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18656
18657 fi
18658
18659 fi
18660
18661 fi
18662
18663 ### Define substitutions for header files to avoid name-pollution
18664
18665 if test "$cf_cv_have_tcgetattr" = yes ; then
18666         HAVE_TCGETATTR=1
18667 else
18668         HAVE_TCGETATTR=0
18669 fi
18670
18671 if test "$ac_cv_header_termio_h" = yes ; then
18672         HAVE_TERMIO_H=1
18673 else
18674         HAVE_TERMIO_H=0
18675 fi
18676
18677 if test "$ac_cv_header_termios_h" = yes ; then
18678         HAVE_TERMIOS_H=1
18679 else
18680         HAVE_TERMIOS_H=0
18681 fi
18682
18683 ################################################################################
18684 test "$use_database" = yes && \
18685 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18686
18687 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18688 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18689
18690 if test x"$enable_pc_files" = xyes ; then \
18691 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18692 MAKE_PC_FILES=
18693 else
18694 MAKE_PC_FILES="#"
18695 fi
18696
18697 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_MAKEFILES Makefile"
18698 ac_config_commands="$ac_config_commands default"
18699 cat >confcache <<\_ACEOF
18700 # This file is a shell script that caches the results of configure
18701 # tests run on this system so they can be shared between configure
18702 # scripts and configure runs, see configure's option --config-cache.
18703 # It is not useful on other systems.  If it contains results you don't
18704 # want to keep, you may remove or edit it.
18705 #
18706 # config.status only pays attention to the cache file if you give it
18707 # the --recheck option to rerun configure.
18708 #
18709 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18710 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18711 # following values.
18712
18713 _ACEOF
18714
18715 # The following way of writing the cache mishandles newlines in values,
18716 # but we know of no workaround that is simple, portable, and efficient.
18717 # So, don't put newlines in cache variables' values.
18718 # Ultrix sh set writes to stderr and can't be redirected directly,
18719 # and sets the high bit in the cache file unless we assign to the vars.
18720 {
18721   (set) 2>&1 |
18722     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18723     *ac_space=\ *)
18724       # `set' does not quote correctly, so add quotes (double-quote
18725       # substitution turns \\\\ into \\, and sed turns \\ into \).
18726       sed -n \
18727         "s/'/'\\\\''/g;
18728           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18729       ;;
18730     *)
18731       # `set' quotes correctly as required by POSIX, so do not add quotes.
18732       sed -n \
18733         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18734       ;;
18735     esac;
18736 } |
18737   sed '
18738      t clear
18739      : clear
18740      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18741      t end
18742      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18743      : end' >>confcache
18744 if cmp -s $cache_file confcache; then :; else
18745   if test -w $cache_file; then
18746     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18747     cat confcache >$cache_file
18748   else
18749     echo "not updating unwritable cache $cache_file"
18750   fi
18751 fi
18752 rm -f confcache
18753
18754 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18755 # Let make expand exec_prefix.
18756 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18757
18758 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18759 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18760 # trailing colons and then remove the whole line if VPATH becomes empty
18761 # (actually we leave an empty line to preserve line numbers).
18762 if test "x$srcdir" = x.; then
18763   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18764 s/:*\$(srcdir):*/:/;
18765 s/:*\${srcdir}:*/:/;
18766 s/:*@srcdir@:*/:/;
18767 s/^\([^=]*=[    ]*\):*/\1/;
18768 s/:*$//;
18769 s/^[^=]*=[      ]*$//;
18770 }'
18771 fi
18772
18773 DEFS=-DHAVE_CONFIG_H
18774
18775 : ${CONFIG_STATUS=./config.status}
18776 ac_clean_files_save=$ac_clean_files
18777 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18778 { echo "$as_me:18778: creating $CONFIG_STATUS" >&5
18779 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18780 cat >$CONFIG_STATUS <<_ACEOF
18781 #! $SHELL
18782 # Generated automatically by configure.
18783 # Run this file to recreate the current configuration.
18784 # Compiler output produced by configure, useful for debugging
18785 # configure, is in config.log if it exists.
18786
18787 debug=false
18788 SHELL=\${CONFIG_SHELL-$SHELL}
18789 ac_cs_invocation="\$0 \$@"
18790
18791 _ACEOF
18792
18793 cat >>$CONFIG_STATUS <<\_ACEOF
18794 # Be Bourne compatible
18795 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18796   emulate sh
18797   NULLCMD=:
18798 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18799   set -o posix
18800 fi
18801
18802 # Name of the executable.
18803 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18804
18805 if expr a : '\(a\)' >/dev/null 2>&1; then
18806   as_expr=expr
18807 else
18808   as_expr=false
18809 fi
18810
18811 rm -f conf$$ conf$$.exe conf$$.file
18812 echo >conf$$.file
18813 if ln -s conf$$.file conf$$ 2>/dev/null; then
18814   # We could just check for DJGPP; but this test a) works b) is more generic
18815   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18816   if test -f conf$$.exe; then
18817     # Don't use ln at all; we don't have any links
18818     as_ln_s='cp -p'
18819   else
18820     as_ln_s='ln -s'
18821   fi
18822 elif ln conf$$.file conf$$ 2>/dev/null; then
18823   as_ln_s=ln
18824 else
18825   as_ln_s='cp -p'
18826 fi
18827 rm -f conf$$ conf$$.exe conf$$.file
18828
18829 as_executable_p="test -f"
18830
18831 # Support unset when possible.
18832 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18833   as_unset=unset
18834 else
18835   as_unset=false
18836 fi
18837
18838 # NLS nuisances.
18839 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18840 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18841 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18842 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18843 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18844 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18845 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18846 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18847
18848 # IFS
18849 # We need space, tab and new line, in precisely that order.
18850 as_nl='
18851 '
18852 IFS="   $as_nl"
18853
18854 # CDPATH.
18855 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18856
18857 exec 6>&1
18858
18859 _ACEOF
18860
18861 # Files that config.status was made for.
18862 if test -n "$ac_config_files"; then
18863   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18864 fi
18865
18866 if test -n "$ac_config_headers"; then
18867   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18868 fi
18869
18870 if test -n "$ac_config_links"; then
18871   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18872 fi
18873
18874 if test -n "$ac_config_commands"; then
18875   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18876 fi
18877
18878 cat >>$CONFIG_STATUS <<\EOF
18879
18880 ac_cs_usage="\
18881 \`$as_me' instantiates files from templates according to the
18882 current configuration.
18883
18884 Usage: $0 [OPTIONS] [FILE]...
18885
18886   -h, --help       print this help, then exit
18887   -V, --version    print version number, then exit
18888   -d, --debug      don't remove temporary files
18889       --recheck    update $as_me by reconfiguring in the same conditions
18890   --file=FILE[:TEMPLATE]
18891                    instantiate the configuration file FILE
18892   --header=FILE[:TEMPLATE]
18893                    instantiate the configuration header FILE
18894
18895 Configuration files:
18896 $config_files
18897
18898 Configuration headers:
18899 $config_headers
18900
18901 Configuration commands:
18902 $config_commands
18903
18904 Report bugs to <bug-autoconf@gnu.org>."
18905 EOF
18906
18907 cat >>$CONFIG_STATUS <<EOF
18908 ac_cs_version="\\
18909 config.status
18910 configured by $0, generated by GNU Autoconf 2.52.20100320,
18911   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18912
18913 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18914 Free Software Foundation, Inc.
18915 This config.status script is free software; the Free Software Foundation
18916 gives unlimited permission to copy, distribute and modify it."
18917 srcdir=$srcdir
18918 INSTALL="$INSTALL"
18919 EOF
18920
18921 cat >>$CONFIG_STATUS <<\EOF
18922 # If no file are specified by the user, then we need to provide default
18923 # value.  By we need to know if files were specified by the user.
18924 ac_need_defaults=:
18925 while test $# != 0
18926 do
18927   case $1 in
18928   --*=*)
18929     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18930     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18931     shift
18932     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18933     shift
18934     ;;
18935   -*);;
18936   *) # This is not an option, so the user has probably given explicit
18937      # arguments.
18938      ac_need_defaults=false;;
18939   esac
18940
18941   case $1 in
18942   # Handling of the options.
18943 EOF
18944 cat >>$CONFIG_STATUS <<EOF
18945   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18946     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18947     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18948 EOF
18949 cat >>$CONFIG_STATUS <<\EOF
18950   --version | --vers* | -V )
18951     echo "$ac_cs_version"; exit 0 ;;
18952   --he | --h)
18953     # Conflict between --help and --header
18954     { { echo "$as_me:18954: error: ambiguous option: $1
18955 Try \`$0 --help' for more information." >&5
18956 echo "$as_me: error: ambiguous option: $1
18957 Try \`$0 --help' for more information." >&2;}
18958    { (exit 1); exit 1; }; };;
18959   --help | --hel | -h )
18960     echo "$ac_cs_usage"; exit 0 ;;
18961   --debug | --d* | -d )
18962     debug=: ;;
18963   --file | --fil | --fi | --f )
18964     shift
18965     CONFIG_FILES="$CONFIG_FILES $1"
18966     ac_need_defaults=false;;
18967   --header | --heade | --head | --hea )
18968     shift
18969     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18970     ac_need_defaults=false;;
18971
18972   # This is an error.
18973   -*) { { echo "$as_me:18973: error: unrecognized option: $1
18974 Try \`$0 --help' for more information." >&5
18975 echo "$as_me: error: unrecognized option: $1
18976 Try \`$0 --help' for more information." >&2;}
18977    { (exit 1); exit 1; }; } ;;
18978
18979   *) ac_config_targets="$ac_config_targets $1" ;;
18980
18981   esac
18982   shift
18983 done
18984
18985 exec 5>>config.log
18986 cat >&5 << _ACEOF
18987
18988 ## ----------------------- ##
18989 ## Running config.status.  ##
18990 ## ----------------------- ##
18991
18992 This file was extended by $as_me 2.52.20100320, executed with
18993   CONFIG_FILES    = $CONFIG_FILES
18994   CONFIG_HEADERS  = $CONFIG_HEADERS
18995   CONFIG_LINKS    = $CONFIG_LINKS
18996   CONFIG_COMMANDS = $CONFIG_COMMANDS
18997   > $ac_cs_invocation
18998 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18999
19000 _ACEOF
19001 EOF
19002
19003 cat >>$CONFIG_STATUS <<EOF
19004 #
19005 # INIT-COMMANDS section.
19006 #
19007
19008 ### Special initialization commands, used to pass information from the
19009 ### configuration-run into config.status
19010
19011 AWK="$AWK"
19012 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19013 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19014 ECHO_LINK="$ECHO_LINK"
19015 LDCONFIG="$LDCONFIG"
19016 LIB_NAME="$LIB_NAME"
19017 LIB_SUBSETS="$LIB_SUBSETS"
19018 LIB_SUFFIX="$LIB_SUFFIX"
19019 LIB_TRACING="$LIB_TRACING"
19020 MAKE_TERMINFO="$MAKE_TERMINFO"
19021 NCURSES_MAJOR="$NCURSES_MAJOR"
19022 NCURSES_MINOR="$NCURSES_MINOR"
19023 NCURSES_OSPEED="$NCURSES_OSPEED"
19024 NCURSES_PATCH="$NCURSES_PATCH"
19025 SRC_SUBDIRS="$SRC_SUBDIRS"
19026 TERMINFO="$TERMINFO"
19027 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19028 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19029 TICS_NAME="$TICS_NAME"
19030 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19031 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19032 TINFO_NAME="$TINFO_NAME"
19033 TINFO_SUFFIX="$TINFO_SUFFIX"
19034 WITH_CURSES_H="$with_curses_h"
19035 WITH_ECHO="$with_echo"
19036 WITH_OVERWRITE="$with_overwrite"
19037 cf_LIST_MODELS="$cf_list_models"
19038 cf_cv_abi_version="$cf_cv_abi_version"
19039 cf_cv_do_relink="$cf_cv_do_relink"
19040 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19041 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19042 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19043 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19044 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19045 cf_cv_rel_version="$cf_cv_rel_version"
19046 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19047 cf_cv_shared_soname='$cf_cv_shared_soname'
19048 cf_cv_shlib_version="$cf_cv_shlib_version"
19049 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19050 cf_cv_system_name="$cf_cv_system_name"
19051 cf_with_cxx_binding="$cf_with_cxx_binding"
19052 cf_with_manpages="$cf_with_manpages"
19053 host="$host"
19054 target="$target"
19055
19056 EOF
19057
19058 cat >>$CONFIG_STATUS <<\EOF
19059 for ac_config_target in $ac_config_targets
19060 do
19061   case "$ac_config_target" in
19062   # Handling of arguments.
19063   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19064   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19065   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19066   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19067   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19068   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19069   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19070   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19071   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19072   *) { { echo "$as_me:19072: error: invalid argument: $ac_config_target" >&5
19073 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19074    { (exit 1); exit 1; }; };;
19075   esac
19076 done
19077
19078 # If the user did not use the arguments to specify the items to instantiate,
19079 # then the envvar interface is used.  Set only those that are not.
19080 # We use the long form for the default assignment because of an extremely
19081 # bizarre bug on SunOS 4.1.3.
19082 if $ac_need_defaults; then
19083   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19084   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19085   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19086 fi
19087
19088 # Create a temporary directory, and hook for its removal unless debugging.
19089 $debug ||
19090 {
19091   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19092   trap '{ (exit 1); exit 1; }' 1 2 13 15
19093 }
19094
19095 # Create a (secure) tmp directory for tmp files.
19096 : ${TMPDIR=/tmp}
19097 {
19098   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19099   test -n "$tmp" && test -d "$tmp"
19100 }  ||
19101 {
19102   tmp=$TMPDIR/cs$$-$RANDOM
19103   (umask 077 && mkdir $tmp)
19104 } ||
19105 {
19106    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19107    { (exit 1); exit 1; }
19108 }
19109
19110 EOF
19111
19112 cat >>$CONFIG_STATUS <<EOF
19113
19114 #
19115 # CONFIG_FILES section.
19116 #
19117
19118 # No need to generate the scripts if there are no CONFIG_FILES.
19119 # This happens for instance when ./config.status config.h
19120 if test -n "\$CONFIG_FILES"; then
19121   # Protect against being on the right side of a sed subst in config.status.
19122   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19123    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19124 s,@SHELL@,$SHELL,;t t
19125 s,@exec_prefix@,$exec_prefix,;t t
19126 s,@prefix@,$prefix,;t t
19127 s,@program_transform_name@,$program_transform_name,;t t
19128 s,@bindir@,$bindir,;t t
19129 s,@sbindir@,$sbindir,;t t
19130 s,@libexecdir@,$libexecdir,;t t
19131 s,@datadir@,$datadir,;t t
19132 s,@sysconfdir@,$sysconfdir,;t t
19133 s,@sharedstatedir@,$sharedstatedir,;t t
19134 s,@localstatedir@,$localstatedir,;t t
19135 s,@libdir@,$libdir,;t t
19136 s,@includedir@,$includedir,;t t
19137 s,@oldincludedir@,$oldincludedir,;t t
19138 s,@infodir@,$infodir,;t t
19139 s,@mandir@,$mandir,;t t
19140 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19141 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19142 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19143 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19144 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19145 s,@build_alias@,$build_alias,;t t
19146 s,@host_alias@,$host_alias,;t t
19147 s,@target_alias@,$target_alias,;t t
19148 s,@ECHO_C@,$ECHO_C,;t t
19149 s,@ECHO_N@,$ECHO_N,;t t
19150 s,@ECHO_T@,$ECHO_T,;t t
19151 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19152 s,@DEFS@,$DEFS,;t t
19153 s,@LIBS@,$LIBS,;t t
19154 s,@top_builddir@,$top_builddir,;t t
19155 s,@EGREP@,$EGREP,;t t
19156 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19157 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19158 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19159 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19160 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19161 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19162 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19163 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19164 s,@build@,$build,;t t
19165 s,@build_cpu@,$build_cpu,;t t
19166 s,@build_vendor@,$build_vendor,;t t
19167 s,@build_os@,$build_os,;t t
19168 s,@host@,$host,;t t
19169 s,@host_cpu@,$host_cpu,;t t
19170 s,@host_vendor@,$host_vendor,;t t
19171 s,@host_os@,$host_os,;t t
19172 s,@target@,$target,;t t
19173 s,@target_cpu@,$target_cpu,;t t
19174 s,@target_vendor@,$target_vendor,;t t
19175 s,@target_os@,$target_os,;t t
19176 s,@CC@,$CC,;t t
19177 s,@CFLAGS@,$CFLAGS,;t t
19178 s,@LDFLAGS@,$LDFLAGS,;t t
19179 s,@CPPFLAGS@,$CPPFLAGS,;t t
19180 s,@ac_ct_CC@,$ac_ct_CC,;t t
19181 s,@EXEEXT@,$EXEEXT,;t t
19182 s,@OBJEXT@,$OBJEXT,;t t
19183 s,@CPP@,$CPP,;t t
19184 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19185 s,@PROG_EXT@,$PROG_EXT,;t t
19186 s,@LDCONFIG@,$LDCONFIG,;t t
19187 s,@CXX@,$CXX,;t t
19188 s,@CXXFLAGS@,$CXXFLAGS,;t t
19189 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19190 s,@AWK@,$AWK,;t t
19191 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19192 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19193 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19194 s,@LINT@,$LINT,;t t
19195 s,@LINT_OPTS@,$LINT_OPTS,;t t
19196 s,@LN_S@,$LN_S,;t t
19197 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19198 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19199 s,@SET_MAKE@,$SET_MAKE,;t t
19200 s,@CTAGS@,$CTAGS,;t t
19201 s,@ETAGS@,$ETAGS,;t t
19202 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19203 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19204 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19205 s,@RANLIB@,$RANLIB,;t t
19206 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19207 s,@LD@,$LD,;t t
19208 s,@ac_ct_LD@,$ac_ct_LD,;t t
19209 s,@AR@,$AR,;t t
19210 s,@ac_ct_AR@,$ac_ct_AR,;t t
19211 s,@ARFLAGS@,$ARFLAGS,;t t
19212 s,@DESTDIR@,$DESTDIR,;t t
19213 s,@BUILD_CC@,$BUILD_CC,;t t
19214 s,@BUILD_CPP@,$BUILD_CPP,;t t
19215 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19216 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19217 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19218 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19219 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19220 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19221 s,@cf_list_models@,$cf_list_models,;t t
19222 s,@LIBTOOL@,$LIBTOOL,;t t
19223 s,@LT_UNDEF@,$LT_UNDEF,;t t
19224 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19225 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19226 s,@LIB_CREATE@,$LIB_CREATE,;t t
19227 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19228 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19229 s,@LIB_PREP@,$LIB_PREP,;t t
19230 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19231 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19232 s,@LIB_LINK@,$LIB_LINK,;t t
19233 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19234 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19235 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19236 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19237 s,@TICS_NAME@,$TICS_NAME,;t t
19238 s,@TINFO_NAME@,$TINFO_NAME,;t t
19239 s,@LIB_NAME@,$LIB_NAME,;t t
19240 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19241 s,@CC_G_OPT@,$CC_G_OPT,;t t
19242 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19243 s,@LD_MODEL@,$LD_MODEL,;t t
19244 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19245 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19246 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19247 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19248 s,@LINK_PROGS@,$LINK_PROGS,;t t
19249 s,@LINK_TESTS@,$LINK_TESTS,;t t
19250 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19251 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19252 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19253 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19254 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19255 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19256 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19257 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19258 s,@TERMINFO@,$TERMINFO,;t t
19259 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19260 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19261 s,@TERMPATH@,$TERMPATH,;t t
19262 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19263 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19264 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19265 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19266 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19267 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19268 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19269 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19270 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19271 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19272 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19273 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19274 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19275 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19276 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19277 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19278 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19279 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19280 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19281 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19282 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19283 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19284 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19285 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19286 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19287 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19288 s,@PTHREAD@,$PTHREAD,;t t
19289 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19290 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19291 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19292 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19293 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19294 s,@ECHO_LINK@,$ECHO_LINK,;t t
19295 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19296 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19297 s,@ADA_TRACE@,$ADA_TRACE,;t t
19298 s,@MATH_LIB@,$MATH_LIB,;t t
19299 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19300 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19301 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19302 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19303 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19304 s,@TEST_LIBS@,$TEST_LIBS,;t t
19305 s,@CXXCPP@,$CXXCPP,;t t
19306 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19307 s,@CXX_AR@,$CXX_AR,;t t
19308 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19309 s,@CXXLIBS@,$CXXLIBS,;t t
19310 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19311 s,@gnat_exists@,$gnat_exists,;t t
19312 s,@M4_exists@,$M4_exists,;t t
19313 s,@cf_ada_make@,$cf_ada_make,;t t
19314 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19315 s,@cf_ada_package@,$cf_ada_package,;t t
19316 s,@ADAFLAGS@,$ADAFLAGS,;t t
19317 s,@cf_compile_generics@,$cf_compile_generics,;t t
19318 s,@cf_generic_objects@,$cf_generic_objects,;t t
19319 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19320 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19321 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19322 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19323 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19324 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19325 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19326 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19327 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19328 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19329 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19330 s,@TICS_ARGS@,$TICS_ARGS,;t t
19331 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19332 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19333 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19334 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19335 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19336 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19337 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19338 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19339 s,@TICS_LIST@,$TICS_LIST,;t t
19340 s,@TINFO_LIST@,$TINFO_LIST,;t t
19341 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19342 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19343 s,@TEST_ARGS@,$TEST_ARGS,;t t
19344 s,@TEST_DEPS@,$TEST_DEPS,;t t
19345 s,@TEST_ARG2@,$TEST_ARG2,;t t
19346 s,@TEST_DEP2@,$TEST_DEP2,;t t
19347 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19348 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19349 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19350 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19351 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19352 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19353 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19354 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19355 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19356 s,@cross_compiling@,$cross_compiling,;t t
19357 CEOF
19358
19359 EOF
19360
19361   cat >>$CONFIG_STATUS <<\EOF
19362   # Split the substitutions into bite-sized pieces for seds with
19363   # small command number limits, like on Digital OSF/1 and HP-UX.
19364   ac_max_sed_lines=48
19365   ac_sed_frag=1 # Number of current file.
19366   ac_beg=1 # First line for current file.
19367   ac_end=$ac_max_sed_lines # Line after last line for current file.
19368   ac_more_lines=:
19369   ac_sed_cmds=
19370   while $ac_more_lines; do
19371     if test $ac_beg -gt 1; then
19372       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19373     else
19374       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19375     fi
19376     if test ! -s $tmp/subs.frag; then
19377       ac_more_lines=false
19378     else
19379       # The purpose of the label and of the branching condition is to
19380       # speed up the sed processing (if there are no `@' at all, there
19381       # is no need to browse any of the substitutions).
19382       # These are the two extra sed commands mentioned above.
19383       (echo ':t
19384   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19385       if test -z "$ac_sed_cmds"; then
19386         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19387       else
19388         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19389       fi
19390       ac_sed_frag=`expr $ac_sed_frag + 1`
19391       ac_beg=$ac_end
19392       ac_end=`expr $ac_end + $ac_max_sed_lines`
19393     fi
19394   done
19395   if test -z "$ac_sed_cmds"; then
19396     ac_sed_cmds=cat
19397   fi
19398 fi # test -n "$CONFIG_FILES"
19399
19400 EOF
19401 cat >>$CONFIG_STATUS <<\EOF
19402 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19403   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19404   case $ac_file in
19405   - | *:- | *:-:* ) # input from stdin
19406         cat >$tmp/stdin
19407         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19408         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19409   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19410         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19411   * )   ac_file_in=$ac_file.in ;;
19412   esac
19413
19414   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19415   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19416          X"$ac_file" : 'X\(//\)[^/]' \| \
19417          X"$ac_file" : 'X\(//\)$' \| \
19418          X"$ac_file" : 'X\(/\)' \| \
19419          .     : '\(.\)' 2>/dev/null ||
19420 echo X"$ac_file" |
19421     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19422           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19423           /^X\(\/\/\)$/{ s//\1/; q; }
19424           /^X\(\/\).*/{ s//\1/; q; }
19425           s/.*/./; q'`
19426   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19427     { case "$ac_dir" in
19428   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19429   *)                      as_incr_dir=.;;
19430 esac
19431 as_dummy="$ac_dir"
19432 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19433   case $as_mkdir_dir in
19434     # Skip DOS drivespec
19435     ?:) as_incr_dir=$as_mkdir_dir ;;
19436     *)
19437       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19438       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19439     ;;
19440   esac
19441 done; }
19442
19443     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19444     # A "../" for each directory in $ac_dir_suffix.
19445     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19446   else
19447     ac_dir_suffix= ac_dots=
19448   fi
19449
19450   case $srcdir in
19451   .)  ac_srcdir=.
19452       if test -z "$ac_dots"; then
19453          ac_top_srcdir=.
19454       else
19455          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19456       fi ;;
19457   [\\/]* | ?:[\\/]* )
19458       ac_srcdir=$srcdir$ac_dir_suffix;
19459       ac_top_srcdir=$srcdir ;;
19460   *) # Relative path.
19461     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19462     ac_top_srcdir=$ac_dots$srcdir ;;
19463   esac
19464
19465   case $INSTALL in
19466   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19467   *) ac_INSTALL=$ac_dots$INSTALL ;;
19468   esac
19469
19470   if test x"$ac_file" != x-; then
19471     { echo "$as_me:19471: creating $ac_file" >&5
19472 echo "$as_me: creating $ac_file" >&6;}
19473     rm -f "$ac_file"
19474   fi
19475   # Let's still pretend it is `configure' which instantiates (i.e., don't
19476   # use $as_me), people would be surprised to read:
19477   #    /* config.h.  Generated automatically by config.status.  */
19478   configure_input="Generated automatically from `echo $ac_file_in |
19479                                                  sed 's,.*/,,'` by configure."
19480
19481   # First look for the input files in the build tree, otherwise in the
19482   # src tree.
19483   ac_file_inputs=`IFS=:
19484     for f in $ac_file_in; do
19485       case $f in
19486       -) echo $tmp/stdin ;;
19487       [\\/$]*)
19488          # Absolute (can't be DOS-style, as IFS=:)
19489          test -f "$f" || { { echo "$as_me:19489: error: cannot find input file: $f" >&5
19490 echo "$as_me: error: cannot find input file: $f" >&2;}
19491    { (exit 1); exit 1; }; }
19492          echo $f;;
19493       *) # Relative
19494          if test -f "$f"; then
19495            # Build tree
19496            echo $f
19497          elif test -f "$srcdir/$f"; then
19498            # Source tree
19499            echo $srcdir/$f
19500          else
19501            # /dev/null tree
19502            { { echo "$as_me:19502: error: cannot find input file: $f" >&5
19503 echo "$as_me: error: cannot find input file: $f" >&2;}
19504    { (exit 1); exit 1; }; }
19505          fi;;
19506       esac
19507     done` || { (exit 1); exit 1; }
19508 EOF
19509 cat >>$CONFIG_STATUS <<EOF
19510   sed "$ac_vpsub
19511 $extrasub
19512 EOF
19513 cat >>$CONFIG_STATUS <<\EOF
19514 :t
19515 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19516 s,@configure_input@,$configure_input,;t t
19517 s,@srcdir@,$ac_srcdir,;t t
19518 s,@top_srcdir@,$ac_top_srcdir,;t t
19519 s,@INSTALL@,$ac_INSTALL,;t t
19520 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19521   rm -f $tmp/stdin
19522   if test x"$ac_file" != x-; then
19523     mv $tmp/out $ac_file
19524   else
19525     cat $tmp/out
19526     rm -f $tmp/out
19527   fi
19528
19529 done
19530 EOF
19531 cat >>$CONFIG_STATUS <<\EOF
19532
19533 #
19534 # CONFIG_HEADER section.
19535 #
19536
19537 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19538 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19539 #
19540 # ac_d sets the value in "#define NAME VALUE" lines.
19541 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19542 ac_dB='[        ].*$,\1#\2'
19543 ac_dC=' '
19544 ac_dD=',;t'
19545 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19546 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19547 ac_iB='\([      ]\),\1#\2define\3'
19548 ac_iC=' '
19549 ac_iD='\4,;t'
19550 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19551 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19552 ac_uB='$,\1#\2define\3'
19553 ac_uC=' '
19554 ac_uD=',;t'
19555
19556 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19557   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19558   case $ac_file in
19559   - | *:- | *:-:* ) # input from stdin
19560         cat >$tmp/stdin
19561         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19562         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19563   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19564         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19565   * )   ac_file_in=$ac_file.in ;;
19566   esac
19567
19568   test x"$ac_file" != x- && { echo "$as_me:19568: creating $ac_file" >&5
19569 echo "$as_me: creating $ac_file" >&6;}
19570
19571   # First look for the input files in the build tree, otherwise in the
19572   # src tree.
19573   ac_file_inputs=`IFS=:
19574     for f in $ac_file_in; do
19575       case $f in
19576       -) echo $tmp/stdin ;;
19577       [\\/$]*)
19578          # Absolute (can't be DOS-style, as IFS=:)
19579          test -f "$f" || { { echo "$as_me:19579: error: cannot find input file: $f" >&5
19580 echo "$as_me: error: cannot find input file: $f" >&2;}
19581    { (exit 1); exit 1; }; }
19582          echo $f;;
19583       *) # Relative
19584          if test -f "$f"; then
19585            # Build tree
19586            echo $f
19587          elif test -f "$srcdir/$f"; then
19588            # Source tree
19589            echo $srcdir/$f
19590          else
19591            # /dev/null tree
19592            { { echo "$as_me:19592: error: cannot find input file: $f" >&5
19593 echo "$as_me: error: cannot find input file: $f" >&2;}
19594    { (exit 1); exit 1; }; }
19595          fi;;
19596       esac
19597     done` || { (exit 1); exit 1; }
19598   # Remove the trailing spaces.
19599   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19600
19601 EOF
19602
19603 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19604 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19605 # be either 'cat' or 'sort'.
19606 cat confdefs.h | uniq >conftest.vals
19607
19608 # Break up conftest.vals because some shells have a limit on
19609 # the size of here documents, and old seds have small limits too.
19610
19611 rm -f conftest.tail
19612 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19613 while grep . conftest.vals >/dev/null
19614 do
19615   # Write chunks of a limited-size here document to conftest.frag.
19616   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19617   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19618   echo 'CEOF' >> $CONFIG_STATUS
19619   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19620   rm -f conftest.vals
19621   mv conftest.tail conftest.vals
19622 done
19623 rm -f conftest.vals
19624
19625 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19626 # marker @DEFS@.
19627 echo '  cat >> conftest.edit <<CEOF
19628 /@DEFS@/r conftest.frag
19629 /@DEFS@/d
19630 CEOF
19631 sed -f conftest.edit $tmp/in > $tmp/out
19632 rm -f $tmp/in
19633 mv $tmp/out $tmp/in
19634 rm -f conftest.edit conftest.frag
19635 ' >> $CONFIG_STATUS
19636
19637 cat >>$CONFIG_STATUS <<\EOF
19638   # Let's still pretend it is `configure' which instantiates (i.e., don't
19639   # use $as_me), people would be surprised to read:
19640   #    /* config.h.  Generated automatically by config.status.  */
19641   if test x"$ac_file" = x-; then
19642     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19643   else
19644     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19645   fi
19646   cat $tmp/in >>$tmp/config.h
19647   rm -f $tmp/in
19648   if test x"$ac_file" != x-; then
19649     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19650       { echo "$as_me:19650: $ac_file is unchanged" >&5
19651 echo "$as_me: $ac_file is unchanged" >&6;}
19652     else
19653       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19654          X"$ac_file" : 'X\(//\)[^/]' \| \
19655          X"$ac_file" : 'X\(//\)$' \| \
19656          X"$ac_file" : 'X\(/\)' \| \
19657          .     : '\(.\)' 2>/dev/null ||
19658 echo X"$ac_file" |
19659     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19660           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19661           /^X\(\/\/\)$/{ s//\1/; q; }
19662           /^X\(\/\).*/{ s//\1/; q; }
19663           s/.*/./; q'`
19664       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19665         { case "$ac_dir" in
19666   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19667   *)                      as_incr_dir=.;;
19668 esac
19669 as_dummy="$ac_dir"
19670 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19671   case $as_mkdir_dir in
19672     # Skip DOS drivespec
19673     ?:) as_incr_dir=$as_mkdir_dir ;;
19674     *)
19675       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19676       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19677     ;;
19678   esac
19679 done; }
19680
19681       fi
19682       rm -f $ac_file
19683       mv $tmp/config.h $ac_file
19684     fi
19685   else
19686     cat $tmp/config.h
19687     rm -f $tmp/config.h
19688   fi
19689 done
19690 EOF
19691 cat >>$CONFIG_STATUS <<\EOF
19692
19693 #
19694 # CONFIG_COMMANDS section.
19695 #
19696 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19697   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19698   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19699
19700   case $ac_dest in
19701     default )
19702
19703 for cf_dir in test
19704 do
19705         if test ! -d $srcdir/$cf_dir; then
19706                 continue
19707         elif test -f $srcdir/$cf_dir/programs; then
19708                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19709         fi
19710 done
19711
19712         case $cf_cv_system_name in #(vi
19713         OS/2*|os2*) #(vi
19714         LIB_PREFIX=''
19715         ;;
19716         *)      LIB_PREFIX='lib'
19717         ;;
19718         esac
19719 cf_prefix=$LIB_PREFIX
19720
19721 if test $cf_cv_shlib_version = cygdll ; then
19722         TINFO_NAME=$TINFO_ARG_SUFFIX
19723         TINFO_SUFFIX=.dll
19724 fi
19725
19726 for cf_dir in $SRC_SUBDIRS
19727 do
19728         if test ! -d $srcdir/$cf_dir ; then
19729                 continue
19730         elif test -f $srcdir/$cf_dir/modules; then
19731
19732                 SHARED_LIB=
19733                 LIBS_TO_MAKE=
19734                 for cf_item in $cf_LIST_MODELS
19735                 do
19736
19737         case $cf_item in #(vi
19738         libtool) #(vi
19739                 cf_suffix='.la'
19740                 cf_depsuf=$cf_suffix
19741                 ;;
19742         normal) #(vi
19743                 cf_suffix='.a'
19744                 cf_depsuf=$cf_suffix
19745                 ;;
19746         debug) #(vi
19747                 cf_suffix='_g.a'
19748                 cf_depsuf=$cf_suffix
19749                 ;;
19750         profile) #(vi
19751                 cf_suffix='_p.a'
19752                 cf_depsuf=$cf_suffix
19753                 ;;
19754         shared) #(vi
19755                 case $cf_cv_system_name in
19756                 aix[56]*) #(vi
19757                         cf_suffix='.a'
19758                         cf_depsuf=$cf_suffix
19759                         ;;
19760                 cygwin*) #(vi
19761                         cf_suffix='.dll'
19762                         cf_depsuf='.dll.a'
19763                         ;;
19764                 darwin*) #(vi
19765                         cf_suffix='.dylib'
19766                         cf_depsuf=$cf_suffix
19767                         ;;
19768                 hpux*) #(vi
19769                         case $target in
19770                         ia64*) #(vi
19771                                 cf_suffix='.so'
19772                                 cf_depsuf=$cf_suffix
19773                                 ;;
19774                         *) #(vi
19775                                 cf_suffix='.sl'
19776                                 cf_depsuf=$cf_suffix
19777                                 ;;
19778                         esac
19779                         ;;
19780                 *)      cf_suffix='.so'
19781                         cf_depsuf=$cf_suffix
19782                         ;;
19783                 esac
19784         esac
19785         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19786         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19787
19788                         if test $cf_item = shared ; then
19789                         if test "$cf_cv_do_symlinks" = yes ; then
19790                                 case "$cf_cv_shlib_version" in #(vi
19791                                 rel) #(vi
19792                                         case "$cf_cv_system_name" in #(vi
19793                                         darwin*)
19794                                         case .${LIB_SUFFIX} in
19795                                         .w*)
19796                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19797                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19798                                                 ;;
19799                                         *)
19800                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19801                                                 ;;
19802                                         esac
19803                                         ;; #(vi
19804                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19805                                         esac
19806                                         ;;
19807                                 abi)
19808                                         case "$cf_cv_system_name" in #(vi
19809                                         darwin*)
19810                                         case .${LIB_SUFFIX} in
19811                                         .w*)
19812                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19813                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19814                                                 ;;
19815                                         *)
19816                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19817                                                 ;;
19818                                         esac
19819                                         ;; #(vi
19820                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19821                                         esac
19822                                         ;;
19823                                 esac
19824                         fi
19825                         # cygwin needs import library, and has unique naming convention
19826                         # use autodetected ${cf_prefix} for import lib and static lib, but
19827                         # use 'cyg' prefix for shared lib.
19828                         if test $cf_cv_shlib_version = cygdll ; then
19829                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19830                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19831                                 continue
19832                         fi
19833                         fi
19834                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19835                 done
19836
19837                 if test $cf_dir = ncurses ; then
19838                         cf_subsets="$LIB_SUBSETS"
19839                         cf_r_parts="$cf_subsets"
19840                         cf_liblist="$LIBS_TO_MAKE"
19841
19842                         while test -n "$cf_r_parts"
19843                         do
19844                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19845                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19846                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19847                                         cf_item=
19848                                         case $cf_l_parts in #(vi
19849                                         *termlib*) #(vi
19850                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19851                                                 ;;
19852                                         *ticlib*)
19853                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19854                                                 ;;
19855                                         *)
19856                                                 break
19857                                                 ;;
19858                                         esac
19859                                         if test -n "$cf_item"; then
19860                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19861                                         fi
19862                                 else
19863                                         break
19864                                 fi
19865                         done
19866                 else
19867                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19868                 fi
19869
19870                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19871                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19872                         $cf_dir/Makefile >$cf_dir/Makefile.out
19873                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19874
19875                 $AWK -f $srcdir/mk-0th.awk \
19876                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19877                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19878
19879                 for cf_subset in $cf_subsets
19880                 do
19881                         cf_subdirs=
19882                         for cf_item in $cf_LIST_MODELS
19883                         do
19884                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19885
19886 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19887
19888         case $cf_item in #(vi
19889         libtool) #(vi
19890                 cf_suffix='.la'
19891                 cf_depsuf=$cf_suffix
19892                 ;;
19893         normal) #(vi
19894                 cf_suffix='.a'
19895                 cf_depsuf=$cf_suffix
19896                 ;;
19897         debug) #(vi
19898                 cf_suffix='_g.a'
19899                 cf_depsuf=$cf_suffix
19900                 ;;
19901         profile) #(vi
19902                 cf_suffix='_p.a'
19903                 cf_depsuf=$cf_suffix
19904                 ;;
19905         shared) #(vi
19906                 case $cf_cv_system_name in
19907                 aix[56]*) #(vi
19908                         cf_suffix='.a'
19909                         cf_depsuf=$cf_suffix
19910                         ;;
19911                 cygwin*) #(vi
19912                         cf_suffix='.dll'
19913                         cf_depsuf='.dll.a'
19914                         ;;
19915                 darwin*) #(vi
19916                         cf_suffix='.dylib'
19917                         cf_depsuf=$cf_suffix
19918                         ;;
19919                 hpux*) #(vi
19920                         case $target in
19921                         ia64*) #(vi
19922                                 cf_suffix='.so'
19923                                 cf_depsuf=$cf_suffix
19924                                 ;;
19925                         *) #(vi
19926                                 cf_suffix='.sl'
19927                                 cf_depsuf=$cf_suffix
19928                                 ;;
19929                         esac
19930                         ;;
19931                 *)      cf_suffix='.so'
19932                         cf_depsuf=$cf_suffix
19933                         ;;
19934                 esac
19935         esac
19936         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19937         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19938
19939         case $cf_item in
19940         libtool) cf_subdir='obj_lo'  ;;
19941         normal)  cf_subdir='objects' ;;
19942         debug)   cf_subdir='obj_g' ;;
19943         profile) cf_subdir='obj_p' ;;
19944         shared)
19945                 case $cf_cv_system_name in #(vi
19946                 cygwin) #(vi
19947                         cf_subdir='objects' ;;
19948                 *)
19949                         cf_subdir='obj_s' ;;
19950                 esac
19951         esac
19952
19953                         # Test for case where we build libtinfo with a different name.
19954                         cf_libname=$cf_dir
19955                         if test $cf_dir = ncurses ; then
19956                                 case $cf_subset in
19957                                 *base*)
19958                                         cf_libname=${cf_libname}$LIB_SUFFIX
19959                                         ;;
19960                                 *termlib*)
19961                                         cf_libname=$TINFO_LIB_SUFFIX
19962                                         ;;
19963                                 ticlib*)
19964                                         cf_libname=$TICS_LIB_SUFFIX
19965                                         ;;
19966                                 esac
19967                         else
19968                                 cf_libname=${cf_libname}$LIB_SUFFIX
19969                         fi
19970                         if test -n "${DFT_ARG_SUFFIX}" ; then
19971                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19972                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19973                         fi
19974
19975                         # These dependencies really are for development, not
19976                         # builds, but they are useful in porting, too.
19977                         cf_depend="../include/ncurses_cfg.h"
19978                         if test "$srcdir" = "."; then
19979                                 cf_reldir="."
19980                         else
19981                                 cf_reldir="\${srcdir}"
19982                         fi
19983
19984                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19985                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19986                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19987                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19988                         fi
19989
19990                         cf_dir_suffix=
19991                         old_cf_suffix="$cf_suffix"
19992                         if test "$cf_cv_shlib_version_infix" = yes ; then
19993                         if test -n "$LIB_SUFFIX" ; then
19994                                 case $LIB_SUFFIX in
19995                                 w*)
19996                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
19997                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19998                                         cf_dir_suffix=w
19999                                         ;;
20000                                 esac
20001                         fi
20002                         fi
20003
20004                         $AWK -f $srcdir/mk-1st.awk \
20005                                 name=${cf_libname}${cf_dir_suffix} \
20006                                 traces=$LIB_TRACING \
20007                                 MODEL=$cf_ITEM \
20008                                 model=$cf_subdir \
20009                                 prefix=$cf_prefix \
20010                                 suffix=$cf_suffix \
20011                                 subset=$cf_subset \
20012                                 TermlibRoot=$TINFO_NAME \
20013                                 TermlibSuffix=$TINFO_SUFFIX \
20014                                 ShlibVer=$cf_cv_shlib_version \
20015                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20016                                 ReLink=${cf_cv_do_relink-no} \
20017                                 DoLinks=$cf_cv_do_symlinks \
20018                                 rmSoLocs=$cf_cv_rm_so_locs \
20019                                 ldconfig="$LDCONFIG" \
20020                                 overwrite=$WITH_OVERWRITE \
20021                                 depend="$cf_depend" \
20022                                 host="$host" \
20023                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20024
20025                         cf_suffix="$old_cf_suffix"
20026
20027                         for cf_subdir2 in $cf_subdirs lib
20028                         do
20029                                 test $cf_subdir = $cf_subdir2 && break
20030                         done
20031                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20032                         $AWK -f $srcdir/mk-2nd.awk \
20033                                 name=$cf_dir \
20034                                 traces=$LIB_TRACING \
20035                                 MODEL=$cf_ITEM \
20036                                 model=$cf_subdir \
20037                                 subset=$cf_subset \
20038                                 srcdir=$srcdir \
20039                                 echo=$WITH_ECHO \
20040                                 crenames=$cf_cv_prog_CC_c_o \
20041                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20042                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20043                         cf_subdirs="$cf_subdirs $cf_subdir"
20044                         done
20045                 done
20046         fi
20047
20048         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20049 done
20050
20051 for cf_dir in $SRC_SUBDIRS
20052 do
20053         if test ! -d $srcdir/$cf_dir ; then
20054                 continue
20055         fi
20056
20057         if test -f $cf_dir/Makefile ; then
20058                 case "$cf_dir" in
20059                 Ada95) #(vi
20060                         echo 'libs \' >> Makefile
20061                         echo 'install.libs \' >> Makefile
20062                         echo 'uninstall.libs ::' >> Makefile
20063                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20064                         ;;
20065                 esac
20066         fi
20067
20068         if test -f $srcdir/$cf_dir/modules; then
20069                 echo >> Makefile
20070                 if test -f $srcdir/$cf_dir/headers; then
20071 cat >> Makefile <<CF_EOF
20072 install.includes \\
20073 uninstall.includes \\
20074 CF_EOF
20075                 fi
20076 if test "$cf_dir" != "c++" ; then
20077 echo 'lint \' >> Makefile
20078 fi
20079 cat >> Makefile <<CF_EOF
20080 libs \\
20081 lintlib \\
20082 install.libs \\
20083 uninstall.libs \\
20084 install.$cf_dir \\
20085 uninstall.$cf_dir ::
20086         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20087 CF_EOF
20088         elif test -f $srcdir/$cf_dir/headers; then
20089 cat >> Makefile <<CF_EOF
20090
20091 libs \\
20092 install.libs \\
20093 uninstall.libs \\
20094 install.includes \\
20095 uninstall.includes ::
20096         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20097 CF_EOF
20098 fi
20099 done
20100
20101 cat >> Makefile <<CF_EOF
20102
20103 install.libs uninstall.libs \\
20104 install.data uninstall.data ::
20105 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20106 CF_EOF
20107
20108 if test "x$cf_with_manpages" = xyes; then
20109 cat >> Makefile <<CF_EOF
20110
20111 install.man \\
20112 uninstall.man ::
20113         cd man && \${MAKE} \${CF_MFLAGS} \$@
20114 CF_EOF
20115 fi
20116
20117 cat >> Makefile <<CF_EOF
20118
20119 distclean ::
20120         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20121         rm -f headers.sh headers.sed mk_shared_lib.sh
20122         rm -f edit_man.* man_alias.*
20123         rm -rf \${DIRS_TO_MAKE}
20124 CF_EOF
20125
20126 # Special case: tack's manpage lives in its own directory.
20127 if test "x$cf_with_manpages" = xyes; then
20128 if test -d tack ; then
20129 if test -f $srcdir/$tack.h; then
20130 cat >> Makefile <<CF_EOF
20131
20132 install.man \\
20133 uninstall.man ::
20134         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20135 CF_EOF
20136 fi
20137 fi
20138 fi
20139
20140 rm -f headers.sed headers.sh
20141
20142 echo creating headers.sh
20143 cat >headers.sh <<CF_EOF
20144 #! /bin/sh
20145 # This shell script is generated by the 'configure' script.  It is invoked in a
20146 # subdirectory of the build tree.  It generates a sed-script in the parent
20147 # directory that is used to adjust includes for header files that reside in a
20148 # subdirectory of /usr/include, etc.
20149 PRG=""
20150 while test \$# != 3
20151 do
20152 PRG="\$PRG \$1"; shift
20153 done
20154 DST=\$1
20155 REF=\$2
20156 SRC=\$3
20157 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20158 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20159 echo installing \$SRC in \$DST
20160 CF_EOF
20161
20162 if test $WITH_CURSES_H = yes; then
20163         cat >>headers.sh <<CF_EOF
20164 case \$DST in
20165 /*/include/*)
20166         END=\`basename \$DST\`
20167         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20168         do
20169                 NAME=\`basename \$i\`
20170                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20171         done
20172         ;;
20173 *)
20174         echo "" >> \$TMPSED
20175         ;;
20176 esac
20177 CF_EOF
20178
20179 else
20180         cat >>headers.sh <<CF_EOF
20181 case \$DST in
20182 /*/include/*)
20183         END=\`basename \$DST\`
20184         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20185         do
20186                 NAME=\`basename \$i\`
20187                 if test "\$NAME" = "curses.h"
20188                 then
20189                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20190                         NAME=ncurses.h
20191                 fi
20192                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20193         done
20194         ;;
20195 *)
20196         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20197         ;;
20198 esac
20199 CF_EOF
20200 fi
20201 cat >>headers.sh <<CF_EOF
20202 rm -f \$TMPSRC
20203 sed -f \$TMPSED \$SRC > \$TMPSRC
20204 NAME=\`basename \$SRC\`
20205 CF_EOF
20206 if test $WITH_CURSES_H != yes; then
20207         cat >>headers.sh <<CF_EOF
20208 test "\$NAME" = "curses.h" && NAME=ncurses.h
20209 CF_EOF
20210 fi
20211 cat >>headers.sh <<CF_EOF
20212 # Just in case someone gzip'd manpages, remove the conflicting copy.
20213 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20214
20215 eval \$PRG \$TMPSRC \$DST/\$NAME
20216 rm -f \$TMPSRC \$TMPSED
20217 CF_EOF
20218
20219 chmod 0755 headers.sh
20220
20221 for cf_dir in $SRC_SUBDIRS
20222 do
20223         if test ! -d $srcdir/$cf_dir ; then
20224                 continue
20225         fi
20226
20227         if test -f $srcdir/$cf_dir/headers; then
20228                 $AWK -f $srcdir/mk-hdr.awk \
20229                         subset="$LIB_SUBSETS" \
20230                         compat="$WITH_CURSES_H" \
20231                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20232         fi
20233
20234         if test -f $srcdir/$cf_dir/modules; then
20235                 if test "$cf_dir" != "c++" ; then
20236                         cat >>$cf_dir/Makefile <<"CF_EOF"
20237 depend : ${AUTO_SRC}
20238         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20239
20240 # DO NOT DELETE THIS LINE -- make depend depends on it.
20241 CF_EOF
20242                 fi
20243         fi
20244 done
20245
20246  ;;
20247   esac
20248 done
20249 EOF
20250
20251 cat >>$CONFIG_STATUS <<\EOF
20252
20253 { (exit 0); exit 0; }
20254 EOF
20255 chmod +x $CONFIG_STATUS
20256 ac_clean_files=$ac_clean_files_save
20257
20258 # configure is writing to config.log, and then calls config.status.
20259 # config.status does its own redirection, appending to config.log.
20260 # Unfortunately, on DOS this fails, as config.log is still kept open
20261 # by configure, so config.status won't be able to write to it; its
20262 # output is simply discarded.  So we exec the FD to /dev/null,
20263 # effectively closing config.log, so it can be properly (re)opened and
20264 # appended to by config.status.  When coming back to configure, we
20265 # need to make the FD available again.
20266 if test "$no_create" != yes; then
20267   ac_cs_success=:
20268   exec 5>/dev/null
20269   $SHELL $CONFIG_STATUS || ac_cs_success=false
20270   exec 5>>config.log
20271   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20272   # would make configure fail if this is the last instruction.
20273   $ac_cs_success || { (exit 1); exit 1; }
20274 fi
20275 ${MAKE-make} preinstall