]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.8 - patch 20110226
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.514 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); } &&
2380   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 echo "$as_me:2425: checking for ${CC:-cc} option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2427 if test "${cf_cv_ansi_cc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430
2431 cf_cv_ansi_cc=no
2432 cf_save_CFLAGS="$CFLAGS"
2433 cf_save_CPPFLAGS="$CPPFLAGS"
2434 # Don't try gcc -ansi; that turns off useful extensions and
2435 # breaks some systems' header files.
2436 # AIX                   -qlanglvl=ansi
2437 # Ultrix and OSF/1      -std1
2438 # HP-UX                 -Aa -D_HPUX_SOURCE
2439 # SVR4                  -Xc
2440 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2441 for cf_arg in "-DCC_HAS_PROTOS" \
2442         "" \
2443         -qlanglvl=ansi \
2444         -std1 \
2445         -Ae \
2446         "-Aa -D_HPUX_SOURCE" \
2447         -Xc
2448 do
2449
2450 cf_fix_cppflags=no
2451 cf_new_cflags=
2452 cf_new_cppflags=
2453 cf_new_extra_cppflags=
2454
2455 for cf_add_cflags in $cf_arg
2456 do
2457 case $cf_fix_cppflags in
2458 no)
2459         case $cf_add_cflags in #(vi
2460         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2461                 case $cf_add_cflags in
2462                 -D*)
2463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2464
2465                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2466                                 && test -z "${cf_tst_cflags}" \
2467                                 && cf_fix_cppflags=yes
2468
2469                         if test $cf_fix_cppflags = yes ; then
2470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2471                                 continue
2472                         elif test "${cf_tst_cflags}" = "\"'" ; then
2473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2474                                 continue
2475                         fi
2476                         ;;
2477                 esac
2478                 case "$CPPFLAGS" in
2479                 *$cf_add_cflags) #(vi
2480                         ;;
2481                 *) #(vi
2482                         case $cf_add_cflags in #(vi
2483                         -D*)
2484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2485
2486 CPPFLAGS=`echo "$CPPFLAGS" | \
2487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2489
2490                                 ;;
2491                         esac
2492                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2493                         ;;
2494                 esac
2495                 ;;
2496         *)
2497                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2498                 ;;
2499         esac
2500         ;;
2501 yes)
2502         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2503
2504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2505
2506         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2507                 && test -z "${cf_tst_cflags}" \
2508                 && cf_fix_cppflags=no
2509         ;;
2510 esac
2511 done
2512
2513 if test -n "$cf_new_cflags" ; then
2514
2515         CFLAGS="$CFLAGS $cf_new_cflags"
2516 fi
2517
2518 if test -n "$cf_new_cppflags" ; then
2519
2520         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2521 fi
2522
2523 if test -n "$cf_new_extra_cppflags" ; then
2524
2525         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2526 fi
2527
2528         cat >conftest.$ac_ext <<_ACEOF
2529 #line 2529 "configure"
2530 #include "confdefs.h"
2531
2532 #ifndef CC_HAS_PROTOS
2533 #if !defined(__STDC__) || (__STDC__ != 1)
2534 choke me
2535 #endif
2536 #endif
2537
2538 int
2539 main ()
2540 {
2541
2542         int test (int i, double x);
2543         struct s1 {int (*f) (int a);};
2544         struct s2 {int (*f) (double a);};
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>&5
2552   ac_status=$?
2553   echo "$as_me:2553: \$? = $ac_status" >&5
2554   (exit $ac_status); } &&
2555          { ac_try='test -s conftest.$ac_objext'
2556   { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); }; }; then
2561   cf_cv_ansi_cc="$cf_arg"; break
2562 else
2563   echo "$as_me: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2565 fi
2566 rm -f conftest.$ac_objext conftest.$ac_ext
2567 done
2568 CFLAGS="$cf_save_CFLAGS"
2569 CPPFLAGS="$cf_save_CPPFLAGS"
2570
2571 fi
2572 echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
2573 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2574
2575 if test "$cf_cv_ansi_cc" != "no"; then
2576 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2577
2578 cf_fix_cppflags=no
2579 cf_new_cflags=
2580 cf_new_cppflags=
2581 cf_new_extra_cppflags=
2582
2583 for cf_add_cflags in $cf_cv_ansi_cc
2584 do
2585 case $cf_fix_cppflags in
2586 no)
2587         case $cf_add_cflags in #(vi
2588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2589                 case $cf_add_cflags in
2590                 -D*)
2591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2592
2593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594                                 && test -z "${cf_tst_cflags}" \
2595                                 && cf_fix_cppflags=yes
2596
2597                         if test $cf_fix_cppflags = yes ; then
2598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599                                 continue
2600                         elif test "${cf_tst_cflags}" = "\"'" ; then
2601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2602                                 continue
2603                         fi
2604                         ;;
2605                 esac
2606                 case "$CPPFLAGS" in
2607                 *$cf_add_cflags) #(vi
2608                         ;;
2609                 *) #(vi
2610                         case $cf_add_cflags in #(vi
2611                         -D*)
2612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2613
2614 CPPFLAGS=`echo "$CPPFLAGS" | \
2615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2617
2618                                 ;;
2619                         esac
2620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2621                         ;;
2622                 esac
2623                 ;;
2624         *)
2625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2626                 ;;
2627         esac
2628         ;;
2629 yes)
2630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2631
2632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2633
2634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2635                 && test -z "${cf_tst_cflags}" \
2636                 && cf_fix_cppflags=no
2637         ;;
2638 esac
2639 done
2640
2641 if test -n "$cf_new_cflags" ; then
2642
2643         CFLAGS="$CFLAGS $cf_new_cflags"
2644 fi
2645
2646 if test -n "$cf_new_cppflags" ; then
2647
2648         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2649 fi
2650
2651 if test -n "$cf_new_extra_cppflags" ; then
2652
2653         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2654 fi
2655
2656 else
2657         cat >>confdefs.h <<\EOF
2658 #define CC_HAS_PROTOS 1
2659 EOF
2660
2661 fi
2662 fi
2663
2664 if test "$cf_cv_ansi_cc" = "no"; then
2665         { { echo "$as_me:2665: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&5
2670 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2671 You have the following choices:
2672         a. adjust your compiler options
2673         b. get an up-to-date compiler
2674         c. use a wrapper such as unproto" >&2;}
2675    { (exit 1); exit 1; }; }
2676 fi
2677
2678 case $cf_cv_system_name in
2679 os2*)
2680     CFLAGS="$CFLAGS -Zmt"
2681     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2682     CXXFLAGS="$CXXFLAGS -Zmt"
2683     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2684     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2685     ac_cv_exeext=.exe
2686     ;;
2687 esac
2688
2689 PROG_EXT="$EXEEXT"
2690
2691 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2692 #define PROG_EXT "$PROG_EXT"
2693 EOF
2694
2695 if test "$cross_compiling" = yes ; then
2696   LDCONFIG=:
2697 else
2698 case "$cf_cv_system_name" in #(vi
2699 dragonfly*|freebsd*) #(vi
2700   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2701   ;;
2702 *) LDPATH=$PATH:/sbin:/usr/sbin
2703   # Extract the first word of "ldconfig", so it can be a program name with args.
2704 set dummy ldconfig; ac_word=$2
2705 echo "$as_me:2705: checking for $ac_word" >&5
2706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2707 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2708   echo $ECHO_N "(cached) $ECHO_C" >&6
2709 else
2710   case $LDCONFIG in
2711   [\\/]* | ?:[\\/]*)
2712   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2713   ;;
2714   *)
2715   ac_save_IFS=$IFS; IFS=$ac_path_separator
2716 ac_dummy="$LDPATH"
2717 for ac_dir in $ac_dummy; do
2718   IFS=$ac_save_IFS
2719   test -z "$ac_dir" && ac_dir=.
2720   if $as_executable_p "$ac_dir/$ac_word"; then
2721    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2722    echo "$as_me:2722: found $ac_dir/$ac_word" >&5
2723    break
2724 fi
2725 done
2726
2727   ;;
2728 esac
2729 fi
2730 LDCONFIG=$ac_cv_path_LDCONFIG
2731
2732 if test -n "$LDCONFIG"; then
2733   echo "$as_me:2733: result: $LDCONFIG" >&5
2734 echo "${ECHO_T}$LDCONFIG" >&6
2735 else
2736   echo "$as_me:2736: result: no" >&5
2737 echo "${ECHO_T}no" >&6
2738 fi
2739
2740   ;;
2741 esac
2742 fi
2743
2744 echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
2745 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2746
2747 # Check whether --with-cxx or --without-cxx was given.
2748 if test "${with_cxx+set}" = set; then
2749   withval="$with_cxx"
2750   cf_with_cxx=$withval
2751 else
2752   cf_with_cxx=yes
2753 fi;
2754 echo "$as_me:2754: result: $cf_with_cxx" >&5
2755 echo "${ECHO_T}$cf_with_cxx" >&6
2756 if test "X$cf_with_cxx" = Xno ; then
2757         CXX=""
2758         GXX=""
2759 else
2760         # with autoconf 2.13, we can change the error to a warning:
2761                 ac_ext=cc
2762 ac_cpp='$CXXCPP $CPPFLAGS'
2763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2766 ac_main_return=return
2767 if test -n "$ac_tool_prefix"; then
2768   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2769   do
2770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2772 echo "$as_me:2772: checking for $ac_word" >&5
2773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2774 if test "${ac_cv_prog_CXX+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   if test -n "$CXX"; then
2778   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2779 else
2780   ac_save_IFS=$IFS; IFS=$ac_path_separator
2781 ac_dummy="$PATH"
2782 for ac_dir in $ac_dummy; do
2783   IFS=$ac_save_IFS
2784   test -z "$ac_dir" && ac_dir=.
2785   $as_executable_p "$ac_dir/$ac_word" || continue
2786 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2787 echo "$as_me:2787: found $ac_dir/$ac_word" >&5
2788 break
2789 done
2790
2791 fi
2792 fi
2793 CXX=$ac_cv_prog_CXX
2794 if test -n "$CXX"; then
2795   echo "$as_me:2795: result: $CXX" >&5
2796 echo "${ECHO_T}$CXX" >&6
2797 else
2798   echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 fi
2801
2802     test -n "$CXX" && break
2803   done
2804 fi
2805 if test -z "$CXX"; then
2806   ac_ct_CXX=$CXX
2807   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2808 do
2809   # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$ac_ct_CXX"; then
2817   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2818 else
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   $as_executable_p "$ac_dir/$ac_word" || continue
2825 ac_cv_prog_ac_ct_CXX="$ac_prog"
2826 echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827 break
2828 done
2829
2830 fi
2831 fi
2832 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2833 if test -n "$ac_ct_CXX"; then
2834   echo "$as_me:2834: result: $ac_ct_CXX" >&5
2835 echo "${ECHO_T}$ac_ct_CXX" >&6
2836 else
2837   echo "$as_me:2837: result: no" >&5
2838 echo "${ECHO_T}no" >&6
2839 fi
2840
2841   test -n "$ac_ct_CXX" && break
2842 done
2843 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2844
2845   CXX=$ac_ct_CXX
2846 fi
2847
2848 # Provide some information about the compiler.
2849 echo "$as_me:2849:" \
2850      "checking for C++ compiler version" >&5
2851 ac_compiler=`set X $ac_compile; echo $2`
2852 { (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
2853   (eval $ac_compiler --version </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
2858   (eval $ac_compiler -v </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862 { (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
2863   (eval $ac_compiler -V </dev/null >&5) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }
2867
2868 echo "$as_me:2868: checking whether we are using the GNU C++ compiler" >&5
2869 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2870 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873   cat >conftest.$ac_ext <<_ACEOF
2874 #line 2874 "configure"
2875 #include "confdefs.h"
2876
2877 int
2878 main ()
2879 {
2880 #ifndef __GNUC__
2881        choke me
2882 #endif
2883
2884   ;
2885   return 0;
2886 }
2887 _ACEOF
2888 rm -f conftest.$ac_objext
2889 if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
2890   (eval $ac_compile) 2>&5
2891   ac_status=$?
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit $ac_status); } &&
2894          { ac_try='test -s conftest.$ac_objext'
2895   { (eval echo "$as_me:2895: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); }; }; then
2900   ac_compiler_gnu=yes
2901 else
2902   echo "$as_me: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 ac_compiler_gnu=no
2905 fi
2906 rm -f conftest.$ac_objext conftest.$ac_ext
2907 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2908
2909 fi
2910 echo "$as_me:2910: result: $ac_cv_cxx_compiler_gnu" >&5
2911 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2912 GXX=`test $ac_compiler_gnu = yes && echo yes`
2913 ac_test_CXXFLAGS=${CXXFLAGS+set}
2914 ac_save_CXXFLAGS=$CXXFLAGS
2915 CXXFLAGS="-g"
2916 echo "$as_me:2916: checking whether $CXX accepts -g" >&5
2917 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2918 if test "${ac_cv_prog_cxx_g+set}" = set; then
2919   echo $ECHO_N "(cached) $ECHO_C" >&6
2920 else
2921   cat >conftest.$ac_ext <<_ACEOF
2922 #line 2922 "configure"
2923 #include "confdefs.h"
2924
2925 int
2926 main ()
2927 {
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 rm -f conftest.$ac_objext
2934 if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
2935   (eval $ac_compile) 2>&5
2936   ac_status=$?
2937   echo "$as_me:2937: \$? = $ac_status" >&5
2938   (exit $ac_status); } &&
2939          { ac_try='test -s conftest.$ac_objext'
2940   { (eval echo "$as_me:2940: \"$ac_try\"") >&5
2941   (eval $ac_try) 2>&5
2942   ac_status=$?
2943   echo "$as_me:2943: \$? = $ac_status" >&5
2944   (exit $ac_status); }; }; then
2945   ac_cv_prog_cxx_g=yes
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 cat conftest.$ac_ext >&5
2949 ac_cv_prog_cxx_g=no
2950 fi
2951 rm -f conftest.$ac_objext conftest.$ac_ext
2952 fi
2953 echo "$as_me:2953: result: $ac_cv_prog_cxx_g" >&5
2954 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2955 if test "$ac_test_CXXFLAGS" = set; then
2956   CXXFLAGS=$ac_save_CXXFLAGS
2957 elif test $ac_cv_prog_cxx_g = yes; then
2958   if test "$GXX" = yes; then
2959     CXXFLAGS="-g -O2"
2960   else
2961     CXXFLAGS="-g"
2962   fi
2963 else
2964   if test "$GXX" = yes; then
2965     CXXFLAGS="-O2"
2966   else
2967     CXXFLAGS=
2968   fi
2969 fi
2970 for ac_declaration in \
2971    ''\
2972    '#include <stdlib.h>' \
2973    'extern "C" void std::exit (int) throw (); using std::exit;' \
2974    'extern "C" void std::exit (int); using std::exit;' \
2975    'extern "C" void exit (int) throw ();' \
2976    'extern "C" void exit (int);' \
2977    'void exit (int);'
2978 do
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <stdlib.h>
2983 $ac_declaration
2984 int
2985 main ()
2986 {
2987 exit (42);
2988   ;
2989   return 0;
2990 }
2991 _ACEOF
2992 rm -f conftest.$ac_objext
2993 if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
2994   (eval $ac_compile) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); } &&
2998          { ac_try='test -s conftest.$ac_objext'
2999   { (eval echo "$as_me:2999: \"$ac_try\"") >&5
3000   (eval $ac_try) 2>&5
3001   ac_status=$?
3002   echo "$as_me:3002: \$? = $ac_status" >&5
3003   (exit $ac_status); }; }; then
3004   :
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 continue
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011   cat >conftest.$ac_ext <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 $ac_declaration
3015 int
3016 main ()
3017 {
3018 exit (42);
3019   ;
3020   return 0;
3021 }
3022 _ACEOF
3023 rm -f conftest.$ac_objext
3024 if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
3025   (eval $ac_compile) 2>&5
3026   ac_status=$?
3027   echo "$as_me:3027: \$? = $ac_status" >&5
3028   (exit $ac_status); } &&
3029          { ac_try='test -s conftest.$ac_objext'
3030   { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3031   (eval $ac_try) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); }; }; then
3035   break
3036 else
3037   echo "$as_me: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 fi
3040 rm -f conftest.$ac_objext conftest.$ac_ext
3041 done
3042 rm -rf conftest*
3043 if test -n "$ac_declaration"; then
3044   echo '#ifdef __cplusplus' >>confdefs.h
3045   echo $ac_declaration      >>confdefs.h
3046   echo '#endif'             >>confdefs.h
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return=return
3055
3056                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3057         if test "$CXX" = "g++" ; then
3058                 # Extract the first word of "g++", so it can be a program name with args.
3059 set dummy g++; ac_word=$2
3060 echo "$as_me:3060: checking for $ac_word" >&5
3061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3062 if test "${ac_cv_path_CXX+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065   case $CXX in
3066   [\\/]* | ?:[\\/]*)
3067   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3068   ;;
3069   *)
3070   ac_save_IFS=$IFS; IFS=$ac_path_separator
3071 ac_dummy="$PATH"
3072 for ac_dir in $ac_dummy; do
3073   IFS=$ac_save_IFS
3074   test -z "$ac_dir" && ac_dir=.
3075   if $as_executable_p "$ac_dir/$ac_word"; then
3076    ac_cv_path_CXX="$ac_dir/$ac_word"
3077    echo "$as_me:3077: found $ac_dir/$ac_word" >&5
3078    break
3079 fi
3080 done
3081
3082   ;;
3083 esac
3084 fi
3085 CXX=$ac_cv_path_CXX
3086
3087 if test -n "$CXX"; then
3088   echo "$as_me:3088: result: $CXX" >&5
3089 echo "${ECHO_T}$CXX" >&6
3090 else
3091   echo "$as_me:3091: result: no" >&5
3092 echo "${ECHO_T}no" >&6
3093 fi
3094
3095         fi
3096         if test "$CXX" = "g++" ; then
3097                 { echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
3098 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3099                 cf_with_cxx=no; CXX=""; GXX="";
3100         fi
3101 fi
3102
3103 GXX_VERSION=none
3104 if test "$GXX" = yes; then
3105         echo "$as_me:3105: checking version of g++" >&5
3106 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3107         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3108         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3109         echo "$as_me:3109: result: $GXX_VERSION" >&5
3110 echo "${ECHO_T}$GXX_VERSION" >&6
3111 fi
3112
3113 case $GXX_VERSION in
3114 1*|2.[0-6]*)
3115         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3116         # cf_cxx_library=no
3117         { echo "$as_me:3117: WARNING: templates do not work" >&5
3118 echo "$as_me: WARNING: templates do not work" >&2;}
3119         ;;
3120 esac
3121
3122 echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
3123 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3124
3125 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3126 if test "${with_cxx_binding+set}" = set; then
3127   withval="$with_cxx_binding"
3128   cf_with_cxx_binding=$withval
3129 else
3130   cf_with_cxx_binding=$cf_with_cxx
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
3133 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3134
3135 echo "$as_me:3135: checking if you want to build with Ada95" >&5
3136 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3137
3138 # Check whether --with-ada or --without-ada was given.
3139 if test "${with_ada+set}" = set; then
3140   withval="$with_ada"
3141   cf_with_ada=$withval
3142 else
3143   cf_with_ada=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_ada" >&5
3146 echo "${ECHO_T}$cf_with_ada" >&6
3147
3148 echo "$as_me:3148: checking if you want to install manpages" >&5
3149 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3150
3151 # Check whether --with-manpages or --without-manpages was given.
3152 if test "${with_manpages+set}" = set; then
3153   withval="$with_manpages"
3154   cf_with_manpages=$withval
3155 else
3156   cf_with_manpages=yes
3157 fi;
3158 echo "$as_me:3158: result: $cf_with_manpages" >&5
3159 echo "${ECHO_T}$cf_with_manpages" >&6
3160
3161 echo "$as_me:3161: checking if you want to build programs such as tic" >&5
3162 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3163
3164 # Check whether --with-progs or --without-progs was given.
3165 if test "${with_progs+set}" = set; then
3166   withval="$with_progs"
3167   cf_with_progs=$withval
3168 else
3169   cf_with_progs=yes
3170 fi;
3171 echo "$as_me:3171: result: $cf_with_progs" >&5
3172 echo "${ECHO_T}$cf_with_progs" >&6
3173
3174 echo "$as_me:3174: checking if you want to build test-programs" >&5
3175 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3176
3177 # Check whether --with-tests or --without-tests was given.
3178 if test "${with_tests+set}" = set; then
3179   withval="$with_tests"
3180   cf_with_tests=$withval
3181 else
3182   cf_with_tests=yes
3183 fi;
3184 echo "$as_me:3184: result: $cf_with_tests" >&5
3185 echo "${ECHO_T}$cf_with_tests" >&6
3186
3187 echo "$as_me:3187: checking if you wish to install curses.h" >&5
3188 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3189
3190 # Check whether --with-curses-h or --without-curses-h was given.
3191 if test "${with_curses_h+set}" = set; then
3192   withval="$with_curses_h"
3193   with_curses_h=$withval
3194 else
3195   with_curses_h=yes
3196 fi;
3197 echo "$as_me:3197: result: $with_curses_h" >&5
3198 echo "${ECHO_T}$with_curses_h" >&6
3199
3200 modules_to_build="ncurses"
3201 if test "X$cf_with_progs" != Xno ; then
3202 modules_to_build="$modules_to_build progs tack"
3203 fi
3204 modules_to_build="$modules_to_build panel menu form"
3205
3206 test "$program_prefix" != NONE &&
3207   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3208 # Use a double $ so make ignores it.
3209 test "$program_suffix" != NONE &&
3210   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3211 # Double any \ or $.  echo might interpret backslashes.
3212 # By default was `s,x,x', remove it if useless.
3213 cat <<\_ACEOF >conftest.sed
3214 s/[\\$]/&&/g;s/;s,x,x,$//
3215 _ACEOF
3216 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3217 rm conftest.sed
3218
3219 for ac_prog in mawk gawk nawk awk
3220 do
3221   # Extract the first word of "$ac_prog", so it can be a program name with args.
3222 set dummy $ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_AWK+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$AWK"; then
3229   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_AWK="$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 AWK=$ac_cv_prog_AWK
3245 if test -n "$AWK"; then
3246   echo "$as_me:3246: result: $AWK" >&5
3247 echo "${ECHO_T}$AWK" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253   test -n "$AWK" && break
3254 done
3255
3256 test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
3257 echo "$as_me: error: No awk program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 echo "$as_me:3260: checking for egrep" >&5
3261 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3262 if test "${ac_cv_prog_egrep+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3266     then ac_cv_prog_egrep='grep -E'
3267     else ac_cv_prog_egrep='egrep'
3268     fi
3269 fi
3270 echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
3271 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3272  EGREP=$ac_cv_prog_egrep
3273
3274 test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
3275 echo "$as_me: error: No egrep program found" >&2;}
3276    { (exit 1); exit 1; }; }
3277
3278 # Find a good install program.  We prefer a C program (faster),
3279 # so one script is as good as another.  But avoid the broken or
3280 # incompatible versions:
3281 # SysV /etc/install, /usr/sbin/install
3282 # SunOS /usr/etc/install
3283 # IRIX /sbin/install
3284 # AIX /bin/install
3285 # AmigaOS /C/install, which installs bootblocks on floppy discs
3286 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3287 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3288 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3289 # ./install, which can be erroneously created by make from ./install.sh.
3290 echo "$as_me:3290: checking for a BSD compatible install" >&5
3291 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3292 if test -z "$INSTALL"; then
3293 if test "${ac_cv_path_install+set}" = set; then
3294   echo $ECHO_N "(cached) $ECHO_C" >&6
3295 else
3296     ac_save_IFS=$IFS; IFS=$ac_path_separator
3297   for ac_dir in $PATH; do
3298     IFS=$ac_save_IFS
3299     # Account for people who put trailing slashes in PATH elements.
3300     case $ac_dir/ in
3301     / | ./ | .// | /cC/* \
3302     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3303     | /usr/ucb/* ) ;;
3304     *)
3305       # OSF1 and SCO ODT 3.0 have their own names for install.
3306       # Don't use installbsd from OSF since it installs stuff as root
3307       # by default.
3308       for ac_prog in ginstall scoinst install; do
3309         if $as_executable_p "$ac_dir/$ac_prog"; then
3310           if test $ac_prog = install &&
3311             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3312             # AIX install.  It has an incompatible calling convention.
3313             :
3314           elif test $ac_prog = install &&
3315             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3316             # program-specific install script used by HP pwplus--don't use.
3317             :
3318           else
3319             ac_cv_path_install="$ac_dir/$ac_prog -c"
3320             break 2
3321           fi
3322         fi
3323       done
3324       ;;
3325     esac
3326   done
3327
3328 fi
3329   if test "${ac_cv_path_install+set}" = set; then
3330     INSTALL=$ac_cv_path_install
3331   else
3332     # As a last resort, use the slow shell script.  We don't cache a
3333     # path for INSTALL within a source directory, because that will
3334     # break other packages using the cache if that directory is
3335     # removed, or if the path is relative.
3336     INSTALL=$ac_install_sh
3337   fi
3338 fi
3339 echo "$as_me:3339: result: $INSTALL" >&5
3340 echo "${ECHO_T}$INSTALL" >&6
3341
3342 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3343 # It thinks the first close brace ends the variable substitution.
3344 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3345
3346 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3347
3348 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3349
3350 case $INSTALL in
3351 /*)
3352   ;;
3353 *)
3354   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3355   test -z "$cf_dir" && cf_dir=.
3356   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3357   ;;
3358 esac
3359
3360 for ac_prog in tdlint lint alint splint lclint
3361 do
3362   # Extract the first word of "$ac_prog", so it can be a program name with args.
3363 set dummy $ac_prog; ac_word=$2
3364 echo "$as_me:3364: checking for $ac_word" >&5
3365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3366 if test "${ac_cv_prog_LINT+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if test -n "$LINT"; then
3370   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3371 else
3372   ac_save_IFS=$IFS; IFS=$ac_path_separator
3373 ac_dummy="$PATH"
3374 for ac_dir in $ac_dummy; do
3375   IFS=$ac_save_IFS
3376   test -z "$ac_dir" && ac_dir=.
3377   $as_executable_p "$ac_dir/$ac_word" || continue
3378 ac_cv_prog_LINT="$ac_prog"
3379 echo "$as_me:3379: found $ac_dir/$ac_word" >&5
3380 break
3381 done
3382
3383 fi
3384 fi
3385 LINT=$ac_cv_prog_LINT
3386 if test -n "$LINT"; then
3387   echo "$as_me:3387: result: $LINT" >&5
3388 echo "${ECHO_T}$LINT" >&6
3389 else
3390   echo "$as_me:3390: result: no" >&5
3391 echo "${ECHO_T}no" >&6
3392 fi
3393
3394   test -n "$LINT" && break
3395 done
3396
3397 echo "$as_me:3397: checking whether ln -s works" >&5
3398 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3399 LN_S=$as_ln_s
3400 if test "$LN_S" = "ln -s"; then
3401   echo "$as_me:3401: result: yes" >&5
3402 echo "${ECHO_T}yes" >&6
3403 else
3404   echo "$as_me:3404: result: no, using $LN_S" >&5
3405 echo "${ECHO_T}no, using $LN_S" >&6
3406 fi
3407
3408 echo "$as_me:3408: checking if $LN_S -f options work" >&5
3409 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3410
3411 rm -f conf$$.src conf$$dst
3412 echo >conf$$.dst
3413 echo first >conf$$.src
3414 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3415         cf_prog_ln_sf=yes
3416 else
3417         cf_prog_ln_sf=no
3418 fi
3419 rm -f conf$$.dst conf$$src
3420 echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
3421 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3422
3423 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3424
3425 echo "$as_me:3425: checking for long file names" >&5
3426 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3427 if test "${ac_cv_sys_long_file_names+set}" = set; then
3428   echo $ECHO_N "(cached) $ECHO_C" >&6
3429 else
3430   ac_cv_sys_long_file_names=yes
3431 # Test for long file names in all the places we know might matter:
3432 #      .                the current directory, where building will happen
3433 #      $prefix/lib      where we will be installing things
3434 #      $exec_prefix/lib likewise
3435 # eval it to expand exec_prefix.
3436 #      $TMPDIR          if set, where it might want to write temporary files
3437 # if $TMPDIR is not set:
3438 #      /tmp             where it might want to write temporary files
3439 #      /var/tmp         likewise
3440 #      /usr/tmp         likewise
3441 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3442   ac_tmpdirs=$TMPDIR
3443 else
3444   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3445 fi
3446 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3447   test -d $ac_dir || continue
3448   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3449   ac_xdir=$ac_dir/cf$$
3450   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3451   ac_tf1=$ac_xdir/conftest9012345
3452   ac_tf2=$ac_xdir/conftest9012346
3453   (echo 1 >$ac_tf1) 2>/dev/null
3454   (echo 2 >$ac_tf2) 2>/dev/null
3455   ac_val=`cat $ac_tf1 2>/dev/null`
3456   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3457     ac_cv_sys_long_file_names=no
3458     rm -rf $ac_xdir 2>/dev/null
3459     break
3460   fi
3461   rm -rf $ac_xdir 2>/dev/null
3462 done
3463 fi
3464 echo "$as_me:3464: result: $ac_cv_sys_long_file_names" >&5
3465 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3466 if test $ac_cv_sys_long_file_names = yes; then
3467
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_LONG_FILE_NAMES 1
3470 EOF
3471
3472 fi
3473
3474 # if we find pkg-config, check if we should install the ".pc" files.
3475
3476 echo "$as_me:3476: checking if you want to use pkg-config" >&5
3477 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3478
3479 # Check whether --with-pkg-config or --without-pkg-config was given.
3480 if test "${with_pkg_config+set}" = set; then
3481   withval="$with_pkg_config"
3482   cf_pkg_config=$withval
3483 else
3484   cf_pkg_config=yes
3485 fi;
3486 echo "$as_me:3486: result: $cf_pkg_config" >&5
3487 echo "${ECHO_T}$cf_pkg_config" >&6
3488
3489 case $cf_pkg_config in #(vi
3490 no) #(vi
3491         PKG_CONFIG=none
3492         ;;
3493 yes) #(vi
3494         if test -n "$ac_tool_prefix"; then
3495   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3496 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3497 echo "$as_me:3497: checking for $ac_word" >&5
3498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3499 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3500   echo $ECHO_N "(cached) $ECHO_C" >&6
3501 else
3502   case $PKG_CONFIG in
3503   [\\/]* | ?:[\\/]*)
3504   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3505   ;;
3506   *)
3507   ac_save_IFS=$IFS; IFS=$ac_path_separator
3508 ac_dummy="$PATH"
3509 for ac_dir in $ac_dummy; do
3510   IFS=$ac_save_IFS
3511   test -z "$ac_dir" && ac_dir=.
3512   if $as_executable_p "$ac_dir/$ac_word"; then
3513    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3514    echo "$as_me:3514: found $ac_dir/$ac_word" >&5
3515    break
3516 fi
3517 done
3518
3519   ;;
3520 esac
3521 fi
3522 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3523
3524 if test -n "$PKG_CONFIG"; then
3525   echo "$as_me:3525: result: $PKG_CONFIG" >&5
3526 echo "${ECHO_T}$PKG_CONFIG" >&6
3527 else
3528   echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532 fi
3533 if test -z "$ac_cv_path_PKG_CONFIG"; then
3534   ac_pt_PKG_CONFIG=$PKG_CONFIG
3535   # Extract the first word of "pkg-config", so it can be a program name with args.
3536 set dummy pkg-config; ac_word=$2
3537 echo "$as_me:3537: checking for $ac_word" >&5
3538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3539 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3540   echo $ECHO_N "(cached) $ECHO_C" >&6
3541 else
3542   case $ac_pt_PKG_CONFIG in
3543   [\\/]* | ?:[\\/]*)
3544   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3545   ;;
3546   *)
3547   ac_save_IFS=$IFS; IFS=$ac_path_separator
3548 ac_dummy="$PATH"
3549 for ac_dir in $ac_dummy; do
3550   IFS=$ac_save_IFS
3551   test -z "$ac_dir" && ac_dir=.
3552   if $as_executable_p "$ac_dir/$ac_word"; then
3553    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3554    echo "$as_me:3554: found $ac_dir/$ac_word" >&5
3555    break
3556 fi
3557 done
3558
3559   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3560   ;;
3561 esac
3562 fi
3563 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3564
3565 if test -n "$ac_pt_PKG_CONFIG"; then
3566   echo "$as_me:3566: result: $ac_pt_PKG_CONFIG" >&5
3567 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3568 else
3569   echo "$as_me:3569: result: no" >&5
3570 echo "${ECHO_T}no" >&6
3571 fi
3572
3573   PKG_CONFIG=$ac_pt_PKG_CONFIG
3574 else
3575   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3576 fi
3577
3578         ;;
3579 *)
3580         PKG_CONFIG=$withval
3581         ;;
3582 esac
3583
3584 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3585 if test "$PKG_CONFIG" != none ; then
3586
3587 if test "x$prefix" != xNONE; then
3588   cf_path_syntax="$prefix"
3589 else
3590   cf_path_syntax="$ac_default_prefix"
3591 fi
3592
3593 case ".$PKG_CONFIG" in #(vi
3594 .\$\(*\)*|.\'*\'*) #(vi
3595   ;;
3596 ..|./*|.\\*) #(vi
3597   ;;
3598 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3599   ;;
3600 .\${*prefix}*) #(vi
3601   eval PKG_CONFIG="$PKG_CONFIG"
3602   case ".$PKG_CONFIG" in #(vi
3603   .NONE/*)
3604     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3605     ;;
3606   esac
3607   ;; #(vi
3608 .no|.NONE/*)
3609   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3610   ;;
3611 *)
3612   { { echo "$as_me:3612: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3613 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3614    { (exit 1); exit 1; }; }
3615   ;;
3616 esac
3617
3618 fi
3619
3620 if test "$PKG_CONFIG" != no ; then
3621         echo "$as_me:3621: checking if we should install .pc files for $PKG_CONFIG" >&5
3622 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3623
3624         # Leave this as something that can be overridden in the environment.
3625         if test -z "$PKG_CONFIG_LIBDIR" ; then
3626                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3627         fi
3628         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3629         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3630
3631 # Check whether --enable-pc-files or --disable-pc-files was given.
3632 if test "${enable_pc_files+set}" = set; then
3633   enableval="$enable_pc_files"
3634   enable_pc_files=$enableval
3635 else
3636   enable_pc_files=no
3637 fi;
3638                 echo "$as_me:3638: result: $enable_pc_files" >&5
3639 echo "${ECHO_T}$enable_pc_files" >&6
3640         else
3641                 echo "$as_me:3641: result: no" >&5
3642 echo "${ECHO_T}no" >&6
3643                 { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3644 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3645                 enable_pc_files=no
3646         fi
3647 fi
3648
3649 echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
3650 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3651
3652 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3653 if test "${enable_mixed_case+set}" = set; then
3654   enableval="$enable_mixed_case"
3655   enable_mixedcase=$enableval
3656 else
3657   enable_mixedcase=auto
3658 fi;
3659 echo "$as_me:3659: result: $enable_mixedcase" >&5
3660 echo "${ECHO_T}$enable_mixedcase" >&6
3661 if test "$enable_mixedcase" = "auto" ; then
3662
3663 echo "$as_me:3663: checking if filesystem supports mixed-case filenames" >&5
3664 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3665 if test "${cf_cv_mixedcase+set}" = set; then
3666   echo $ECHO_N "(cached) $ECHO_C" >&6
3667 else
3668
3669 if test "$cross_compiling" = yes ; then
3670         case $target_alias in #(vi
3671         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3672                 cf_cv_mixedcase=no
3673                 ;;
3674         *)
3675                 cf_cv_mixedcase=yes
3676                 ;;
3677         esac
3678 else
3679         rm -f conftest CONFTEST
3680         echo test >conftest
3681         if test -f CONFTEST ; then
3682                 cf_cv_mixedcase=no
3683         else
3684                 cf_cv_mixedcase=yes
3685         fi
3686         rm -f conftest CONFTEST
3687 fi
3688
3689 fi
3690 echo "$as_me:3690: result: $cf_cv_mixedcase" >&5
3691 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3692 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3693 #define MIXEDCASE_FILENAMES 1
3694 EOF
3695
3696 else
3697     cf_cv_mixedcase=$enable_mixedcase
3698     if test "$enable_mixedcase" = "yes" ; then
3699         cat >>confdefs.h <<\EOF
3700 #define MIXEDCASE_FILENAMES 1
3701 EOF
3702
3703     fi
3704 fi
3705
3706 # do this after mixed-case option (tags/TAGS is not as important as tic).
3707 echo "$as_me:3707: checking whether ${MAKE-make} sets \${MAKE}" >&5
3708 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3709 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3710 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3711   echo $ECHO_N "(cached) $ECHO_C" >&6
3712 else
3713   cat >conftest.make <<\EOF
3714 all:
3715         @echo 'ac_maketemp="${MAKE}"'
3716 EOF
3717 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3718 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3719 if test -n "$ac_maketemp"; then
3720   eval ac_cv_prog_make_${ac_make}_set=yes
3721 else
3722   eval ac_cv_prog_make_${ac_make}_set=no
3723 fi
3724 rm -f conftest.make
3725 fi
3726 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3727   echo "$as_me:3727: result: yes" >&5
3728 echo "${ECHO_T}yes" >&6
3729   SET_MAKE=
3730 else
3731   echo "$as_me:3731: result: no" >&5
3732 echo "${ECHO_T}no" >&6
3733   SET_MAKE="MAKE=${MAKE-make}"
3734 fi
3735
3736 for ac_prog in exctags ctags
3737 do
3738   # Extract the first word of "$ac_prog", so it can be a program name with args.
3739 set dummy $ac_prog; ac_word=$2
3740 echo "$as_me:3740: checking for $ac_word" >&5
3741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3742 if test "${ac_cv_prog_CTAGS+set}" = set; then
3743   echo $ECHO_N "(cached) $ECHO_C" >&6
3744 else
3745   if test -n "$CTAGS"; then
3746   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3747 else
3748   ac_save_IFS=$IFS; IFS=$ac_path_separator
3749 ac_dummy="$PATH"
3750 for ac_dir in $ac_dummy; do
3751   IFS=$ac_save_IFS
3752   test -z "$ac_dir" && ac_dir=.
3753   $as_executable_p "$ac_dir/$ac_word" || continue
3754 ac_cv_prog_CTAGS="$ac_prog"
3755 echo "$as_me:3755: found $ac_dir/$ac_word" >&5
3756 break
3757 done
3758
3759 fi
3760 fi
3761 CTAGS=$ac_cv_prog_CTAGS
3762 if test -n "$CTAGS"; then
3763   echo "$as_me:3763: result: $CTAGS" >&5
3764 echo "${ECHO_T}$CTAGS" >&6
3765 else
3766   echo "$as_me:3766: result: no" >&5
3767 echo "${ECHO_T}no" >&6
3768 fi
3769
3770   test -n "$CTAGS" && break
3771 done
3772
3773 for ac_prog in exetags etags
3774 do
3775   # Extract the first word of "$ac_prog", so it can be a program name with args.
3776 set dummy $ac_prog; ac_word=$2
3777 echo "$as_me:3777: checking for $ac_word" >&5
3778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3779 if test "${ac_cv_prog_ETAGS+set}" = set; then
3780   echo $ECHO_N "(cached) $ECHO_C" >&6
3781 else
3782   if test -n "$ETAGS"; then
3783   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3784 else
3785   ac_save_IFS=$IFS; IFS=$ac_path_separator
3786 ac_dummy="$PATH"
3787 for ac_dir in $ac_dummy; do
3788   IFS=$ac_save_IFS
3789   test -z "$ac_dir" && ac_dir=.
3790   $as_executable_p "$ac_dir/$ac_word" || continue
3791 ac_cv_prog_ETAGS="$ac_prog"
3792 echo "$as_me:3792: found $ac_dir/$ac_word" >&5
3793 break
3794 done
3795
3796 fi
3797 fi
3798 ETAGS=$ac_cv_prog_ETAGS
3799 if test -n "$ETAGS"; then
3800   echo "$as_me:3800: result: $ETAGS" >&5
3801 echo "${ECHO_T}$ETAGS" >&6
3802 else
3803   echo "$as_me:3803: result: no" >&5
3804 echo "${ECHO_T}no" >&6
3805 fi
3806
3807   test -n "$ETAGS" && break
3808 done
3809
3810 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3811 set dummy ${CTAGS:-ctags}; ac_word=$2
3812 echo "$as_me:3812: checking for $ac_word" >&5
3813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3814 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817   if test -n "$MAKE_LOWER_TAGS"; then
3818   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3819 else
3820   ac_save_IFS=$IFS; IFS=$ac_path_separator
3821 ac_dummy="$PATH"
3822 for ac_dir in $ac_dummy; do
3823   IFS=$ac_save_IFS
3824   test -z "$ac_dir" && ac_dir=.
3825   $as_executable_p "$ac_dir/$ac_word" || continue
3826 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3827 echo "$as_me:3827: found $ac_dir/$ac_word" >&5
3828 break
3829 done
3830
3831   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3832 fi
3833 fi
3834 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3835 if test -n "$MAKE_LOWER_TAGS"; then
3836   echo "$as_me:3836: result: $MAKE_LOWER_TAGS" >&5
3837 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3838 else
3839   echo "$as_me:3839: result: no" >&5
3840 echo "${ECHO_T}no" >&6
3841 fi
3842
3843 if test "$cf_cv_mixedcase" = yes ; then
3844         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3845 set dummy ${ETAGS:-etags}; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$MAKE_UPPER_TAGS"; then
3852   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3866 fi
3867 fi
3868 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3869 if test -n "$MAKE_UPPER_TAGS"; then
3870   echo "$as_me:3870: result: $MAKE_UPPER_TAGS" >&5
3871 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877 else
3878         MAKE_UPPER_TAGS=no
3879 fi
3880
3881 if test "$MAKE_UPPER_TAGS" = yes ; then
3882         MAKE_UPPER_TAGS=
3883 else
3884         MAKE_UPPER_TAGS="#"
3885 fi
3886
3887 if test "$MAKE_LOWER_TAGS" = yes ; then
3888         MAKE_LOWER_TAGS=
3889 else
3890         MAKE_LOWER_TAGS="#"
3891 fi
3892
3893 echo "$as_me:3893: checking for makeflags variable" >&5
3894 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3895 if test "${cf_cv_makeflags+set}" = set; then
3896   echo $ECHO_N "(cached) $ECHO_C" >&6
3897 else
3898
3899         cf_cv_makeflags=''
3900         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3901         do
3902                 cat >cf_makeflags.tmp <<CF_EOF
3903 SHELL = /bin/sh
3904 all :
3905         @ echo '.$cf_option'
3906 CF_EOF
3907                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[       ]*$,,'`
3908                 case "$cf_result" in
3909                 .*k)
3910                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3911                         case "$cf_result" in
3912                         .*CC=*) cf_cv_makeflags=
3913                                 ;;
3914                         *)      cf_cv_makeflags=$cf_option
3915                                 ;;
3916                         esac
3917                         break
3918                         ;;
3919                 .-)     ;;
3920                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3921                         ;;
3922                 esac
3923         done
3924         rm -f cf_makeflags.tmp
3925
3926 fi
3927 echo "$as_me:3927: result: $cf_cv_makeflags" >&5
3928 echo "${ECHO_T}$cf_cv_makeflags" >&6
3929
3930 if test -n "$ac_tool_prefix"; then
3931   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3932 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3933 echo "$as_me:3933: checking for $ac_word" >&5
3934 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3935 if test "${ac_cv_prog_RANLIB+set}" = set; then
3936   echo $ECHO_N "(cached) $ECHO_C" >&6
3937 else
3938   if test -n "$RANLIB"; then
3939   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3940 else
3941   ac_save_IFS=$IFS; IFS=$ac_path_separator
3942 ac_dummy="$PATH"
3943 for ac_dir in $ac_dummy; do
3944   IFS=$ac_save_IFS
3945   test -z "$ac_dir" && ac_dir=.
3946   $as_executable_p "$ac_dir/$ac_word" || continue
3947 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3948 echo "$as_me:3948: found $ac_dir/$ac_word" >&5
3949 break
3950 done
3951
3952 fi
3953 fi
3954 RANLIB=$ac_cv_prog_RANLIB
3955 if test -n "$RANLIB"; then
3956   echo "$as_me:3956: result: $RANLIB" >&5
3957 echo "${ECHO_T}$RANLIB" >&6
3958 else
3959   echo "$as_me:3959: result: no" >&5
3960 echo "${ECHO_T}no" >&6
3961 fi
3962
3963 fi
3964 if test -z "$ac_cv_prog_RANLIB"; then
3965   ac_ct_RANLIB=$RANLIB
3966   # Extract the first word of "ranlib", so it can be a program name with args.
3967 set dummy ranlib; ac_word=$2
3968 echo "$as_me:3968: checking for $ac_word" >&5
3969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3970 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3971   echo $ECHO_N "(cached) $ECHO_C" >&6
3972 else
3973   if test -n "$ac_ct_RANLIB"; then
3974   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3975 else
3976   ac_save_IFS=$IFS; IFS=$ac_path_separator
3977 ac_dummy="$PATH"
3978 for ac_dir in $ac_dummy; do
3979   IFS=$ac_save_IFS
3980   test -z "$ac_dir" && ac_dir=.
3981   $as_executable_p "$ac_dir/$ac_word" || continue
3982 ac_cv_prog_ac_ct_RANLIB="ranlib"
3983 echo "$as_me:3983: found $ac_dir/$ac_word" >&5
3984 break
3985 done
3986
3987   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3988 fi
3989 fi
3990 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3991 if test -n "$ac_ct_RANLIB"; then
3992   echo "$as_me:3992: result: $ac_ct_RANLIB" >&5
3993 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3994 else
3995   echo "$as_me:3995: result: no" >&5
3996 echo "${ECHO_T}no" >&6
3997 fi
3998
3999   RANLIB=$ac_ct_RANLIB
4000 else
4001   RANLIB="$ac_cv_prog_RANLIB"
4002 fi
4003
4004 if test -n "$ac_tool_prefix"; then
4005   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4006 set dummy ${ac_tool_prefix}ld; ac_word=$2
4007 echo "$as_me:4007: checking for $ac_word" >&5
4008 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4009 if test "${ac_cv_prog_LD+set}" = set; then
4010   echo $ECHO_N "(cached) $ECHO_C" >&6
4011 else
4012   if test -n "$LD"; then
4013   ac_cv_prog_LD="$LD" # Let the user override the test.
4014 else
4015   ac_save_IFS=$IFS; IFS=$ac_path_separator
4016 ac_dummy="$PATH"
4017 for ac_dir in $ac_dummy; do
4018   IFS=$ac_save_IFS
4019   test -z "$ac_dir" && ac_dir=.
4020   $as_executable_p "$ac_dir/$ac_word" || continue
4021 ac_cv_prog_LD="${ac_tool_prefix}ld"
4022 echo "$as_me:4022: found $ac_dir/$ac_word" >&5
4023 break
4024 done
4025
4026 fi
4027 fi
4028 LD=$ac_cv_prog_LD
4029 if test -n "$LD"; then
4030   echo "$as_me:4030: result: $LD" >&5
4031 echo "${ECHO_T}$LD" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037 fi
4038 if test -z "$ac_cv_prog_LD"; then
4039   ac_ct_LD=$LD
4040   # Extract the first word of "ld", so it can be a program name with args.
4041 set dummy ld; ac_word=$2
4042 echo "$as_me:4042: checking for $ac_word" >&5
4043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4044 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4045   echo $ECHO_N "(cached) $ECHO_C" >&6
4046 else
4047   if test -n "$ac_ct_LD"; then
4048   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4049 else
4050   ac_save_IFS=$IFS; IFS=$ac_path_separator
4051 ac_dummy="$PATH"
4052 for ac_dir in $ac_dummy; do
4053   IFS=$ac_save_IFS
4054   test -z "$ac_dir" && ac_dir=.
4055   $as_executable_p "$ac_dir/$ac_word" || continue
4056 ac_cv_prog_ac_ct_LD="ld"
4057 echo "$as_me:4057: found $ac_dir/$ac_word" >&5
4058 break
4059 done
4060
4061   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4062 fi
4063 fi
4064 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4065 if test -n "$ac_ct_LD"; then
4066   echo "$as_me:4066: result: $ac_ct_LD" >&5
4067 echo "${ECHO_T}$ac_ct_LD" >&6
4068 else
4069   echo "$as_me:4069: result: no" >&5
4070 echo "${ECHO_T}no" >&6
4071 fi
4072
4073   LD=$ac_ct_LD
4074 else
4075   LD="$ac_cv_prog_LD"
4076 fi
4077
4078 if test -n "$ac_tool_prefix"; then
4079   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4080 set dummy ${ac_tool_prefix}ar; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_prog_AR+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   if test -n "$AR"; then
4087   ac_cv_prog_AR="$AR" # Let the user override the test.
4088 else
4089   ac_save_IFS=$IFS; IFS=$ac_path_separator
4090 ac_dummy="$PATH"
4091 for ac_dir in $ac_dummy; do
4092   IFS=$ac_save_IFS
4093   test -z "$ac_dir" && ac_dir=.
4094   $as_executable_p "$ac_dir/$ac_word" || continue
4095 ac_cv_prog_AR="${ac_tool_prefix}ar"
4096 echo "$as_me:4096: found $ac_dir/$ac_word" >&5
4097 break
4098 done
4099
4100 fi
4101 fi
4102 AR=$ac_cv_prog_AR
4103 if test -n "$AR"; then
4104   echo "$as_me:4104: result: $AR" >&5
4105 echo "${ECHO_T}$AR" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111 fi
4112 if test -z "$ac_cv_prog_AR"; then
4113   ac_ct_AR=$AR
4114   # Extract the first word of "ar", so it can be a program name with args.
4115 set dummy ar; ac_word=$2
4116 echo "$as_me:4116: checking for $ac_word" >&5
4117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4118 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4119   echo $ECHO_N "(cached) $ECHO_C" >&6
4120 else
4121   if test -n "$ac_ct_AR"; then
4122   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4123 else
4124   ac_save_IFS=$IFS; IFS=$ac_path_separator
4125 ac_dummy="$PATH"
4126 for ac_dir in $ac_dummy; do
4127   IFS=$ac_save_IFS
4128   test -z "$ac_dir" && ac_dir=.
4129   $as_executable_p "$ac_dir/$ac_word" || continue
4130 ac_cv_prog_ac_ct_AR="ar"
4131 echo "$as_me:4131: found $ac_dir/$ac_word" >&5
4132 break
4133 done
4134
4135   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4136 fi
4137 fi
4138 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4139 if test -n "$ac_ct_AR"; then
4140   echo "$as_me:4140: result: $ac_ct_AR" >&5
4141 echo "${ECHO_T}$ac_ct_AR" >&6
4142 else
4143   echo "$as_me:4143: result: no" >&5
4144 echo "${ECHO_T}no" >&6
4145 fi
4146
4147   AR=$ac_ct_AR
4148 else
4149   AR="$ac_cv_prog_AR"
4150 fi
4151
4152 if test -n "$ac_tool_prefix"; then
4153   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4154 set dummy ${ac_tool_prefix}ar; ac_word=$2
4155 echo "$as_me:4155: checking for $ac_word" >&5
4156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4157 if test "${ac_cv_prog_AR+set}" = set; then
4158   echo $ECHO_N "(cached) $ECHO_C" >&6
4159 else
4160   if test -n "$AR"; then
4161   ac_cv_prog_AR="$AR" # Let the user override the test.
4162 else
4163   ac_save_IFS=$IFS; IFS=$ac_path_separator
4164 ac_dummy="$PATH"
4165 for ac_dir in $ac_dummy; do
4166   IFS=$ac_save_IFS
4167   test -z "$ac_dir" && ac_dir=.
4168   $as_executable_p "$ac_dir/$ac_word" || continue
4169 ac_cv_prog_AR="${ac_tool_prefix}ar"
4170 echo "$as_me:4170: found $ac_dir/$ac_word" >&5
4171 break
4172 done
4173
4174 fi
4175 fi
4176 AR=$ac_cv_prog_AR
4177 if test -n "$AR"; then
4178   echo "$as_me:4178: result: $AR" >&5
4179 echo "${ECHO_T}$AR" >&6
4180 else
4181   echo "$as_me:4181: result: no" >&5
4182 echo "${ECHO_T}no" >&6
4183 fi
4184
4185 fi
4186 if test -z "$ac_cv_prog_AR"; then
4187   ac_ct_AR=$AR
4188   # Extract the first word of "ar", so it can be a program name with args.
4189 set dummy ar; ac_word=$2
4190 echo "$as_me:4190: checking for $ac_word" >&5
4191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4192 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4193   echo $ECHO_N "(cached) $ECHO_C" >&6
4194 else
4195   if test -n "$ac_ct_AR"; then
4196   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4197 else
4198   ac_save_IFS=$IFS; IFS=$ac_path_separator
4199 ac_dummy="$PATH"
4200 for ac_dir in $ac_dummy; do
4201   IFS=$ac_save_IFS
4202   test -z "$ac_dir" && ac_dir=.
4203   $as_executable_p "$ac_dir/$ac_word" || continue
4204 ac_cv_prog_ac_ct_AR="ar"
4205 echo "$as_me:4205: found $ac_dir/$ac_word" >&5
4206 break
4207 done
4208
4209   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4210 fi
4211 fi
4212 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4213 if test -n "$ac_ct_AR"; then
4214   echo "$as_me:4214: result: $ac_ct_AR" >&5
4215 echo "${ECHO_T}$ac_ct_AR" >&6
4216 else
4217   echo "$as_me:4217: result: no" >&5
4218 echo "${ECHO_T}no" >&6
4219 fi
4220
4221   AR=$ac_ct_AR
4222 else
4223   AR="$ac_cv_prog_AR"
4224 fi
4225
4226 echo "$as_me:4226: checking for options to update archives" >&5
4227 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4228 if test "${cf_cv_ar_flags+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231
4232         cf_cv_ar_flags=unknown
4233         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4234         do
4235
4236                 # check if $ARFLAGS already contains this choice
4237                 if test "x$ARFLAGS" != "x" ; then
4238                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4239                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4240                                 cf_cv_ar_flags=
4241                                 break
4242                         fi
4243                 fi
4244
4245                 rm -f conftest.$ac_cv_objext
4246                 rm -f conftest.a
4247
4248                 cat >conftest.$ac_ext <<EOF
4249 #line 4249 "configure"
4250 int     testdata[3] = { 123, 456, 789 };
4251 EOF
4252                 if { (eval echo "$as_me:4252: \"$ac_compile\"") >&5
4253   (eval $ac_compile) 2>&5
4254   ac_status=$?
4255   echo "$as_me:4255: \$? = $ac_status" >&5
4256   (exit $ac_status); } ; then
4257                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4258                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4259                         if test -f conftest.a ; then
4260                                 cf_cv_ar_flags=$cf_ar_flags
4261                                 break
4262                         fi
4263                 else
4264                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4265
4266 echo "${as_me:-configure}:4266: testing cannot compile test-program ..." 1>&5
4267
4268                         break
4269                 fi
4270         done
4271         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4272
4273 fi
4274 echo "$as_me:4274: result: $cf_cv_ar_flags" >&5
4275 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4276
4277 if test -n "$ARFLAGS" ; then
4278         if test -n "$cf_cv_ar_flags" ; then
4279                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4280         fi
4281 else
4282         ARFLAGS=$cf_cv_ar_flags
4283 fi
4284
4285 echo "$as_me:4285: checking if you have specified an install-prefix" >&5
4286 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4287
4288 # Check whether --with-install-prefix or --without-install-prefix was given.
4289 if test "${with_install_prefix+set}" = set; then
4290   withval="$with_install_prefix"
4291   case "$withval" in #(vi
4292         yes|no) #(vi
4293                 ;;
4294         *)      DESTDIR="$withval"
4295                 ;;
4296         esac
4297 fi;
4298 echo "$as_me:4298: result: $DESTDIR" >&5
4299 echo "${ECHO_T}$DESTDIR" >&6
4300
4301 ###############################################################################
4302
4303 # If we're cross-compiling, allow the user to override the tools and their
4304 # options.  The configure script is oriented toward identifying the host
4305 # compiler, etc., but we need a build compiler to generate parts of the source.
4306
4307 if test "$cross_compiling" = yes ; then
4308
4309         # defaults that we might want to override
4310         : ${BUILD_CFLAGS:=''}
4311         : ${BUILD_CPPFLAGS:=''}
4312         : ${BUILD_LDFLAGS:=''}
4313         : ${BUILD_LIBS:=''}
4314         : ${BUILD_EXEEXT:='$x'}
4315         : ${BUILD_OBJEXT:='o'}
4316
4317 # Check whether --with-build-cc or --without-build-cc was given.
4318 if test "${with_build_cc+set}" = set; then
4319   withval="$with_build_cc"
4320   BUILD_CC="$withval"
4321 else
4322   for ac_prog in gcc cc cl
4323 do
4324   # Extract the first word of "$ac_prog", so it can be a program name with args.
4325 set dummy $ac_prog; ac_word=$2
4326 echo "$as_me:4326: checking for $ac_word" >&5
4327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4328 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4329   echo $ECHO_N "(cached) $ECHO_C" >&6
4330 else
4331   if test -n "$BUILD_CC"; then
4332   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4333 else
4334   ac_save_IFS=$IFS; IFS=$ac_path_separator
4335 ac_dummy="$PATH"
4336 for ac_dir in $ac_dummy; do
4337   IFS=$ac_save_IFS
4338   test -z "$ac_dir" && ac_dir=.
4339   $as_executable_p "$ac_dir/$ac_word" || continue
4340 ac_cv_prog_BUILD_CC="$ac_prog"
4341 echo "$as_me:4341: found $ac_dir/$ac_word" >&5
4342 break
4343 done
4344
4345 fi
4346 fi
4347 BUILD_CC=$ac_cv_prog_BUILD_CC
4348 if test -n "$BUILD_CC"; then
4349   echo "$as_me:4349: result: $BUILD_CC" >&5
4350 echo "${ECHO_T}$BUILD_CC" >&6
4351 else
4352   echo "$as_me:4352: result: no" >&5
4353 echo "${ECHO_T}no" >&6
4354 fi
4355
4356   test -n "$BUILD_CC" && break
4357 done
4358
4359 fi;
4360         echo "$as_me:4360: checking for native build C compiler" >&5
4361 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4362         echo "$as_me:4362: result: $BUILD_CC" >&5
4363 echo "${ECHO_T}$BUILD_CC" >&6
4364
4365         echo "$as_me:4365: checking for native build C preprocessor" >&5
4366 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4367
4368 # Check whether --with-build-cpp or --without-build-cpp was given.
4369 if test "${with_build_cpp+set}" = set; then
4370   withval="$with_build_cpp"
4371   BUILD_CPP="$withval"
4372 else
4373   BUILD_CPP='${BUILD_CC} -E'
4374 fi;
4375         echo "$as_me:4375: result: $BUILD_CPP" >&5
4376 echo "${ECHO_T}$BUILD_CPP" >&6
4377
4378         echo "$as_me:4378: checking for native build C flags" >&5
4379 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4380
4381 # Check whether --with-build-cflags or --without-build-cflags was given.
4382 if test "${with_build_cflags+set}" = set; then
4383   withval="$with_build_cflags"
4384   BUILD_CFLAGS="$withval"
4385 fi;
4386         echo "$as_me:4386: result: $BUILD_CFLAGS" >&5
4387 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4388
4389         echo "$as_me:4389: checking for native build C preprocessor-flags" >&5
4390 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4391
4392 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4393 if test "${with_build_cppflags+set}" = set; then
4394   withval="$with_build_cppflags"
4395   BUILD_CPPFLAGS="$withval"
4396 fi;
4397         echo "$as_me:4397: result: $BUILD_CPPFLAGS" >&5
4398 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4399
4400         echo "$as_me:4400: checking for native build linker-flags" >&5
4401 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4402
4403 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4404 if test "${with_build_ldflags+set}" = set; then
4405   withval="$with_build_ldflags"
4406   BUILD_LDFLAGS="$withval"
4407 fi;
4408         echo "$as_me:4408: result: $BUILD_LDFLAGS" >&5
4409 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4410
4411         echo "$as_me:4411: checking for native build linker-libraries" >&5
4412 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4413
4414 # Check whether --with-build-libs or --without-build-libs was given.
4415 if test "${with_build_libs+set}" = set; then
4416   withval="$with_build_libs"
4417   BUILD_LIBS="$withval"
4418 fi;
4419         echo "$as_me:4419: result: $BUILD_LIBS" >&5
4420 echo "${ECHO_T}$BUILD_LIBS" >&6
4421
4422         # this assumes we're on Unix.
4423         BUILD_EXEEXT=
4424         BUILD_OBJEXT=o
4425
4426         : ${BUILD_CC:='${CC}'}
4427
4428         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4429                 { { echo "$as_me:4429: error: Cross-build requires two compilers.
4430 Use --with-build-cc to specify the native compiler." >&5
4431 echo "$as_me: error: Cross-build requires two compilers.
4432 Use --with-build-cc to specify the native compiler." >&2;}
4433    { (exit 1); exit 1; }; }
4434         fi
4435
4436 else
4437         : ${BUILD_CC:='${CC}'}
4438         : ${BUILD_CPP:='${CPP}'}
4439         : ${BUILD_CFLAGS:='${CFLAGS}'}
4440         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4441         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4442         : ${BUILD_LIBS:='${LIBS}'}
4443         : ${BUILD_EXEEXT:='$x'}
4444         : ${BUILD_OBJEXT:='o'}
4445 fi
4446
4447 ###############################################################################
4448
4449 ### Options to allow the user to specify the set of libraries which are used.
4450 ### Use "--without-normal --with-shared" to allow the default model to be
4451 ### shared, for example.
4452 cf_list_models=""
4453
4454 echo "$as_me:4454: checking if libtool -version-number should be used" >&5
4455 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4456
4457 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4458 if test "${enable_libtool_version+set}" = set; then
4459   enableval="$enable_libtool_version"
4460   test "$enableval" != no && enableval=yes
4461   if test "$enableval" != "yes" ; then
4462     cf_libtool_version=no
4463   else
4464     cf_libtool_version=yes
4465   fi
4466 else
4467   enableval=yes
4468   cf_libtool_version=yes
4469
4470 fi;
4471 echo "$as_me:4471: result: $cf_libtool_version" >&5
4472 echo "${ECHO_T}$cf_libtool_version" >&6
4473
4474 if test "$cf_libtool_version" = yes ; then
4475         LIBTOOL_VERSION="-version-number"
4476 else
4477         LIBTOOL_VERSION="-version-info"
4478 fi
4479
4480 LIBTOOL=
4481
4482 # common library maintenance symbols that are convenient for libtool scripts:
4483 LIB_CREATE='${AR} -cr'
4484 LIB_OBJECT='${OBJECTS}'
4485 LIB_SUFFIX=.a
4486 LIB_PREP="$RANLIB"
4487
4488 # symbols used to prop libtool up to enable it to determine what it should be
4489 # doing:
4490 LIB_CLEAN=
4491 LIB_COMPILE=
4492 LIB_LINK='${CC}'
4493 LIB_INSTALL=
4494 LIB_UNINSTALL=
4495
4496 echo "$as_me:4496: checking if you want to build libraries with libtool" >&5
4497 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4498
4499 # Check whether --with-libtool or --without-libtool was given.
4500 if test "${with_libtool+set}" = set; then
4501   withval="$with_libtool"
4502   with_libtool=$withval
4503 else
4504   with_libtool=no
4505 fi;
4506 echo "$as_me:4506: result: $with_libtool" >&5
4507 echo "${ECHO_T}$with_libtool" >&6
4508 if test "$with_libtool" != "no"; then
4509
4510         if test "$with_libtool" != "yes" ; then
4511
4512 if test "x$prefix" != xNONE; then
4513   cf_path_syntax="$prefix"
4514 else
4515   cf_path_syntax="$ac_default_prefix"
4516 fi
4517
4518 case ".$with_libtool" in #(vi
4519 .\$\(*\)*|.\'*\'*) #(vi
4520   ;;
4521 ..|./*|.\\*) #(vi
4522   ;;
4523 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4524   ;;
4525 .\${*prefix}*) #(vi
4526   eval with_libtool="$with_libtool"
4527   case ".$with_libtool" in #(vi
4528   .NONE/*)
4529     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4530     ;;
4531   esac
4532   ;; #(vi
4533 .no|.NONE/*)
4534   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4535   ;;
4536 *)
4537   { { echo "$as_me:4537: error: expected a pathname, not \"$with_libtool\"" >&5
4538 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4539    { (exit 1); exit 1; }; }
4540   ;;
4541 esac
4542
4543                 LIBTOOL=$with_libtool
4544         else
4545                 # Extract the first word of "libtool", so it can be a program name with args.
4546 set dummy libtool; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   case $LIBTOOL in
4553   [\\/]* | ?:[\\/]*)
4554   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4555   ;;
4556   *)
4557   ac_save_IFS=$IFS; IFS=$ac_path_separator
4558 ac_dummy="$PATH"
4559 for ac_dir in $ac_dummy; do
4560   IFS=$ac_save_IFS
4561   test -z "$ac_dir" && ac_dir=.
4562   if $as_executable_p "$ac_dir/$ac_word"; then
4563    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4564    echo "$as_me:4564: found $ac_dir/$ac_word" >&5
4565    break
4566 fi
4567 done
4568
4569   ;;
4570 esac
4571 fi
4572 LIBTOOL=$ac_cv_path_LIBTOOL
4573
4574 if test -n "$LIBTOOL"; then
4575   echo "$as_me:4575: result: $LIBTOOL" >&5
4576 echo "${ECHO_T}$LIBTOOL" >&6
4577 else
4578   echo "$as_me:4578: result: no" >&5
4579 echo "${ECHO_T}no" >&6
4580 fi
4581
4582         fi
4583         if test -z "$LIBTOOL" ; then
4584                 { { echo "$as_me:4584: error: Cannot find libtool" >&5
4585 echo "$as_me: error: Cannot find libtool" >&2;}
4586    { (exit 1); exit 1; }; }
4587         fi
4588         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4589         LIB_OBJECT='${OBJECTS:.o=.lo}'
4590         LIB_SUFFIX=.la
4591         LIB_CLEAN='${LIBTOOL} --mode=clean'
4592         LIB_COMPILE='${LIBTOOL} --mode=compile'
4593         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4594         LIB_INSTALL='${LIBTOOL} --mode=install'
4595         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4596         LIB_PREP=:
4597
4598         # Show the version of libtool
4599         echo "$as_me:4599: checking version of libtool" >&5
4600 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4601
4602         # Save the version in a cache variable - this is not entirely a good
4603         # thing, but the version string from libtool is very ugly, and for
4604         # bug reports it might be useful to have the original string. "("
4605         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4606         echo "$as_me:4606: result: $cf_cv_libtool_version" >&5
4607 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4608         if test -z "$cf_cv_libtool_version" ; then
4609                 { { echo "$as_me:4609: error: This is not GNU libtool" >&5
4610 echo "$as_me: error: This is not GNU libtool" >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613
4614         # special hack to add -no-undefined (which libtool should do for itself)
4615         LT_UNDEF=
4616         case "$cf_cv_system_name" in #(vi
4617         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4618                 LT_UNDEF=-no-undefined
4619                 ;;
4620         esac
4621
4622         # special hack to add --tag option for C++ compiler
4623         case $cf_cv_libtool_version in #(vi
4624         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4625                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4626                 LIBTOOL="$LIBTOOL --tag=CC"
4627                 ;;
4628         *)
4629                 LIBTOOL_CXX="$LIBTOOL"
4630                 ;;
4631         esac
4632 else
4633         LIBTOOL=""
4634         LIBTOOL_CXX=""
4635 fi
4636
4637 test -z "$LIBTOOL" && ECHO_LT=
4638
4639 if test "$with_libtool" != "no" ; then
4640
4641 cf_list_models="$cf_list_models libtool"
4642
4643 else
4644
4645 echo "$as_me:4645: checking if you want to build shared libraries" >&5
4646 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4647
4648 # Check whether --with-shared or --without-shared was given.
4649 if test "${with_shared+set}" = set; then
4650   withval="$with_shared"
4651   with_shared=$withval
4652 else
4653   with_shared=no
4654 fi;
4655 echo "$as_me:4655: result: $with_shared" >&5
4656 echo "${ECHO_T}$with_shared" >&6
4657 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4658
4659 echo "$as_me:4659: checking if you want to build static libraries" >&5
4660 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4661
4662 # Check whether --with-normal or --without-normal was given.
4663 if test "${with_normal+set}" = set; then
4664   withval="$with_normal"
4665   with_normal=$withval
4666 else
4667   with_normal=yes
4668 fi;
4669 echo "$as_me:4669: result: $with_normal" >&5
4670 echo "${ECHO_T}$with_normal" >&6
4671 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4672
4673 echo "$as_me:4673: checking if you want to build debug libraries" >&5
4674 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4675
4676 # Check whether --with-debug or --without-debug was given.
4677 if test "${with_debug+set}" = set; then
4678   withval="$with_debug"
4679   with_debug=$withval
4680 else
4681   with_debug=yes
4682 fi;
4683 echo "$as_me:4683: result: $with_debug" >&5
4684 echo "${ECHO_T}$with_debug" >&6
4685 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4686
4687 echo "$as_me:4687: checking if you want to build profiling libraries" >&5
4688 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4689
4690 # Check whether --with-profile or --without-profile was given.
4691 if test "${with_profile+set}" = set; then
4692   withval="$with_profile"
4693   with_profile=$withval
4694 else
4695   with_profile=no
4696 fi;
4697 echo "$as_me:4697: result: $with_profile" >&5
4698 echo "${ECHO_T}$with_profile" >&6
4699 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4700
4701 fi
4702
4703 ###############################################################################
4704
4705 echo "$as_me:4705: checking for specified models" >&5
4706 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4707 test -z "$cf_list_models" && cf_list_models=normal
4708 test "$with_libtool" != "no" && cf_list_models=libtool
4709 echo "$as_me:4709: result: $cf_list_models" >&5
4710 echo "${ECHO_T}$cf_list_models" >&6
4711
4712 ### Use the first model as the default, and save its suffix for use in building
4713 ### up test-applications.
4714 echo "$as_me:4714: checking for default model" >&5
4715 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4716 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4717 echo "$as_me:4717: result: $DFT_LWR_MODEL" >&5
4718 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4719
4720 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4721
4722 TICS_NAME=tic
4723
4724 TINFO_NAME=tinfo
4725
4726 LIB_NAME=ncurses
4727
4728 LIB_DIR=../lib
4729 LIB_2ND=../../lib
4730
4731         case $cf_cv_system_name in #(vi
4732         OS/2*|os2*) #(vi
4733         LIB_PREFIX=''
4734         ;;
4735         *)      LIB_PREFIX='lib'
4736         ;;
4737         esac
4738 cf_prefix=$LIB_PREFIX
4739
4740 LIB_PREFIX=$cf_prefix
4741
4742 LIB_SUFFIX=
4743
4744 ###############################################################################
4745
4746 echo "$as_me:4746: checking if you want to build a separate terminfo library" >&5
4747 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4748
4749 # Check whether --with-termlib or --without-termlib was given.
4750 if test "${with_termlib+set}" = set; then
4751   withval="$with_termlib"
4752   with_termlib=$withval
4753 else
4754   with_termlib=no
4755 fi;
4756 echo "$as_me:4756: result: $with_termlib" >&5
4757 echo "${ECHO_T}$with_termlib" >&6
4758
4759 echo "$as_me:4759: checking if you want to build a separate tic library" >&5
4760 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4761
4762 # Check whether --with-ticlib or --without-ticlib was given.
4763 if test "${with_ticlib+set}" = set; then
4764   withval="$with_ticlib"
4765   with_ticlib=$withval
4766 else
4767   with_ticlib=no
4768 fi;
4769 echo "$as_me:4769: result: $with_ticlib" >&5
4770 echo "${ECHO_T}$with_ticlib" >&6
4771
4772 ### Checks for special libraries, must be done up-front.
4773 SHLIB_LIST=""
4774
4775 echo "$as_me:4775: checking if you want to link with the GPM mouse library" >&5
4776 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4777
4778 # Check whether --with-gpm or --without-gpm was given.
4779 if test "${with_gpm+set}" = set; then
4780   withval="$with_gpm"
4781   with_gpm=$withval
4782 else
4783   with_gpm=maybe
4784 fi;
4785 echo "$as_me:4785: result: $with_gpm" >&5
4786 echo "${ECHO_T}$with_gpm" >&6
4787
4788 if test "$with_gpm" != no ; then
4789         echo "$as_me:4789: checking for gpm.h" >&5
4790 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4791 if test "${ac_cv_header_gpm_h+set}" = set; then
4792   echo $ECHO_N "(cached) $ECHO_C" >&6
4793 else
4794   cat >conftest.$ac_ext <<_ACEOF
4795 #line 4795 "configure"
4796 #include "confdefs.h"
4797 #include <gpm.h>
4798 _ACEOF
4799 if { (eval echo "$as_me:4799: \"$ac_cpp conftest.$ac_ext\"") >&5
4800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4801   ac_status=$?
4802   egrep -v '^ *\+' conftest.er1 >conftest.err
4803   rm -f conftest.er1
4804   cat conftest.err >&5
4805   echo "$as_me:4805: \$? = $ac_status" >&5
4806   (exit $ac_status); } >/dev/null; then
4807   if test -s conftest.err; then
4808     ac_cpp_err=$ac_c_preproc_warn_flag
4809   else
4810     ac_cpp_err=
4811   fi
4812 else
4813   ac_cpp_err=yes
4814 fi
4815 if test -z "$ac_cpp_err"; then
4816   ac_cv_header_gpm_h=yes
4817 else
4818   echo "$as_me: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   ac_cv_header_gpm_h=no
4821 fi
4822 rm -f conftest.err conftest.$ac_ext
4823 fi
4824 echo "$as_me:4824: result: $ac_cv_header_gpm_h" >&5
4825 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4826 if test $ac_cv_header_gpm_h = yes; then
4827
4828                 cat >>confdefs.h <<\EOF
4829 #define HAVE_GPM_H 1
4830 EOF
4831
4832                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4833                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4834
4835 echo "${as_me:-configure}:4835: testing assuming we really have GPM library ..." 1>&5
4836
4837                         cat >>confdefs.h <<\EOF
4838 #define HAVE_LIBGPM 1
4839 EOF
4840
4841                 else
4842                         echo "$as_me:4842: checking for Gpm_Open in -lgpm" >&5
4843 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4844 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   ac_check_lib_save_LIBS=$LIBS
4848 LIBS="-lgpm  $LIBS"
4849 cat >conftest.$ac_ext <<_ACEOF
4850 #line 4850 "configure"
4851 #include "confdefs.h"
4852
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 #ifdef __cplusplus
4855 extern "C"
4856 #endif
4857 /* We use char because int might match the return type of a gcc2
4858    builtin and then its argument prototype would still apply.  */
4859 char Gpm_Open ();
4860 int
4861 main ()
4862 {
4863 Gpm_Open ();
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 rm -f conftest.$ac_objext conftest$ac_exeext
4869 if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
4870   (eval $ac_link) 2>&5
4871   ac_status=$?
4872   echo "$as_me:4872: \$? = $ac_status" >&5
4873   (exit $ac_status); } &&
4874          { ac_try='test -s conftest$ac_exeext'
4875   { (eval echo "$as_me:4875: \"$ac_try\"") >&5
4876   (eval $ac_try) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); }; }; then
4880   ac_cv_lib_gpm_Gpm_Open=yes
4881 else
4882   echo "$as_me: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 ac_cv_lib_gpm_Gpm_Open=no
4885 fi
4886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4887 LIBS=$ac_check_lib_save_LIBS
4888 fi
4889 echo "$as_me:4889: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4890 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4891 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4892   :
4893 else
4894
4895                                 { { echo "$as_me:4895: error: Cannot link with GPM library" >&5
4896 echo "$as_me: error: Cannot link with GPM library" >&2;}
4897    { (exit 1); exit 1; }; }
4898                 fi
4899                 with_gpm=yes
4900
4901 fi
4902
4903 else
4904
4905                 test "$with_gpm" != maybe && { echo "$as_me:4905: WARNING: Cannot find GPM header" >&5
4906 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4907                 with_gpm=no
4908
4909 fi
4910
4911 fi
4912
4913 if test "$with_gpm" != no ; then
4914         echo "$as_me:4914: checking if you want to load GPM dynamically" >&5
4915 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4916
4917 # Check whether --with-dlsym or --without-dlsym was given.
4918 if test "${with_dlsym+set}" = set; then
4919   withval="$with_dlsym"
4920   with_dlsym=$withval
4921 else
4922   with_dlsym=yes
4923 fi;
4924         echo "$as_me:4924: result: $with_dlsym" >&5
4925 echo "${ECHO_T}$with_dlsym" >&6
4926         if test "$with_dlsym" = yes ; then
4927
4928 cf_have_dlsym=no
4929 echo "$as_me:4929: checking for dlsym" >&5
4930 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4931 if test "${ac_cv_func_dlsym+set}" = set; then
4932   echo $ECHO_N "(cached) $ECHO_C" >&6
4933 else
4934   cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937 /* System header to define __stub macros and hopefully few prototypes,
4938     which can conflict with char dlsym (); below.  */
4939 #include <assert.h>
4940 /* Override any gcc2 internal prototype to avoid an error.  */
4941 #ifdef __cplusplus
4942 extern "C"
4943 #endif
4944 /* We use char because int might match the return type of a gcc2
4945    builtin and then its argument prototype would still apply.  */
4946 char dlsym ();
4947 char (*f) ();
4948
4949 int
4950 main ()
4951 {
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4956 choke me
4957 #else
4958 f = dlsym;
4959 #endif
4960
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext conftest$ac_exeext
4966 if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
4967   (eval $ac_link) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest$ac_exeext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977   ac_cv_func_dlsym=yes
4978 else
4979   echo "$as_me: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 ac_cv_func_dlsym=no
4982 fi
4983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4984 fi
4985 echo "$as_me:4985: result: $ac_cv_func_dlsym" >&5
4986 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4987 if test $ac_cv_func_dlsym = yes; then
4988   cf_have_dlsym=yes
4989 else
4990
4991 cf_have_libdl=no
4992 echo "$as_me:4992: checking for dlsym in -ldl" >&5
4993 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4994 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4995   echo $ECHO_N "(cached) $ECHO_C" >&6
4996 else
4997   ac_check_lib_save_LIBS=$LIBS
4998 LIBS="-ldl  $LIBS"
4999 cat >conftest.$ac_ext <<_ACEOF
5000 #line 5000 "configure"
5001 #include "confdefs.h"
5002
5003 /* Override any gcc2 internal prototype to avoid an error.  */
5004 #ifdef __cplusplus
5005 extern "C"
5006 #endif
5007 /* We use char because int might match the return type of a gcc2
5008    builtin and then its argument prototype would still apply.  */
5009 char dlsym ();
5010 int
5011 main ()
5012 {
5013 dlsym ();
5014   ;
5015   return 0;
5016 }
5017 _ACEOF
5018 rm -f conftest.$ac_objext conftest$ac_exeext
5019 if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
5020   (eval $ac_link) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); } &&
5024          { ac_try='test -s conftest$ac_exeext'
5025   { (eval echo "$as_me:5025: \"$ac_try\"") >&5
5026   (eval $ac_try) 2>&5
5027   ac_status=$?
5028   echo "$as_me:5028: \$? = $ac_status" >&5
5029   (exit $ac_status); }; }; then
5030   ac_cv_lib_dl_dlsym=yes
5031 else
5032   echo "$as_me: failed program was:" >&5
5033 cat conftest.$ac_ext >&5
5034 ac_cv_lib_dl_dlsym=no
5035 fi
5036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5037 LIBS=$ac_check_lib_save_LIBS
5038 fi
5039 echo "$as_me:5039: result: $ac_cv_lib_dl_dlsym" >&5
5040 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5041 if test $ac_cv_lib_dl_dlsym = yes; then
5042
5043         cf_have_dlsym=yes
5044         cf_have_libdl=yes
5045 fi
5046
5047 fi
5048
5049 if test "$cf_have_dlsym" = yes ; then
5050         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5051
5052         echo "$as_me:5052: checking whether able to link to dl*() functions" >&5
5053 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5054         cat >conftest.$ac_ext <<_ACEOF
5055 #line 5055 "configure"
5056 #include "confdefs.h"
5057 #include <dlfcn.h>
5058 int
5059 main ()
5060 {
5061
5062                 void *obj;
5063                 if ((obj = dlopen("filename", 0)) != 0) {
5064                         if (dlsym(obj, "symbolname") == 0) {
5065                         dlclose(obj);
5066                         }
5067                 }
5068   ;
5069   return 0;
5070 }
5071 _ACEOF
5072 rm -f conftest.$ac_objext conftest$ac_exeext
5073 if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
5074   (eval $ac_link) 2>&5
5075   ac_status=$?
5076   echo "$as_me:5076: \$? = $ac_status" >&5
5077   (exit $ac_status); } &&
5078          { ac_try='test -s conftest$ac_exeext'
5079   { (eval echo "$as_me:5079: \"$ac_try\"") >&5
5080   (eval $ac_try) 2>&5
5081   ac_status=$?
5082   echo "$as_me:5082: \$? = $ac_status" >&5
5083   (exit $ac_status); }; }; then
5084
5085                 cat >>confdefs.h <<\EOF
5086 #define HAVE_LIBDL 1
5087 EOF
5088
5089 else
5090   echo "$as_me: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092
5093                 { { echo "$as_me:5093: error: Cannot link test program for libdl" >&5
5094 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5095    { (exit 1); exit 1; }; }
5096 fi
5097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5098         echo "$as_me:5098: result: ok" >&5
5099 echo "${ECHO_T}ok" >&6
5100 else
5101         { { echo "$as_me:5101: error: Cannot find dlsym function" >&5
5102 echo "$as_me: error: Cannot find dlsym function" >&2;}
5103    { (exit 1); exit 1; }; }
5104 fi
5105
5106                 if test "$with_gpm" != yes ; then
5107                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5108
5109 echo "${as_me:-configure}:5109: testing assuming soname for gpm is $with_gpm ..." 1>&5
5110
5111                         cf_cv_gpm_soname="$with_gpm"
5112                 else
5113
5114 echo "$as_me:5114: checking for soname of gpm library" >&5
5115 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5116 if test "${cf_cv_gpm_soname+set}" = set; then
5117   echo $ECHO_N "(cached) $ECHO_C" >&6
5118 else
5119
5120 cf_cv_gpm_soname=unknown
5121 if test "$cross_compiling" != yes ; then
5122 cat >conftest.$ac_ext <<CF_EOF
5123 #include <gpm.h>
5124 int main()
5125 {
5126 if (Gpm_Open(0,0)) Gpm_Close();
5127         ${cf_cv_main_return:-return}(0);
5128 }
5129 CF_EOF
5130 cf_save_LIBS="$LIBS"
5131         LIBS="-lgpm $LIBS"
5132         if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                 if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
5138   (eval $ac_link) 2>&5
5139   ac_status=$?
5140   echo "$as_me:5140: \$? = $ac_status" >&5
5141   (exit $ac_status); } ; then
5142                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5143                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5144                 fi
5145         fi
5146 rm -rf conftest*
5147 LIBS="$cf_save_LIBS"
5148 fi
5149
5150 fi
5151 echo "$as_me:5151: result: $cf_cv_gpm_soname" >&5
5152 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5153
5154                 fi
5155                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5156 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5157 EOF
5158
5159                 SHLIB_LIST="-ldl $SHLIB_LIST"
5160         else
5161                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5162                 TEST_LIBS="-lgpm $TEST_LIBS"
5163         fi
5164         cat >>confdefs.h <<\EOF
5165 #define HAVE_LIBGPM 1
5166 EOF
5167
5168 echo "$as_me:5168: checking for Gpm_Wgetch in -lgpm" >&5
5169 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5170 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5171   echo $ECHO_N "(cached) $ECHO_C" >&6
5172 else
5173   ac_check_lib_save_LIBS=$LIBS
5174 LIBS="-lgpm  $LIBS"
5175 cat >conftest.$ac_ext <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5178
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 #ifdef __cplusplus
5181 extern "C"
5182 #endif
5183 /* We use char because int might match the return type of a gcc2
5184    builtin and then its argument prototype would still apply.  */
5185 char Gpm_Wgetch ();
5186 int
5187 main ()
5188 {
5189 Gpm_Wgetch ();
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext conftest$ac_exeext
5195 if { (eval echo "$as_me:5195: \"$ac_link\"") >&5
5196   (eval $ac_link) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); } &&
5200          { ac_try='test -s conftest$ac_exeext'
5201   { (eval echo "$as_me:5201: \"$ac_try\"") >&5
5202   (eval $ac_try) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); }; }; then
5206   ac_cv_lib_gpm_Gpm_Wgetch=yes
5207 else
5208   echo "$as_me: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5210 ac_cv_lib_gpm_Gpm_Wgetch=no
5211 fi
5212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5213 LIBS=$ac_check_lib_save_LIBS
5214 fi
5215 echo "$as_me:5215: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5216 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5217 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5218
5219 echo "$as_me:5219: checking if GPM is weakly bound to curses library" >&5
5220 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5221 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5222   echo $ECHO_N "(cached) $ECHO_C" >&6
5223 else
5224
5225 cf_cv_check_gpm_wgetch=unknown
5226 if test "$cross_compiling" != yes ; then
5227
5228 cat >conftest.$ac_ext <<CF_EOF
5229 #include <gpm.h>
5230 int main()
5231 {
5232         Gpm_Wgetch();
5233         ${cf_cv_main_return:-return}(0);
5234 }
5235 CF_EOF
5236
5237         cf_save_LIBS="$LIBS"
5238         # This only works if we can look at the symbol table.  If a shared
5239         # library is stripped for install, we cannot use that.  So we're forced
5240         # to rely on the static library, noting that some packagers may not
5241         # include it.
5242         LIBS="-static -lgpm -dynamic $LIBS"
5243         if { (eval echo "$as_me:5243: \"$ac_compile\"") >&5
5244   (eval $ac_compile) 2>&5
5245   ac_status=$?
5246   echo "$as_me:5246: \$? = $ac_status" >&5
5247   (exit $ac_status); } ; then
5248                 if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
5249   (eval $ac_link) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5254                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5255                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5256                 fi
5257         fi
5258         rm -rf conftest*
5259         LIBS="$cf_save_LIBS"
5260 fi
5261
5262 fi
5263 echo "$as_me:5263: result: $cf_cv_check_gpm_wgetch" >&5
5264 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5265
5266 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5267         { echo "$as_me:5267: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5268 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5269 fi
5270
5271 fi
5272
5273 fi
5274
5275 # not everyone has "test -c"
5276 if test -c /dev/sysmouse 2>/dev/null ; then
5277 echo "$as_me:5277: checking if you want to use sysmouse" >&5
5278 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5279
5280 # Check whether --with-sysmouse or --without-sysmouse was given.
5281 if test "${with_sysmouse+set}" = set; then
5282   withval="$with_sysmouse"
5283   cf_with_sysmouse=$withval
5284 else
5285   cf_with_sysmouse=maybe
5286 fi;
5287         if test "$cf_with_sysmouse" != no ; then
5288         cat >conftest.$ac_ext <<_ACEOF
5289 #line 5289 "configure"
5290 #include "confdefs.h"
5291
5292 #include <osreldate.h>
5293 #if (__FreeBSD_version >= 400017)
5294 #include <sys/consio.h>
5295 #include <sys/fbio.h>
5296 #else
5297 #include <machine/console.h>
5298 #endif
5299
5300 int
5301 main ()
5302 {
5303
5304         struct mouse_info the_mouse;
5305         ioctl(0, CONS_MOUSECTL, &the_mouse);
5306
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext
5312 if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
5313   (eval $ac_compile) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest.$ac_objext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   cf_with_sysmouse=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 cf_with_sysmouse=no
5328 fi
5329 rm -f conftest.$ac_objext conftest.$ac_ext
5330         fi
5331 echo "$as_me:5331: result: $cf_with_sysmouse" >&5
5332 echo "${ECHO_T}$cf_with_sysmouse" >&6
5333 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5334 #define USE_SYSMOUSE 1
5335 EOF
5336
5337 fi
5338
5339 if test X"$CC_G_OPT" = X"" ; then
5340         CC_G_OPT='-g'
5341         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5342 fi
5343
5344 if test X"$CXX_G_OPT" = X"" ; then
5345         CXX_G_OPT='-g'
5346         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5347 fi
5348
5349 echo "$as_me:5349: checking for default loader flags" >&5
5350 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5351 case $DFT_LWR_MODEL in
5352 libtool) LD_MODEL=''   ;;
5353 normal)  LD_MODEL=''   ;;
5354 debug)   LD_MODEL=$CC_G_OPT ;;
5355 profile) LD_MODEL='-pg';;
5356 shared)  LD_MODEL=''   ;;
5357 esac
5358 echo "$as_me:5358: result: $LD_MODEL" >&5
5359 echo "${ECHO_T}$LD_MODEL" >&6
5360
5361 case $DFT_LWR_MODEL in
5362 shared)
5363
5364 echo "$as_me:5364: checking if rpath option should be used" >&5
5365 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5366
5367 # Check whether --enable-rpath or --disable-rpath was given.
5368 if test "${enable_rpath+set}" = set; then
5369   enableval="$enable_rpath"
5370   cf_cv_enable_rpath=$enableval
5371 else
5372   cf_cv_enable_rpath=no
5373 fi;
5374 echo "$as_me:5374: result: $cf_cv_enable_rpath" >&5
5375 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5376
5377 echo "$as_me:5377: checking if shared libraries should be relinked during install" >&5
5378 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5379
5380 # Check whether --enable-relink or --disable-relink was given.
5381 if test "${enable_relink+set}" = set; then
5382   enableval="$enable_relink"
5383   cf_cv_do_relink=$enableval
5384 else
5385   cf_cv_do_relink=yes
5386 fi;
5387 echo "$as_me:5387: result: $cf_cv_do_relink" >&5
5388 echo "${ECHO_T}$cf_cv_do_relink" >&6
5389         ;;
5390 esac
5391
5392 LD_RPATH_OPT=
5393 echo "$as_me:5393: checking for an rpath option" >&5
5394 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5395 case $cf_cv_system_name in #(vi
5396 irix*) #(vi
5397         if test "$GCC" = yes; then
5398                 LD_RPATH_OPT="-Wl,-rpath,"
5399         else
5400                 LD_RPATH_OPT="-rpath "
5401         fi
5402         ;;
5403 linux*|gnu*|k*bsd*-gnu) #(vi
5404         LD_RPATH_OPT="-Wl,-rpath,"
5405         ;;
5406 openbsd[2-9].*) #(vi
5407         LD_RPATH_OPT="-Wl,-rpath,"
5408         ;;
5409 freebsd*) #(vi
5410         LD_RPATH_OPT="-rpath "
5411         ;;
5412 netbsd*) #(vi
5413         LD_RPATH_OPT="-Wl,-rpath,"
5414         ;;
5415 osf*|mls+*) #(vi
5416         LD_RPATH_OPT="-rpath "
5417         ;;
5418 solaris2*) #(vi
5419         LD_RPATH_OPT="-R"
5420         ;;
5421 *)
5422         ;;
5423 esac
5424 echo "$as_me:5424: result: $LD_RPATH_OPT" >&5
5425 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5426
5427 case "x$LD_RPATH_OPT" in #(vi
5428 x-R*)
5429         echo "$as_me:5429: checking if we need a space after rpath option" >&5
5430 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5431         cf_save_LIBS="$LIBS"
5432         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5433         cat >conftest.$ac_ext <<_ACEOF
5434 #line 5434 "configure"
5435 #include "confdefs.h"
5436
5437 int
5438 main ()
5439 {
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext conftest$ac_exeext
5446 if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
5447   (eval $ac_link) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest$ac_exeext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_rpath_space=no
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_rpath_space=yes
5462 fi
5463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5464         LIBS="$cf_save_LIBS"
5465         echo "$as_me:5465: result: $cf_rpath_space" >&5
5466 echo "${ECHO_T}$cf_rpath_space" >&6
5467         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5468         ;;
5469 esac
5470
5471         LOCAL_LDFLAGS=
5472         LOCAL_LDFLAGS2=
5473         LD_SHARED_OPTS=
5474         INSTALL_LIB="-m 644"
5475
5476         cf_cv_do_symlinks=no
5477         cf_ld_rpath_opt=
5478         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5479
5480         echo "$as_me:5480: checking if release/abi version should be used for shared libs" >&5
5481 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5482
5483 # Check whether --with-shlib-version or --without-shlib-version was given.
5484 if test "${with_shlib_version+set}" = set; then
5485   withval="$with_shlib_version"
5486   test -z "$withval" && withval=auto
5487         case $withval in #(vi
5488         yes) #(vi
5489                 cf_cv_shlib_version=auto
5490                 ;;
5491         rel|abi|auto|no) #(vi
5492                 cf_cv_shlib_version=$withval
5493                 ;;
5494         *)
5495                 { { echo "$as_me:5495: error: option value must be one of: rel, abi, auto or no" >&5
5496 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5497    { (exit 1); exit 1; }; }
5498                 ;;
5499         esac
5500
5501 else
5502   cf_cv_shlib_version=auto
5503 fi;
5504         echo "$as_me:5504: result: $cf_cv_shlib_version" >&5
5505 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5506
5507         cf_cv_rm_so_locs=no
5508
5509         # Some less-capable ports of gcc support only -fpic
5510         CC_SHARED_OPTS=
5511         if test "$GCC" = yes
5512         then
5513                 echo "$as_me:5513: checking which $CC option to use" >&5
5514 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5515                 cf_save_CFLAGS="$CFLAGS"
5516                 for CC_SHARED_OPTS in -fPIC -fpic ''
5517                 do
5518                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5519                         cat >conftest.$ac_ext <<_ACEOF
5520 #line 5520 "configure"
5521 #include "confdefs.h"
5522 #include <stdio.h>
5523 int
5524 main ()
5525 {
5526 int x = 1
5527   ;
5528   return 0;
5529 }
5530 _ACEOF
5531 rm -f conftest.$ac_objext
5532 if { (eval echo "$as_me:5532: \"$ac_compile\"") >&5
5533   (eval $ac_compile) 2>&5
5534   ac_status=$?
5535   echo "$as_me:5535: \$? = $ac_status" >&5
5536   (exit $ac_status); } &&
5537          { ac_try='test -s conftest.$ac_objext'
5538   { (eval echo "$as_me:5538: \"$ac_try\"") >&5
5539   (eval $ac_try) 2>&5
5540   ac_status=$?
5541   echo "$as_me:5541: \$? = $ac_status" >&5
5542   (exit $ac_status); }; }; then
5543   break
5544 else
5545   echo "$as_me: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5547 fi
5548 rm -f conftest.$ac_objext conftest.$ac_ext
5549                 done
5550                 echo "$as_me:5550: result: $CC_SHARED_OPTS" >&5
5551 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5552                 CFLAGS="$cf_save_CFLAGS"
5553         fi
5554
5555         cf_cv_shlib_version_infix=no
5556
5557         case $cf_cv_system_name in #(vi
5558         aix[56]*) #(vi
5559                 if test "$GCC" = yes; then
5560                         CC_SHARED_OPTS=
5561                         MK_SHARED_LIB='$(CC) -shared'
5562                 fi
5563                 ;;
5564         beos*) #(vi
5565                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5566                 ;;
5567         cygwin*) #(vi
5568                 CC_SHARED_OPTS=
5569                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5570                 cf_cv_shlib_version=cygdll
5571                 cf_cv_shlib_version_infix=cygdll
5572                 cat >mk_shared_lib.sh <<-CF_EOF
5573                 #!/bin/sh
5574                 SHARED_LIB=\$1
5575                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5576                 shift
5577                 cat <<-EOF
5578                 Linking shared library
5579                 ** SHARED_LIB \$SHARED_LIB
5580                 ** IMPORT_LIB \$IMPORT_LIB
5581 EOF
5582                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5583 CF_EOF
5584                 chmod +x mk_shared_lib.sh
5585                 ;;
5586         darwin*) #(vi
5587                 EXTRA_CFLAGS="-no-cpp-precomp"
5588                 CC_SHARED_OPTS="-dynamic"
5589                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5590                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5591                 cf_cv_shlib_version_infix=yes
5592                 echo "$as_me:5592: checking if ld -search_paths_first works" >&5
5593 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5594 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5595   echo $ECHO_N "(cached) $ECHO_C" >&6
5596 else
5597
5598                         cf_save_LDFLAGS=$LDFLAGS
5599                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5600                         cat >conftest.$ac_ext <<_ACEOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5603
5604 int
5605 main ()
5606 {
5607 int i;
5608   ;
5609   return 0;
5610 }
5611 _ACEOF
5612 rm -f conftest.$ac_objext conftest$ac_exeext
5613 if { (eval echo "$as_me:5613: \"$ac_link\"") >&5
5614   (eval $ac_link) 2>&5
5615   ac_status=$?
5616   echo "$as_me:5616: \$? = $ac_status" >&5
5617   (exit $ac_status); } &&
5618          { ac_try='test -s conftest$ac_exeext'
5619   { (eval echo "$as_me:5619: \"$ac_try\"") >&5
5620   (eval $ac_try) 2>&5
5621   ac_status=$?
5622   echo "$as_me:5622: \$? = $ac_status" >&5
5623   (exit $ac_status); }; }; then
5624   cf_cv_ldflags_search_paths_first=yes
5625 else
5626   echo "$as_me: failed program was:" >&5
5627 cat conftest.$ac_ext >&5
5628 cf_cv_ldflags_search_paths_first=no
5629 fi
5630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5631                                 LDFLAGS=$cf_save_LDFLAGS
5632 fi
5633 echo "$as_me:5633: result: $cf_cv_ldflags_search_paths_first" >&5
5634 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5635                 if test $cf_cv_ldflags_search_paths_first = yes; then
5636                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5637                 fi
5638                 ;;
5639         hpux*) #(vi
5640                 # (tested with gcc 2.7.2 -- I don't have c89)
5641                 if test "$GCC" = yes; then
5642                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5643                 else
5644                         CC_SHARED_OPTS='+Z'
5645                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5646                 fi
5647                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5648                 # HP-UX shared libraries must be executable, and should be
5649                 # readonly to exploit a quirk in the memory manager.
5650                 INSTALL_LIB="-m 555"
5651                 ;;
5652         irix*) #(vi
5653                 if test "$cf_cv_enable_rpath" = yes ; then
5654                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5655                 fi
5656                 # tested with IRIX 5.2 and 'cc'.
5657                 if test "$GCC" != yes; then
5658                         CC_SHARED_OPTS='-KPIC'
5659                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5660                 else
5661                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5662                 fi
5663                 cf_cv_rm_so_locs=yes
5664                 ;;
5665         linux*|gnu*|k*bsd*-gnu) #(vi
5666                 if test "$DFT_LWR_MODEL" = "shared" ; then
5667                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5668                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5669                 fi
5670                 if test "$cf_cv_enable_rpath" = yes ; then
5671                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5672                 fi
5673
5674         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5675         if test "$cf_cv_shlib_version" = rel; then
5676                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5677         else
5678                 cf_cv_shared_soname='`basename $@`'
5679         fi
5680
5681                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5682                 ;;
5683         openbsd[2-9].*) #(vi
5684                 if test "$DFT_LWR_MODEL" = "shared" ; then
5685                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5686                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5687                 fi
5688                 if test "$cf_cv_enable_rpath" = yes ; then
5689                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5690                 fi
5691                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5692
5693         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5694         if test "$cf_cv_shlib_version" = rel; then
5695                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5696         else
5697                 cf_cv_shared_soname='`basename $@`'
5698         fi
5699
5700                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5701                 ;;
5702         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5703                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5704                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5705                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5706                 ;;
5707         freebsd*) #(vi
5708                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5709                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5710                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5711                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5712                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5713                 fi
5714
5715         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5716         if test "$cf_cv_shlib_version" = rel; then
5717                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5718         else
5719                 cf_cv_shared_soname='`basename $@`'
5720         fi
5721
5722                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5723                 ;;
5724         netbsd*) #(vi
5725                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5726                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5727                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5728                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5729                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5730                         if test "$cf_cv_shlib_version" = auto; then
5731                         if test -f /usr/libexec/ld.elf_so; then
5732                                 cf_cv_shlib_version=abi
5733                         else
5734                                 cf_cv_shlib_version=rel
5735                         fi
5736                         fi
5737
5738         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5739         if test "$cf_cv_shlib_version" = rel; then
5740                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5741         else
5742                 cf_cv_shared_soname='`basename $@`'
5743         fi
5744
5745                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5746                 else
5747                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5748                 fi
5749                 ;;
5750         osf*|mls+*) #(vi
5751                 # tested with OSF/1 V3.2 and 'cc'
5752                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5753                 # link with shared libs).
5754                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5755                 case $host_os in #(vi
5756                 osf4*)
5757                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5758                         ;;
5759                 esac
5760                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5761                 if test "$DFT_LWR_MODEL" = "shared" ; then
5762                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5763                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5764                 fi
5765                 cf_cv_rm_so_locs=yes
5766                 ;;
5767         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5768                 # tested with osr5.0.5
5769                 if test "$GCC" != yes; then
5770                         CC_SHARED_OPTS='-belf -KPIC'
5771                 fi
5772                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5773                 if test "$cf_cv_enable_rpath" = yes ; then
5774                         # only way is to set LD_RUN_PATH but no switch for it
5775                         RUN_PATH=$libdir
5776                 fi
5777                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5778                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5779                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5780                 ;;
5781         sunos4*) #(vi
5782                 # tested with SunOS 4.1.1 and gcc 2.7.0
5783                 if test "$GCC" != yes; then
5784                         CC_SHARED_OPTS='-KPIC'
5785                 fi
5786                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5787                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5788                 ;;
5789         solaris2*) #(vi
5790                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5791                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5792                 if test "$DFT_LWR_MODEL" = "shared" ; then
5793                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5794                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5795                 fi
5796                 if test "$cf_cv_enable_rpath" = yes ; then
5797                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5798                 fi
5799
5800         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5801         if test "$cf_cv_shlib_version" = rel; then
5802                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5803         else
5804                 cf_cv_shared_soname='`basename $@`'
5805         fi
5806
5807                 if test "$GCC" != yes; then
5808                         cf_save_CFLAGS="$CFLAGS"
5809                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5810                         do
5811                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5812                                 cat >conftest.$ac_ext <<_ACEOF
5813 #line 5813 "configure"
5814 #include "confdefs.h"
5815 #include <stdio.h>
5816 int
5817 main ()
5818 {
5819 printf("Hello\n");
5820   ;
5821   return 0;
5822 }
5823 _ACEOF
5824 rm -f conftest.$ac_objext
5825 if { (eval echo "$as_me:5825: \"$ac_compile\"") >&5
5826   (eval $ac_compile) 2>&5
5827   ac_status=$?
5828   echo "$as_me:5828: \$? = $ac_status" >&5
5829   (exit $ac_status); } &&
5830          { ac_try='test -s conftest.$ac_objext'
5831   { (eval echo "$as_me:5831: \"$ac_try\"") >&5
5832   (eval $ac_try) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); }; }; then
5836   break
5837 else
5838   echo "$as_me: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840 fi
5841 rm -f conftest.$ac_objext conftest.$ac_ext
5842                         done
5843                         CFLAGS="$cf_save_CFLAGS"
5844                         CC_SHARED_OPTS=$cf_shared_opts
5845                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5846                 else
5847                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5848                 fi
5849                 ;;
5850         sysv5uw7*|unix_sv*) #(vi
5851                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5852                 if test "$GCC" != yes; then
5853                         CC_SHARED_OPTS='-KPIC'
5854                 fi
5855                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5856                 ;;
5857         *)
5858                 CC_SHARED_OPTS='unknown'
5859                 MK_SHARED_LIB='echo unknown'
5860                 ;;
5861         esac
5862
5863         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5864         case "$cf_cv_shlib_version" in #(vi
5865         rel|abi)
5866                 case "$MK_SHARED_LIB" in #(vi
5867                 *'-o $@') #(vi
5868                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5869                         ;;
5870                 *)
5871                         { echo "$as_me:5871: WARNING: ignored --with-shlib-version" >&5
5872 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5873                         ;;
5874                 esac
5875                 ;;
5876         esac
5877
5878         if test -n "$cf_ld_rpath_opt" ; then
5879                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5880         fi
5881
5882 if test "$CC_SHARED_OPTS" = "unknown"; then
5883         for model in $cf_list_models; do
5884                 if test "$model" = "shared"; then
5885                         { { echo "$as_me:5885: error: Shared libraries are not supported in this version" >&5
5886 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5887    { (exit 1); exit 1; }; }
5888                 fi
5889         done
5890 fi
5891
5892 ### If we're building with rpath, try to link non-standard libs that way too.
5893 if test "$DFT_LWR_MODEL" = "shared"; then
5894
5895 echo "$as_me:5895: checking if rpath-hack should be disabled" >&5
5896 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5897
5898 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5899 if test "${enable_rpath_hack+set}" = set; then
5900   enableval="$enable_rpath_hack"
5901   test "$enableval" != no && enableval=yes
5902   if test "$enableval" != "yes" ; then
5903     cf_disable_rpath_hack=yes
5904   else
5905     cf_disable_rpath_hack=no
5906   fi
5907 else
5908   enableval=yes
5909   cf_disable_rpath_hack=no
5910
5911 fi;
5912 echo "$as_me:5912: result: $cf_disable_rpath_hack" >&5
5913 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5914 if test "$cf_disable_rpath_hack" = no ; then
5915
5916 echo "$as_me:5916: checking for updated LDFLAGS" >&5
5917 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5918 if test -n "$LD_RPATH_OPT" ; then
5919         echo "$as_me:5919: result: maybe" >&5
5920 echo "${ECHO_T}maybe" >&6
5921
5922         for ac_prog in ldd
5923 do
5924   # Extract the first word of "$ac_prog", so it can be a program name with args.
5925 set dummy $ac_prog; ac_word=$2
5926 echo "$as_me:5926: checking for $ac_word" >&5
5927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5928 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5929   echo $ECHO_N "(cached) $ECHO_C" >&6
5930 else
5931   if test -n "$cf_ldd_prog"; then
5932   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5933 else
5934   ac_save_IFS=$IFS; IFS=$ac_path_separator
5935 ac_dummy="$PATH"
5936 for ac_dir in $ac_dummy; do
5937   IFS=$ac_save_IFS
5938   test -z "$ac_dir" && ac_dir=.
5939   $as_executable_p "$ac_dir/$ac_word" || continue
5940 ac_cv_prog_cf_ldd_prog="$ac_prog"
5941 echo "$as_me:5941: found $ac_dir/$ac_word" >&5
5942 break
5943 done
5944
5945 fi
5946 fi
5947 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5948 if test -n "$cf_ldd_prog"; then
5949   echo "$as_me:5949: result: $cf_ldd_prog" >&5
5950 echo "${ECHO_T}$cf_ldd_prog" >&6
5951 else
5952   echo "$as_me:5952: result: no" >&5
5953 echo "${ECHO_T}no" >&6
5954 fi
5955
5956   test -n "$cf_ldd_prog" && break
5957 done
5958 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5959
5960         cf_rpath_list="/usr/lib /lib"
5961         if test "$cf_ldd_prog" != no
5962         then
5963                 cf_rpath_oops=
5964
5965 cat >conftest.$ac_ext <<_ACEOF
5966 #line 5966 "configure"
5967 #include "confdefs.h"
5968 #include <stdio.h>
5969 int
5970 main ()
5971 {
5972 printf("Hello");
5973   ;
5974   return 0;
5975 }
5976 _ACEOF
5977 rm -f conftest.$ac_objext conftest$ac_exeext
5978 if { (eval echo "$as_me:5978: \"$ac_link\"") >&5
5979   (eval $ac_link) 2>&5
5980   ac_status=$?
5981   echo "$as_me:5981: \$? = $ac_status" >&5
5982   (exit $ac_status); } &&
5983          { ac_try='test -s conftest$ac_exeext'
5984   { (eval echo "$as_me:5984: \"$ac_try\"") >&5
5985   (eval $ac_try) 2>&5
5986   ac_status=$?
5987   echo "$as_me:5987: \$? = $ac_status" >&5
5988   (exit $ac_status); }; }; then
5989   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5990                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5991 else
5992   echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5994 fi
5995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5996
5997                 # If we passed the link-test, but get a "not found" on a given library,
5998                 # this could be due to inept reconfiguration of gcc to make it only
5999                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6000                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6001                 # /usr/local libraries.
6002                 if test -n "$cf_rpath_oops"
6003                 then
6004                         for cf_rpath_src in $cf_rpath_oops
6005                         do
6006                                 for cf_rpath_dir in \
6007                                         /usr/local \
6008                                         /usr/pkg \
6009                                         /opt/sfw
6010                                 do
6011                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6012                                         then
6013                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6014
6015 echo "${as_me:-configure}:6015: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6016
6017                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6018                                                 break
6019                                         fi
6020                                 done
6021                         done
6022                 fi
6023         fi
6024
6025         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6026
6027 echo "${as_me:-configure}:6027: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6028
6029 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6030
6031 echo "${as_me:-configure}:6031: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6032
6033 cf_rpath_dst=
6034 for cf_rpath_src in $LDFLAGS
6035 do
6036         case $cf_rpath_src in #(vi
6037         -L*) #(vi
6038
6039                 # check if this refers to a directory which we will ignore
6040                 cf_rpath_skip=no
6041                 if test -n "$cf_rpath_list"
6042                 then
6043                         for cf_rpath_item in $cf_rpath_list
6044                         do
6045                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6046                                 then
6047                                         cf_rpath_skip=yes
6048                                         break
6049                                 fi
6050                         done
6051                 fi
6052
6053                 if test "$cf_rpath_skip" = no
6054                 then
6055                         # transform the option
6056                         if test "$LD_RPATH_OPT" = "-R " ; then
6057                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6058                         else
6059                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6060                         fi
6061
6062                         # if we have not already added this, add it now
6063                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6064                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6065                         then
6066                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6067
6068 echo "${as_me:-configure}:6068: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6069
6070                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6071                         fi
6072                 fi
6073                 ;;
6074         esac
6075         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6076 done
6077 LDFLAGS=$cf_rpath_dst
6078
6079 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6080
6081 echo "${as_me:-configure}:6081: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6082
6083 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6084
6085 echo "${as_me:-configure}:6085: testing ...checking LIBS $LIBS ..." 1>&5
6086
6087 cf_rpath_dst=
6088 for cf_rpath_src in $LIBS
6089 do
6090         case $cf_rpath_src in #(vi
6091         -L*) #(vi
6092
6093                 # check if this refers to a directory which we will ignore
6094                 cf_rpath_skip=no
6095                 if test -n "$cf_rpath_list"
6096                 then
6097                         for cf_rpath_item in $cf_rpath_list
6098                         do
6099                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6100                                 then
6101                                         cf_rpath_skip=yes
6102                                         break
6103                                 fi
6104                         done
6105                 fi
6106
6107                 if test "$cf_rpath_skip" = no
6108                 then
6109                         # transform the option
6110                         if test "$LD_RPATH_OPT" = "-R " ; then
6111                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6112                         else
6113                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6114                         fi
6115
6116                         # if we have not already added this, add it now
6117                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6118                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6119                         then
6120                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6121
6122 echo "${as_me:-configure}:6122: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6123
6124                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6125                         fi
6126                 fi
6127                 ;;
6128         esac
6129         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6130 done
6131 LIBS=$cf_rpath_dst
6132
6133 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6134
6135 echo "${as_me:-configure}:6135: testing ...checked LIBS $LIBS ..." 1>&5
6136
6137         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6138
6139 echo "${as_me:-configure}:6139: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6140
6141 fi
6142
6143 fi
6144
6145 fi
6146
6147 ###############################################################################
6148
6149 ###     use option --disable-overwrite to leave out the link to -lcurses
6150 echo "$as_me:6150: checking if you wish to install ncurses overwriting curses" >&5
6151 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6152
6153 # Check whether --enable-overwrite or --disable-overwrite was given.
6154 if test "${enable_overwrite+set}" = set; then
6155   enableval="$enable_overwrite"
6156   with_overwrite=$enableval
6157 else
6158   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6159 fi;
6160 echo "$as_me:6160: result: $with_overwrite" >&5
6161 echo "${ECHO_T}$with_overwrite" >&6
6162
6163 echo "$as_me:6163: checking if external terminfo-database is used" >&5
6164 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6165
6166 # Check whether --enable-database or --disable-database was given.
6167 if test "${enable_database+set}" = set; then
6168   enableval="$enable_database"
6169   use_database=$enableval
6170 else
6171   use_database=yes
6172 fi;
6173 echo "$as_me:6173: result: $use_database" >&5
6174 echo "${ECHO_T}$use_database" >&6
6175
6176 case $host_os in #(vi
6177 os2*) #(vi
6178         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6179         ;;
6180 *) #(vi
6181         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6182         ;;
6183 esac
6184
6185         case $cf_cv_system_name in
6186         os2*)   PATH_SEPARATOR=';'  ;;
6187         *)      PATH_SEPARATOR=':'  ;;
6188         esac
6189
6190 if test "$use_database" != no ; then
6191         cat >>confdefs.h <<\EOF
6192 #define USE_DATABASE 1
6193 EOF
6194
6195         echo "$as_me:6195: checking which terminfo source-file will be installed" >&5
6196 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6197
6198 # Check whether --with-database or --without-database was given.
6199 if test "${with_database+set}" = set; then
6200   withval="$with_database"
6201   TERMINFO_SRC=$withval
6202 fi;
6203         echo "$as_me:6203: result: $TERMINFO_SRC" >&5
6204 echo "${ECHO_T}$TERMINFO_SRC" >&6
6205
6206         echo "$as_me:6206: checking whether to use hashed database instead of directory/tree" >&5
6207 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6208
6209 # Check whether --with-hashed-db or --without-hashed-db was given.
6210 if test "${with_hashed_db+set}" = set; then
6211   withval="$with_hashed_db"
6212
6213 else
6214   with_hashed_db=no
6215 fi;
6216         echo "$as_me:6216: result: $with_hashed_db" >&5
6217 echo "${ECHO_T}$with_hashed_db" >&6
6218 else
6219         with_hashed_db=no
6220 fi
6221
6222 echo "$as_me:6222: checking for list of fallback descriptions" >&5
6223 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6224
6225 # Check whether --with-fallbacks or --without-fallbacks was given.
6226 if test "${with_fallbacks+set}" = set; then
6227   withval="$with_fallbacks"
6228   with_fallback=$withval
6229 else
6230   with_fallback=
6231 fi;
6232 echo "$as_me:6232: result: $with_fallback" >&5
6233 echo "${ECHO_T}$with_fallback" >&6
6234 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6235
6236 echo "$as_me:6236: checking if you want modern xterm or antique" >&5
6237 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6238
6239 # Check whether --with-xterm-new or --without-xterm-new was given.
6240 if test "${with_xterm_new+set}" = set; then
6241   withval="$with_xterm_new"
6242   with_xterm_new=$withval
6243 else
6244   with_xterm_new=yes
6245 fi;
6246 case $with_xterm_new in
6247 no)     with_xterm_new=xterm-old;;
6248 *)      with_xterm_new=xterm-new;;
6249 esac
6250 echo "$as_me:6250: result: $with_xterm_new" >&5
6251 echo "${ECHO_T}$with_xterm_new" >&6
6252 WHICH_XTERM=$with_xterm_new
6253
6254 MAKE_TERMINFO=
6255 if test "$use_database" = no ; then
6256         TERMINFO="${datadir}/terminfo"
6257         MAKE_TERMINFO="#"
6258 else
6259
6260 echo "$as_me:6260: checking for list of terminfo directories" >&5
6261 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6262
6263 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6264 if test "${with_terminfo_dirs+set}" = set; then
6265   withval="$with_terminfo_dirs"
6266
6267 else
6268   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6269 fi;
6270 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6271 cf_dst_path=
6272 for cf_src_path in $withval
6273 do
6274
6275 if test "x$prefix" != xNONE; then
6276   cf_path_syntax="$prefix"
6277 else
6278   cf_path_syntax="$ac_default_prefix"
6279 fi
6280
6281 case ".$cf_src_path" in #(vi
6282 .\$\(*\)*|.\'*\'*) #(vi
6283   ;;
6284 ..|./*|.\\*) #(vi
6285   ;;
6286 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6287   ;;
6288 .\${*prefix}*) #(vi
6289   eval cf_src_path="$cf_src_path"
6290   case ".$cf_src_path" in #(vi
6291   .NONE/*)
6292     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6293     ;;
6294   esac
6295   ;; #(vi
6296 .no|.NONE/*)
6297   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6298   ;;
6299 *)
6300   { { echo "$as_me:6300: error: expected a pathname, not \"$cf_src_path\"" >&5
6301 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6302    { (exit 1); exit 1; }; }
6303   ;;
6304 esac
6305
6306   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6307   cf_dst_path="${cf_dst_path}${cf_src_path}"
6308 done
6309 IFS="$ac_save_ifs"
6310
6311 eval 'TERMINFO_DIRS="$cf_dst_path"'
6312
6313 echo "$as_me:6313: result: $TERMINFO_DIRS" >&5
6314 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6315 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6316 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6317 EOF
6318
6319 echo "$as_me:6319: checking for default terminfo directory" >&5
6320 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6321
6322 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6323 if test "${with_default_terminfo_dir+set}" = set; then
6324   withval="$with_default_terminfo_dir"
6325
6326 else
6327   withval="${TERMINFO:-${datadir}/terminfo}"
6328 fi; if test -n "${datadir}/terminfo" ; then
6329
6330 if test "x$prefix" != xNONE; then
6331   cf_path_syntax="$prefix"
6332 else
6333   cf_path_syntax="$ac_default_prefix"
6334 fi
6335
6336 case ".$withval" in #(vi
6337 .\$\(*\)*|.\'*\'*) #(vi
6338   ;;
6339 ..|./*|.\\*) #(vi
6340   ;;
6341 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6342   ;;
6343 .\${*prefix}*) #(vi
6344   eval withval="$withval"
6345   case ".$withval" in #(vi
6346   .NONE/*)
6347     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6348     ;;
6349   esac
6350   ;; #(vi
6351 .no|.NONE/*)
6352   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6353   ;;
6354 *)
6355   { { echo "$as_me:6355: error: expected a pathname, not \"$withval\"" >&5
6356 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6357    { (exit 1); exit 1; }; }
6358   ;;
6359 esac
6360
6361 fi
6362 TERMINFO="$withval"
6363
6364 echo "$as_me:6364: result: $TERMINFO" >&5
6365 echo "${ECHO_T}$TERMINFO" >&6
6366 cat >>confdefs.h <<EOF
6367 #define TERMINFO "$TERMINFO"
6368 EOF
6369
6370 fi
6371
6372 ###     use option --disable-big-core to make tic run on small machines
6373 ###     We need 4Mb, check if we can allocate 50% more than that.
6374 echo "$as_me:6374: checking if big-core option selected" >&5
6375 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6376
6377 # Check whether --enable-big-core or --disable-big-core was given.
6378 if test "${enable_big_core+set}" = set; then
6379   enableval="$enable_big_core"
6380   with_big_core=$enableval
6381 else
6382   if test "$cross_compiling" = yes; then
6383   with_big_core=no
6384 else
6385   cat >conftest.$ac_ext <<_ACEOF
6386 #line 6386 "configure"
6387 #include "confdefs.h"
6388
6389 #include <stdlib.h>
6390 #include <string.h>
6391 int main() {
6392         unsigned long n = 6000000L;
6393         char *s = malloc(n);
6394         if (s != 0)
6395                 s[0] = s[n-1] = 0;
6396         ${cf_cv_main_return:-return}(s == 0);
6397 }
6398 _ACEOF
6399 rm -f conftest$ac_exeext
6400 if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
6401   (eval $ac_link) 2>&5
6402   ac_status=$?
6403   echo "$as_me:6403: \$? = $ac_status" >&5
6404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6405   { (eval echo "$as_me:6405: \"$ac_try\"") >&5
6406   (eval $ac_try) 2>&5
6407   ac_status=$?
6408   echo "$as_me:6408: \$? = $ac_status" >&5
6409   (exit $ac_status); }; }; then
6410   with_big_core=yes
6411 else
6412   echo "$as_me: program exited with status $ac_status" >&5
6413 echo "$as_me: failed program was:" >&5
6414 cat conftest.$ac_ext >&5
6415 with_big_core=no
6416 fi
6417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6418 fi
6419 fi;
6420 echo "$as_me:6420: result: $with_big_core" >&5
6421 echo "${ECHO_T}$with_big_core" >&6
6422 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6423 #define HAVE_BIG_CORE 1
6424 EOF
6425
6426 ### ISO C only guarantees 512-char strings, we have tables which load faster
6427 ### when constructed using "big" strings.  More than the C compiler, the awk
6428 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6429 echo "$as_me:6429: checking if big-strings option selected" >&5
6430 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6431
6432 # Check whether --enable-big-strings or --disable-big-strings was given.
6433 if test "${enable_big_strings+set}" = set; then
6434   enableval="$enable_big_strings"
6435   with_big_strings=$enableval
6436 else
6437
6438         case x$AWK in #(vi
6439         x)
6440                 eval with_big_strings=no
6441                 ;;
6442         *) #(vi
6443                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6444                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6445                         eval with_big_strings=yes
6446                 else
6447                         eval with_big_strings=no
6448                 fi
6449                 ;;
6450         esac
6451
6452 fi;
6453 echo "$as_me:6453: result: $with_big_strings" >&5
6454 echo "${ECHO_T}$with_big_strings" >&6
6455
6456 USE_BIG_STRINGS=0
6457 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6458
6459 ###     use option --enable-termcap to compile in the termcap fallback support
6460 echo "$as_me:6460: checking if you want termcap-fallback support" >&5
6461 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6462
6463 # Check whether --enable-termcap or --disable-termcap was given.
6464 if test "${enable_termcap+set}" = set; then
6465   enableval="$enable_termcap"
6466   with_termcap=$enableval
6467 else
6468   with_termcap=no
6469 fi;
6470 echo "$as_me:6470: result: $with_termcap" >&5
6471 echo "${ECHO_T}$with_termcap" >&6
6472
6473 if test "$with_termcap" != "yes" ; then
6474         if test "$use_database" = no ; then
6475                 if test -z "$with_fallback" ; then
6476                         { { echo "$as_me:6476: error: You have disabled the database w/o specifying fallbacks" >&5
6477 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6478    { (exit 1); exit 1; }; }
6479                 fi
6480         fi
6481         cat >>confdefs.h <<\EOF
6482 #define PURE_TERMINFO 1
6483 EOF
6484
6485 else
6486
6487 if test "$with_ticlib" != no ; then
6488         { { echo "$as_me:6488: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6489 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6490    { (exit 1); exit 1; }; }
6491 fi
6492
6493 cat >>confdefs.h <<\EOF
6494 #define USE_TERMCAP 1
6495 EOF
6496
6497 echo "$as_me:6497: checking for list of termcap files" >&5
6498 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6499
6500 # Check whether --with-termpath or --without-termpath was given.
6501 if test "${with_termpath+set}" = set; then
6502   withval="$with_termpath"
6503
6504 else
6505   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6506 fi;
6507 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6508 cf_dst_path=
6509 for cf_src_path in $withval
6510 do
6511
6512 if test "x$prefix" != xNONE; then
6513   cf_path_syntax="$prefix"
6514 else
6515   cf_path_syntax="$ac_default_prefix"
6516 fi
6517
6518 case ".$cf_src_path" in #(vi
6519 .\$\(*\)*|.\'*\'*) #(vi
6520   ;;
6521 ..|./*|.\\*) #(vi
6522   ;;
6523 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6524   ;;
6525 .\${*prefix}*) #(vi
6526   eval cf_src_path="$cf_src_path"
6527   case ".$cf_src_path" in #(vi
6528   .NONE/*)
6529     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6530     ;;
6531   esac
6532   ;; #(vi
6533 .no|.NONE/*)
6534   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6535   ;;
6536 *)
6537   { { echo "$as_me:6537: error: expected a pathname, not \"$cf_src_path\"" >&5
6538 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6539    { (exit 1); exit 1; }; }
6540   ;;
6541 esac
6542
6543   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6544   cf_dst_path="${cf_dst_path}${cf_src_path}"
6545 done
6546 IFS="$ac_save_ifs"
6547
6548 eval 'TERMPATH="$cf_dst_path"'
6549
6550 echo "$as_me:6550: result: $TERMPATH" >&5
6551 echo "${ECHO_T}$TERMPATH" >&6
6552 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6553 #define TERMPATH "$TERMPATH"
6554 EOF
6555
6556 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6557 echo "$as_me:6557: checking if fast termcap-loader is needed" >&5
6558 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6559
6560 # Check whether --enable-getcap or --disable-getcap was given.
6561 if test "${enable_getcap+set}" = set; then
6562   enableval="$enable_getcap"
6563   with_getcap=$enableval
6564 else
6565   with_getcap=no
6566 fi;
6567 echo "$as_me:6567: result: $with_getcap" >&5
6568 echo "${ECHO_T}$with_getcap" >&6
6569 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6570 #define USE_GETCAP 1
6571 EOF
6572
6573 echo "$as_me:6573: checking if translated termcaps will be cached in ~/.terminfo" >&5
6574 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6575
6576 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6577 if test "${enable_getcap_cache+set}" = set; then
6578   enableval="$enable_getcap_cache"
6579   with_getcap_cache=$enableval
6580 else
6581   with_getcap_cache=no
6582 fi;
6583 echo "$as_me:6583: result: $with_getcap_cache" >&5
6584 echo "${ECHO_T}$with_getcap_cache" >&6
6585 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6586 #define USE_GETCAP_CACHE 1
6587 EOF
6588
6589 fi
6590
6591 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6592 echo "$as_me:6592: checking if ~/.terminfo is wanted" >&5
6593 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6594
6595 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6596 if test "${enable_home_terminfo+set}" = set; then
6597   enableval="$enable_home_terminfo"
6598   with_home_terminfo=$enableval
6599 else
6600   with_home_terminfo=yes
6601 fi;
6602 echo "$as_me:6602: result: $with_home_terminfo" >&5
6603 echo "${ECHO_T}$with_home_terminfo" >&6
6604 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6605 #define USE_HOME_TERMINFO 1
6606 EOF
6607
6608 echo "$as_me:6608: checking if you want to use restricted environment when running as root" >&5
6609 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6610
6611 # Check whether --enable-root-environ or --disable-root-environ was given.
6612 if test "${enable_root_environ+set}" = set; then
6613   enableval="$enable_root_environ"
6614   with_root_environ=$enableval
6615 else
6616   with_root_environ=yes
6617 fi;
6618 echo "$as_me:6618: result: $with_root_environ" >&5
6619 echo "${ECHO_T}$with_root_environ" >&6
6620 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6621 #define USE_ROOT_ENVIRON 1
6622 EOF
6623
6624 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6625 ###   to reduce storage requirements for the terminfo database.
6626
6627 for ac_func in \
6628         remove \
6629         unlink
6630 do
6631 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6632 echo "$as_me:6632: checking for $ac_func" >&5
6633 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6634 if eval "test \"\${$as_ac_var+set}\" = set"; then
6635   echo $ECHO_N "(cached) $ECHO_C" >&6
6636 else
6637   cat >conftest.$ac_ext <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6640 /* System header to define __stub macros and hopefully few prototypes,
6641     which can conflict with char $ac_func (); below.  */
6642 #include <assert.h>
6643 /* Override any gcc2 internal prototype to avoid an error.  */
6644 #ifdef __cplusplus
6645 extern "C"
6646 #endif
6647 /* We use char because int might match the return type of a gcc2
6648    builtin and then its argument prototype would still apply.  */
6649 char $ac_func ();
6650 char (*f) ();
6651
6652 int
6653 main ()
6654 {
6655 /* The GNU C library defines this for functions which it implements
6656     to always fail with ENOSYS.  Some functions are actually named
6657     something starting with __ and the normal name is an alias.  */
6658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6659 choke me
6660 #else
6661 f = $ac_func;
6662 #endif
6663
6664   ;
6665   return 0;
6666 }
6667 _ACEOF
6668 rm -f conftest.$ac_objext conftest$ac_exeext
6669 if { (eval echo "$as_me:6669: \"$ac_link\"") >&5
6670   (eval $ac_link) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); } &&
6674          { ac_try='test -s conftest$ac_exeext'
6675   { (eval echo "$as_me:6675: \"$ac_try\"") >&5
6676   (eval $ac_try) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); }; }; then
6680   eval "$as_ac_var=yes"
6681 else
6682   echo "$as_me: failed program was:" >&5
6683 cat conftest.$ac_ext >&5
6684 eval "$as_ac_var=no"
6685 fi
6686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6687 fi
6688 echo "$as_me:6688: result: `eval echo '${'$as_ac_var'}'`" >&5
6689 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6690 if test `eval echo '${'$as_ac_var'}'` = yes; then
6691   cat >>confdefs.h <<EOF
6692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6693 EOF
6694
6695 fi
6696 done
6697
6698 if test "$cross_compiling" = yes ; then
6699
6700 for ac_func in \
6701                 link \
6702                 symlink
6703 do
6704 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6705 echo "$as_me:6705: checking for $ac_func" >&5
6706 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6707 if eval "test \"\${$as_ac_var+set}\" = set"; then
6708   echo $ECHO_N "(cached) $ECHO_C" >&6
6709 else
6710   cat >conftest.$ac_ext <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713 /* System header to define __stub macros and hopefully few prototypes,
6714     which can conflict with char $ac_func (); below.  */
6715 #include <assert.h>
6716 /* Override any gcc2 internal prototype to avoid an error.  */
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 /* We use char because int might match the return type of a gcc2
6721    builtin and then its argument prototype would still apply.  */
6722 char $ac_func ();
6723 char (*f) ();
6724
6725 int
6726 main ()
6727 {
6728 /* The GNU C library defines this for functions which it implements
6729     to always fail with ENOSYS.  Some functions are actually named
6730     something starting with __ and the normal name is an alias.  */
6731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6732 choke me
6733 #else
6734 f = $ac_func;
6735 #endif
6736
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -f conftest.$ac_objext conftest$ac_exeext
6742 if { (eval echo "$as_me:6742: \"$ac_link\"") >&5
6743   (eval $ac_link) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); } &&
6747          { ac_try='test -s conftest$ac_exeext'
6748   { (eval echo "$as_me:6748: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   eval "$as_ac_var=yes"
6754 else
6755   echo "$as_me: failed program was:" >&5
6756 cat conftest.$ac_ext >&5
6757 eval "$as_ac_var=no"
6758 fi
6759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6760 fi
6761 echo "$as_me:6761: result: `eval echo '${'$as_ac_var'}'`" >&5
6762 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6763 if test `eval echo '${'$as_ac_var'}'` = yes; then
6764   cat >>confdefs.h <<EOF
6765 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6766 EOF
6767
6768 fi
6769 done
6770
6771 else
6772         echo "$as_me:6772: checking if link/symlink functions work" >&5
6773 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6774 if test "${cf_cv_link_funcs+set}" = set; then
6775   echo $ECHO_N "(cached) $ECHO_C" >&6
6776 else
6777
6778                 cf_cv_link_funcs=
6779                 for cf_func in link symlink ; do
6780                         if test "$cross_compiling" = yes; then
6781
6782                         eval 'ac_cv_func_'$cf_func'=error'
6783 else
6784   cat >conftest.$ac_ext <<_ACEOF
6785 #line 6785 "configure"
6786 #include "confdefs.h"
6787
6788 #include <sys/types.h>
6789 #include <sys/stat.h>
6790 #ifdef HAVE_UNISTD_H
6791 #include <unistd.h>
6792 #endif
6793 int main()
6794 {
6795         int fail = 0;
6796         char *src = "config.log";
6797         char *dst = "conftest.chk";
6798         struct stat src_sb;
6799         struct stat dst_sb;
6800
6801         stat(src, &src_sb);
6802         fail = ($cf_func("config.log", "conftest.chk") < 0)
6803             || (stat(dst, &dst_sb) < 0)
6804             || (dst_sb.st_mtime != src_sb.st_mtime);
6805 #ifdef HAVE_UNLINK
6806         unlink(dst);
6807 #else
6808         remove(dst);
6809 #endif
6810         ${cf_cv_main_return:-return} (fail);
6811 }
6812
6813 _ACEOF
6814 rm -f conftest$ac_exeext
6815 if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
6816   (eval $ac_link) 2>&5
6817   ac_status=$?
6818   echo "$as_me:6818: \$? = $ac_status" >&5
6819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6820   { (eval echo "$as_me:6820: \"$ac_try\"") >&5
6821   (eval $ac_try) 2>&5
6822   ac_status=$?
6823   echo "$as_me:6823: \$? = $ac_status" >&5
6824   (exit $ac_status); }; }; then
6825
6826                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6827                         eval 'ac_cv_func_'$cf_func'=yes'
6828 else
6829   echo "$as_me: program exited with status $ac_status" >&5
6830 echo "$as_me: failed program was:" >&5
6831 cat conftest.$ac_ext >&5
6832
6833                         eval 'ac_cv_func_'$cf_func'=no'
6834 fi
6835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6836 fi
6837                 done
6838                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6839
6840 fi
6841 echo "$as_me:6841: result: $cf_cv_link_funcs" >&5
6842 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6843         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6844 #define HAVE_LINK 1
6845 EOF
6846
6847         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6848 #define HAVE_SYMLINK 1
6849 EOF
6850
6851 fi
6852
6853 with_links=no
6854 with_symlinks=no
6855
6856 # soft links (symbolic links) are useful for some systems where hard links do
6857 # not work, or to make it simpler to copy terminfo trees around.
6858 if test "$ac_cv_func_symlink" = yes ; then
6859     echo "$as_me:6859: checking if tic should use symbolic links" >&5
6860 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6861
6862 # Check whether --enable-symlinks or --disable-symlinks was given.
6863 if test "${enable_symlinks+set}" = set; then
6864   enableval="$enable_symlinks"
6865   with_symlinks=$enableval
6866 else
6867   with_symlinks=no
6868 fi;
6869     echo "$as_me:6869: result: $with_symlinks" >&5
6870 echo "${ECHO_T}$with_symlinks" >&6
6871 fi
6872
6873 # If we have hard links and did not choose to use soft links instead, there is
6874 # no reason to make this choice optional - use the hard links.
6875 if test "$with_symlinks" = no ; then
6876     echo "$as_me:6876: checking if tic should use hard links" >&5
6877 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6878     if test "$ac_cv_func_link" = yes ; then
6879         with_links=yes
6880     else
6881         with_links=no
6882     fi
6883     echo "$as_me:6883: result: $with_links" >&5
6884 echo "${ECHO_T}$with_links" >&6
6885 fi
6886
6887 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6888 #define USE_LINKS 1
6889 EOF
6890
6891 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6892 #define USE_SYMLINKS 1
6893 EOF
6894
6895 ###   use option --enable-broken-linker to force on use of broken-linker support
6896 echo "$as_me:6896: checking if you want broken-linker support code" >&5
6897 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6898
6899 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6900 if test "${enable_broken_linker+set}" = set; then
6901   enableval="$enable_broken_linker"
6902   with_broken_linker=$enableval
6903 else
6904   with_broken_linker=${BROKEN_LINKER:-no}
6905 fi;
6906 echo "$as_me:6906: result: $with_broken_linker" >&5
6907 echo "${ECHO_T}$with_broken_linker" >&6
6908
6909 BROKEN_LINKER=0
6910 if test "$with_broken_linker" = yes ; then
6911         cat >>confdefs.h <<\EOF
6912 #define BROKEN_LINKER 1
6913 EOF
6914
6915         BROKEN_LINKER=1
6916 elif test "$DFT_LWR_MODEL" = shared ; then
6917         case $cf_cv_system_name in #(vi
6918         cygwin*)
6919                 cat >>confdefs.h <<\EOF
6920 #define BROKEN_LINKER 1
6921 EOF
6922
6923                 BROKEN_LINKER=1
6924                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6925
6926 echo "${as_me:-configure}:6926: testing cygwin linker is broken anyway ..." 1>&5
6927
6928                 ;;
6929         esac
6930 fi
6931
6932 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6933 echo "$as_me:6933: checking if tputs should process BSD-style prefix padding" >&5
6934 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6935
6936 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6937 if test "${enable_bsdpad+set}" = set; then
6938   enableval="$enable_bsdpad"
6939   with_bsdpad=$enableval
6940 else
6941   with_bsdpad=no
6942 fi;
6943 echo "$as_me:6943: result: $with_bsdpad" >&5
6944 echo "${ECHO_T}$with_bsdpad" >&6
6945 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6946 #define BSD_TPUTS 1
6947 EOF
6948
6949 ###   use option --enable-widec to turn on use of wide-character support
6950 NCURSES_CH_T=chtype
6951 NCURSES_LIBUTF8=0
6952
6953 NEED_WCHAR_H=0
6954 NCURSES_MBSTATE_T=0
6955 NCURSES_WCHAR_T=0
6956 NCURSES_WINT_T=0
6957
6958 # Check to define _XOPEN_SOURCE "automatically"
6959
6960 cf_XOPEN_SOURCE=500
6961 cf_POSIX_C_SOURCE=199506L
6962 cf_xopen_source=
6963
6964 case $host_os in #(vi
6965 aix[456]*) #(vi
6966         cf_xopen_source="-D_ALL_SOURCE"
6967         ;;
6968 cygwin) #(vi
6969         cf_XOPEN_SOURCE=600
6970         ;;
6971 darwin[0-8].*) #(vi
6972         cf_xopen_source="-D_APPLE_C_SOURCE"
6973         ;;
6974 darwin*) #(vi
6975         cf_xopen_source="-D_DARWIN_C_SOURCE"
6976         ;;
6977 freebsd*|dragonfly*) #(vi
6978         # 5.x headers associate
6979         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6980         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6981         cf_POSIX_C_SOURCE=200112L
6982         cf_XOPEN_SOURCE=600
6983         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6984         ;;
6985 hpux11*) #(vi
6986         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6987         ;;
6988 hpux*) #(vi
6989         cf_xopen_source="-D_HPUX_SOURCE"
6990         ;;
6991 irix[56].*) #(vi
6992         cf_xopen_source="-D_SGI_SOURCE"
6993         ;;
6994 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6995
6996 echo "$as_me:6996: checking if we must define _GNU_SOURCE" >&5
6997 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6998 if test "${cf_cv_gnu_source+set}" = set; then
6999   echo $ECHO_N "(cached) $ECHO_C" >&6
7000 else
7001
7002 cat >conftest.$ac_ext <<_ACEOF
7003 #line 7003 "configure"
7004 #include "confdefs.h"
7005 #include <sys/types.h>
7006 int
7007 main ()
7008 {
7009
7010 #ifndef _XOPEN_SOURCE
7011 make an error
7012 #endif
7013   ;
7014   return 0;
7015 }
7016 _ACEOF
7017 rm -f conftest.$ac_objext
7018 if { (eval echo "$as_me:7018: \"$ac_compile\"") >&5
7019   (eval $ac_compile) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit $ac_status); } &&
7023          { ac_try='test -s conftest.$ac_objext'
7024   { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7025   (eval $ac_try) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); }; }; then
7029   cf_cv_gnu_source=no
7030 else
7031   echo "$as_me: failed program was:" >&5
7032 cat conftest.$ac_ext >&5
7033 cf_save="$CPPFLAGS"
7034          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7035          cat >conftest.$ac_ext <<_ACEOF
7036 #line 7036 "configure"
7037 #include "confdefs.h"
7038 #include <sys/types.h>
7039 int
7040 main ()
7041 {
7042
7043 #ifdef _XOPEN_SOURCE
7044 make an error
7045 #endif
7046   ;
7047   return 0;
7048 }
7049 _ACEOF
7050 rm -f conftest.$ac_objext
7051 if { (eval echo "$as_me:7051: \"$ac_compile\"") >&5
7052   (eval $ac_compile) 2>&5
7053   ac_status=$?
7054   echo "$as_me:7054: \$? = $ac_status" >&5
7055   (exit $ac_status); } &&
7056          { ac_try='test -s conftest.$ac_objext'
7057   { (eval echo "$as_me:7057: \"$ac_try\"") >&5
7058   (eval $ac_try) 2>&5
7059   ac_status=$?
7060   echo "$as_me:7060: \$? = $ac_status" >&5
7061   (exit $ac_status); }; }; then
7062   cf_cv_gnu_source=no
7063 else
7064   echo "$as_me: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066 cf_cv_gnu_source=yes
7067 fi
7068 rm -f conftest.$ac_objext conftest.$ac_ext
7069         CPPFLAGS="$cf_save"
7070
7071 fi
7072 rm -f conftest.$ac_objext conftest.$ac_ext
7073
7074 fi
7075 echo "$as_me:7075: result: $cf_cv_gnu_source" >&5
7076 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7077 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7078
7079         ;;
7080 mirbsd*) #(vi
7081         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7082         ;;
7083 netbsd*) #(vi
7084         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7085         ;;
7086 openbsd*) #(vi
7087         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7088         ;;
7089 osf[45]*) #(vi
7090         cf_xopen_source="-D_OSF_SOURCE"
7091         ;;
7092 nto-qnx*) #(vi
7093         cf_xopen_source="-D_QNX_SOURCE"
7094         ;;
7095 sco*) #(vi
7096         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7097         ;;
7098 solaris2.1[0-9]) #(vi
7099         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7100         ;;
7101 solaris2.[1-9]) #(vi
7102         cf_xopen_source="-D__EXTENSIONS__"
7103         ;;
7104 *)
7105         echo "$as_me:7105: checking if we should define _XOPEN_SOURCE" >&5
7106 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7107 if test "${cf_cv_xopen_source+set}" = set; then
7108   echo $ECHO_N "(cached) $ECHO_C" >&6
7109 else
7110
7111         cat >conftest.$ac_ext <<_ACEOF
7112 #line 7112 "configure"
7113 #include "confdefs.h"
7114 #include <sys/types.h>
7115 int
7116 main ()
7117 {
7118
7119 #ifndef _XOPEN_SOURCE
7120 make an error
7121 #endif
7122   ;
7123   return 0;
7124 }
7125 _ACEOF
7126 rm -f conftest.$ac_objext
7127 if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
7128   (eval $ac_compile) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); } &&
7132          { ac_try='test -s conftest.$ac_objext'
7133   { (eval echo "$as_me:7133: \"$ac_try\"") >&5
7134   (eval $ac_try) 2>&5
7135   ac_status=$?
7136   echo "$as_me:7136: \$? = $ac_status" >&5
7137   (exit $ac_status); }; }; then
7138   cf_cv_xopen_source=no
7139 else
7140   echo "$as_me: failed program was:" >&5
7141 cat conftest.$ac_ext >&5
7142 cf_save="$CPPFLAGS"
7143          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7144          cat >conftest.$ac_ext <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7147 #include <sys/types.h>
7148 int
7149 main ()
7150 {
7151
7152 #ifdef _XOPEN_SOURCE
7153 make an error
7154 #endif
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -f conftest.$ac_objext
7160 if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
7161   (eval $ac_compile) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -s conftest.$ac_objext'
7166   { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7167   (eval $ac_try) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); }; }; then
7171   cf_cv_xopen_source=no
7172 else
7173   echo "$as_me: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7175 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7176 fi
7177 rm -f conftest.$ac_objext conftest.$ac_ext
7178         CPPFLAGS="$cf_save"
7179
7180 fi
7181 rm -f conftest.$ac_objext conftest.$ac_ext
7182
7183 fi
7184 echo "$as_me:7184: result: $cf_cv_xopen_source" >&5
7185 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7186         if test "$cf_cv_xopen_source" != no ; then
7187
7188 CFLAGS=`echo "$CFLAGS" | \
7189         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7190                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7191
7192 CPPFLAGS=`echo "$CPPFLAGS" | \
7193         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7194                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7195
7196                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7197
7198 cf_fix_cppflags=no
7199 cf_new_cflags=
7200 cf_new_cppflags=
7201 cf_new_extra_cppflags=
7202
7203 for cf_add_cflags in $cf_temp_xopen_source
7204 do
7205 case $cf_fix_cppflags in
7206 no)
7207         case $cf_add_cflags in #(vi
7208         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7209                 case $cf_add_cflags in
7210                 -D*)
7211                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7212
7213                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7214                                 && test -z "${cf_tst_cflags}" \
7215                                 && cf_fix_cppflags=yes
7216
7217                         if test $cf_fix_cppflags = yes ; then
7218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7219                                 continue
7220                         elif test "${cf_tst_cflags}" = "\"'" ; then
7221                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7222                                 continue
7223                         fi
7224                         ;;
7225                 esac
7226                 case "$CPPFLAGS" in
7227                 *$cf_add_cflags) #(vi
7228                         ;;
7229                 *) #(vi
7230                         case $cf_add_cflags in #(vi
7231                         -D*)
7232                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7233
7234 CPPFLAGS=`echo "$CPPFLAGS" | \
7235         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7236                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7237
7238                                 ;;
7239                         esac
7240                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7241                         ;;
7242                 esac
7243                 ;;
7244         *)
7245                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7246                 ;;
7247         esac
7248         ;;
7249 yes)
7250         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7251
7252         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7253
7254         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7255                 && test -z "${cf_tst_cflags}" \
7256                 && cf_fix_cppflags=no
7257         ;;
7258 esac
7259 done
7260
7261 if test -n "$cf_new_cflags" ; then
7262
7263         CFLAGS="$CFLAGS $cf_new_cflags"
7264 fi
7265
7266 if test -n "$cf_new_cppflags" ; then
7267
7268         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7269 fi
7270
7271 if test -n "$cf_new_extra_cppflags" ; then
7272
7273         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7274 fi
7275
7276         fi
7277
7278 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7279
7280 cf_save_CFLAGS="$CFLAGS"
7281 cf_save_CPPFLAGS="$CPPFLAGS"
7282
7283 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7284         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7285                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7286
7287 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7288         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7289                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7290
7291 echo "$as_me:7291: checking if we should define _POSIX_C_SOURCE" >&5
7292 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7293 if test "${cf_cv_posix_c_source+set}" = set; then
7294   echo $ECHO_N "(cached) $ECHO_C" >&6
7295 else
7296
7297 echo "${as_me:-configure}:7297: testing if the symbol is already defined go no further ..." 1>&5
7298
7299         cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302 #include <sys/types.h>
7303 int
7304 main ()
7305 {
7306
7307 #ifndef _POSIX_C_SOURCE
7308 make an error
7309 #endif
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext
7315 if { (eval echo "$as_me:7315: \"$ac_compile\"") >&5
7316   (eval $ac_compile) 2>&5
7317   ac_status=$?
7318   echo "$as_me:7318: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest.$ac_objext'
7321   { (eval echo "$as_me:7321: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   cf_cv_posix_c_source=no
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330 cf_want_posix_source=no
7331          case .$cf_POSIX_C_SOURCE in #(vi
7332          .[12]??*) #(vi
7333                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7334                 ;;
7335          .2) #(vi
7336                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7337                 cf_want_posix_source=yes
7338                 ;;
7339          .*)
7340                 cf_want_posix_source=yes
7341                 ;;
7342          esac
7343          if test "$cf_want_posix_source" = yes ; then
7344                 cat >conftest.$ac_ext <<_ACEOF
7345 #line 7345 "configure"
7346 #include "confdefs.h"
7347 #include <sys/types.h>
7348 int
7349 main ()
7350 {
7351
7352 #ifdef _POSIX_SOURCE
7353 make an error
7354 #endif
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 rm -f conftest.$ac_objext
7360 if { (eval echo "$as_me:7360: \"$ac_compile\"") >&5
7361   (eval $ac_compile) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit $ac_status); } &&
7365          { ac_try='test -s conftest.$ac_objext'
7366   { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit $ac_status); }; }; then
7371   :
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 cat conftest.$ac_ext >&5
7375 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7376 fi
7377 rm -f conftest.$ac_objext conftest.$ac_ext
7378          fi
7379
7380 echo "${as_me:-configure}:7380: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7381
7382          CFLAGS="$cf_trim_CFLAGS"
7383          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7384
7385 echo "${as_me:-configure}:7385: testing if the second compile does not leave our definition intact error ..." 1>&5
7386
7387          cat >conftest.$ac_ext <<_ACEOF
7388 #line 7388 "configure"
7389 #include "confdefs.h"
7390 #include <sys/types.h>
7391 int
7392 main ()
7393 {
7394
7395 #ifndef _POSIX_C_SOURCE
7396 make an error
7397 #endif
7398   ;
7399   return 0;
7400 }
7401 _ACEOF
7402 rm -f conftest.$ac_objext
7403 if { (eval echo "$as_me:7403: \"$ac_compile\"") >&5
7404   (eval $ac_compile) 2>&5
7405   ac_status=$?
7406   echo "$as_me:7406: \$? = $ac_status" >&5
7407   (exit $ac_status); } &&
7408          { ac_try='test -s conftest.$ac_objext'
7409   { (eval echo "$as_me:7409: \"$ac_try\"") >&5
7410   (eval $ac_try) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit $ac_status); }; }; then
7414   :
7415 else
7416   echo "$as_me: failed program was:" >&5
7417 cat conftest.$ac_ext >&5
7418 cf_cv_posix_c_source=no
7419 fi
7420 rm -f conftest.$ac_objext conftest.$ac_ext
7421          CFLAGS="$cf_save_CFLAGS"
7422          CPPFLAGS="$cf_save_CPPFLAGS"
7423
7424 fi
7425 rm -f conftest.$ac_objext conftest.$ac_ext
7426
7427 fi
7428 echo "$as_me:7428: result: $cf_cv_posix_c_source" >&5
7429 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7430
7431 if test "$cf_cv_posix_c_source" != no ; then
7432         CFLAGS="$cf_trim_CFLAGS"
7433         CPPFLAGS="$cf_trim_CPPFLAGS"
7434
7435 cf_fix_cppflags=no
7436 cf_new_cflags=
7437 cf_new_cppflags=
7438 cf_new_extra_cppflags=
7439
7440 for cf_add_cflags in $cf_cv_posix_c_source
7441 do
7442 case $cf_fix_cppflags in
7443 no)
7444         case $cf_add_cflags in #(vi
7445         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7446                 case $cf_add_cflags in
7447                 -D*)
7448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7449
7450                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7451                                 && test -z "${cf_tst_cflags}" \
7452                                 && cf_fix_cppflags=yes
7453
7454                         if test $cf_fix_cppflags = yes ; then
7455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7456                                 continue
7457                         elif test "${cf_tst_cflags}" = "\"'" ; then
7458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7459                                 continue
7460                         fi
7461                         ;;
7462                 esac
7463                 case "$CPPFLAGS" in
7464                 *$cf_add_cflags) #(vi
7465                         ;;
7466                 *) #(vi
7467                         case $cf_add_cflags in #(vi
7468                         -D*)
7469                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7470
7471 CPPFLAGS=`echo "$CPPFLAGS" | \
7472         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7473                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7474
7475                                 ;;
7476                         esac
7477                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7478                         ;;
7479                 esac
7480                 ;;
7481         *)
7482                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7483                 ;;
7484         esac
7485         ;;
7486 yes)
7487         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7488
7489         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7490
7491         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7492                 && test -z "${cf_tst_cflags}" \
7493                 && cf_fix_cppflags=no
7494         ;;
7495 esac
7496 done
7497
7498 if test -n "$cf_new_cflags" ; then
7499
7500         CFLAGS="$CFLAGS $cf_new_cflags"
7501 fi
7502
7503 if test -n "$cf_new_cppflags" ; then
7504
7505         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7506 fi
7507
7508 if test -n "$cf_new_extra_cppflags" ; then
7509
7510         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7511 fi
7512
7513 fi
7514
7515         ;;
7516 esac
7517
7518 if test -n "$cf_xopen_source" ; then
7519
7520 cf_fix_cppflags=no
7521 cf_new_cflags=
7522 cf_new_cppflags=
7523 cf_new_extra_cppflags=
7524
7525 for cf_add_cflags in $cf_xopen_source
7526 do
7527 case $cf_fix_cppflags in
7528 no)
7529         case $cf_add_cflags in #(vi
7530         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7531                 case $cf_add_cflags in
7532                 -D*)
7533                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7534
7535                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7536                                 && test -z "${cf_tst_cflags}" \
7537                                 && cf_fix_cppflags=yes
7538
7539                         if test $cf_fix_cppflags = yes ; then
7540                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7541                                 continue
7542                         elif test "${cf_tst_cflags}" = "\"'" ; then
7543                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7544                                 continue
7545                         fi
7546                         ;;
7547                 esac
7548                 case "$CPPFLAGS" in
7549                 *$cf_add_cflags) #(vi
7550                         ;;
7551                 *) #(vi
7552                         case $cf_add_cflags in #(vi
7553                         -D*)
7554                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7555
7556 CPPFLAGS=`echo "$CPPFLAGS" | \
7557         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7558                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7559
7560                                 ;;
7561                         esac
7562                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7563                         ;;
7564                 esac
7565                 ;;
7566         *)
7567                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7568                 ;;
7569         esac
7570         ;;
7571 yes)
7572         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7573
7574         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7575
7576         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7577                 && test -z "${cf_tst_cflags}" \
7578                 && cf_fix_cppflags=no
7579         ;;
7580 esac
7581 done
7582
7583 if test -n "$cf_new_cflags" ; then
7584
7585         CFLAGS="$CFLAGS $cf_new_cflags"
7586 fi
7587
7588 if test -n "$cf_new_cppflags" ; then
7589
7590         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7591 fi
7592
7593 if test -n "$cf_new_extra_cppflags" ; then
7594
7595         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7596 fi
7597
7598 fi
7599
7600 # Work around breakage on OS X
7601
7602 echo "$as_me:7602: checking if SIGWINCH is defined" >&5
7603 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7604 if test "${cf_cv_define_sigwinch+set}" = set; then
7605   echo $ECHO_N "(cached) $ECHO_C" >&6
7606 else
7607
7608         cat >conftest.$ac_ext <<_ACEOF
7609 #line 7609 "configure"
7610 #include "confdefs.h"
7611
7612 #include <sys/types.h>
7613 #include <sys/signal.h>
7614
7615 int
7616 main ()
7617 {
7618 int x = SIGWINCH
7619   ;
7620   return 0;
7621 }
7622 _ACEOF
7623 rm -f conftest.$ac_objext
7624 if { (eval echo "$as_me:7624: \"$ac_compile\"") >&5
7625   (eval $ac_compile) 2>&5
7626   ac_status=$?
7627   echo "$as_me:7627: \$? = $ac_status" >&5
7628   (exit $ac_status); } &&
7629          { ac_try='test -s conftest.$ac_objext'
7630   { (eval echo "$as_me:7630: \"$ac_try\"") >&5
7631   (eval $ac_try) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); }; }; then
7635   cf_cv_define_sigwinch=yes
7636 else
7637   echo "$as_me: failed program was:" >&5
7638 cat conftest.$ac_ext >&5
7639 cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642
7643 #undef _XOPEN_SOURCE
7644 #undef _POSIX_SOURCE
7645 #undef _POSIX_C_SOURCE
7646 #include <sys/types.h>
7647 #include <sys/signal.h>
7648
7649 int
7650 main ()
7651 {
7652 int x = SIGWINCH
7653   ;
7654   return 0;
7655 }
7656 _ACEOF
7657 rm -f conftest.$ac_objext
7658 if { (eval echo "$as_me:7658: \"$ac_compile\"") >&5
7659   (eval $ac_compile) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } &&
7663          { ac_try='test -s conftest.$ac_objext'
7664   { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7665   (eval $ac_try) 2>&5
7666   ac_status=$?
7667   echo "$as_me:7667: \$? = $ac_status" >&5
7668   (exit $ac_status); }; }; then
7669   cf_cv_define_sigwinch=maybe
7670 else
7671   echo "$as_me: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 cf_cv_define_sigwinch=no
7674 fi
7675 rm -f conftest.$ac_objext conftest.$ac_ext
7676
7677 fi
7678 rm -f conftest.$ac_objext conftest.$ac_ext
7679
7680 fi
7681 echo "$as_me:7681: result: $cf_cv_define_sigwinch" >&5
7682 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7683
7684 if test "$cf_cv_define_sigwinch" = maybe ; then
7685 echo "$as_me:7685: checking for actual SIGWINCH definition" >&5
7686 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7687 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7688   echo $ECHO_N "(cached) $ECHO_C" >&6
7689 else
7690
7691 cf_cv_fixup_sigwinch=unknown
7692 cf_sigwinch=32
7693 while test $cf_sigwinch != 1
7694 do
7695         cat >conftest.$ac_ext <<_ACEOF
7696 #line 7696 "configure"
7697 #include "confdefs.h"
7698
7699 #undef _XOPEN_SOURCE
7700 #undef _POSIX_SOURCE
7701 #undef _POSIX_C_SOURCE
7702 #include <sys/types.h>
7703 #include <sys/signal.h>
7704
7705 int
7706 main ()
7707 {
7708
7709 #if SIGWINCH != $cf_sigwinch
7710 make an error
7711 #endif
7712 int x = SIGWINCH
7713   ;
7714   return 0;
7715 }
7716 _ACEOF
7717 rm -f conftest.$ac_objext
7718 if { (eval echo "$as_me:7718: \"$ac_compile\"") >&5
7719   (eval $ac_compile) 2>&5
7720   ac_status=$?
7721   echo "$as_me:7721: \$? = $ac_status" >&5
7722   (exit $ac_status); } &&
7723          { ac_try='test -s conftest.$ac_objext'
7724   { (eval echo "$as_me:7724: \"$ac_try\"") >&5
7725   (eval $ac_try) 2>&5
7726   ac_status=$?
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); }; }; then
7729   cf_cv_fixup_sigwinch=$cf_sigwinch
7730          break
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 fi
7735 rm -f conftest.$ac_objext conftest.$ac_ext
7736
7737 cf_sigwinch=`expr $cf_sigwinch - 1`
7738 done
7739
7740 fi
7741 echo "$as_me:7741: result: $cf_cv_fixup_sigwinch" >&5
7742 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7743
7744         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7745                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7746         fi
7747 fi
7748
7749 # Checks for CODESET support.
7750
7751   echo "$as_me:7751: checking for nl_langinfo and CODESET" >&5
7752 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7753 if test "${am_cv_langinfo_codeset+set}" = set; then
7754   echo $ECHO_N "(cached) $ECHO_C" >&6
7755 else
7756   cat >conftest.$ac_ext <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <langinfo.h>
7760 int
7761 main ()
7762 {
7763 char* cs = nl_langinfo(CODESET);
7764   ;
7765   return 0;
7766 }
7767 _ACEOF
7768 rm -f conftest.$ac_objext conftest$ac_exeext
7769 if { (eval echo "$as_me:7769: \"$ac_link\"") >&5
7770   (eval $ac_link) 2>&5
7771   ac_status=$?
7772   echo "$as_me:7772: \$? = $ac_status" >&5
7773   (exit $ac_status); } &&
7774          { ac_try='test -s conftest$ac_exeext'
7775   { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7776   (eval $ac_try) 2>&5
7777   ac_status=$?
7778   echo "$as_me:7778: \$? = $ac_status" >&5
7779   (exit $ac_status); }; }; then
7780   am_cv_langinfo_codeset=yes
7781 else
7782   echo "$as_me: failed program was:" >&5
7783 cat conftest.$ac_ext >&5
7784 am_cv_langinfo_codeset=no
7785 fi
7786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7787
7788 fi
7789 echo "$as_me:7789: result: $am_cv_langinfo_codeset" >&5
7790 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7791   if test $am_cv_langinfo_codeset = yes; then
7792
7793 cat >>confdefs.h <<\EOF
7794 #define HAVE_LANGINFO_CODESET 1
7795 EOF
7796
7797   fi
7798
7799 # use these variables to work around a defect in gcc's fixincludes.
7800 NCURSES_OK_WCHAR_T=
7801 NCURSES_OK_WINT_T=
7802
7803 echo "$as_me:7803: checking if you want wide-character code" >&5
7804 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7805
7806 # Check whether --enable-widec or --disable-widec was given.
7807 if test "${enable_widec+set}" = set; then
7808   enableval="$enable_widec"
7809   with_widec=$enableval
7810 else
7811   with_widec=no
7812 fi;
7813 echo "$as_me:7813: result: $with_widec" >&5
7814 echo "${ECHO_T}$with_widec" >&6
7815 if test "$with_widec" = yes ; then
7816         LIB_SUFFIX="w${LIB_SUFFIX}"
7817         cat >>confdefs.h <<\EOF
7818 #define USE_WIDEC_SUPPORT 1
7819 EOF
7820
7821         case "$CFLAGS $CPPFLAGS" in #(vi
7822         *-D_XOPEN_SOURCE=500) #(vi
7823                 ;;
7824         *)
7825
7826 echo "$as_me:7826: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7827 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7828 cat >conftest.$ac_ext <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831 #include <sys/types.h>
7832
7833 int
7834 main ()
7835 {
7836
7837 #ifndef _XOPEN_SOURCE_EXTENDED
7838 make an error
7839 #endif
7840   ;
7841   return 0;
7842 }
7843 _ACEOF
7844 rm -f conftest.$ac_objext
7845 if { (eval echo "$as_me:7845: \"$ac_compile\"") >&5
7846   (eval $ac_compile) 2>&5
7847   ac_status=$?
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit $ac_status); } &&
7850          { ac_try='test -s conftest.$ac_objext'
7851   { (eval echo "$as_me:7851: \"$ac_try\"") >&5
7852   (eval $ac_try) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit $ac_status); }; }; then
7856   cf_result=no
7857 else
7858   echo "$as_me: failed program was:" >&5
7859 cat conftest.$ac_ext >&5
7860 cf_result=yes
7861 fi
7862 rm -f conftest.$ac_objext conftest.$ac_ext
7863 echo "$as_me:7863: result: $cf_result" >&5
7864 echo "${ECHO_T}$cf_result" >&6
7865
7866 if test "$cf_result" = yes ; then
7867         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7868 elif test "x" != "x" ; then
7869         echo "$as_me:7869: checking checking for compatible value versus " >&5
7870 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7871         cat >conftest.$ac_ext <<_ACEOF
7872 #line 7872 "configure"
7873 #include "confdefs.h"
7874 #include <sys/types.h>
7875
7876 int
7877 main ()
7878 {
7879
7880 #if _XOPEN_SOURCE_EXTENDED- < 0
7881 make an error
7882 #endif
7883   ;
7884   return 0;
7885 }
7886 _ACEOF
7887 rm -f conftest.$ac_objext
7888 if { (eval echo "$as_me:7888: \"$ac_compile\"") >&5
7889   (eval $ac_compile) 2>&5
7890   ac_status=$?
7891   echo "$as_me:7891: \$? = $ac_status" >&5
7892   (exit $ac_status); } &&
7893          { ac_try='test -s conftest.$ac_objext'
7894   { (eval echo "$as_me:7894: \"$ac_try\"") >&5
7895   (eval $ac_try) 2>&5
7896   ac_status=$?
7897   echo "$as_me:7897: \$? = $ac_status" >&5
7898   (exit $ac_status); }; }; then
7899   cf_result=yes
7900 else
7901   echo "$as_me: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903 cf_result=no
7904 fi
7905 rm -f conftest.$ac_objext conftest.$ac_ext
7906         echo "$as_me:7906: result: $cf_result" >&5
7907 echo "${ECHO_T}$cf_result" >&6
7908         if test "$cf_result" = no ; then
7909                 # perhaps we can override it - try...
7910                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7911         fi
7912 fi
7913
7914                 ;;
7915         esac
7916
7917         # with_overwrite=no
7918         NCURSES_CH_T=cchar_t
7919
7920 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7921 do
7922 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7923 echo "$as_me:7923: checking for $ac_func" >&5
7924 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7925 if eval "test \"\${$as_ac_var+set}\" = set"; then
7926   echo $ECHO_N "(cached) $ECHO_C" >&6
7927 else
7928   cat >conftest.$ac_ext <<_ACEOF
7929 #line 7929 "configure"
7930 #include "confdefs.h"
7931 /* System header to define __stub macros and hopefully few prototypes,
7932     which can conflict with char $ac_func (); below.  */
7933 #include <assert.h>
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 #ifdef __cplusplus
7936 extern "C"
7937 #endif
7938 /* We use char because int might match the return type of a gcc2
7939    builtin and then its argument prototype would still apply.  */
7940 char $ac_func ();
7941 char (*f) ();
7942
7943 int
7944 main ()
7945 {
7946 /* The GNU C library defines this for functions which it implements
7947     to always fail with ENOSYS.  Some functions are actually named
7948     something starting with __ and the normal name is an alias.  */
7949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7950 choke me
7951 #else
7952 f = $ac_func;
7953 #endif
7954
7955   ;
7956   return 0;
7957 }
7958 _ACEOF
7959 rm -f conftest.$ac_objext conftest$ac_exeext
7960 if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
7961   (eval $ac_link) 2>&5
7962   ac_status=$?
7963   echo "$as_me:7963: \$? = $ac_status" >&5
7964   (exit $ac_status); } &&
7965          { ac_try='test -s conftest$ac_exeext'
7966   { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7967   (eval $ac_try) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit $ac_status); }; }; then
7971   eval "$as_ac_var=yes"
7972 else
7973   echo "$as_me: failed program was:" >&5
7974 cat conftest.$ac_ext >&5
7975 eval "$as_ac_var=no"
7976 fi
7977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7978 fi
7979 echo "$as_me:7979: result: `eval echo '${'$as_ac_var'}'`" >&5
7980 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7981 if test `eval echo '${'$as_ac_var'}'` = yes; then
7982   cat >>confdefs.h <<EOF
7983 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7984 EOF
7985
7986 fi
7987 done
7988
7989         if test "$ac_cv_func_putwc" != yes ; then
7990
7991 echo "$as_me:7991: checking for multibyte character support" >&5
7992 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7993 if test "${cf_cv_utf8_lib+set}" = set; then
7994   echo $ECHO_N "(cached) $ECHO_C" >&6
7995 else
7996
7997         cf_save_LIBS="$LIBS"
7998         cat >conftest.$ac_ext <<_ACEOF
7999 #line 7999 "configure"
8000 #include "confdefs.h"
8001
8002 #include <stdlib.h>
8003 int
8004 main ()
8005 {
8006 putwc(0,0);
8007   ;
8008   return 0;
8009 }
8010 _ACEOF
8011 rm -f conftest.$ac_objext conftest$ac_exeext
8012 if { (eval echo "$as_me:8012: \"$ac_link\"") >&5
8013   (eval $ac_link) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit $ac_status); } &&
8017          { ac_try='test -s conftest$ac_exeext'
8018   { (eval echo "$as_me:8018: \"$ac_try\"") >&5
8019   (eval $ac_try) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit $ac_status); }; }; then
8023   cf_cv_utf8_lib=yes
8024 else
8025   echo "$as_me: failed program was:" >&5
8026 cat conftest.$ac_ext >&5
8027
8028 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8029 # will be set on completion of the AC_TRY_LINK below.
8030 cf_cv_header_path_utf8=
8031 cf_cv_library_path_utf8=
8032
8033 echo "${as_me:-configure}:8033: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8034
8035 cf_save_LIBS="$LIBS"
8036
8037 cat >conftest.$ac_ext <<_ACEOF
8038 #line 8038 "configure"
8039 #include "confdefs.h"
8040
8041 #include <libutf8.h>
8042 int
8043 main ()
8044 {
8045 putwc(0,0);
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f conftest.$ac_objext conftest$ac_exeext
8051 if { (eval echo "$as_me:8051: \"$ac_link\"") >&5
8052   (eval $ac_link) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit $ac_status); } &&
8056          { ac_try='test -s conftest$ac_exeext'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); }; }; then
8062
8063         cf_cv_find_linkage_utf8=yes
8064         cf_cv_header_path_utf8=/usr/include
8065         cf_cv_library_path_utf8=/usr/lib
8066
8067 else
8068   echo "$as_me: failed program was:" >&5
8069 cat conftest.$ac_ext >&5
8070
8071 LIBS="-lutf8  $cf_save_LIBS"
8072
8073 cat >conftest.$ac_ext <<_ACEOF
8074 #line 8074 "configure"
8075 #include "confdefs.h"
8076
8077 #include <libutf8.h>
8078 int
8079 main ()
8080 {
8081 putwc(0,0);
8082   ;
8083   return 0;
8084 }
8085 _ACEOF
8086 rm -f conftest.$ac_objext conftest$ac_exeext
8087 if { (eval echo "$as_me:8087: \"$ac_link\"") >&5
8088   (eval $ac_link) 2>&5
8089   ac_status=$?
8090   echo "$as_me:8090: \$? = $ac_status" >&5
8091   (exit $ac_status); } &&
8092          { ac_try='test -s conftest$ac_exeext'
8093   { (eval echo "$as_me:8093: \"$ac_try\"") >&5
8094   (eval $ac_try) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); }; }; then
8098
8099         cf_cv_find_linkage_utf8=yes
8100         cf_cv_header_path_utf8=/usr/include
8101         cf_cv_library_path_utf8=/usr/lib
8102         cf_cv_library_file_utf8="-lutf8"
8103
8104 else
8105   echo "$as_me: failed program was:" >&5
8106 cat conftest.$ac_ext >&5
8107
8108         cf_cv_find_linkage_utf8=no
8109         LIBS="$cf_save_LIBS"
8110
8111     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8112
8113 echo "${as_me:-configure}:8113: testing find linkage for utf8 library ..." 1>&5
8114
8115 echo "${as_me:-configure}:8115: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8116
8117     cf_save_CPPFLAGS="$CPPFLAGS"
8118     cf_test_CPPFLAGS="$CPPFLAGS"
8119
8120 cf_search=
8121
8122 # collect the current set of include-directories from compiler flags
8123 cf_header_path_list=""
8124 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8125         for cf_header_path in $CPPFLAGS $CFLAGS
8126         do
8127                 case $cf_header_path in #(vi
8128                 -I*)
8129                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8130
8131 test "$cf_header_path" != "NONE" && \
8132 test -d "$cf_header_path" && \
8133  {
8134         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8135         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8136         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8137         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8138         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8139         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8140 }
8141
8142                         cf_header_path_list="$cf_header_path_list $cf_search"
8143                         ;;
8144                 esac
8145         done
8146 fi
8147
8148 # add the variations for the package we are looking for
8149
8150 cf_search=
8151
8152 test "/usr" != "$prefix" && \
8153 test -d "/usr" && \
8154 (test $prefix = NONE || test "/usr" != "$prefix") && {
8155         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8156         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8157         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8158         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8159         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8160         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8161 }
8162
8163 test "$prefix" != "NONE" && \
8164 test -d "$prefix" && \
8165  {
8166         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8167         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8168         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8169         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8170         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8171         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8172 }
8173
8174 test "/usr/local" != "$prefix" && \
8175 test -d "/usr/local" && \
8176 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8177         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8178         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8179         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8180         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8181         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8182         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8183 }
8184
8185 test "/opt" != "$prefix" && \
8186 test -d "/opt" && \
8187 (test $prefix = NONE || test "/opt" != "$prefix") && {
8188         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8189         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8190         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8191         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8192         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8193         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8194 }
8195
8196 test "$HOME" != "$prefix" && \
8197 test -d "$HOME" && \
8198 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8199         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8200         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8201         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8202         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8203         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8204         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8205 }
8206
8207 test "$includedir" != NONE && \
8208 test "$includedir" != "/usr/include" && \
8209 test -d "$includedir" && {
8210         test -d $includedir &&    cf_search="$cf_search $includedir"
8211         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8212 }
8213
8214 test "$oldincludedir" != NONE && \
8215 test "$oldincludedir" != "/usr/include" && \
8216 test -d "$oldincludedir" && {
8217         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8218         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8219 }
8220
8221 cf_search="$cf_search $cf_header_path_list"
8222
8223     for cf_cv_header_path_utf8 in $cf_search
8224     do
8225       if test -d $cf_cv_header_path_utf8 ; then
8226         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8227
8228 echo "${as_me:-configure}:8228: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8229
8230         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8231         cat >conftest.$ac_ext <<_ACEOF
8232 #line 8232 "configure"
8233 #include "confdefs.h"
8234
8235 #include <libutf8.h>
8236 int
8237 main ()
8238 {
8239 putwc(0,0);
8240   ;
8241   return 0;
8242 }
8243 _ACEOF
8244 rm -f conftest.$ac_objext
8245 if { (eval echo "$as_me:8245: \"$ac_compile\"") >&5
8246   (eval $ac_compile) 2>&5
8247   ac_status=$?
8248   echo "$as_me:8248: \$? = $ac_status" >&5
8249   (exit $ac_status); } &&
8250          { ac_try='test -s conftest.$ac_objext'
8251   { (eval echo "$as_me:8251: \"$ac_try\"") >&5
8252   (eval $ac_try) 2>&5
8253   ac_status=$?
8254   echo "$as_me:8254: \$? = $ac_status" >&5
8255   (exit $ac_status); }; }; then
8256
8257             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8258
8259 echo "${as_me:-configure}:8259: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8260
8261             cf_cv_find_linkage_utf8=maybe
8262             cf_test_CPPFLAGS="$CPPFLAGS"
8263             break
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267
8268             CPPFLAGS="$cf_save_CPPFLAGS"
8269
8270 fi
8271 rm -f conftest.$ac_objext conftest.$ac_ext
8272       fi
8273     done
8274
8275     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8276
8277 echo "${as_me:-configure}:8277: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8278
8279       cf_save_LIBS="$LIBS"
8280       cf_save_LDFLAGS="$LDFLAGS"
8281
8282       if test "$cf_cv_find_linkage_utf8" != yes ; then
8283
8284 cf_search=
8285 cf_library_path_list=""
8286 if test -n "${LDFLAGS}${LIBS}" ; then
8287         for cf_library_path in $LDFLAGS $LIBS
8288         do
8289                 case $cf_library_path in #(vi
8290                 -L*)
8291                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8292
8293 test "$cf_library_path" != "NONE" && \
8294 test -d "$cf_library_path" && \
8295  {
8296         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8297         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8298         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8299         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8300         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8301         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8302 }
8303
8304                         cf_library_path_list="$cf_library_path_list $cf_search"
8305                         ;;
8306                 esac
8307         done
8308 fi
8309
8310 cf_search=
8311
8312 test "/usr" != "$prefix" && \
8313 test -d "/usr" && \
8314 (test $prefix = NONE || test "/usr" != "$prefix") && {
8315         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8316         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8317         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8318         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8319         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8320         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8321 }
8322
8323 test "$prefix" != "NONE" && \
8324 test -d "$prefix" && \
8325  {
8326         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8327         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8328         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8329         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8330         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8331         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8332 }
8333
8334 test "/usr/local" != "$prefix" && \
8335 test -d "/usr/local" && \
8336 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8337         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8338         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8339         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8340         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8341         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8342         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8343 }
8344
8345 test "/opt" != "$prefix" && \
8346 test -d "/opt" && \
8347 (test $prefix = NONE || test "/opt" != "$prefix") && {
8348         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8349         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8350         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8351         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8352         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8353         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8354 }
8355
8356 test "$HOME" != "$prefix" && \
8357 test -d "$HOME" && \
8358 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8359         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8360         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8361         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8362         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8363         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8364         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8365 }
8366
8367 cf_search="$cf_library_path_list $cf_search"
8368
8369         for cf_cv_library_path_utf8 in $cf_search
8370         do
8371           if test -d $cf_cv_library_path_utf8 ; then
8372             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8373
8374 echo "${as_me:-configure}:8374: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8375
8376             CPPFLAGS="$cf_test_CPPFLAGS"
8377             LIBS="-lutf8  $cf_save_LIBS"
8378             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8379             cat >conftest.$ac_ext <<_ACEOF
8380 #line 8380 "configure"
8381 #include "confdefs.h"
8382
8383 #include <libutf8.h>
8384 int
8385 main ()
8386 {
8387 putwc(0,0);
8388   ;
8389   return 0;
8390 }
8391 _ACEOF
8392 rm -f conftest.$ac_objext conftest$ac_exeext
8393 if { (eval echo "$as_me:8393: \"$ac_link\"") >&5
8394   (eval $ac_link) 2>&5
8395   ac_status=$?
8396   echo "$as_me:8396: \$? = $ac_status" >&5
8397   (exit $ac_status); } &&
8398          { ac_try='test -s conftest$ac_exeext'
8399   { (eval echo "$as_me:8399: \"$ac_try\"") >&5
8400   (eval $ac_try) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit $ac_status); }; }; then
8404
8405                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8406
8407 echo "${as_me:-configure}:8407: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8408
8409                 cf_cv_find_linkage_utf8=yes
8410                 cf_cv_library_file_utf8="-lutf8"
8411                 break
8412 else
8413   echo "$as_me: failed program was:" >&5
8414 cat conftest.$ac_ext >&5
8415
8416                 CPPFLAGS="$cf_save_CPPFLAGS"
8417                 LIBS="$cf_save_LIBS"
8418                 LDFLAGS="$cf_save_LDFLAGS"
8419
8420 fi
8421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8422           fi
8423         done
8424         CPPFLAGS="$cf_save_CPPFLAGS"
8425         LDFLAGS="$cf_save_LDFLAGS"
8426       fi
8427
8428     else
8429       cf_cv_find_linkage_utf8=no
8430     fi
8431
8432 fi
8433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8434
8435 fi
8436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8437
8438 LIBS="$cf_save_LIBS"
8439
8440 if test "$cf_cv_find_linkage_utf8" = yes ; then
8441 cf_cv_utf8_lib=add-on
8442 else
8443 cf_cv_utf8_lib=no
8444 fi
8445
8446 fi
8447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8448 fi
8449 echo "$as_me:8449: result: $cf_cv_utf8_lib" >&5
8450 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8451
8452 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8453 # ncurses/ncursesw:
8454 if test "$cf_cv_utf8_lib" = "add-on" ; then
8455         cat >>confdefs.h <<\EOF
8456 #define HAVE_LIBUTF8_H 1
8457 EOF
8458
8459 if test -n "$cf_cv_header_path_utf8" ; then
8460   for cf_add_incdir in $cf_cv_header_path_utf8
8461   do
8462         while test $cf_add_incdir != /usr/include
8463         do
8464           if test -d $cf_add_incdir
8465           then
8466                 cf_have_incdir=no
8467                 if test -n "$CFLAGS$CPPFLAGS" ; then
8468                   # a loop is needed to ensure we can add subdirs of existing dirs
8469                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8470                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8471                           cf_have_incdir=yes; break
8472                         fi
8473                   done
8474                 fi
8475
8476                 if test "$cf_have_incdir" = no ; then
8477                   if test "$cf_add_incdir" = /usr/local/include ; then
8478                         if test "$GCC" = yes
8479                         then
8480                           cf_save_CPPFLAGS=$CPPFLAGS
8481                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8482                           cat >conftest.$ac_ext <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8485 #include <stdio.h>
8486 int
8487 main ()
8488 {
8489 printf("Hello")
8490   ;
8491   return 0;
8492 }
8493 _ACEOF
8494 rm -f conftest.$ac_objext
8495 if { (eval echo "$as_me:8495: \"$ac_compile\"") >&5
8496   (eval $ac_compile) 2>&5
8497   ac_status=$?
8498   echo "$as_me:8498: \$? = $ac_status" >&5
8499   (exit $ac_status); } &&
8500          { ac_try='test -s conftest.$ac_objext'
8501   { (eval echo "$as_me:8501: \"$ac_try\"") >&5
8502   (eval $ac_try) 2>&5
8503   ac_status=$?
8504   echo "$as_me:8504: \$? = $ac_status" >&5
8505   (exit $ac_status); }; }; then
8506   :
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 cat conftest.$ac_ext >&5
8510 cf_have_incdir=yes
8511 fi
8512 rm -f conftest.$ac_objext conftest.$ac_ext
8513                           CPPFLAGS=$cf_save_CPPFLAGS
8514                         fi
8515                   fi
8516                 fi
8517
8518                 if test "$cf_have_incdir" = no ; then
8519                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8520
8521 echo "${as_me:-configure}:8521: testing adding $cf_add_incdir to include-path ..." 1>&5
8522
8523                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8524
8525                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8526                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8527                   cf_add_incdir="$cf_top_incdir"
8528                 else
8529                   break
8530                 fi
8531           fi
8532         done
8533   done
8534 fi
8535
8536 if test -n "$cf_cv_library_path_utf8" ; then
8537   for cf_add_libdir in $cf_cv_library_path_utf8
8538   do
8539     if test $cf_add_libdir = /usr/lib ; then
8540       :
8541     elif test -d $cf_add_libdir
8542     then
8543       cf_have_libdir=no
8544       if test -n "$LDFLAGS$LIBS" ; then
8545         # a loop is needed to ensure we can add subdirs of existing dirs
8546         for cf_test_libdir in $LDFLAGS $LIBS ; do
8547           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8548             cf_have_libdir=yes; break
8549           fi
8550         done
8551       fi
8552       if test "$cf_have_libdir" = no ; then
8553         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8554
8555 echo "${as_me:-configure}:8555: testing adding $cf_add_libdir to library-path ..." 1>&5
8556
8557         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8558       fi
8559     fi
8560   done
8561 fi
8562
8563         LIBS="$cf_cv_library_file_utf8 $LIBS"
8564 fi
8565
8566                 if test "$cf_cv_utf8_lib" != no ; then
8567                         NCURSES_LIBUTF8=1
8568                 fi
8569         fi
8570
8571 # This is needed on Tru64 5.0 to declare mbstate_t
8572 echo "$as_me:8572: checking if we must include wchar.h to declare mbstate_t" >&5
8573 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8574 if test "${cf_cv_mbstate_t+set}" = set; then
8575   echo $ECHO_N "(cached) $ECHO_C" >&6
8576 else
8577
8578 cat >conftest.$ac_ext <<_ACEOF
8579 #line 8579 "configure"
8580 #include "confdefs.h"
8581
8582 #include <stdlib.h>
8583 #include <stdarg.h>
8584 #include <stdio.h>
8585 #ifdef HAVE_LIBUTF8_H
8586 #include <libutf8.h>
8587 #endif
8588 int
8589 main ()
8590 {
8591 mbstate_t state
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 rm -f conftest.$ac_objext
8597 if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
8598   (eval $ac_compile) 2>&5
8599   ac_status=$?
8600   echo "$as_me:8600: \$? = $ac_status" >&5
8601   (exit $ac_status); } &&
8602          { ac_try='test -s conftest.$ac_objext'
8603   { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8604   (eval $ac_try) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); }; }; then
8608   cf_cv_mbstate_t=no
8609 else
8610   echo "$as_me: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8612 cat >conftest.$ac_ext <<_ACEOF
8613 #line 8613 "configure"
8614 #include "confdefs.h"
8615
8616 #include <stdlib.h>
8617 #include <stdarg.h>
8618 #include <stdio.h>
8619 #include <wchar.h>
8620 #ifdef HAVE_LIBUTF8_H
8621 #include <libutf8.h>
8622 #endif
8623 int
8624 main ()
8625 {
8626 mbstate_t value
8627   ;
8628   return 0;
8629 }
8630 _ACEOF
8631 rm -f conftest.$ac_objext
8632 if { (eval echo "$as_me:8632: \"$ac_compile\"") >&5
8633   (eval $ac_compile) 2>&5
8634   ac_status=$?
8635   echo "$as_me:8635: \$? = $ac_status" >&5
8636   (exit $ac_status); } &&
8637          { ac_try='test -s conftest.$ac_objext'
8638   { (eval echo "$as_me:8638: \"$ac_try\"") >&5
8639   (eval $ac_try) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); }; }; then
8643   cf_cv_mbstate_t=yes
8644 else
8645   echo "$as_me: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 cf_cv_mbstate_t=unknown
8648 fi
8649 rm -f conftest.$ac_objext conftest.$ac_ext
8650 fi
8651 rm -f conftest.$ac_objext conftest.$ac_ext
8652 fi
8653 echo "$as_me:8653: result: $cf_cv_mbstate_t" >&5
8654 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8655
8656 if test "$cf_cv_mbstate_t" = yes ; then
8657         cat >>confdefs.h <<\EOF
8658 #define NEED_WCHAR_H 1
8659 EOF
8660
8661         NEED_WCHAR_H=1
8662 fi
8663
8664 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8665 if test "$cf_cv_mbstate_t" = unknown ; then
8666         NCURSES_MBSTATE_T=1
8667 fi
8668
8669 # This is needed on Tru64 5.0 to declare wchar_t
8670 echo "$as_me:8670: checking if we must include wchar.h to declare wchar_t" >&5
8671 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8672 if test "${cf_cv_wchar_t+set}" = set; then
8673   echo $ECHO_N "(cached) $ECHO_C" >&6
8674 else
8675
8676 cat >conftest.$ac_ext <<_ACEOF
8677 #line 8677 "configure"
8678 #include "confdefs.h"
8679
8680 #include <stdlib.h>
8681 #include <stdarg.h>
8682 #include <stdio.h>
8683 #ifdef HAVE_LIBUTF8_H
8684 #include <libutf8.h>
8685 #endif
8686 int
8687 main ()
8688 {
8689 wchar_t state
8690   ;
8691   return 0;
8692 }
8693 _ACEOF
8694 rm -f conftest.$ac_objext
8695 if { (eval echo "$as_me:8695: \"$ac_compile\"") >&5
8696   (eval $ac_compile) 2>&5
8697   ac_status=$?
8698   echo "$as_me:8698: \$? = $ac_status" >&5
8699   (exit $ac_status); } &&
8700          { ac_try='test -s conftest.$ac_objext'
8701   { (eval echo "$as_me:8701: \"$ac_try\"") >&5
8702   (eval $ac_try) 2>&5
8703   ac_status=$?
8704   echo "$as_me:8704: \$? = $ac_status" >&5
8705   (exit $ac_status); }; }; then
8706   cf_cv_wchar_t=no
8707 else
8708   echo "$as_me: failed program was:" >&5
8709 cat conftest.$ac_ext >&5
8710 cat >conftest.$ac_ext <<_ACEOF
8711 #line 8711 "configure"
8712 #include "confdefs.h"
8713
8714 #include <stdlib.h>
8715 #include <stdarg.h>
8716 #include <stdio.h>
8717 #include <wchar.h>
8718 #ifdef HAVE_LIBUTF8_H
8719 #include <libutf8.h>
8720 #endif
8721 int
8722 main ()
8723 {
8724 wchar_t value
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext
8730 if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
8731   (eval $ac_compile) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest.$ac_objext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   cf_cv_wchar_t=yes
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 cf_cv_wchar_t=unknown
8746 fi
8747 rm -f conftest.$ac_objext conftest.$ac_ext
8748 fi
8749 rm -f conftest.$ac_objext conftest.$ac_ext
8750 fi
8751 echo "$as_me:8751: result: $cf_cv_wchar_t" >&5
8752 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8753
8754 if test "$cf_cv_wchar_t" = yes ; then
8755         cat >>confdefs.h <<\EOF
8756 #define NEED_WCHAR_H 1
8757 EOF
8758
8759         NEED_WCHAR_H=1
8760 fi
8761
8762 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8763 if test "$cf_cv_wchar_t" = unknown ; then
8764         NCURSES_WCHAR_T=1
8765 fi
8766
8767 # if we find wchar_t in either place, use substitution to provide a fallback.
8768 if test "$cf_cv_wchar_t" != unknown ; then
8769         NCURSES_OK_WCHAR_T=1
8770 fi
8771
8772 # This is needed on Tru64 5.0 to declare wint_t
8773 echo "$as_me:8773: checking if we must include wchar.h to declare wint_t" >&5
8774 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8775 if test "${cf_cv_wint_t+set}" = set; then
8776   echo $ECHO_N "(cached) $ECHO_C" >&6
8777 else
8778
8779 cat >conftest.$ac_ext <<_ACEOF
8780 #line 8780 "configure"
8781 #include "confdefs.h"
8782
8783 #include <stdlib.h>
8784 #include <stdarg.h>
8785 #include <stdio.h>
8786 #ifdef HAVE_LIBUTF8_H
8787 #include <libutf8.h>
8788 #endif
8789 int
8790 main ()
8791 {
8792 wint_t state
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 rm -f conftest.$ac_objext
8798 if { (eval echo "$as_me:8798: \"$ac_compile\"") >&5
8799   (eval $ac_compile) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); } &&
8803          { ac_try='test -s conftest.$ac_objext'
8804   { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:8807: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   cf_cv_wint_t=no
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 cat >conftest.$ac_ext <<_ACEOF
8814 #line 8814 "configure"
8815 #include "confdefs.h"
8816
8817 #include <stdlib.h>
8818 #include <stdarg.h>
8819 #include <stdio.h>
8820 #include <wchar.h>
8821 #ifdef HAVE_LIBUTF8_H
8822 #include <libutf8.h>
8823 #endif
8824 int
8825 main ()
8826 {
8827 wint_t value
8828   ;
8829   return 0;
8830 }
8831 _ACEOF
8832 rm -f conftest.$ac_objext
8833 if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
8834   (eval $ac_compile) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); } &&
8838          { ac_try='test -s conftest.$ac_objext'
8839   { (eval echo "$as_me:8839: \"$ac_try\"") >&5
8840   (eval $ac_try) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); }; }; then
8844   cf_cv_wint_t=yes
8845 else
8846   echo "$as_me: failed program was:" >&5
8847 cat conftest.$ac_ext >&5
8848 cf_cv_wint_t=unknown
8849 fi
8850 rm -f conftest.$ac_objext conftest.$ac_ext
8851 fi
8852 rm -f conftest.$ac_objext conftest.$ac_ext
8853 fi
8854 echo "$as_me:8854: result: $cf_cv_wint_t" >&5
8855 echo "${ECHO_T}$cf_cv_wint_t" >&6
8856
8857 if test "$cf_cv_wint_t" = yes ; then
8858         cat >>confdefs.h <<\EOF
8859 #define NEED_WCHAR_H 1
8860 EOF
8861
8862         NEED_WCHAR_H=1
8863 fi
8864
8865 # if we do not find wint_t in either place, use substitution to provide a fallback.
8866 if test "$cf_cv_wint_t" = unknown ; then
8867         NCURSES_WINT_T=1
8868 fi
8869
8870 # if we find wint_t in either place, use substitution to provide a fallback.
8871 if test "$cf_cv_wint_t" != unknown ; then
8872         NCURSES_OK_WINT_T=1
8873 fi
8874
8875         if test "$NCURSES_MBSTATE_T" != 0; then
8876                 cat >>confdefs.h <<\EOF
8877 #define NEED_MBSTATE_T_DEF 1
8878 EOF
8879
8880         fi
8881 fi
8882
8883 ###   use option --disable-lp64 to allow long chtype
8884 case $cf_cv_abi_version in
8885 [345]*)
8886         default_with_lp64=no
8887         ;;
8888 *)
8889         default_with_lp64=yes
8890         ;;
8891 esac
8892
8893 echo "$as_me:8893: checking whether to enable _LP64 definition in curses.h" >&5
8894 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8895
8896 # Check whether --enable-lp64 or --disable-lp64 was given.
8897 if test "${enable_lp64+set}" = set; then
8898   enableval="$enable_lp64"
8899   with_lp64=$enableval
8900 else
8901   with_lp64=$default_with_lp64
8902 fi;
8903 echo "$as_me:8903: result: $with_lp64" >&5
8904 echo "${ECHO_T}$with_lp64" >&6
8905
8906 if test "$with_lp64" = yes ; then
8907         cf_cv_enable_lp64=1
8908 else
8909         cf_cv_enable_lp64=0
8910 fi
8911
8912 # Check whether --enable-largefile or --disable-largefile was given.
8913 if test "${enable_largefile+set}" = set; then
8914   enableval="$enable_largefile"
8915
8916 fi;
8917 if test "$enable_largefile" != no; then
8918
8919   echo "$as_me:8919: checking for special C compiler options needed for large files" >&5
8920 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8921 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8922   echo $ECHO_N "(cached) $ECHO_C" >&6
8923 else
8924   ac_cv_sys_largefile_CC=no
8925      if test "$GCC" != yes; then
8926        ac_save_CC=$CC
8927        while :; do
8928          # IRIX 6.2 and later do not support large files by default,
8929          # so use the C compiler's -n32 option if that helps.
8930          cat >conftest.$ac_ext <<_ACEOF
8931 #line 8931 "configure"
8932 #include "confdefs.h"
8933 #include <sys/types.h>
8934  /* Check that off_t can represent 2**63 - 1 correctly.
8935     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8936     since some C++ compilers masquerading as C compilers
8937     incorrectly reject 9223372036854775807.  */
8938 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8939   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8940                        && LARGE_OFF_T % 2147483647 == 1)
8941                       ? 1 : -1];
8942 int
8943 main ()
8944 {
8945
8946   ;
8947   return 0;
8948 }
8949 _ACEOF
8950          rm -f conftest.$ac_objext
8951 if { (eval echo "$as_me:8951: \"$ac_compile\"") >&5
8952   (eval $ac_compile) 2>&5
8953   ac_status=$?
8954   echo "$as_me:8954: \$? = $ac_status" >&5
8955   (exit $ac_status); } &&
8956          { ac_try='test -s conftest.$ac_objext'
8957   { (eval echo "$as_me:8957: \"$ac_try\"") >&5
8958   (eval $ac_try) 2>&5
8959   ac_status=$?
8960   echo "$as_me:8960: \$? = $ac_status" >&5
8961   (exit $ac_status); }; }; then
8962   break
8963 else
8964   echo "$as_me: failed program was:" >&5
8965 cat conftest.$ac_ext >&5
8966 fi
8967 rm -f conftest.$ac_objext
8968          CC="$CC -n32"
8969          rm -f conftest.$ac_objext
8970 if { (eval echo "$as_me:8970: \"$ac_compile\"") >&5
8971   (eval $ac_compile) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); } &&
8975          { ac_try='test -s conftest.$ac_objext'
8976   { (eval echo "$as_me:8976: \"$ac_try\"") >&5
8977   (eval $ac_try) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit $ac_status); }; }; then
8981   ac_cv_sys_largefile_CC=' -n32'; break
8982 else
8983   echo "$as_me: failed program was:" >&5
8984 cat conftest.$ac_ext >&5
8985 fi
8986 rm -f conftest.$ac_objext
8987          break
8988        done
8989        CC=$ac_save_CC
8990        rm -f conftest.$ac_ext
8991     fi
8992 fi
8993 echo "$as_me:8993: result: $ac_cv_sys_largefile_CC" >&5
8994 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8995   if test "$ac_cv_sys_largefile_CC" != no; then
8996     CC=$CC$ac_cv_sys_largefile_CC
8997   fi
8998
8999   echo "$as_me:8999: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9000 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9001 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9002   echo $ECHO_N "(cached) $ECHO_C" >&6
9003 else
9004   while :; do
9005   ac_cv_sys_file_offset_bits=no
9006   cat >conftest.$ac_ext <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9009 #include <sys/types.h>
9010  /* Check that off_t can represent 2**63 - 1 correctly.
9011     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9012     since some C++ compilers masquerading as C compilers
9013     incorrectly reject 9223372036854775807.  */
9014 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9015   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9016                        && LARGE_OFF_T % 2147483647 == 1)
9017                       ? 1 : -1];
9018 int
9019 main ()
9020 {
9021
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 rm -f conftest.$ac_objext
9027 if { (eval echo "$as_me:9027: \"$ac_compile\"") >&5
9028   (eval $ac_compile) 2>&5
9029   ac_status=$?
9030   echo "$as_me:9030: \$? = $ac_status" >&5
9031   (exit $ac_status); } &&
9032          { ac_try='test -s conftest.$ac_objext'
9033   { (eval echo "$as_me:9033: \"$ac_try\"") >&5
9034   (eval $ac_try) 2>&5
9035   ac_status=$?
9036   echo "$as_me:9036: \$? = $ac_status" >&5
9037   (exit $ac_status); }; }; then
9038   break
9039 else
9040   echo "$as_me: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 fi
9043 rm -f conftest.$ac_objext conftest.$ac_ext
9044   cat >conftest.$ac_ext <<_ACEOF
9045 #line 9045 "configure"
9046 #include "confdefs.h"
9047 #define _FILE_OFFSET_BITS 64
9048 #include <sys/types.h>
9049  /* Check that off_t can represent 2**63 - 1 correctly.
9050     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9051     since some C++ compilers masquerading as C compilers
9052     incorrectly reject 9223372036854775807.  */
9053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9054   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9055                        && LARGE_OFF_T % 2147483647 == 1)
9056                       ? 1 : -1];
9057 int
9058 main ()
9059 {
9060
9061   ;
9062   return 0;
9063 }
9064 _ACEOF
9065 rm -f conftest.$ac_objext
9066 if { (eval echo "$as_me:9066: \"$ac_compile\"") >&5
9067   (eval $ac_compile) 2>&5
9068   ac_status=$?
9069   echo "$as_me:9069: \$? = $ac_status" >&5
9070   (exit $ac_status); } &&
9071          { ac_try='test -s conftest.$ac_objext'
9072   { (eval echo "$as_me:9072: \"$ac_try\"") >&5
9073   (eval $ac_try) 2>&5
9074   ac_status=$?
9075   echo "$as_me:9075: \$? = $ac_status" >&5
9076   (exit $ac_status); }; }; then
9077   ac_cv_sys_file_offset_bits=64; break
9078 else
9079   echo "$as_me: failed program was:" >&5
9080 cat conftest.$ac_ext >&5
9081 fi
9082 rm -f conftest.$ac_objext conftest.$ac_ext
9083   break
9084 done
9085 fi
9086 echo "$as_me:9086: result: $ac_cv_sys_file_offset_bits" >&5
9087 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9088 if test "$ac_cv_sys_file_offset_bits" != no; then
9089
9090 cat >>confdefs.h <<EOF
9091 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9092 EOF
9093
9094 fi
9095 rm -rf conftest*
9096   echo "$as_me:9096: checking for _LARGE_FILES value needed for large files" >&5
9097 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9098 if test "${ac_cv_sys_large_files+set}" = set; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 else
9101   while :; do
9102   ac_cv_sys_large_files=no
9103   cat >conftest.$ac_ext <<_ACEOF
9104 #line 9104 "configure"
9105 #include "confdefs.h"
9106 #include <sys/types.h>
9107  /* Check that off_t can represent 2**63 - 1 correctly.
9108     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9109     since some C++ compilers masquerading as C compilers
9110     incorrectly reject 9223372036854775807.  */
9111 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9112   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9113                        && LARGE_OFF_T % 2147483647 == 1)
9114                       ? 1 : -1];
9115 int
9116 main ()
9117 {
9118
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 rm -f conftest.$ac_objext
9124 if { (eval echo "$as_me:9124: \"$ac_compile\"") >&5
9125   (eval $ac_compile) 2>&5
9126   ac_status=$?
9127   echo "$as_me:9127: \$? = $ac_status" >&5
9128   (exit $ac_status); } &&
9129          { ac_try='test -s conftest.$ac_objext'
9130   { (eval echo "$as_me:9130: \"$ac_try\"") >&5
9131   (eval $ac_try) 2>&5
9132   ac_status=$?
9133   echo "$as_me:9133: \$? = $ac_status" >&5
9134   (exit $ac_status); }; }; then
9135   break
9136 else
9137   echo "$as_me: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 fi
9140 rm -f conftest.$ac_objext conftest.$ac_ext
9141   cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 #define _LARGE_FILES 1
9145 #include <sys/types.h>
9146  /* Check that off_t can represent 2**63 - 1 correctly.
9147     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9148     since some C++ compilers masquerading as C compilers
9149     incorrectly reject 9223372036854775807.  */
9150 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9151   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9152                        && LARGE_OFF_T % 2147483647 == 1)
9153                       ? 1 : -1];
9154 int
9155 main ()
9156 {
9157
9158   ;
9159   return 0;
9160 }
9161 _ACEOF
9162 rm -f conftest.$ac_objext
9163 if { (eval echo "$as_me:9163: \"$ac_compile\"") >&5
9164   (eval $ac_compile) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit $ac_status); } &&
9168          { ac_try='test -s conftest.$ac_objext'
9169   { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170   (eval $ac_try) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); }; }; then
9174   ac_cv_sys_large_files=1; break
9175 else
9176   echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 fi
9179 rm -f conftest.$ac_objext conftest.$ac_ext
9180   break
9181 done
9182 fi
9183 echo "$as_me:9183: result: $ac_cv_sys_large_files" >&5
9184 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9185 if test "$ac_cv_sys_large_files" != no; then
9186
9187 cat >>confdefs.h <<EOF
9188 #define _LARGE_FILES $ac_cv_sys_large_files
9189 EOF
9190
9191 fi
9192 rm -rf conftest*
9193 fi
9194
9195     if test "$enable_largefile" != no ; then
9196         echo "$as_me:9196: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9197 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9198 if test "${ac_cv_sys_largefile_source+set}" = set; then
9199   echo $ECHO_N "(cached) $ECHO_C" >&6
9200 else
9201   while :; do
9202   ac_cv_sys_largefile_source=no
9203   cat >conftest.$ac_ext <<_ACEOF
9204 #line 9204 "configure"
9205 #include "confdefs.h"
9206 #include <stdio.h>
9207 int
9208 main ()
9209 {
9210 return !fseeko;
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 rm -f conftest.$ac_objext
9216 if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
9217   (eval $ac_compile) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); } &&
9221          { ac_try='test -s conftest.$ac_objext'
9222   { (eval echo "$as_me:9222: \"$ac_try\"") >&5
9223   (eval $ac_try) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); }; }; then
9227   break
9228 else
9229   echo "$as_me: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233   cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236 #define _LARGEFILE_SOURCE 1
9237 #include <stdio.h>
9238 int
9239 main ()
9240 {
9241 return !fseeko;
9242   ;
9243   return 0;
9244 }
9245 _ACEOF
9246 rm -f conftest.$ac_objext
9247 if { (eval echo "$as_me:9247: \"$ac_compile\"") >&5
9248   (eval $ac_compile) 2>&5
9249   ac_status=$?
9250   echo "$as_me:9250: \$? = $ac_status" >&5
9251   (exit $ac_status); } &&
9252          { ac_try='test -s conftest.$ac_objext'
9253   { (eval echo "$as_me:9253: \"$ac_try\"") >&5
9254   (eval $ac_try) 2>&5
9255   ac_status=$?
9256   echo "$as_me:9256: \$? = $ac_status" >&5
9257   (exit $ac_status); }; }; then
9258   ac_cv_sys_largefile_source=1; break
9259 else
9260   echo "$as_me: failed program was:" >&5
9261 cat conftest.$ac_ext >&5
9262 fi
9263 rm -f conftest.$ac_objext conftest.$ac_ext
9264   break
9265 done
9266 fi
9267 echo "$as_me:9267: result: $ac_cv_sys_largefile_source" >&5
9268 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9269 if test "$ac_cv_sys_largefile_source" != no; then
9270
9271 cat >>confdefs.h <<EOF
9272 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9273 EOF
9274
9275 fi
9276 rm -rf conftest*
9277
9278 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9279 # in glibc 2.1.3, but that breaks too many other things.
9280 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9281 echo "$as_me:9281: checking for fseeko" >&5
9282 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9283 if test "${ac_cv_func_fseeko+set}" = set; then
9284   echo $ECHO_N "(cached) $ECHO_C" >&6
9285 else
9286   cat >conftest.$ac_ext <<_ACEOF
9287 #line 9287 "configure"
9288 #include "confdefs.h"
9289 #include <stdio.h>
9290 int
9291 main ()
9292 {
9293 return fseeko && fseeko (stdin, 0, 0);
9294   ;
9295   return 0;
9296 }
9297 _ACEOF
9298 rm -f conftest.$ac_objext conftest$ac_exeext
9299 if { (eval echo "$as_me:9299: \"$ac_link\"") >&5
9300   (eval $ac_link) 2>&5
9301   ac_status=$?
9302   echo "$as_me:9302: \$? = $ac_status" >&5
9303   (exit $ac_status); } &&
9304          { ac_try='test -s conftest$ac_exeext'
9305   { (eval echo "$as_me:9305: \"$ac_try\"") >&5
9306   (eval $ac_try) 2>&5
9307   ac_status=$?
9308   echo "$as_me:9308: \$? = $ac_status" >&5
9309   (exit $ac_status); }; }; then
9310   ac_cv_func_fseeko=yes
9311 else
9312   echo "$as_me: failed program was:" >&5
9313 cat conftest.$ac_ext >&5
9314 ac_cv_func_fseeko=no
9315 fi
9316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9317 fi
9318 echo "$as_me:9318: result: $ac_cv_func_fseeko" >&5
9319 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9320 if test $ac_cv_func_fseeko = yes; then
9321
9322 cat >>confdefs.h <<\EOF
9323 #define HAVE_FSEEKO 1
9324 EOF
9325
9326 fi
9327
9328         # Normally we would collect these definitions in the config.h,
9329         # but (like _XOPEN_SOURCE), some environments rely on having these
9330         # defined before any of the system headers are included.  Another
9331         # case comes up with C++, e.g., on AIX the compiler compiles the
9332         # header files by themselves before looking at the body files it is
9333         # told to compile.  For ncurses, those header files do not include
9334         # the config.h
9335         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9336         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9337         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9338
9339         echo "$as_me:9339: checking whether to use struct dirent64" >&5
9340 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9341 if test "${cf_cv_struct_dirent64+set}" = set; then
9342   echo $ECHO_N "(cached) $ECHO_C" >&6
9343 else
9344
9345                 cat >conftest.$ac_ext <<_ACEOF
9346 #line 9346 "configure"
9347 #include "confdefs.h"
9348
9349 #include <sys/types.h>
9350 #include <dirent.h>
9351
9352 int
9353 main ()
9354 {
9355
9356                 /* if transitional largefile support is setup, this is true */
9357                 extern struct dirent64 * readdir(DIR *);
9358                 struct dirent64 *x = readdir((DIR *)0);
9359                 struct dirent *y = readdir((DIR *)0);
9360                 int z = x - y;
9361
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_struct_dirent64=yes
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cf_cv_struct_dirent64=no
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385
9386 fi
9387 echo "$as_me:9387: result: $cf_cv_struct_dirent64" >&5
9388 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9389         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9390 #define HAVE_STRUCT_DIRENT64 1
9391 EOF
9392
9393     fi
9394
9395 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9396 echo "$as_me:9396: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9397 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9398
9399 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9400 if test "${enable_tparm_varargs+set}" = set; then
9401   enableval="$enable_tparm_varargs"
9402   with_tparm_varargs=$enableval
9403 else
9404   with_tparm_varargs=yes
9405 fi;
9406 echo "$as_me:9406: result: $with_tparm_varargs" >&5
9407 echo "${ECHO_T}$with_tparm_varargs" >&6
9408 NCURSES_TPARM_VARARGS=0
9409 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9410
9411 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9412 if test "$with_ticlib" != no ; then
9413 echo "$as_me:9413: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9414 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9415
9416 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9417 if test "${enable_tic_depends+set}" = set; then
9418   enableval="$enable_tic_depends"
9419   with_tic_depends=$enableval
9420 else
9421   with_tic_depends=yes
9422 fi;
9423 echo "$as_me:9423: result: $with_tic_depends" >&5
9424 echo "${ECHO_T}$with_tic_depends" >&6
9425 else
9426         with_tic_depends=no
9427 fi
9428
9429 ###   use option --with-bool to override bool's type
9430 echo "$as_me:9430: checking for type of bool" >&5
9431 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9432
9433 # Check whether --with-bool or --without-bool was given.
9434 if test "${with_bool+set}" = set; then
9435   withval="$with_bool"
9436   NCURSES_BOOL="$withval"
9437 else
9438   NCURSES_BOOL=auto
9439 fi;
9440 echo "$as_me:9440: result: $NCURSES_BOOL" >&5
9441 echo "${ECHO_T}$NCURSES_BOOL" >&6
9442
9443 echo "$as_me:9443: checking for alternate terminal capabilities file" >&5
9444 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9445
9446 # Check whether --with-caps or --without-caps was given.
9447 if test "${with_caps+set}" = set; then
9448   withval="$with_caps"
9449   TERMINFO_CAPS=Caps.$withval
9450 else
9451   TERMINFO_CAPS=Caps
9452 fi;
9453 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9454 echo "$as_me:9454: result: $TERMINFO_CAPS" >&5
9455 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9456
9457 ###   use option --with-chtype to override chtype's type
9458 echo "$as_me:9458: checking for type of chtype" >&5
9459 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9460
9461 # Check whether --with-chtype or --without-chtype was given.
9462 if test "${with_chtype+set}" = set; then
9463   withval="$with_chtype"
9464   NCURSES_CHTYPE="$withval"
9465 else
9466   NCURSES_CHTYPE=auto
9467 fi;
9468 echo "$as_me:9468: result: $NCURSES_CHTYPE" >&5
9469 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9470
9471 ###   use option --with-ospeed to override ospeed's type
9472 echo "$as_me:9472: checking for type of ospeed" >&5
9473 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9474
9475 # Check whether --with-ospeed or --without-ospeed was given.
9476 if test "${with_ospeed+set}" = set; then
9477   withval="$with_ospeed"
9478   NCURSES_OSPEED="$withval"
9479 else
9480   NCURSES_OSPEED=short
9481 fi;
9482 echo "$as_me:9482: result: $NCURSES_OSPEED" >&5
9483 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9484
9485 ###   use option --with-mmask-t to override mmask_t's type
9486 echo "$as_me:9486: checking for type of mmask_t" >&5
9487 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9488
9489 # Check whether --with-mmask-t or --without-mmask-t was given.
9490 if test "${with_mmask_t+set}" = set; then
9491   withval="$with_mmask_t"
9492   NCURSES_MMASK_T="$withval"
9493 else
9494   NCURSES_MMASK_T=auto
9495 fi;
9496 echo "$as_me:9496: result: $NCURSES_MMASK_T" >&5
9497 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9498
9499 ###   use option --with-ccharw-max to override CCHARW_MAX size
9500 echo "$as_me:9500: checking for size CCHARW_MAX" >&5
9501 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9502
9503 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9504 if test "${with_ccharw_max+set}" = set; then
9505   withval="$with_ccharw_max"
9506   NCURSES_CCHARW_MAX="$withval"
9507 else
9508   NCURSES_CCHARW_MAX=5
9509 fi;
9510 echo "$as_me:9510: result: $NCURSES_CCHARW_MAX" >&5
9511 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9512
9513 ### Enable compiling-in rcs id's
9514 echo "$as_me:9514: checking if RCS identifiers should be compiled-in" >&5
9515 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9516
9517 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9518 if test "${with_rcs_ids+set}" = set; then
9519   withval="$with_rcs_ids"
9520   with_rcs_ids=$withval
9521 else
9522   with_rcs_ids=no
9523 fi;
9524 echo "$as_me:9524: result: $with_rcs_ids" >&5
9525 echo "${ECHO_T}$with_rcs_ids" >&6
9526 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9527 #define USE_RCS_IDS 1
9528 EOF
9529
9530 ###############################################################################
9531
9532 echo "$as_me:9532: checking format of man-pages" >&5
9533 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9534
9535 # Check whether --with-manpage-format or --without-manpage-format was given.
9536 if test "${with_manpage_format+set}" = set; then
9537   withval="$with_manpage_format"
9538   MANPAGE_FORMAT=$withval
9539 else
9540   MANPAGE_FORMAT=unknown
9541 fi;
9542
9543 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9544 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9545
9546 cf_unknown=
9547
9548 case $MANPAGE_FORMAT in
9549 unknown)
9550   if test -z "$MANPATH" ; then
9551     MANPATH="/usr/man:/usr/share/man"
9552   fi
9553
9554   # look for the 'date' man-page (it's most likely to be installed!)
9555   MANPAGE_FORMAT=
9556   cf_preform=no
9557   cf_catonly=yes
9558   cf_example=date
9559
9560   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9561   for cf_dir in $MANPATH; do
9562     test -z "$cf_dir" && cf_dir=/usr/man
9563     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
9564     do
9565       cf_test=`echo $cf_name | sed -e 's/*//'`
9566       if test "x$cf_test" = "x$cf_name" ; then
9567
9568         case "$cf_name" in
9569         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9570         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9571         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9572         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9573         esac
9574
9575         case "$cf_name" in
9576         $cf_dir/man*)
9577           cf_catonly=no
9578           ;;
9579         $cf_dir/cat*)
9580           cf_preform=yes
9581           ;;
9582         esac
9583         break
9584       fi
9585
9586       # if we found a match in either man* or cat*, stop looking
9587       if test -n "$MANPAGE_FORMAT" ; then
9588         cf_found=no
9589         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9590         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9591         case "$cf_name" in
9592         $cf_dir/cat*)
9593           cf_found=yes
9594           ;;
9595         esac
9596         test $cf_found=yes && break
9597       fi
9598     done
9599     # only check the first directory in $MANPATH where we find manpages
9600     if test -n "$MANPAGE_FORMAT" ; then
9601        break
9602     fi
9603   done
9604   # if we did not find the example, just assume it is normal
9605   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9606   IFS="$ac_save_ifs"
9607   ;;
9608 *)
9609   for cf_option in $MANPAGE_FORMAT; do
9610      case $cf_option in #(vi
9611      gzip|compress|BSDI|normal|formatted|catonly)
9612        ;;
9613      *)
9614        cf_unknown="$cf_unknown $cf_option"
9615        ;;
9616      esac
9617   done
9618   ;;
9619 esac
9620
9621 echo "$as_me:9621: result: $MANPAGE_FORMAT" >&5
9622 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9623 if test -n "$cf_unknown" ; then
9624   { echo "$as_me:9624: WARNING: Unexpected manpage-format $cf_unknown" >&5
9625 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9626 fi
9627
9628 echo "$as_me:9628: checking for manpage renaming" >&5
9629 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9630
9631 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9632 if test "${with_manpage_renames+set}" = set; then
9633   withval="$with_manpage_renames"
9634   MANPAGE_RENAMES=$withval
9635 else
9636   MANPAGE_RENAMES=yes
9637 fi;
9638
9639 case ".$MANPAGE_RENAMES" in #(vi
9640 .no) #(vi
9641   ;;
9642 .|.yes)
9643   # Debian 'man' program?
9644   if test -f /etc/debian_version ; then
9645     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9646   else
9647     MANPAGE_RENAMES=no
9648   fi
9649   ;;
9650 esac
9651
9652 if test "$MANPAGE_RENAMES" != no ; then
9653   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9654     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9655   elif test ! -f $MANPAGE_RENAMES ; then
9656     { { echo "$as_me:9656: error: not a filename: $MANPAGE_RENAMES" >&5
9657 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9658    { (exit 1); exit 1; }; }
9659   fi
9660
9661   test ! -d man && mkdir man
9662
9663   # Construct a sed-script to perform renaming within man-pages
9664   if test -n "$MANPAGE_RENAMES" ; then
9665     test ! -d man && mkdir man
9666     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9667   fi
9668 fi
9669
9670 echo "$as_me:9670: result: $MANPAGE_RENAMES" >&5
9671 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9672
9673 echo "$as_me:9673: checking if manpage aliases will be installed" >&5
9674 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9675
9676 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9677 if test "${with_manpage_aliases+set}" = set; then
9678   withval="$with_manpage_aliases"
9679   MANPAGE_ALIASES=$withval
9680 else
9681   MANPAGE_ALIASES=yes
9682 fi;
9683
9684 echo "$as_me:9684: result: $MANPAGE_ALIASES" >&5
9685 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9686
9687 case "x$LN_S" in #(vi
9688 xln*) #(vi
9689         cf_use_symlinks=yes
9690         ;;
9691 *)
9692         cf_use_symlinks=no
9693         ;;
9694 esac
9695
9696 MANPAGE_SYMLINKS=no
9697 if test "$MANPAGE_ALIASES" = yes ; then
9698 echo "$as_me:9698: checking if manpage symlinks should be used" >&5
9699 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9700
9701 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9702 if test "${with_manpage_symlinks+set}" = set; then
9703   withval="$with_manpage_symlinks"
9704   MANPAGE_SYMLINKS=$withval
9705 else
9706   MANPAGE_SYMLINKS=$cf_use_symlinks
9707 fi;
9708
9709 if test "$$cf_use_symlinks" = no; then
9710 if test "$MANPAGE_SYMLINKS" = yes ; then
9711         { echo "$as_me:9711: WARNING: cannot make symlinks" >&5
9712 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9713         MANPAGE_SYMLINKS=no
9714 fi
9715 fi
9716
9717 echo "$as_me:9717: result: $MANPAGE_SYMLINKS" >&5
9718 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9719 fi
9720
9721 echo "$as_me:9721: checking for manpage tbl" >&5
9722 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9723
9724 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9725 if test "${with_manpage_tbl+set}" = set; then
9726   withval="$with_manpage_tbl"
9727   MANPAGE_TBL=$withval
9728 else
9729   MANPAGE_TBL=no
9730 fi;
9731
9732 echo "$as_me:9732: result: $MANPAGE_TBL" >&5
9733 echo "${ECHO_T}$MANPAGE_TBL" >&6
9734
9735   if test "$prefix" = "NONE" ; then
9736      cf_prefix="$ac_default_prefix"
9737   else
9738      cf_prefix="$prefix"
9739   fi
9740
9741   case "$MANPAGE_FORMAT" in # (vi
9742   *catonly*) # (vi
9743     cf_format=yes
9744     cf_inboth=no
9745     ;;
9746   *formatted*) # (vi
9747     cf_format=yes
9748     cf_inboth=yes
9749     ;;
9750   *)
9751     cf_format=no
9752     cf_inboth=no
9753     ;;
9754   esac
9755
9756 test ! -d man && mkdir man
9757
9758 cf_so_strip=
9759 cf_compress=
9760 case "$MANPAGE_FORMAT" in #(vi
9761 *compress*) #(vi
9762         cf_so_strip="Z"
9763         cf_compress=compress
9764   ;;
9765 *gzip*)
9766         cf_so_strip="gz"
9767         cf_compress=gzip
9768   ;;
9769 esac
9770
9771 cf_edit_man=./edit_man.sh
9772 cf_man_alias=`pwd`/man_alias.sed
9773
9774 cat >$cf_edit_man <<CF_EOF
9775 #! /bin/sh
9776 # this script is generated by the configure-script CF_MAN_PAGES macro.
9777
9778 prefix="$cf_prefix"
9779 datadir="$datadir"
9780
9781 NCURSES_MAJOR="$NCURSES_MAJOR"
9782 NCURSES_MINOR="$NCURSES_MINOR"
9783 NCURSES_PATCH="$NCURSES_PATCH"
9784
9785 NCURSES_OSPEED="$NCURSES_OSPEED"
9786 TERMINFO="$TERMINFO"
9787
9788 INSTALL="$INSTALL"
9789 INSTALL_DATA="$INSTALL_DATA"
9790
9791 transform="$program_transform_name"
9792
9793 TMP=\${TMPDIR:=/tmp}/man\$\$
9794 trap "rm -f \$TMP" 0 1 2 5 15
9795
9796 form=\$1
9797 shift || exit 1
9798
9799 verb=\$1
9800 shift || exit 1
9801
9802 mandir=\$1
9803 shift || exit 1
9804
9805 srcdir=\$1
9806 top_srcdir=\$srcdir/..
9807 shift || exit 1
9808
9809 if test "\$form" = normal ; then
9810         if test "$cf_format" = yes ; then
9811         if test "$cf_inboth" = no ; then
9812                 sh \$0 format \$verb \$mandir \$srcdir \$*
9813                 exit $?
9814         fi
9815         fi
9816         cf_subdir=\$mandir/man
9817         cf_tables=$MANPAGE_TBL
9818 else
9819         cf_subdir=\$mandir/cat
9820         cf_tables=yes
9821 fi
9822
9823 # process the list of source-files
9824 for i in \$* ; do
9825 case \$i in #(vi
9826 *.orig|*.rej) ;; #(vi
9827 *.[0-9]*)
9828         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9829         if test \$verb = installing ; then
9830         if test ! -d \$cf_subdir\${section} ; then
9831                 mkdir -p \$cf_subdir\$section
9832         fi
9833         fi
9834
9835         # replace variables in man page
9836         if test ! -f $cf_man_alias ; then
9837 cat >>$cf_man_alias <<-CF_EOF2
9838                 s,@DATADIR@,\$datadir,g
9839                 s,@TERMINFO@,\$TERMINFO,g
9840                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9841                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9842                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9843                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9844 CF_EOF
9845
9846         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9847         do
9848                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9849                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9850 cat >>$cf_edit_man <<-CF_EOF
9851                 s,@$cf_NAME@,$cf_name,g
9852 CF_EOF
9853         done
9854
9855 cat >>$cf_edit_man <<CF_EOF
9856 CF_EOF2
9857                 echo "...made $cf_man_alias"
9858         fi
9859
9860         aliases=
9861         cf_source=\`basename \$i\`
9862         inalias=\$cf_source
9863         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9864         if test ! -f \$inalias ; then
9865                 echo .. skipped \$cf_source
9866                 continue
9867         fi
9868 CF_EOF
9869
9870 if test "$MANPAGE_ALIASES" != no ; then
9871 cat >>$cf_edit_man <<CF_EOF
9872         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9873 CF_EOF
9874 fi
9875
9876 if test "$MANPAGE_RENAMES" = no ; then
9877 cat >>$cf_edit_man <<CF_EOF
9878         # perform program transformations for section 1 man pages
9879         if test \$section = 1 ; then
9880                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9881         else
9882                 cf_target=\$cf_subdir\${section}/\$cf_source
9883         fi
9884 CF_EOF
9885 else
9886 cat >>$cf_edit_man <<CF_EOF
9887         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9888         if test -z "\$cf_target" ; then
9889                 echo '? missing rename for '\$cf_source
9890                 cf_target="\$cf_source"
9891         fi
9892         cf_target="\$cf_subdir\${section}/\${cf_target}"
9893
9894 CF_EOF
9895 fi
9896
9897 cat >>$cf_edit_man <<CF_EOF
9898         sed     -f $cf_man_alias \\
9899 CF_EOF
9900
9901 if test -f $MANPAGE_RENAMES ; then
9902 cat >>$cf_edit_man <<CF_EOF
9903                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9904 CF_EOF
9905 else
9906 cat >>$cf_edit_man <<CF_EOF
9907                 < \$i >\$TMP
9908 CF_EOF
9909 fi
9910
9911 cat >>$cf_edit_man <<CF_EOF
9912 if test \$cf_tables = yes ; then
9913         tbl \$TMP >\$TMP.out
9914         mv \$TMP.out \$TMP
9915 fi
9916 CF_EOF
9917
9918 if test $with_curses_h != yes ; then
9919 cat >>$cf_edit_man <<CF_EOF
9920         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9921         mv \$TMP.out \$TMP
9922 CF_EOF
9923 fi
9924
9925 cat >>$cf_edit_man <<CF_EOF
9926         if test \$form = format ; then
9927                 nroff -man \$TMP >\$TMP.out
9928                 mv \$TMP.out \$TMP
9929         fi
9930 CF_EOF
9931
9932 if test -n "$cf_compress" ; then
9933 cat >>$cf_edit_man <<CF_EOF
9934         if test \$verb = installing ; then
9935         if ( $cf_compress -f \$TMP )
9936         then
9937                 mv \$TMP.$cf_so_strip \$TMP
9938         fi
9939         fi
9940         cf_target="\$cf_target.$cf_so_strip"
9941 CF_EOF
9942 fi
9943
9944 case "$MANPAGE_FORMAT" in #(vi
9945 *BSDI*)
9946 cat >>$cf_edit_man <<CF_EOF
9947         if test \$form = format ; then
9948                 # BSDI installs only .0 suffixes in the cat directories
9949                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9950         fi
9951 CF_EOF
9952   ;;
9953 esac
9954
9955 cat >>$cf_edit_man <<CF_EOF
9956         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9957         if test \$verb = installing ; then
9958                 echo \$verb \$cf_target
9959                 \$INSTALL_DATA \$TMP \$cf_target
9960                 test -d \$cf_subdir\${section} &&
9961                 test -n "\$aliases" && (
9962                         cd \$cf_subdir\${section} && (
9963                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9964                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9965                                 cf_target=\`basename \$cf_target\`
9966                                 for cf_alias in \$aliases
9967                                 do
9968                                         if test \$section = 1 ; then
9969                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9970                                         fi
9971
9972                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9973                                                 if test -f \$cf_alias\${suffix} ; then
9974                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9975                                                         then
9976                                                                 continue
9977                                                         fi
9978                                                 fi
9979                                                 echo .. \$verb alias \$cf_alias\${suffix}
9980 CF_EOF
9981 case "x$LN_S" in #(vi
9982 *-f) #(vi
9983 cat >>$cf_edit_man <<CF_EOF
9984                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9985 CF_EOF
9986         ;;
9987 *)
9988 cat >>$cf_edit_man <<CF_EOF
9989                                                 rm -f \$cf_alias\${suffix}
9990                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9991 CF_EOF
9992         ;;
9993 esac
9994 cat >>$cf_edit_man <<CF_EOF
9995                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9996                                                 echo ".so \$cf_source" >\$TMP
9997 CF_EOF
9998 if test -n "$cf_compress" ; then
9999 cat >>$cf_edit_man <<CF_EOF
10000                                                 if test -n "$cf_so_strip" ; then
10001                                                         $cf_compress -f \$TMP
10002                                                         mv \$TMP.$cf_so_strip \$TMP
10003                                                 fi
10004 CF_EOF
10005 fi
10006 cat >>$cf_edit_man <<CF_EOF
10007                                                 echo .. \$verb alias \$cf_alias\${suffix}
10008                                                 rm -f \$cf_alias\${suffix}
10009                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10010                                         fi
10011                                 done
10012                         )
10013                 )
10014         elif test \$verb = removing ; then
10015                 test -f \$cf_target && (
10016                         echo \$verb \$cf_target
10017                         rm -f \$cf_target
10018                 )
10019                 test -d \$cf_subdir\${section} &&
10020                 test -n "\$aliases" && (
10021                         cd \$cf_subdir\${section} && (
10022                                 for cf_alias in \$aliases
10023                                 do
10024                                         if test \$section = 1 ; then
10025                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10026                                         fi
10027
10028                                         echo .. \$verb alias \$cf_alias\${suffix}
10029                                         rm -f \$cf_alias\${suffix}
10030                                 done
10031                         )
10032                 )
10033         else
10034 #               echo ".hy 0"
10035                 cat \$TMP
10036         fi
10037         ;;
10038 esac
10039 done
10040
10041 if test $cf_inboth = yes ; then
10042 if test \$form != format ; then
10043         sh \$0 format \$verb \$mandir \$srcdir \$*
10044 fi
10045 fi
10046
10047 exit 0
10048 CF_EOF
10049 chmod 755 $cf_edit_man
10050
10051 ###############################################################################
10052
10053 ### Note that some functions (such as const) are normally disabled anyway.
10054 echo "$as_me:10054: checking if you want to build with function extensions" >&5
10055 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10056
10057 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10058 if test "${enable_ext_funcs+set}" = set; then
10059   enableval="$enable_ext_funcs"
10060   with_ext_funcs=$enableval
10061 else
10062   with_ext_funcs=yes
10063 fi;
10064 echo "$as_me:10064: result: $with_ext_funcs" >&5
10065 echo "${ECHO_T}$with_ext_funcs" >&6
10066 if test "$with_ext_funcs" = yes ; then
10067         NCURSES_EXT_FUNCS=1
10068         cat >>confdefs.h <<\EOF
10069 #define HAVE_CURSES_VERSION 1
10070 EOF
10071
10072         cat >>confdefs.h <<\EOF
10073 #define HAVE_HAS_KEY 1
10074 EOF
10075
10076         cat >>confdefs.h <<\EOF
10077 #define HAVE_RESIZETERM 1
10078 EOF
10079
10080         cat >>confdefs.h <<\EOF
10081 #define HAVE_RESIZE_TERM 1
10082 EOF
10083
10084         cat >>confdefs.h <<\EOF
10085 #define HAVE_TERM_ENTRY_H 1
10086 EOF
10087
10088         cat >>confdefs.h <<\EOF
10089 #define HAVE_USE_DEFAULT_COLORS 1
10090 EOF
10091
10092         cat >>confdefs.h <<\EOF
10093 #define HAVE_WRESIZE 1
10094 EOF
10095
10096         cat >>confdefs.h <<\EOF
10097 #define NCURSES_EXT_FUNCS 1
10098 EOF
10099
10100         GENERATED_EXT_FUNCS=generated
10101 else
10102         NCURSES_EXT_FUNCS=0
10103         GENERATED_EXT_FUNCS=
10104 fi
10105
10106 echo "$as_me:10106: checking if you want to build with experimental SCREEN extensions" >&5
10107 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10108
10109 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10110 if test "${enable_sp_funcs+set}" = set; then
10111   enableval="$enable_sp_funcs"
10112   with_sp_funcs=$enableval
10113 else
10114   with_sp_funcs=no
10115 fi;
10116 echo "$as_me:10116: result: $with_sp_funcs" >&5
10117 echo "${ECHO_T}$with_sp_funcs" >&6
10118 if test "$with_sp_funcs" = yes ; then
10119         NCURSES_SP_FUNCS=1
10120         cat >>confdefs.h <<\EOF
10121 #define NCURSES_SP_FUNCS 1
10122 EOF
10123
10124         GENERATED_SP_FUNCS=generated
10125 else
10126         NCURSES_SP_FUNCS=0
10127         GENERATED_SP_FUNCS=
10128 fi
10129
10130 echo "$as_me:10130: checking if you want to build with experimental terminal-driver" >&5
10131 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10132
10133 # Check whether --enable-term-driver or --disable-term-driver was given.
10134 if test "${enable_term_driver+set}" = set; then
10135   enableval="$enable_term_driver"
10136   with_term_driver=$enableval
10137 else
10138   with_term_driver=no
10139 fi;
10140 echo "$as_me:10140: result: $with_term_driver" >&5
10141 echo "${ECHO_T}$with_term_driver" >&6
10142 if test "$with_term_driver" = yes ; then
10143         cat >>confdefs.h <<\EOF
10144 #define USE_TERM_DRIVER 1
10145 EOF
10146
10147         if test "$with_sp_funcs" != yes ; then
10148                 { { echo "$as_me:10148: error: The term-driver option relies upon sp-funcs" >&5
10149 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10150    { (exit 1); exit 1; }; }
10151         fi
10152 fi
10153
10154 ###   use option --enable-const to turn on use of const beyond that in XSI.
10155 echo "$as_me:10155: checking for extended use of const keyword" >&5
10156 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10157
10158 # Check whether --enable-const or --disable-const was given.
10159 if test "${enable_const+set}" = set; then
10160   enableval="$enable_const"
10161   with_ext_const=$enableval
10162 else
10163   with_ext_const=no
10164 fi;
10165 echo "$as_me:10165: result: $with_ext_const" >&5
10166 echo "${ECHO_T}$with_ext_const" >&6
10167 NCURSES_CONST='/*nothing*/'
10168 if test "$with_ext_const" = yes ; then
10169         NCURSES_CONST=const
10170 fi
10171
10172 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10173 echo "$as_me:10173: checking if you want to use extended colors" >&5
10174 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10175
10176 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10177 if test "${enable_ext_colors+set}" = set; then
10178   enableval="$enable_ext_colors"
10179   with_ext_colors=$enableval
10180 else
10181   with_ext_colors=no
10182 fi;
10183 echo "$as_me:10183: result: $with_ext_colors" >&5
10184 echo "${ECHO_T}$with_ext_colors" >&6
10185 NCURSES_EXT_COLORS=0
10186 if test "$with_ext_colors" = yes ; then
10187         if test "$with_widec" != yes ; then
10188                 { { echo "$as_me:10188: error: This option applies only to wide-character library" >&5
10189 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10190    { (exit 1); exit 1; }; }
10191         else
10192                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10193
10194 if test "${with_abi_version+set}" != set; then
10195         case $cf_cv_rel_version in
10196         5.*)
10197                 cf_cv_rel_version=6.0
10198                 cf_cv_abi_version=6
10199                 { echo "$as_me:10199: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10200 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10201                 ;;
10202         esac
10203 fi
10204
10205         fi
10206         NCURSES_EXT_COLORS=1
10207         cat >>confdefs.h <<\EOF
10208 #define NCURSES_EXT_COLORS 1
10209 EOF
10210
10211 fi
10212
10213 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10214 echo "$as_me:10214: checking if you want to use extended mouse encoding" >&5
10215 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10216
10217 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10218 if test "${enable_ext_mouse+set}" = set; then
10219   enableval="$enable_ext_mouse"
10220   with_ext_mouse=$enableval
10221 else
10222   with_ext_mouse=no
10223 fi;
10224 echo "$as_me:10224: result: $with_ext_mouse" >&5
10225 echo "${ECHO_T}$with_ext_mouse" >&6
10226 NCURSES_MOUSE_VERSION=1
10227 if test "$with_ext_mouse" = yes ; then
10228         NCURSES_MOUSE_VERSION=2
10229
10230 if test "${with_abi_version+set}" != set; then
10231         case $cf_cv_rel_version in
10232         5.*)
10233                 cf_cv_rel_version=6.0
10234                 cf_cv_abi_version=6
10235                 { echo "$as_me:10235: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10236 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10237                 ;;
10238         esac
10239 fi
10240
10241 fi
10242
10243 echo "$as_me:10243: checking if you want \$NCURSES_NO_PADDING code" >&5
10244 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10245
10246 # Check whether --enable-no-padding or --disable-no-padding was given.
10247 if test "${enable_no_padding+set}" = set; then
10248   enableval="$enable_no_padding"
10249   with_no_padding=$enableval
10250 else
10251   with_no_padding=$with_ext_funcs
10252 fi;
10253 echo "$as_me:10253: result: $with_no_padding" >&5
10254 echo "${ECHO_T}$with_no_padding" >&6
10255 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10256 #define NCURSES_NO_PADDING 1
10257 EOF
10258
10259 echo "$as_me:10259: checking for ANSI C header files" >&5
10260 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10261 if test "${ac_cv_header_stdc+set}" = set; then
10262   echo $ECHO_N "(cached) $ECHO_C" >&6
10263 else
10264   cat >conftest.$ac_ext <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267 #include <stdlib.h>
10268 #include <stdarg.h>
10269 #include <string.h>
10270 #include <float.h>
10271
10272 _ACEOF
10273 if { (eval echo "$as_me:10273: \"$ac_cpp conftest.$ac_ext\"") >&5
10274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10275   ac_status=$?
10276   egrep -v '^ *\+' conftest.er1 >conftest.err
10277   rm -f conftest.er1
10278   cat conftest.err >&5
10279   echo "$as_me:10279: \$? = $ac_status" >&5
10280   (exit $ac_status); } >/dev/null; then
10281   if test -s conftest.err; then
10282     ac_cpp_err=$ac_c_preproc_warn_flag
10283   else
10284     ac_cpp_err=
10285   fi
10286 else
10287   ac_cpp_err=yes
10288 fi
10289 if test -z "$ac_cpp_err"; then
10290   ac_cv_header_stdc=yes
10291 else
10292   echo "$as_me: failed program was:" >&5
10293   cat conftest.$ac_ext >&5
10294   ac_cv_header_stdc=no
10295 fi
10296 rm -f conftest.err conftest.$ac_ext
10297
10298 if test $ac_cv_header_stdc = yes; then
10299   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10300   cat >conftest.$ac_ext <<_ACEOF
10301 #line 10301 "configure"
10302 #include "confdefs.h"
10303 #include <string.h>
10304
10305 _ACEOF
10306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10307   egrep "memchr" >/dev/null 2>&1; then
10308   :
10309 else
10310   ac_cv_header_stdc=no
10311 fi
10312 rm -rf conftest*
10313
10314 fi
10315
10316 if test $ac_cv_header_stdc = yes; then
10317   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10318   cat >conftest.$ac_ext <<_ACEOF
10319 #line 10319 "configure"
10320 #include "confdefs.h"
10321 #include <stdlib.h>
10322
10323 _ACEOF
10324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10325   egrep "free" >/dev/null 2>&1; then
10326   :
10327 else
10328   ac_cv_header_stdc=no
10329 fi
10330 rm -rf conftest*
10331
10332 fi
10333
10334 if test $ac_cv_header_stdc = yes; then
10335   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10336   if test "$cross_compiling" = yes; then
10337   :
10338 else
10339   cat >conftest.$ac_ext <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342 #include <ctype.h>
10343 #if ((' ' & 0x0FF) == 0x020)
10344 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10345 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10346 #else
10347 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10348                      || ('j' <= (c) && (c) <= 'r') \
10349                      || ('s' <= (c) && (c) <= 'z'))
10350 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10351 #endif
10352
10353 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10354 int
10355 main ()
10356 {
10357   int i;
10358   for (i = 0; i < 256; i++)
10359     if (XOR (islower (i), ISLOWER (i))
10360         || toupper (i) != TOUPPER (i))
10361       $ac_main_return(2);
10362   $ac_main_return (0);
10363 }
10364 _ACEOF
10365 rm -f conftest$ac_exeext
10366 if { (eval echo "$as_me:10366: \"$ac_link\"") >&5
10367   (eval $ac_link) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit $ac_status); }; }; then
10376   :
10377 else
10378   echo "$as_me: program exited with status $ac_status" >&5
10379 echo "$as_me: failed program was:" >&5
10380 cat conftest.$ac_ext >&5
10381 ac_cv_header_stdc=no
10382 fi
10383 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10384 fi
10385 fi
10386 fi
10387 echo "$as_me:10387: result: $ac_cv_header_stdc" >&5
10388 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10389 if test $ac_cv_header_stdc = yes; then
10390
10391 cat >>confdefs.h <<\EOF
10392 #define STDC_HEADERS 1
10393 EOF
10394
10395 fi
10396
10397 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10398
10399 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10400                   inttypes.h stdint.h unistd.h
10401 do
10402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10403 echo "$as_me:10403: checking for $ac_header" >&5
10404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10406   echo $ECHO_N "(cached) $ECHO_C" >&6
10407 else
10408   cat >conftest.$ac_ext <<_ACEOF
10409 #line 10409 "configure"
10410 #include "confdefs.h"
10411 $ac_includes_default
10412 #include <$ac_header>
10413 _ACEOF
10414 rm -f conftest.$ac_objext
10415 if { (eval echo "$as_me:10415: \"$ac_compile\"") >&5
10416   (eval $ac_compile) 2>&5
10417   ac_status=$?
10418   echo "$as_me:10418: \$? = $ac_status" >&5
10419   (exit $ac_status); } &&
10420          { ac_try='test -s conftest.$ac_objext'
10421   { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422   (eval $ac_try) 2>&5
10423   ac_status=$?
10424   echo "$as_me:10424: \$? = $ac_status" >&5
10425   (exit $ac_status); }; }; then
10426   eval "$as_ac_Header=yes"
10427 else
10428   echo "$as_me: failed program was:" >&5
10429 cat conftest.$ac_ext >&5
10430 eval "$as_ac_Header=no"
10431 fi
10432 rm -f conftest.$ac_objext conftest.$ac_ext
10433 fi
10434 echo "$as_me:10434: result: `eval echo '${'$as_ac_Header'}'`" >&5
10435 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10436 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10437   cat >>confdefs.h <<EOF
10438 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10439 EOF
10440
10441 fi
10442 done
10443
10444 echo "$as_me:10444: checking for signed char" >&5
10445 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10446 if test "${ac_cv_type_signed_char+set}" = set; then
10447   echo $ECHO_N "(cached) $ECHO_C" >&6
10448 else
10449   cat >conftest.$ac_ext <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 $ac_includes_default
10453 int
10454 main ()
10455 {
10456 if ((signed char *) 0)
10457   return 0;
10458 if (sizeof (signed char))
10459   return 0;
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 rm -f conftest.$ac_objext
10465 if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
10466   (eval $ac_compile) 2>&5
10467   ac_status=$?
10468   echo "$as_me:10468: \$? = $ac_status" >&5
10469   (exit $ac_status); } &&
10470          { ac_try='test -s conftest.$ac_objext'
10471   { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472   (eval $ac_try) 2>&5
10473   ac_status=$?
10474   echo "$as_me:10474: \$? = $ac_status" >&5
10475   (exit $ac_status); }; }; then
10476   ac_cv_type_signed_char=yes
10477 else
10478   echo "$as_me: failed program was:" >&5
10479 cat conftest.$ac_ext >&5
10480 ac_cv_type_signed_char=no
10481 fi
10482 rm -f conftest.$ac_objext conftest.$ac_ext
10483 fi
10484 echo "$as_me:10484: result: $ac_cv_type_signed_char" >&5
10485 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10486
10487 echo "$as_me:10487: checking size of signed char" >&5
10488 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10489 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10490   echo $ECHO_N "(cached) $ECHO_C" >&6
10491 else
10492   if test "$ac_cv_type_signed_char" = yes; then
10493   if test "$cross_compiling" = yes; then
10494   # Depending upon the size, compute the lo and hi bounds.
10495 cat >conftest.$ac_ext <<_ACEOF
10496 #line 10496 "configure"
10497 #include "confdefs.h"
10498 $ac_includes_default
10499 int
10500 main ()
10501 {
10502 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 rm -f conftest.$ac_objext
10508 if { (eval echo "$as_me:10508: \"$ac_compile\"") >&5
10509   (eval $ac_compile) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit $ac_status); } &&
10513          { ac_try='test -s conftest.$ac_objext'
10514   { (eval echo "$as_me:10514: \"$ac_try\"") >&5
10515   (eval $ac_try) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit $ac_status); }; }; then
10519   ac_lo=0 ac_mid=0
10520   while :; do
10521     cat >conftest.$ac_ext <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524 $ac_includes_default
10525 int
10526 main ()
10527 {
10528 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 rm -f conftest.$ac_objext
10534 if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
10535   (eval $ac_compile) 2>&5
10536   ac_status=$?
10537   echo "$as_me:10537: \$? = $ac_status" >&5
10538   (exit $ac_status); } &&
10539          { ac_try='test -s conftest.$ac_objext'
10540   { (eval echo "$as_me:10540: \"$ac_try\"") >&5
10541   (eval $ac_try) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); }; }; then
10545   ac_hi=$ac_mid; break
10546 else
10547   echo "$as_me: failed program was:" >&5
10548 cat conftest.$ac_ext >&5
10549 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10550 fi
10551 rm -f conftest.$ac_objext conftest.$ac_ext
10552   done
10553 else
10554   echo "$as_me: failed program was:" >&5
10555 cat conftest.$ac_ext >&5
10556 ac_hi=-1 ac_mid=-1
10557   while :; do
10558     cat >conftest.$ac_ext <<_ACEOF
10559 #line 10559 "configure"
10560 #include "confdefs.h"
10561 $ac_includes_default
10562 int
10563 main ()
10564 {
10565 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10566   ;
10567   return 0;
10568 }
10569 _ACEOF
10570 rm -f conftest.$ac_objext
10571 if { (eval echo "$as_me:10571: \"$ac_compile\"") >&5
10572   (eval $ac_compile) 2>&5
10573   ac_status=$?
10574   echo "$as_me:10574: \$? = $ac_status" >&5
10575   (exit $ac_status); } &&
10576          { ac_try='test -s conftest.$ac_objext'
10577   { (eval echo "$as_me:10577: \"$ac_try\"") >&5
10578   (eval $ac_try) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); }; }; then
10582   ac_lo=$ac_mid; break
10583 else
10584   echo "$as_me: failed program was:" >&5
10585 cat conftest.$ac_ext >&5
10586 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10587 fi
10588 rm -f conftest.$ac_objext conftest.$ac_ext
10589   done
10590 fi
10591 rm -f conftest.$ac_objext conftest.$ac_ext
10592 # Binary search between lo and hi bounds.
10593 while test "x$ac_lo" != "x$ac_hi"; do
10594   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10595   cat >conftest.$ac_ext <<_ACEOF
10596 #line 10596 "configure"
10597 #include "confdefs.h"
10598 $ac_includes_default
10599 int
10600 main ()
10601 {
10602 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10603   ;
10604   return 0;
10605 }
10606 _ACEOF
10607 rm -f conftest.$ac_objext
10608 if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
10609   (eval $ac_compile) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); } &&
10613          { ac_try='test -s conftest.$ac_objext'
10614   { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615   (eval $ac_try) 2>&5
10616   ac_status=$?
10617   echo "$as_me:10617: \$? = $ac_status" >&5
10618   (exit $ac_status); }; }; then
10619   ac_hi=$ac_mid
10620 else
10621   echo "$as_me: failed program was:" >&5
10622 cat conftest.$ac_ext >&5
10623 ac_lo=`expr $ac_mid + 1`
10624 fi
10625 rm -f conftest.$ac_objext conftest.$ac_ext
10626 done
10627 ac_cv_sizeof_signed_char=$ac_lo
10628 else
10629   if test "$cross_compiling" = yes; then
10630   { { echo "$as_me:10630: error: cannot run test program while cross compiling" >&5
10631 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10632    { (exit 1); exit 1; }; }
10633 else
10634   cat >conftest.$ac_ext <<_ACEOF
10635 #line 10635 "configure"
10636 #include "confdefs.h"
10637 $ac_includes_default
10638 int
10639 main ()
10640 {
10641 FILE *f = fopen ("conftest.val", "w");
10642 if (!f)
10643   $ac_main_return (1);
10644 fprintf (f, "%d", (sizeof (signed char)));
10645 fclose (f);
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f conftest$ac_exeext
10651 if { (eval echo "$as_me:10651: \"$ac_link\"") >&5
10652   (eval $ac_link) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10656   { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657   (eval $ac_try) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); }; }; then
10661   ac_cv_sizeof_signed_char=`cat conftest.val`
10662 else
10663   echo "$as_me: program exited with status $ac_status" >&5
10664 echo "$as_me: failed program was:" >&5
10665 cat conftest.$ac_ext >&5
10666 fi
10667 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10668 fi
10669 fi
10670 rm -f conftest.val
10671 else
10672   ac_cv_sizeof_signed_char=0
10673 fi
10674 fi
10675 echo "$as_me:10675: result: $ac_cv_sizeof_signed_char" >&5
10676 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10677 cat >>confdefs.h <<EOF
10678 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10679 EOF
10680
10681 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10682         NCURSES_SBOOL="signed char"
10683 else
10684         NCURSES_SBOOL="char"
10685 fi
10686 echo "$as_me:10686: checking if you want to use signed Boolean array in term.h" >&5
10687 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10688
10689 # Check whether --enable-signed-char or --disable-signed-char was given.
10690 if test "${enable_signed_char+set}" = set; then
10691   enableval="$enable_signed_char"
10692   with_signed_char=$enableval
10693 else
10694   with_signed_char=no
10695 fi;
10696 echo "$as_me:10696: result: $with_signed_char" >&5
10697 echo "${ECHO_T}$with_signed_char" >&6
10698 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10699
10700 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10701 echo "$as_me:10701: checking if you want SIGWINCH handler" >&5
10702 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10703
10704 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10705 if test "${enable_sigwinch+set}" = set; then
10706   enableval="$enable_sigwinch"
10707   with_sigwinch=$enableval
10708 else
10709   with_sigwinch=$with_ext_funcs
10710 fi;
10711 echo "$as_me:10711: result: $with_sigwinch" >&5
10712 echo "${ECHO_T}$with_sigwinch" >&6
10713 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10714 #define USE_SIGWINCH 1
10715 EOF
10716
10717 ###   use option --enable-tcap-names to allow user to define new capabilities
10718 echo "$as_me:10718: checking if you want user-definable terminal capabilities like termcap" >&5
10719 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10720
10721 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10722 if test "${enable_tcap_names+set}" = set; then
10723   enableval="$enable_tcap_names"
10724   with_tcap_names=$enableval
10725 else
10726   with_tcap_names=$with_ext_funcs
10727 fi;
10728 echo "$as_me:10728: result: $with_tcap_names" >&5
10729 echo "${ECHO_T}$with_tcap_names" >&6
10730 NCURSES_XNAMES=0
10731 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10732
10733 ###############################################################################
10734 # These options are relatively safe to experiment with.
10735
10736 echo "$as_me:10736: checking if you want all development code" >&5
10737 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10738
10739 # Check whether --with-develop or --without-develop was given.
10740 if test "${with_develop+set}" = set; then
10741   withval="$with_develop"
10742   with_develop=$withval
10743 else
10744   with_develop=no
10745 fi;
10746 echo "$as_me:10746: result: $with_develop" >&5
10747 echo "${ECHO_T}$with_develop" >&6
10748
10749 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10750 echo "$as_me:10750: checking if you want hard-tabs code" >&5
10751 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10752
10753 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10754 if test "${enable_hard_tabs+set}" = set; then
10755   enableval="$enable_hard_tabs"
10756
10757 else
10758   enable_hard_tabs=$with_develop
10759 fi;
10760 echo "$as_me:10760: result: $enable_hard_tabs" >&5
10761 echo "${ECHO_T}$enable_hard_tabs" >&6
10762 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10763 #define USE_HARD_TABS 1
10764 EOF
10765
10766 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10767 echo "$as_me:10767: checking if you want limited support for xmc" >&5
10768 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10769
10770 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10771 if test "${enable_xmc_glitch+set}" = set; then
10772   enableval="$enable_xmc_glitch"
10773
10774 else
10775   enable_xmc_glitch=$with_develop
10776 fi;
10777 echo "$as_me:10777: result: $enable_xmc_glitch" >&5
10778 echo "${ECHO_T}$enable_xmc_glitch" >&6
10779 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10780 #define USE_XMC_SUPPORT 1
10781 EOF
10782
10783 ###############################################################################
10784 # These are just experimental, probably should not be in a package:
10785
10786 echo "$as_me:10786: checking if you do not want to assume colors are white-on-black" >&5
10787 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10788
10789 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10790 if test "${enable_assumed_color+set}" = set; then
10791   enableval="$enable_assumed_color"
10792   with_assumed_color=$enableval
10793 else
10794   with_assumed_color=yes
10795 fi;
10796 echo "$as_me:10796: result: $with_assumed_color" >&5
10797 echo "${ECHO_T}$with_assumed_color" >&6
10798 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10799 #define USE_ASSUMED_COLOR 1
10800 EOF
10801
10802 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10803 echo "$as_me:10803: checking if you want hashmap scrolling-optimization code" >&5
10804 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10805
10806 # Check whether --enable-hashmap or --disable-hashmap was given.
10807 if test "${enable_hashmap+set}" = set; then
10808   enableval="$enable_hashmap"
10809   with_hashmap=$enableval
10810 else
10811   with_hashmap=yes
10812 fi;
10813 echo "$as_me:10813: result: $with_hashmap" >&5
10814 echo "${ECHO_T}$with_hashmap" >&6
10815 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10816 #define USE_HASHMAP 1
10817 EOF
10818
10819 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10820 echo "$as_me:10820: checking if you want colorfgbg code" >&5
10821 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10822
10823 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10824 if test "${enable_colorfgbg+set}" = set; then
10825   enableval="$enable_colorfgbg"
10826   with_colorfgbg=$enableval
10827 else
10828   with_colorfgbg=no
10829 fi;
10830 echo "$as_me:10830: result: $with_colorfgbg" >&5
10831 echo "${ECHO_T}$with_colorfgbg" >&6
10832 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10833 #define USE_COLORFGBG 1
10834 EOF
10835
10836 ###   use option --enable-interop to turn on use of bindings used for interop
10837 echo "$as_me:10837: checking if you want interop bindings" >&5
10838 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10839
10840 # Check whether --enable-interop or --disable-interop was given.
10841 if test "${enable_interop+set}" = set; then
10842   enableval="$enable_interop"
10843   with_exp_interop=$enableval
10844 else
10845   with_exp_interop=no
10846 fi;
10847 echo "$as_me:10847: result: $with_exp_interop" >&5
10848 echo "${ECHO_T}$with_exp_interop" >&6
10849
10850 NCURSES_INTEROP_FUNCS=0
10851 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10852
10853 # This is still experimental (20080329), but should ultimately be moved to
10854 # the script-block --with-normal, etc.
10855
10856 echo "$as_me:10856: checking if you want to link with the pthread library" >&5
10857 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10858
10859 # Check whether --with-pthread or --without-pthread was given.
10860 if test "${with_pthread+set}" = set; then
10861   withval="$with_pthread"
10862   with_pthread=$withval
10863 else
10864   with_pthread=no
10865 fi;
10866 echo "$as_me:10866: result: $with_pthread" >&5
10867 echo "${ECHO_T}$with_pthread" >&6
10868
10869 if test "$with_pthread" != no ; then
10870     echo "$as_me:10870: checking for pthread.h" >&5
10871 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10872 if test "${ac_cv_header_pthread_h+set}" = set; then
10873   echo $ECHO_N "(cached) $ECHO_C" >&6
10874 else
10875   cat >conftest.$ac_ext <<_ACEOF
10876 #line 10876 "configure"
10877 #include "confdefs.h"
10878 #include <pthread.h>
10879 _ACEOF
10880 if { (eval echo "$as_me:10880: \"$ac_cpp conftest.$ac_ext\"") >&5
10881   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10882   ac_status=$?
10883   egrep -v '^ *\+' conftest.er1 >conftest.err
10884   rm -f conftest.er1
10885   cat conftest.err >&5
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit $ac_status); } >/dev/null; then
10888   if test -s conftest.err; then
10889     ac_cpp_err=$ac_c_preproc_warn_flag
10890   else
10891     ac_cpp_err=
10892   fi
10893 else
10894   ac_cpp_err=yes
10895 fi
10896 if test -z "$ac_cpp_err"; then
10897   ac_cv_header_pthread_h=yes
10898 else
10899   echo "$as_me: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   ac_cv_header_pthread_h=no
10902 fi
10903 rm -f conftest.err conftest.$ac_ext
10904 fi
10905 echo "$as_me:10905: result: $ac_cv_header_pthread_h" >&5
10906 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10907 if test $ac_cv_header_pthread_h = yes; then
10908
10909         cat >>confdefs.h <<\EOF
10910 #define HAVE_PTHREADS_H 1
10911 EOF
10912
10913         echo "$as_me:10913: checking if we can link with the pthread library" >&5
10914 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10915         cf_save_LIBS="$LIBS"
10916         LIBS="-lpthread $LIBS"
10917         cat >conftest.$ac_ext <<_ACEOF
10918 #line 10918 "configure"
10919 #include "confdefs.h"
10920
10921 #include <pthread.h>
10922
10923 int
10924 main ()
10925 {
10926
10927         int rc = pthread_create(0,0,0,0);
10928
10929   ;
10930   return 0;
10931 }
10932 _ACEOF
10933 rm -f conftest.$ac_objext conftest$ac_exeext
10934 if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
10935   (eval $ac_link) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); } &&
10939          { ac_try='test -s conftest$ac_exeext'
10940   { (eval echo "$as_me:10940: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); }; }; then
10945   with_pthread=yes
10946 else
10947   echo "$as_me: failed program was:" >&5
10948 cat conftest.$ac_ext >&5
10949 with_pthread=no
10950 fi
10951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10952         LIBS="$cf_save_LIBS"
10953         echo "$as_me:10953: result: $with_pthread" >&5
10954 echo "${ECHO_T}$with_pthread" >&6
10955
10956         if test "$with_pthread" = yes ; then
10957             LIBS="-lpthread $LIBS"
10958             cat >>confdefs.h <<\EOF
10959 #define HAVE_LIBPTHREADS 1
10960 EOF
10961
10962         else
10963             { { echo "$as_me:10963: error: Cannot link with pthread library" >&5
10964 echo "$as_me: error: Cannot link with pthread library" >&2;}
10965    { (exit 1); exit 1; }; }
10966         fi
10967
10968 fi
10969
10970 fi
10971
10972 if test "x$with_pthread" != xno; then
10973         echo "$as_me:10973: checking for pthread_kill" >&5
10974 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
10975 if test "${ac_cv_func_pthread_kill+set}" = set; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978   cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981 /* System header to define __stub macros and hopefully few prototypes,
10982     which can conflict with char pthread_kill (); below.  */
10983 #include <assert.h>
10984 /* Override any gcc2 internal prototype to avoid an error.  */
10985 #ifdef __cplusplus
10986 extern "C"
10987 #endif
10988 /* We use char because int might match the return type of a gcc2
10989    builtin and then its argument prototype would still apply.  */
10990 char pthread_kill ();
10991 char (*f) ();
10992
10993 int
10994 main ()
10995 {
10996 /* The GNU C library defines this for functions which it implements
10997     to always fail with ENOSYS.  Some functions are actually named
10998     something starting with __ and the normal name is an alias.  */
10999 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11000 choke me
11001 #else
11002 f = pthread_kill;
11003 #endif
11004
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f conftest.$ac_objext conftest$ac_exeext
11010 if { (eval echo "$as_me:11010: \"$ac_link\"") >&5
11011   (eval $ac_link) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit $ac_status); } &&
11015          { ac_try='test -s conftest$ac_exeext'
11016   { (eval echo "$as_me:11016: \"$ac_try\"") >&5
11017   (eval $ac_try) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit $ac_status); }; }; then
11021   ac_cv_func_pthread_kill=yes
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11025 ac_cv_func_pthread_kill=no
11026 fi
11027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11028 fi
11029 echo "$as_me:11029: result: $ac_cv_func_pthread_kill" >&5
11030 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11031 if test $ac_cv_func_pthread_kill = yes; then
11032
11033                 echo "$as_me:11033: checking if you want to allow EINTR in wgetch with pthreads" >&5
11034 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11035
11036 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11037 if test "${enable_pthreads_eintr+set}" = set; then
11038   enableval="$enable_pthreads_eintr"
11039   use_pthreads_eintr=$enableval
11040 else
11041   use_pthreads_eintr=no
11042 fi;
11043                 echo "$as_me:11043: result: $use_pthreads_eintr" >&5
11044 echo "${ECHO_T}$use_pthreads_eintr" >&6
11045                 if test $use_pthreads_eintr = yes ; then
11046                         cat >>confdefs.h <<\EOF
11047 #define USE_PTHREADS_EINTR 1
11048 EOF
11049
11050                 fi
11051 fi
11052
11053         echo "$as_me:11053: checking if you want to use weak-symbols for pthreads" >&5
11054 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11055
11056 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11057 if test "${enable_weak_symbols+set}" = set; then
11058   enableval="$enable_weak_symbols"
11059   use_weak_symbols=$enableval
11060 else
11061   use_weak_symbols=no
11062 fi;
11063         echo "$as_me:11063: result: $use_weak_symbols" >&5
11064 echo "${ECHO_T}$use_weak_symbols" >&6
11065         if test "$use_weak_symbols" = yes ; then
11066
11067 echo "$as_me:11067: checking if $CC supports weak symbols" >&5
11068 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11069 if test "${cf_cv_weak_symbols+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072
11073 cat >conftest.$ac_ext <<_ACEOF
11074 #line 11074 "configure"
11075 #include "confdefs.h"
11076
11077 #include <stdio.h>
11078 int
11079 main ()
11080 {
11081
11082 #if defined(__GNUC__)
11083 #  if defined __USE_ISOC99
11084 #    define _cat_pragma(exp)    _Pragma(#exp)
11085 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11086 #  else
11087 #    define _weak_pragma(exp)
11088 #  endif
11089 #  define _declare(name)        __extension__ extern __typeof__(name) name
11090 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11091 #endif
11092
11093 weak_symbol(fopen);
11094
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 rm -f conftest.$ac_objext
11100 if { (eval echo "$as_me:11100: \"$ac_compile\"") >&5
11101   (eval $ac_compile) 2>&5
11102   ac_status=$?
11103   echo "$as_me:11103: \$? = $ac_status" >&5
11104   (exit $ac_status); } &&
11105          { ac_try='test -s conftest.$ac_objext'
11106   { (eval echo "$as_me:11106: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   cf_cv_weak_symbols=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115 cf_cv_weak_symbols=no
11116 fi
11117 rm -f conftest.$ac_objext conftest.$ac_ext
11118
11119 fi
11120 echo "$as_me:11120: result: $cf_cv_weak_symbols" >&5
11121 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11122
11123         else
11124                 cf_cv_weak_symbols=no
11125         fi
11126
11127         if test $cf_cv_weak_symbols = yes ; then
11128                 cat >>confdefs.h <<\EOF
11129 #define USE_WEAK_SYMBOLS 1
11130 EOF
11131
11132         fi
11133 fi
11134
11135 PTHREAD=
11136 if test "$with_pthread" = "yes" ; then
11137     cat >>confdefs.h <<\EOF
11138 #define USE_PTHREADS 1
11139 EOF
11140
11141     enable_reentrant=yes
11142     if test $cf_cv_weak_symbols = yes ; then
11143         PTHREAD=-lpthread
11144     fi
11145 fi
11146
11147 # Reentrant code has to be opaque; there's little advantage to making ncurses
11148 # opaque outside of that, so there is no --enable-opaque option.  We can use
11149 # this option without --with-pthreads, but this will be always set for
11150 # pthreads.
11151 echo "$as_me:11151: checking if you want experimental reentrant code" >&5
11152 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11153
11154 # Check whether --enable-reentrant or --disable-reentrant was given.
11155 if test "${enable_reentrant+set}" = set; then
11156   enableval="$enable_reentrant"
11157   with_reentrant=$enableval
11158 else
11159   with_reentrant=no
11160 fi;
11161 echo "$as_me:11161: result: $with_reentrant" >&5
11162 echo "${ECHO_T}$with_reentrant" >&6
11163 if test "$with_reentrant" = yes ; then
11164         cf_cv_enable_reentrant=1
11165         cf_cv_enable_opaque="NCURSES_INTERNALS"
11166         NCURSES_OPAQUE=1
11167         NCURSES_SIZE_T=int
11168         if test $cf_cv_weak_symbols = yes ; then
11169
11170 # remove pthread library from $LIBS
11171 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11172
11173                 TEST_LIBS="-lpthread $TEST_LIBS"
11174                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11175         else
11176                 LIB_SUFFIX="t${LIB_SUFFIX}"
11177         fi
11178         cat >>confdefs.h <<\EOF
11179 #define USE_REENTRANT 1
11180 EOF
11181
11182 if test "${with_abi_version+set}" != set; then
11183         case $cf_cv_rel_version in
11184         5.*)
11185                 cf_cv_rel_version=6.0
11186                 cf_cv_abi_version=6
11187                 { echo "$as_me:11187: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11188 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11189                 ;;
11190         esac
11191 fi
11192
11193 else
11194         cf_cv_enable_reentrant=0
11195         cf_cv_enable_opaque="NCURSES_OPAQUE"
11196         NCURSES_OPAQUE=0
11197         NCURSES_SIZE_T=short
11198 fi
11199
11200 ### Allow using a different wrap-prefix
11201 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11202         echo "$as_me:11202: checking for prefix used to wrap public variables" >&5
11203 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11204
11205 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11206 if test "${with_wrap_prefix+set}" = set; then
11207   withval="$with_wrap_prefix"
11208   NCURSES_WRAP_PREFIX=$withval
11209 else
11210   NCURSES_WRAP_PREFIX=_nc_
11211 fi;
11212         echo "$as_me:11212: result: $NCURSES_WRAP_PREFIX" >&5
11213 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11214 else
11215         NCURSES_WRAP_PREFIX=_nc_
11216 fi
11217
11218 cat >>confdefs.h <<EOF
11219 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11220 EOF
11221
11222 echo "$as_me:11222: checking if you want experimental safe-sprintf code" >&5
11223 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11224
11225 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11226 if test "${enable_safe_sprintf+set}" = set; then
11227   enableval="$enable_safe_sprintf"
11228   with_safe_sprintf=$enableval
11229 else
11230   with_safe_sprintf=no
11231 fi;
11232 echo "$as_me:11232: result: $with_safe_sprintf" >&5
11233 echo "${ECHO_T}$with_safe_sprintf" >&6
11234 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11235 #define USE_SAFE_SPRINTF 1
11236 EOF
11237
11238 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11239 # when hashmap is used scroll hints are useless
11240 if test "$with_hashmap" = no ; then
11241 echo "$as_me:11241: checking if you want to experiment without scrolling-hints code" >&5
11242 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11243
11244 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11245 if test "${enable_scroll_hints+set}" = set; then
11246   enableval="$enable_scroll_hints"
11247   with_scroll_hints=$enableval
11248 else
11249   with_scroll_hints=yes
11250 fi;
11251 echo "$as_me:11251: result: $with_scroll_hints" >&5
11252 echo "${ECHO_T}$with_scroll_hints" >&6
11253 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11254 #define USE_SCROLL_HINTS 1
11255 EOF
11256
11257 fi
11258
11259 echo "$as_me:11259: checking if you want experimental wgetch-events code" >&5
11260 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11261
11262 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11263 if test "${enable_wgetch_events+set}" = set; then
11264   enableval="$enable_wgetch_events"
11265   with_wgetch_events=$enableval
11266 else
11267   with_wgetch_events=no
11268 fi;
11269 echo "$as_me:11269: result: $with_wgetch_events" >&5
11270 echo "${ECHO_T}$with_wgetch_events" >&6
11271 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11272 #define NCURSES_WGETCH_EVENTS 1
11273 EOF
11274
11275 ###############################################################################
11276
11277 ###     use option --disable-echo to suppress full display compiling commands
11278 echo "$as_me:11278: checking if you want to display full commands during build" >&5
11279 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11280
11281 # Check whether --enable-echo or --disable-echo was given.
11282 if test "${enable_echo+set}" = set; then
11283   enableval="$enable_echo"
11284   with_echo=$enableval
11285 else
11286   with_echo=yes
11287 fi;
11288 if test "$with_echo" = yes; then
11289         ECHO_LINK=
11290 else
11291         ECHO_LINK='@ echo linking $@ ... ;'
11292         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11293         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11294 fi
11295 echo "$as_me:11295: result: $with_echo" >&5
11296 echo "${ECHO_T}$with_echo" >&6
11297
11298 ###     use option --enable-warnings to turn on all gcc warnings
11299 echo "$as_me:11299: checking if you want to see compiler warnings" >&5
11300 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11301
11302 # Check whether --enable-warnings or --disable-warnings was given.
11303 if test "${enable_warnings+set}" = set; then
11304   enableval="$enable_warnings"
11305   with_warnings=$enableval
11306 fi;
11307 echo "$as_me:11307: result: $with_warnings" >&5
11308 echo "${ECHO_T}$with_warnings" >&6
11309
11310 if test "x$with_warnings" = "xyes"; then
11311
11312         ADAFLAGS="$ADAFLAGS -gnatg"
11313
11314 INTEL_COMPILER=no
11315
11316 if test "$GCC" = yes ; then
11317         case $host_os in
11318         linux*|gnu*)
11319                 echo "$as_me:11319: checking if this is really Intel C compiler" >&5
11320 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11321                 cf_save_CFLAGS="$CFLAGS"
11322                 CFLAGS="$CFLAGS -no-gcc"
11323                 cat >conftest.$ac_ext <<_ACEOF
11324 #line 11324 "configure"
11325 #include "confdefs.h"
11326
11327 int
11328 main ()
11329 {
11330
11331 #ifdef __INTEL_COMPILER
11332 #else
11333 make an error
11334 #endif
11335
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 rm -f conftest.$ac_objext
11341 if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
11342   (eval $ac_compile) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit $ac_status); } &&
11346          { ac_try='test -s conftest.$ac_objext'
11347   { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348   (eval $ac_try) 2>&5
11349   ac_status=$?
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit $ac_status); }; }; then
11352   INTEL_COMPILER=yes
11353 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11354
11355 else
11356   echo "$as_me: failed program was:" >&5
11357 cat conftest.$ac_ext >&5
11358 fi
11359 rm -f conftest.$ac_objext conftest.$ac_ext
11360                 CFLAGS="$cf_save_CFLAGS"
11361                 echo "$as_me:11361: result: $INTEL_COMPILER" >&5
11362 echo "${ECHO_T}$INTEL_COMPILER" >&6
11363                 ;;
11364         esac
11365 fi
11366
11367 cat > conftest.$ac_ext <<EOF
11368 #line 11368 "${as_me:-configure}"
11369 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11370 EOF
11371
11372 if test "$INTEL_COMPILER" = yes
11373 then
11374 # The "-wdXXX" options suppress warnings:
11375 # remark #1419: external declaration in primary source file
11376 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11377 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11378 # remark #193: zero used for undefined preprocessing identifier
11379 # remark #593: variable "curs_sb_left_arrow" was set but never used
11380 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11381 # remark #869: parameter "tw" was never referenced
11382 # remark #981: operands are evaluated in unspecified order
11383 # warning #279: controlling expression is constant
11384
11385         { echo "$as_me:11385: checking for $CC warning options..." >&5
11386 echo "$as_me: checking for $CC warning options..." >&6;}
11387         cf_save_CFLAGS="$CFLAGS"
11388         EXTRA_CFLAGS="-Wall"
11389         for cf_opt in \
11390                 wd1419 \
11391                 wd1683 \
11392                 wd1684 \
11393                 wd193 \
11394                 wd593 \
11395                 wd279 \
11396                 wd810 \
11397                 wd869 \
11398                 wd981
11399         do
11400                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11401                 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); }; then
11406                         test -n "$verbose" && echo "$as_me:11406: result: ... -$cf_opt" >&5
11407 echo "${ECHO_T}... -$cf_opt" >&6
11408                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11409                 fi
11410         done
11411         CFLAGS="$cf_save_CFLAGS"
11412
11413 elif test "$GCC" = yes
11414 then
11415         { echo "$as_me:11415: checking for $CC warning options..." >&5
11416 echo "$as_me: checking for $CC warning options..." >&6;}
11417         cf_save_CFLAGS="$CFLAGS"
11418         EXTRA_CFLAGS=
11419         cf_warn_CONST=""
11420         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11421         for cf_opt in W Wall \
11422                 Wbad-function-cast \
11423                 Wcast-align \
11424                 Wcast-qual \
11425                 Winline \
11426                 Wmissing-declarations \
11427                 Wmissing-prototypes \
11428                 Wnested-externs \
11429                 Wpointer-arith \
11430                 Wshadow \
11431                 Wstrict-prototypes \
11432                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11433         do
11434                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11435                 if { (eval echo "$as_me:11435: \"$ac_compile\"") >&5
11436   (eval $ac_compile) 2>&5
11437   ac_status=$?
11438   echo "$as_me:11438: \$? = $ac_status" >&5
11439   (exit $ac_status); }; then
11440                         test -n "$verbose" && echo "$as_me:11440: result: ... -$cf_opt" >&5
11441 echo "${ECHO_T}... -$cf_opt" >&6
11442                         case $cf_opt in #(vi
11443                         Wcast-qual) #(vi
11444                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11445                                 ;;
11446                         Winline) #(vi
11447                                 case $GCC_VERSION in
11448                                 [34].*)
11449                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11450
11451 echo "${as_me:-configure}:11451: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11452
11453                                         continue;;
11454                                 esac
11455                                 ;;
11456                         esac
11457                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11458                 fi
11459         done
11460         CFLAGS="$cf_save_CFLAGS"
11461 fi
11462 rm -rf conftest*
11463
11464         if test "$cf_with_cxx" = yes ; then
11465
11466 INTEL_CPLUSPLUS=no
11467
11468 if test "$GCC" = yes ; then
11469         case $host_os in
11470         linux*|gnu*)
11471                 echo "$as_me:11471: checking if this is really Intel C++ compiler" >&5
11472 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11473                 cf_save_CFLAGS="$CXXFLAGS"
11474                 CXXFLAGS="$CXXFLAGS -no-gcc"
11475                 cat >conftest.$ac_ext <<_ACEOF
11476 #line 11476 "configure"
11477 #include "confdefs.h"
11478
11479 int
11480 main ()
11481 {
11482
11483 #ifdef __INTEL_COMPILER
11484 #else
11485 make an error
11486 #endif
11487
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 rm -f conftest.$ac_objext
11493 if { (eval echo "$as_me:11493: \"$ac_compile\"") >&5
11494   (eval $ac_compile) 2>&5
11495   ac_status=$?
11496   echo "$as_me:11496: \$? = $ac_status" >&5
11497   (exit $ac_status); } &&
11498          { ac_try='test -s conftest.$ac_objext'
11499   { (eval echo "$as_me:11499: \"$ac_try\"") >&5
11500   (eval $ac_try) 2>&5
11501   ac_status=$?
11502   echo "$as_me:11502: \$? = $ac_status" >&5
11503   (exit $ac_status); }; }; then
11504   INTEL_CPLUSPLUS=yes
11505 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11506
11507 else
11508   echo "$as_me: failed program was:" >&5
11509 cat conftest.$ac_ext >&5
11510 fi
11511 rm -f conftest.$ac_objext conftest.$ac_ext
11512                 CXXFLAGS="$cf_save_CFLAGS"
11513                 echo "$as_me:11513: result: $INTEL_CPLUSPLUS" >&5
11514 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11515                 ;;
11516         esac
11517 fi
11518
11519 ac_ext=cc
11520 ac_cpp='$CXXCPP $CPPFLAGS'
11521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11522 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11524 ac_main_return=return
11525
11526 cat > conftest.$ac_ext <<EOF
11527 #line 11527 "configure"
11528 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11529 EOF
11530
11531 if test "$INTEL_CPLUSPLUS" = yes
11532 then
11533 # The "-wdXXX" options suppress warnings:
11534 # remark #1419: external declaration in primary source file
11535 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11536 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11537 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11538 # remark #193: zero used for undefined preprocessing identifier
11539 # remark #593: variable "curs_sb_left_arrow" was set but never used
11540 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11541 # remark #869: parameter "tw" was never referenced
11542 # remark #981: operands are evaluated in unspecified order
11543 # warning #269: invalid format string conversion
11544
11545         { echo "$as_me:11545: checking for $CC warning options..." >&5
11546 echo "$as_me: checking for $CC warning options..." >&6;}
11547         cf_save_CXXFLAGS="$CXXFLAGS"
11548         EXTRA_CXXFLAGS="-Wall"
11549         for cf_opt in \
11550                 wd1419 \
11551                 wd1682 \
11552                 wd1683 \
11553                 wd1684 \
11554                 wd193 \
11555                 wd279 \
11556                 wd593 \
11557                 wd810 \
11558                 wd869 \
11559                 wd981
11560         do
11561                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11562                 if { (eval echo "$as_me:11562: \"$ac_compile\"") >&5
11563   (eval $ac_compile) 2>&5
11564   ac_status=$?
11565   echo "$as_me:11565: \$? = $ac_status" >&5
11566   (exit $ac_status); }; then
11567                         test -n "$verbose" && echo "$as_me:11567: result: ... -$cf_opt" >&5
11568 echo "${ECHO_T}... -$cf_opt" >&6
11569                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11570                 fi
11571         done
11572         CXXFLAGS="$cf_save_CXXFLAGS"
11573
11574 elif test "$GXX" = yes
11575 then
11576         { echo "$as_me:11576: checking for $CXX warning options..." >&5
11577 echo "$as_me: checking for $CXX warning options..." >&6;}
11578         cf_save_CXXFLAGS="$CXXFLAGS"
11579         EXTRA_CXXFLAGS="-W -Wall"
11580         cf_gxx_extra_warnings=""
11581         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11582         case "$GCC_VERSION" in
11583         [1-2].*)
11584                 ;;
11585         *)
11586                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11587                 ;;
11588         esac
11589         for cf_opt in \
11590                 Wabi \
11591                 fabi-version=0 \
11592                 Woverloaded-virtual \
11593                 Wsign-promo \
11594                 Wsynth \
11595                 Wold-style-cast \
11596                 Wcast-align \
11597                 Wcast-qual \
11598                 Wmissing-prototypes \
11599                 Wpointer-arith \
11600                 Wshadow \
11601                 Wstrict-prototypes \
11602                 Wundef $cf_gxx_extra_warnings Wno-unused
11603         do
11604                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11605                 if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit $ac_status); }; then
11610                         test -n "$verbose" && echo "$as_me:11610: result: ... -$cf_opt" >&5
11611 echo "${ECHO_T}... -$cf_opt" >&6
11612                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11613                 else
11614                         test -n "$verbose" && echo "$as_me:11614: result: ... no -$cf_opt" >&5
11615 echo "${ECHO_T}... no -$cf_opt" >&6
11616                 fi
11617         done
11618         CXXFLAGS="$cf_save_CXXFLAGS"
11619 fi
11620
11621 rm -rf conftest*
11622 ac_ext=c
11623 ac_cpp='$CPP $CPPFLAGS'
11624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11627 ac_main_return=return
11628
11629         fi
11630 fi
11631
11632 if test "$GCC" = yes
11633 then
11634 cat > conftest.i <<EOF
11635 #ifndef GCC_PRINTF
11636 #define GCC_PRINTF 0
11637 #endif
11638 #ifndef GCC_SCANF
11639 #define GCC_SCANF 0
11640 #endif
11641 #ifndef GCC_NORETURN
11642 #define GCC_NORETURN /* nothing */
11643 #endif
11644 #ifndef GCC_UNUSED
11645 #define GCC_UNUSED /* nothing */
11646 #endif
11647 EOF
11648 if test "$GCC" = yes
11649 then
11650         { echo "$as_me:11650: checking for $CC __attribute__ directives..." >&5
11651 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11652 cat > conftest.$ac_ext <<EOF
11653 #line 11653 "${as_me:-configure}"
11654 #include "confdefs.h"
11655 #include "conftest.h"
11656 #include "conftest.i"
11657 #if     GCC_PRINTF
11658 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11659 #else
11660 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11661 #endif
11662 #if     GCC_SCANF
11663 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11664 #else
11665 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11666 #endif
11667 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11668 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11669 extern void foo(void) GCC_NORETURN;
11670 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11671 EOF
11672         cf_printf_attribute=no
11673         cf_scanf_attribute=no
11674         for cf_attribute in scanf printf unused noreturn
11675         do
11676
11677 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11678
11679                 cf_directive="__attribute__(($cf_attribute))"
11680                 echo "checking for $CC $cf_directive" 1>&5
11681
11682                 case $cf_attribute in #(vi
11683                 printf) #(vi
11684                         cf_printf_attribute=yes
11685                         cat >conftest.h <<EOF
11686 #define GCC_$cf_ATTRIBUTE 1
11687 EOF
11688                         ;;
11689                 scanf) #(vi
11690                         cf_scanf_attribute=yes
11691                         cat >conftest.h <<EOF
11692 #define GCC_$cf_ATTRIBUTE 1
11693 EOF
11694                         ;;
11695                 *) #(vi
11696                         cat >conftest.h <<EOF
11697 #define GCC_$cf_ATTRIBUTE $cf_directive
11698 EOF
11699                         ;;
11700                 esac
11701
11702                 if { (eval echo "$as_me:11702: \"$ac_compile\"") >&5
11703   (eval $ac_compile) 2>&5
11704   ac_status=$?
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); }; then
11707                         test -n "$verbose" && echo "$as_me:11707: result: ... $cf_attribute" >&5
11708 echo "${ECHO_T}... $cf_attribute" >&6
11709                         cat conftest.h >>confdefs.h
11710                         case $cf_attribute in #(vi
11711                         printf) #(vi
11712                                 if test "$cf_printf_attribute" = no ; then
11713                                         cat >>confdefs.h <<EOF
11714 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11715 EOF
11716                                 else
11717                                         cat >>confdefs.h <<EOF
11718 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11719 EOF
11720                                 fi
11721                                 ;;
11722                         scanf) #(vi
11723                                 if test "$cf_scanf_attribute" = no ; then
11724                                         cat >>confdefs.h <<EOF
11725 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11726 EOF
11727                                 else
11728                                         cat >>confdefs.h <<EOF
11729 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11730 EOF
11731                                 fi
11732                                 ;;
11733                         esac
11734                 fi
11735         done
11736 else
11737         fgrep define conftest.i >>confdefs.h
11738 fi
11739 rm -rf conftest*
11740 fi
11741
11742 ###     use option --enable-assertions to turn on generation of assertion code
11743 echo "$as_me:11743: checking if you want to enable runtime assertions" >&5
11744 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11745
11746 # Check whether --enable-assertions or --disable-assertions was given.
11747 if test "${enable_assertions+set}" = set; then
11748   enableval="$enable_assertions"
11749   with_assertions=$enableval
11750 else
11751   with_assertions=no
11752 fi;
11753 echo "$as_me:11753: result: $with_assertions" >&5
11754 echo "${ECHO_T}$with_assertions" >&6
11755 if test -n "$GCC"
11756 then
11757         if test "$with_assertions" = no
11758         then
11759                 cat >>confdefs.h <<\EOF
11760 #define NDEBUG 1
11761 EOF
11762
11763                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11764         else
11765
11766         ADAFLAGS="$ADAFLAGS -gnata"
11767
11768         fi
11769 fi
11770
11771 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11772
11773 echo "$as_me:11773: checking if you want to use dmalloc for testing" >&5
11774 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11775
11776 # Check whether --with-dmalloc or --without-dmalloc was given.
11777 if test "${with_dmalloc+set}" = set; then
11778   withval="$with_dmalloc"
11779   cat >>confdefs.h <<\EOF
11780 #define USE_DMALLOC 1
11781 EOF
11782
11783         : ${with_cflags:=-g}
11784         : ${with_no_leaks:=yes}
11785          with_dmalloc=yes
11786 else
11787   with_dmalloc=
11788 fi;
11789 echo "$as_me:11789: result: ${with_dmalloc:-no}" >&5
11790 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11791
11792 case .$with_cflags in #(vi
11793 .*-g*)
11794         case .$CFLAGS in #(vi
11795         .*-g*) #(vi
11796                 ;;
11797         *)
11798
11799 cf_fix_cppflags=no
11800 cf_new_cflags=
11801 cf_new_cppflags=
11802 cf_new_extra_cppflags=
11803
11804 for cf_add_cflags in -g
11805 do
11806 case $cf_fix_cppflags in
11807 no)
11808         case $cf_add_cflags in #(vi
11809         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11810                 case $cf_add_cflags in
11811                 -D*)
11812                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11813
11814                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11815                                 && test -z "${cf_tst_cflags}" \
11816                                 && cf_fix_cppflags=yes
11817
11818                         if test $cf_fix_cppflags = yes ; then
11819                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11820                                 continue
11821                         elif test "${cf_tst_cflags}" = "\"'" ; then
11822                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11823                                 continue
11824                         fi
11825                         ;;
11826                 esac
11827                 case "$CPPFLAGS" in
11828                 *$cf_add_cflags) #(vi
11829                         ;;
11830                 *) #(vi
11831                         case $cf_add_cflags in #(vi
11832                         -D*)
11833                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11834
11835 CPPFLAGS=`echo "$CPPFLAGS" | \
11836         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11837                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11838
11839                                 ;;
11840                         esac
11841                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11842                         ;;
11843                 esac
11844                 ;;
11845         *)
11846                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11847                 ;;
11848         esac
11849         ;;
11850 yes)
11851         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11852
11853         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11854
11855         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11856                 && test -z "${cf_tst_cflags}" \
11857                 && cf_fix_cppflags=no
11858         ;;
11859 esac
11860 done
11861
11862 if test -n "$cf_new_cflags" ; then
11863
11864         CFLAGS="$CFLAGS $cf_new_cflags"
11865 fi
11866
11867 if test -n "$cf_new_cppflags" ; then
11868
11869         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11870 fi
11871
11872 if test -n "$cf_new_extra_cppflags" ; then
11873
11874         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11875 fi
11876
11877                 ;;
11878         esac
11879         ;;
11880 esac
11881
11882 if test "$with_dmalloc" = yes ; then
11883         echo "$as_me:11883: checking for dmalloc.h" >&5
11884 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11885 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11886   echo $ECHO_N "(cached) $ECHO_C" >&6
11887 else
11888   cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891 #include <dmalloc.h>
11892 _ACEOF
11893 if { (eval echo "$as_me:11893: \"$ac_cpp conftest.$ac_ext\"") >&5
11894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11895   ac_status=$?
11896   egrep -v '^ *\+' conftest.er1 >conftest.err
11897   rm -f conftest.er1
11898   cat conftest.err >&5
11899   echo "$as_me:11899: \$? = $ac_status" >&5
11900   (exit $ac_status); } >/dev/null; then
11901   if test -s conftest.err; then
11902     ac_cpp_err=$ac_c_preproc_warn_flag
11903   else
11904     ac_cpp_err=
11905   fi
11906 else
11907   ac_cpp_err=yes
11908 fi
11909 if test -z "$ac_cpp_err"; then
11910   ac_cv_header_dmalloc_h=yes
11911 else
11912   echo "$as_me: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   ac_cv_header_dmalloc_h=no
11915 fi
11916 rm -f conftest.err conftest.$ac_ext
11917 fi
11918 echo "$as_me:11918: result: $ac_cv_header_dmalloc_h" >&5
11919 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11920 if test $ac_cv_header_dmalloc_h = yes; then
11921
11922 echo "$as_me:11922: checking for dmalloc_debug in -ldmalloc" >&5
11923 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11924 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927   ac_check_lib_save_LIBS=$LIBS
11928 LIBS="-ldmalloc  $LIBS"
11929 cat >conftest.$ac_ext <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932
11933 /* Override any gcc2 internal prototype to avoid an error.  */
11934 #ifdef __cplusplus
11935 extern "C"
11936 #endif
11937 /* We use char because int might match the return type of a gcc2
11938    builtin and then its argument prototype would still apply.  */
11939 char dmalloc_debug ();
11940 int
11941 main ()
11942 {
11943 dmalloc_debug ();
11944   ;
11945   return 0;
11946 }
11947 _ACEOF
11948 rm -f conftest.$ac_objext conftest$ac_exeext
11949 if { (eval echo "$as_me:11949: \"$ac_link\"") >&5
11950   (eval $ac_link) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); } &&
11954          { ac_try='test -s conftest$ac_exeext'
11955   { (eval echo "$as_me:11955: \"$ac_try\"") >&5
11956   (eval $ac_try) 2>&5
11957   ac_status=$?
11958   echo "$as_me:11958: \$? = $ac_status" >&5
11959   (exit $ac_status); }; }; then
11960   ac_cv_lib_dmalloc_dmalloc_debug=yes
11961 else
11962   echo "$as_me: failed program was:" >&5
11963 cat conftest.$ac_ext >&5
11964 ac_cv_lib_dmalloc_dmalloc_debug=no
11965 fi
11966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11967 LIBS=$ac_check_lib_save_LIBS
11968 fi
11969 echo "$as_me:11969: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11970 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11971 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11972   cat >>confdefs.h <<EOF
11973 #define HAVE_LIBDMALLOC 1
11974 EOF
11975
11976   LIBS="-ldmalloc $LIBS"
11977
11978 fi
11979
11980 fi
11981
11982 fi
11983
11984 echo "$as_me:11984: checking if you want to use dbmalloc for testing" >&5
11985 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11986
11987 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11988 if test "${with_dbmalloc+set}" = set; then
11989   withval="$with_dbmalloc"
11990   cat >>confdefs.h <<\EOF
11991 #define USE_DBMALLOC 1
11992 EOF
11993
11994         : ${with_cflags:=-g}
11995         : ${with_no_leaks:=yes}
11996          with_dbmalloc=yes
11997 else
11998   with_dbmalloc=
11999 fi;
12000 echo "$as_me:12000: result: ${with_dbmalloc:-no}" >&5
12001 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12002
12003 case .$with_cflags in #(vi
12004 .*-g*)
12005         case .$CFLAGS in #(vi
12006         .*-g*) #(vi
12007                 ;;
12008         *)
12009
12010 cf_fix_cppflags=no
12011 cf_new_cflags=
12012 cf_new_cppflags=
12013 cf_new_extra_cppflags=
12014
12015 for cf_add_cflags in -g
12016 do
12017 case $cf_fix_cppflags in
12018 no)
12019         case $cf_add_cflags in #(vi
12020         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12021                 case $cf_add_cflags in
12022                 -D*)
12023                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12024
12025                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12026                                 && test -z "${cf_tst_cflags}" \
12027                                 && cf_fix_cppflags=yes
12028
12029                         if test $cf_fix_cppflags = yes ; then
12030                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12031                                 continue
12032                         elif test "${cf_tst_cflags}" = "\"'" ; then
12033                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12034                                 continue
12035                         fi
12036                         ;;
12037                 esac
12038                 case "$CPPFLAGS" in
12039                 *$cf_add_cflags) #(vi
12040                         ;;
12041                 *) #(vi
12042                         case $cf_add_cflags in #(vi
12043                         -D*)
12044                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12045
12046 CPPFLAGS=`echo "$CPPFLAGS" | \
12047         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12048                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12049
12050                                 ;;
12051                         esac
12052                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12053                         ;;
12054                 esac
12055                 ;;
12056         *)
12057                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12058                 ;;
12059         esac
12060         ;;
12061 yes)
12062         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12063
12064         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12065
12066         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12067                 && test -z "${cf_tst_cflags}" \
12068                 && cf_fix_cppflags=no
12069         ;;
12070 esac
12071 done
12072
12073 if test -n "$cf_new_cflags" ; then
12074
12075         CFLAGS="$CFLAGS $cf_new_cflags"
12076 fi
12077
12078 if test -n "$cf_new_cppflags" ; then
12079
12080         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12081 fi
12082
12083 if test -n "$cf_new_extra_cppflags" ; then
12084
12085         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12086 fi
12087
12088                 ;;
12089         esac
12090         ;;
12091 esac
12092
12093 if test "$with_dbmalloc" = yes ; then
12094         echo "$as_me:12094: checking for dbmalloc.h" >&5
12095 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12096 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12097   echo $ECHO_N "(cached) $ECHO_C" >&6
12098 else
12099   cat >conftest.$ac_ext <<_ACEOF
12100 #line 12100 "configure"
12101 #include "confdefs.h"
12102 #include <dbmalloc.h>
12103 _ACEOF
12104 if { (eval echo "$as_me:12104: \"$ac_cpp conftest.$ac_ext\"") >&5
12105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12106   ac_status=$?
12107   egrep -v '^ *\+' conftest.er1 >conftest.err
12108   rm -f conftest.er1
12109   cat conftest.err >&5
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit $ac_status); } >/dev/null; then
12112   if test -s conftest.err; then
12113     ac_cpp_err=$ac_c_preproc_warn_flag
12114   else
12115     ac_cpp_err=
12116   fi
12117 else
12118   ac_cpp_err=yes
12119 fi
12120 if test -z "$ac_cpp_err"; then
12121   ac_cv_header_dbmalloc_h=yes
12122 else
12123   echo "$as_me: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   ac_cv_header_dbmalloc_h=no
12126 fi
12127 rm -f conftest.err conftest.$ac_ext
12128 fi
12129 echo "$as_me:12129: result: $ac_cv_header_dbmalloc_h" >&5
12130 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12131 if test $ac_cv_header_dbmalloc_h = yes; then
12132
12133 echo "$as_me:12133: checking for debug_malloc in -ldbmalloc" >&5
12134 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12135 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12136   echo $ECHO_N "(cached) $ECHO_C" >&6
12137 else
12138   ac_check_lib_save_LIBS=$LIBS
12139 LIBS="-ldbmalloc  $LIBS"
12140 cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143
12144 /* Override any gcc2 internal prototype to avoid an error.  */
12145 #ifdef __cplusplus
12146 extern "C"
12147 #endif
12148 /* We use char because int might match the return type of a gcc2
12149    builtin and then its argument prototype would still apply.  */
12150 char debug_malloc ();
12151 int
12152 main ()
12153 {
12154 debug_malloc ();
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 rm -f conftest.$ac_objext conftest$ac_exeext
12160 if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
12161   (eval $ac_link) 2>&5
12162   ac_status=$?
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit $ac_status); } &&
12165          { ac_try='test -s conftest$ac_exeext'
12166   { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171   ac_cv_lib_dbmalloc_debug_malloc=yes
12172 else
12173   echo "$as_me: failed program was:" >&5
12174 cat conftest.$ac_ext >&5
12175 ac_cv_lib_dbmalloc_debug_malloc=no
12176 fi
12177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12178 LIBS=$ac_check_lib_save_LIBS
12179 fi
12180 echo "$as_me:12180: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12181 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12182 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12183   cat >>confdefs.h <<EOF
12184 #define HAVE_LIBDBMALLOC 1
12185 EOF
12186
12187   LIBS="-ldbmalloc $LIBS"
12188
12189 fi
12190
12191 fi
12192
12193 fi
12194
12195 echo "$as_me:12195: checking if you want to use valgrind for testing" >&5
12196 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12197
12198 # Check whether --with-valgrind or --without-valgrind was given.
12199 if test "${with_valgrind+set}" = set; then
12200   withval="$with_valgrind"
12201   cat >>confdefs.h <<\EOF
12202 #define USE_VALGRIND 1
12203 EOF
12204
12205         : ${with_cflags:=-g}
12206         : ${with_no_leaks:=yes}
12207          with_valgrind=yes
12208 else
12209   with_valgrind=
12210 fi;
12211 echo "$as_me:12211: result: ${with_valgrind:-no}" >&5
12212 echo "${ECHO_T}${with_valgrind:-no}" >&6
12213
12214 case .$with_cflags in #(vi
12215 .*-g*)
12216         case .$CFLAGS in #(vi
12217         .*-g*) #(vi
12218                 ;;
12219         *)
12220
12221 cf_fix_cppflags=no
12222 cf_new_cflags=
12223 cf_new_cppflags=
12224 cf_new_extra_cppflags=
12225
12226 for cf_add_cflags in -g
12227 do
12228 case $cf_fix_cppflags in
12229 no)
12230         case $cf_add_cflags in #(vi
12231         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12232                 case $cf_add_cflags in
12233                 -D*)
12234                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12235
12236                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12237                                 && test -z "${cf_tst_cflags}" \
12238                                 && cf_fix_cppflags=yes
12239
12240                         if test $cf_fix_cppflags = yes ; then
12241                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12242                                 continue
12243                         elif test "${cf_tst_cflags}" = "\"'" ; then
12244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12245                                 continue
12246                         fi
12247                         ;;
12248                 esac
12249                 case "$CPPFLAGS" in
12250                 *$cf_add_cflags) #(vi
12251                         ;;
12252                 *) #(vi
12253                         case $cf_add_cflags in #(vi
12254                         -D*)
12255                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12256
12257 CPPFLAGS=`echo "$CPPFLAGS" | \
12258         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12259                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12260
12261                                 ;;
12262                         esac
12263                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12264                         ;;
12265                 esac
12266                 ;;
12267         *)
12268                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12269                 ;;
12270         esac
12271         ;;
12272 yes)
12273         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12274
12275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12276
12277         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12278                 && test -z "${cf_tst_cflags}" \
12279                 && cf_fix_cppflags=no
12280         ;;
12281 esac
12282 done
12283
12284 if test -n "$cf_new_cflags" ; then
12285
12286         CFLAGS="$CFLAGS $cf_new_cflags"
12287 fi
12288
12289 if test -n "$cf_new_cppflags" ; then
12290
12291         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12292 fi
12293
12294 if test -n "$cf_new_extra_cppflags" ; then
12295
12296         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12297 fi
12298
12299                 ;;
12300         esac
12301         ;;
12302 esac
12303
12304 echo "$as_me:12304: checking if you want to perform memory-leak testing" >&5
12305 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12306
12307 # Check whether --enable-leaks or --disable-leaks was given.
12308 if test "${enable_leaks+set}" = set; then
12309   enableval="$enable_leaks"
12310   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12311 else
12312   : ${with_no_leaks:=no}
12313 fi;
12314 echo "$as_me:12314: result: $with_no_leaks" >&5
12315 echo "${ECHO_T}$with_no_leaks" >&6
12316
12317 if test "$with_no_leaks" = yes ; then
12318         cat >>confdefs.h <<\EOF
12319 #define NO_LEAKS 1
12320 EOF
12321
12322         cat >>confdefs.h <<\EOF
12323 #define YY_NO_LEAKS 1
12324 EOF
12325
12326 fi
12327
12328 cat >>confdefs.h <<\EOF
12329 #define HAVE_NC_ALLOC_H 1
12330 EOF
12331
12332 ###     use option --enable-expanded to generate certain macros as functions
12333
12334 # Check whether --enable-expanded or --disable-expanded was given.
12335 if test "${enable_expanded+set}" = set; then
12336   enableval="$enable_expanded"
12337   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12338 #define NCURSES_EXPANDED 1
12339 EOF
12340
12341 fi;
12342
12343 ###     use option --disable-macros to suppress macros in favor of functions
12344
12345 # Check whether --enable-macros or --disable-macros was given.
12346 if test "${enable_macros+set}" = set; then
12347   enableval="$enable_macros"
12348   test "$enableval" = no && cat >>confdefs.h <<\EOF
12349 #define NCURSES_NOMACROS 1
12350 EOF
12351
12352 fi;
12353
12354 # Normally we only add trace() to the debug-library.  Allow this to be
12355 # extended to all models of the ncurses library:
12356 cf_all_traces=no
12357 case "$CFLAGS $CPPFLAGS" in
12358 *-DTRACE*)
12359         cf_all_traces=yes
12360         ;;
12361 esac
12362
12363 echo "$as_me:12363: checking whether to add trace feature to all models" >&5
12364 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12365
12366 # Check whether --with-trace or --without-trace was given.
12367 if test "${with_trace+set}" = set; then
12368   withval="$with_trace"
12369   cf_with_trace=$withval
12370 else
12371   cf_with_trace=$cf_all_traces
12372 fi;
12373 echo "$as_me:12373: result: $cf_with_trace" >&5
12374 echo "${ECHO_T}$cf_with_trace" >&6
12375
12376 if test "$cf_with_trace" = yes ; then
12377         LIB_TRACING=all
12378         ADA_TRACE=TRUE
12379
12380 cf_fix_cppflags=no
12381 cf_new_cflags=
12382 cf_new_cppflags=
12383 cf_new_extra_cppflags=
12384
12385 for cf_add_cflags in -DTRACE
12386 do
12387 case $cf_fix_cppflags in
12388 no)
12389         case $cf_add_cflags in #(vi
12390         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12391                 case $cf_add_cflags in
12392                 -D*)
12393                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12394
12395                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12396                                 && test -z "${cf_tst_cflags}" \
12397                                 && cf_fix_cppflags=yes
12398
12399                         if test $cf_fix_cppflags = yes ; then
12400                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12401                                 continue
12402                         elif test "${cf_tst_cflags}" = "\"'" ; then
12403                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12404                                 continue
12405                         fi
12406                         ;;
12407                 esac
12408                 case "$CPPFLAGS" in
12409                 *$cf_add_cflags) #(vi
12410                         ;;
12411                 *) #(vi
12412                         case $cf_add_cflags in #(vi
12413                         -D*)
12414                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12415
12416 CPPFLAGS=`echo "$CPPFLAGS" | \
12417         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12418                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12419
12420                                 ;;
12421                         esac
12422                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12423                         ;;
12424                 esac
12425                 ;;
12426         *)
12427                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12428                 ;;
12429         esac
12430         ;;
12431 yes)
12432         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12433
12434         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12435
12436         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12437                 && test -z "${cf_tst_cflags}" \
12438                 && cf_fix_cppflags=no
12439         ;;
12440 esac
12441 done
12442
12443 if test -n "$cf_new_cflags" ; then
12444
12445         CFLAGS="$CFLAGS $cf_new_cflags"
12446 fi
12447
12448 if test -n "$cf_new_cppflags" ; then
12449
12450         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12451 fi
12452
12453 if test -n "$cf_new_extra_cppflags" ; then
12454
12455         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12456 fi
12457
12458 else
12459         LIB_TRACING=DEBUG
12460         ADA_TRACE=FALSE
12461 fi
12462
12463 ###     Checks for libraries.
12464 case $cf_cv_system_name in #(vi
12465 *mingw32*) #(vi
12466         ;;
12467 *)
12468 echo "$as_me:12468: checking for gettimeofday" >&5
12469 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12470 if test "${ac_cv_func_gettimeofday+set}" = set; then
12471   echo $ECHO_N "(cached) $ECHO_C" >&6
12472 else
12473   cat >conftest.$ac_ext <<_ACEOF
12474 #line 12474 "configure"
12475 #include "confdefs.h"
12476 /* System header to define __stub macros and hopefully few prototypes,
12477     which can conflict with char gettimeofday (); below.  */
12478 #include <assert.h>
12479 /* Override any gcc2 internal prototype to avoid an error.  */
12480 #ifdef __cplusplus
12481 extern "C"
12482 #endif
12483 /* We use char because int might match the return type of a gcc2
12484    builtin and then its argument prototype would still apply.  */
12485 char gettimeofday ();
12486 char (*f) ();
12487
12488 int
12489 main ()
12490 {
12491 /* The GNU C library defines this for functions which it implements
12492     to always fail with ENOSYS.  Some functions are actually named
12493     something starting with __ and the normal name is an alias.  */
12494 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12495 choke me
12496 #else
12497 f = gettimeofday;
12498 #endif
12499
12500   ;
12501   return 0;
12502 }
12503 _ACEOF
12504 rm -f conftest.$ac_objext conftest$ac_exeext
12505 if { (eval echo "$as_me:12505: \"$ac_link\"") >&5
12506   (eval $ac_link) 2>&5
12507   ac_status=$?
12508   echo "$as_me:12508: \$? = $ac_status" >&5
12509   (exit $ac_status); } &&
12510          { ac_try='test -s conftest$ac_exeext'
12511   { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512   (eval $ac_try) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; }; then
12516   ac_cv_func_gettimeofday=yes
12517 else
12518   echo "$as_me: failed program was:" >&5
12519 cat conftest.$ac_ext >&5
12520 ac_cv_func_gettimeofday=no
12521 fi
12522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12523 fi
12524 echo "$as_me:12524: result: $ac_cv_func_gettimeofday" >&5
12525 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12526 if test $ac_cv_func_gettimeofday = yes; then
12527   cat >>confdefs.h <<\EOF
12528 #define HAVE_GETTIMEOFDAY 1
12529 EOF
12530
12531 else
12532
12533 echo "$as_me:12533: checking for gettimeofday in -lbsd" >&5
12534 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12535 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12536   echo $ECHO_N "(cached) $ECHO_C" >&6
12537 else
12538   ac_check_lib_save_LIBS=$LIBS
12539 LIBS="-lbsd  $LIBS"
12540 cat >conftest.$ac_ext <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12543
12544 /* Override any gcc2 internal prototype to avoid an error.  */
12545 #ifdef __cplusplus
12546 extern "C"
12547 #endif
12548 /* We use char because int might match the return type of a gcc2
12549    builtin and then its argument prototype would still apply.  */
12550 char gettimeofday ();
12551 int
12552 main ()
12553 {
12554 gettimeofday ();
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f conftest.$ac_objext conftest$ac_exeext
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561   (eval $ac_link) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); } &&
12565          { ac_try='test -s conftest$ac_exeext'
12566   { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567   (eval $ac_try) 2>&5
12568   ac_status=$?
12569   echo "$as_me:12569: \$? = $ac_status" >&5
12570   (exit $ac_status); }; }; then
12571   ac_cv_lib_bsd_gettimeofday=yes
12572 else
12573   echo "$as_me: failed program was:" >&5
12574 cat conftest.$ac_ext >&5
12575 ac_cv_lib_bsd_gettimeofday=no
12576 fi
12577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12578 LIBS=$ac_check_lib_save_LIBS
12579 fi
12580 echo "$as_me:12580: result: $ac_cv_lib_bsd_gettimeofday" >&5
12581 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12582 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12583   cat >>confdefs.h <<\EOF
12584 #define HAVE_GETTIMEOFDAY 1
12585 EOF
12586
12587         LIBS="-lbsd $LIBS"
12588 fi
12589
12590 fi
12591         ;;
12592 esac
12593
12594 echo "$as_me:12594: checking if -lm needed for math functions" >&5
12595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12596 if test "${cf_cv_need_libm+set}" = set; then
12597   echo $ECHO_N "(cached) $ECHO_C" >&6
12598 else
12599
12600         cat >conftest.$ac_ext <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603
12604         #include <stdio.h>
12605         #include <math.h>
12606
12607 int
12608 main ()
12609 {
12610 double x = rand(); printf("result = %g\n", sin(x))
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 rm -f conftest.$ac_objext conftest$ac_exeext
12616 if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
12617   (eval $ac_link) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); } &&
12621          { ac_try='test -s conftest$ac_exeext'
12622   { (eval echo "$as_me:12622: \"$ac_try\"") >&5
12623   (eval $ac_try) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); }; }; then
12627   cf_cv_need_libm=no
12628 else
12629   echo "$as_me: failed program was:" >&5
12630 cat conftest.$ac_ext >&5
12631 cf_cv_need_libm=yes
12632 fi
12633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12634 fi
12635 echo "$as_me:12635: result: $cf_cv_need_libm" >&5
12636 echo "${ECHO_T}$cf_cv_need_libm" >&6
12637 if test "$cf_cv_need_libm" = yes
12638 then
12639 MATH_LIB=-lm
12640 fi
12641
12642 ###     Checks for header files.
12643 echo "$as_me:12643: checking for ANSI C header files" >&5
12644 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12645 if test "${ac_cv_header_stdc+set}" = set; then
12646   echo $ECHO_N "(cached) $ECHO_C" >&6
12647 else
12648   cat >conftest.$ac_ext <<_ACEOF
12649 #line 12649 "configure"
12650 #include "confdefs.h"
12651 #include <stdlib.h>
12652 #include <stdarg.h>
12653 #include <string.h>
12654 #include <float.h>
12655
12656 _ACEOF
12657 if { (eval echo "$as_me:12657: \"$ac_cpp conftest.$ac_ext\"") >&5
12658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12659   ac_status=$?
12660   egrep -v '^ *\+' conftest.er1 >conftest.err
12661   rm -f conftest.er1
12662   cat conftest.err >&5
12663   echo "$as_me:12663: \$? = $ac_status" >&5
12664   (exit $ac_status); } >/dev/null; then
12665   if test -s conftest.err; then
12666     ac_cpp_err=$ac_c_preproc_warn_flag
12667   else
12668     ac_cpp_err=
12669   fi
12670 else
12671   ac_cpp_err=yes
12672 fi
12673 if test -z "$ac_cpp_err"; then
12674   ac_cv_header_stdc=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677   cat conftest.$ac_ext >&5
12678   ac_cv_header_stdc=no
12679 fi
12680 rm -f conftest.err conftest.$ac_ext
12681
12682 if test $ac_cv_header_stdc = yes; then
12683   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12684   cat >conftest.$ac_ext <<_ACEOF
12685 #line 12685 "configure"
12686 #include "confdefs.h"
12687 #include <string.h>
12688
12689 _ACEOF
12690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12691   egrep "memchr" >/dev/null 2>&1; then
12692   :
12693 else
12694   ac_cv_header_stdc=no
12695 fi
12696 rm -rf conftest*
12697
12698 fi
12699
12700 if test $ac_cv_header_stdc = yes; then
12701   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705 #include <stdlib.h>
12706
12707 _ACEOF
12708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12709   egrep "free" >/dev/null 2>&1; then
12710   :
12711 else
12712   ac_cv_header_stdc=no
12713 fi
12714 rm -rf conftest*
12715
12716 fi
12717
12718 if test $ac_cv_header_stdc = yes; then
12719   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12720   if test "$cross_compiling" = yes; then
12721   :
12722 else
12723   cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 #include <ctype.h>
12727 #if ((' ' & 0x0FF) == 0x020)
12728 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12729 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12730 #else
12731 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12732                      || ('j' <= (c) && (c) <= 'r') \
12733                      || ('s' <= (c) && (c) <= 'z'))
12734 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12735 #endif
12736
12737 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12738 int
12739 main ()
12740 {
12741   int i;
12742   for (i = 0; i < 256; i++)
12743     if (XOR (islower (i), ISLOWER (i))
12744         || toupper (i) != TOUPPER (i))
12745       $ac_main_return(2);
12746   $ac_main_return (0);
12747 }
12748 _ACEOF
12749 rm -f conftest$ac_exeext
12750 if { (eval echo "$as_me:12750: \"$ac_link\"") >&5
12751   (eval $ac_link) 2>&5
12752   ac_status=$?
12753   echo "$as_me:12753: \$? = $ac_status" >&5
12754   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12755   { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); }; }; then
12760   :
12761 else
12762   echo "$as_me: program exited with status $ac_status" >&5
12763 echo "$as_me: failed program was:" >&5
12764 cat conftest.$ac_ext >&5
12765 ac_cv_header_stdc=no
12766 fi
12767 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12768 fi
12769 fi
12770 fi
12771 echo "$as_me:12771: result: $ac_cv_header_stdc" >&5
12772 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12773 if test $ac_cv_header_stdc = yes; then
12774
12775 cat >>confdefs.h <<\EOF
12776 #define STDC_HEADERS 1
12777 EOF
12778
12779 fi
12780
12781 ac_header_dirent=no
12782 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12783   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12784 echo "$as_me:12784: checking for $ac_hdr that defines DIR" >&5
12785 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12786 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12787   echo $ECHO_N "(cached) $ECHO_C" >&6
12788 else
12789   cat >conftest.$ac_ext <<_ACEOF
12790 #line 12790 "configure"
12791 #include "confdefs.h"
12792 #include <sys/types.h>
12793 #include <$ac_hdr>
12794
12795 int
12796 main ()
12797 {
12798 if ((DIR *) 0)
12799 return 0;
12800   ;
12801   return 0;
12802 }
12803 _ACEOF
12804 rm -f conftest.$ac_objext
12805 if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
12806   (eval $ac_compile) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit $ac_status); } &&
12810          { ac_try='test -s conftest.$ac_objext'
12811   { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812   (eval $ac_try) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); }; }; then
12816   eval "$as_ac_Header=yes"
12817 else
12818   echo "$as_me: failed program was:" >&5
12819 cat conftest.$ac_ext >&5
12820 eval "$as_ac_Header=no"
12821 fi
12822 rm -f conftest.$ac_objext conftest.$ac_ext
12823 fi
12824 echo "$as_me:12824: result: `eval echo '${'$as_ac_Header'}'`" >&5
12825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12826 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12827   cat >>confdefs.h <<EOF
12828 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12829 EOF
12830
12831 ac_header_dirent=$ac_hdr; break
12832 fi
12833
12834 done
12835 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12836 if test $ac_header_dirent = dirent.h; then
12837   echo "$as_me:12837: checking for opendir in -ldir" >&5
12838 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12839 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842   ac_check_lib_save_LIBS=$LIBS
12843 LIBS="-ldir  $LIBS"
12844 cat >conftest.$ac_ext <<_ACEOF
12845 #line 12845 "configure"
12846 #include "confdefs.h"
12847
12848 /* Override any gcc2 internal prototype to avoid an error.  */
12849 #ifdef __cplusplus
12850 extern "C"
12851 #endif
12852 /* We use char because int might match the return type of a gcc2
12853    builtin and then its argument prototype would still apply.  */
12854 char opendir ();
12855 int
12856 main ()
12857 {
12858 opendir ();
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext conftest$ac_exeext
12864 if { (eval echo "$as_me:12864: \"$ac_link\"") >&5
12865   (eval $ac_link) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -s conftest$ac_exeext'
12870   { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   ac_cv_lib_dir_opendir=yes
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 cat conftest.$ac_ext >&5
12879 ac_cv_lib_dir_opendir=no
12880 fi
12881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12882 LIBS=$ac_check_lib_save_LIBS
12883 fi
12884 echo "$as_me:12884: result: $ac_cv_lib_dir_opendir" >&5
12885 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12886 if test $ac_cv_lib_dir_opendir = yes; then
12887   LIBS="$LIBS -ldir"
12888 fi
12889
12890 else
12891   echo "$as_me:12891: checking for opendir in -lx" >&5
12892 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12893 if test "${ac_cv_lib_x_opendir+set}" = set; then
12894   echo $ECHO_N "(cached) $ECHO_C" >&6
12895 else
12896   ac_check_lib_save_LIBS=$LIBS
12897 LIBS="-lx  $LIBS"
12898 cat >conftest.$ac_ext <<_ACEOF
12899 #line 12899 "configure"
12900 #include "confdefs.h"
12901
12902 /* Override any gcc2 internal prototype to avoid an error.  */
12903 #ifdef __cplusplus
12904 extern "C"
12905 #endif
12906 /* We use char because int might match the return type of a gcc2
12907    builtin and then its argument prototype would still apply.  */
12908 char opendir ();
12909 int
12910 main ()
12911 {
12912 opendir ();
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 rm -f conftest.$ac_objext conftest$ac_exeext
12918 if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919   (eval $ac_link) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -s conftest$ac_exeext'
12924   { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   ac_cv_lib_x_opendir=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 ac_cv_lib_x_opendir=no
12934 fi
12935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12936 LIBS=$ac_check_lib_save_LIBS
12937 fi
12938 echo "$as_me:12938: result: $ac_cv_lib_x_opendir" >&5
12939 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12940 if test $ac_cv_lib_x_opendir = yes; then
12941   LIBS="$LIBS -lx"
12942 fi
12943
12944 fi
12945
12946 echo "$as_me:12946: checking whether time.h and sys/time.h may both be included" >&5
12947 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12948 if test "${ac_cv_header_time+set}" = set; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <sys/types.h>
12955 #include <sys/time.h>
12956 #include <time.h>
12957
12958 int
12959 main ()
12960 {
12961 if ((struct tm *) 0)
12962 return 0;
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext
12968 if { (eval echo "$as_me:12968: \"$ac_compile\"") >&5
12969   (eval $ac_compile) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest.$ac_objext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   ac_cv_header_time=yes
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12983 ac_cv_header_time=no
12984 fi
12985 rm -f conftest.$ac_objext conftest.$ac_ext
12986 fi
12987 echo "$as_me:12987: result: $ac_cv_header_time" >&5
12988 echo "${ECHO_T}$ac_cv_header_time" >&6
12989 if test $ac_cv_header_time = yes; then
12990
12991 cat >>confdefs.h <<\EOF
12992 #define TIME_WITH_SYS_TIME 1
12993 EOF
12994
12995 fi
12996
12997 cf_regex_func=no
12998
12999 cf_regex_libs="regex re"
13000 case $host_os in #(vi
13001 mingw*)
13002         cf_regex_libs="regex.dll $cf_regex_libs"
13003         ;;
13004 esac
13005
13006 echo "$as_me:13006: checking for regcomp" >&5
13007 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13008 if test "${ac_cv_func_regcomp+set}" = set; then
13009   echo $ECHO_N "(cached) $ECHO_C" >&6
13010 else
13011   cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014 /* System header to define __stub macros and hopefully few prototypes,
13015     which can conflict with char regcomp (); below.  */
13016 #include <assert.h>
13017 /* Override any gcc2 internal prototype to avoid an error.  */
13018 #ifdef __cplusplus
13019 extern "C"
13020 #endif
13021 /* We use char because int might match the return type of a gcc2
13022    builtin and then its argument prototype would still apply.  */
13023 char regcomp ();
13024 char (*f) ();
13025
13026 int
13027 main ()
13028 {
13029 /* The GNU C library defines this for functions which it implements
13030     to always fail with ENOSYS.  Some functions are actually named
13031     something starting with __ and the normal name is an alias.  */
13032 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13033 choke me
13034 #else
13035 f = regcomp;
13036 #endif
13037
13038   ;
13039   return 0;
13040 }
13041 _ACEOF
13042 rm -f conftest.$ac_objext conftest$ac_exeext
13043 if { (eval echo "$as_me:13043: \"$ac_link\"") >&5
13044   (eval $ac_link) 2>&5
13045   ac_status=$?
13046   echo "$as_me:13046: \$? = $ac_status" >&5
13047   (exit $ac_status); } &&
13048          { ac_try='test -s conftest$ac_exeext'
13049   { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   ac_cv_func_regcomp=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057 cat conftest.$ac_ext >&5
13058 ac_cv_func_regcomp=no
13059 fi
13060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13061 fi
13062 echo "$as_me:13062: result: $ac_cv_func_regcomp" >&5
13063 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13064 if test $ac_cv_func_regcomp = yes; then
13065   cf_regex_func=regcomp
13066 else
13067
13068         for cf_regex_lib in $cf_regex_libs
13069         do
13070                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13071 echo "$as_me:13071: checking for regcomp in -l$cf_regex_lib" >&5
13072 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13073 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   ac_check_lib_save_LIBS=$LIBS
13077 LIBS="-l$cf_regex_lib  $LIBS"
13078 cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081
13082 /* Override any gcc2 internal prototype to avoid an error.  */
13083 #ifdef __cplusplus
13084 extern "C"
13085 #endif
13086 /* We use char because int might match the return type of a gcc2
13087    builtin and then its argument prototype would still apply.  */
13088 char regcomp ();
13089 int
13090 main ()
13091 {
13092 regcomp ();
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 rm -f conftest.$ac_objext conftest$ac_exeext
13098 if { (eval echo "$as_me:13098: \"$ac_link\"") >&5
13099   (eval $ac_link) 2>&5
13100   ac_status=$?
13101   echo "$as_me:13101: \$? = $ac_status" >&5
13102   (exit $ac_status); } &&
13103          { ac_try='test -s conftest$ac_exeext'
13104   { (eval echo "$as_me:13104: \"$ac_try\"") >&5
13105   (eval $ac_try) 2>&5
13106   ac_status=$?
13107   echo "$as_me:13107: \$? = $ac_status" >&5
13108   (exit $ac_status); }; }; then
13109   eval "$as_ac_Lib=yes"
13110 else
13111   echo "$as_me: failed program was:" >&5
13112 cat conftest.$ac_ext >&5
13113 eval "$as_ac_Lib=no"
13114 fi
13115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13116 LIBS=$ac_check_lib_save_LIBS
13117 fi
13118 echo "$as_me:13118: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13119 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13120 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13121
13122                                 LIBS="-l$cf_regex_lib $LIBS"
13123                                 cf_regex_func=regcomp
13124                                 break
13125 fi
13126
13127         done
13128
13129 fi
13130
13131 if test "$cf_regex_func" = no ; then
13132         echo "$as_me:13132: checking for compile" >&5
13133 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13134 if test "${ac_cv_func_compile+set}" = set; then
13135   echo $ECHO_N "(cached) $ECHO_C" >&6
13136 else
13137   cat >conftest.$ac_ext <<_ACEOF
13138 #line 13138 "configure"
13139 #include "confdefs.h"
13140 /* System header to define __stub macros and hopefully few prototypes,
13141     which can conflict with char compile (); below.  */
13142 #include <assert.h>
13143 /* Override any gcc2 internal prototype to avoid an error.  */
13144 #ifdef __cplusplus
13145 extern "C"
13146 #endif
13147 /* We use char because int might match the return type of a gcc2
13148    builtin and then its argument prototype would still apply.  */
13149 char compile ();
13150 char (*f) ();
13151
13152 int
13153 main ()
13154 {
13155 /* The GNU C library defines this for functions which it implements
13156     to always fail with ENOSYS.  Some functions are actually named
13157     something starting with __ and the normal name is an alias.  */
13158 #if defined (__stub_compile) || defined (__stub___compile)
13159 choke me
13160 #else
13161 f = compile;
13162 #endif
13163
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext conftest$ac_exeext
13169 if { (eval echo "$as_me:13169: \"$ac_link\"") >&5
13170   (eval $ac_link) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); } &&
13174          { ac_try='test -s conftest$ac_exeext'
13175   { (eval echo "$as_me:13175: \"$ac_try\"") >&5
13176   (eval $ac_try) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit $ac_status); }; }; then
13180   ac_cv_func_compile=yes
13181 else
13182   echo "$as_me: failed program was:" >&5
13183 cat conftest.$ac_ext >&5
13184 ac_cv_func_compile=no
13185 fi
13186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13187 fi
13188 echo "$as_me:13188: result: $ac_cv_func_compile" >&5
13189 echo "${ECHO_T}$ac_cv_func_compile" >&6
13190 if test $ac_cv_func_compile = yes; then
13191   cf_regex_func=compile
13192 else
13193
13194                 echo "$as_me:13194: checking for compile in -lgen" >&5
13195 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13196 if test "${ac_cv_lib_gen_compile+set}" = set; then
13197   echo $ECHO_N "(cached) $ECHO_C" >&6
13198 else
13199   ac_check_lib_save_LIBS=$LIBS
13200 LIBS="-lgen  $LIBS"
13201 cat >conftest.$ac_ext <<_ACEOF
13202 #line 13202 "configure"
13203 #include "confdefs.h"
13204
13205 /* Override any gcc2 internal prototype to avoid an error.  */
13206 #ifdef __cplusplus
13207 extern "C"
13208 #endif
13209 /* We use char because int might match the return type of a gcc2
13210    builtin and then its argument prototype would still apply.  */
13211 char compile ();
13212 int
13213 main ()
13214 {
13215 compile ();
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f conftest.$ac_objext conftest$ac_exeext
13221 if { (eval echo "$as_me:13221: \"$ac_link\"") >&5
13222   (eval $ac_link) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit $ac_status); } &&
13226          { ac_try='test -s conftest$ac_exeext'
13227   { (eval echo "$as_me:13227: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit $ac_status); }; }; then
13232   ac_cv_lib_gen_compile=yes
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 cat conftest.$ac_ext >&5
13236 ac_cv_lib_gen_compile=no
13237 fi
13238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13239 LIBS=$ac_check_lib_save_LIBS
13240 fi
13241 echo "$as_me:13241: result: $ac_cv_lib_gen_compile" >&5
13242 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13243 if test $ac_cv_lib_gen_compile = yes; then
13244
13245                                 LIBS="-lgen $LIBS"
13246                                 cf_regex_func=compile
13247 fi
13248
13249 fi
13250
13251 fi
13252
13253 if test "$cf_regex_func" = no ; then
13254         { echo "$as_me:13254: WARNING: cannot find regular expression library" >&5
13255 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13256 fi
13257
13258 echo "$as_me:13258: checking for regular-expression headers" >&5
13259 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13260 if test "${cf_cv_regex_hdrs+set}" = set; then
13261   echo $ECHO_N "(cached) $ECHO_C" >&6
13262 else
13263
13264 cf_cv_regex_hdrs=no
13265 case $cf_regex_func in #(vi
13266 compile) #(vi
13267         for cf_regex_hdr in regexp.h regexpr.h
13268         do
13269                 cat >conftest.$ac_ext <<_ACEOF
13270 #line 13270 "configure"
13271 #include "confdefs.h"
13272 #include <$cf_regex_hdr>
13273 int
13274 main ()
13275 {
13276
13277                         char *p = compile("", "", "", 0);
13278                         int x = step("", "");
13279
13280   ;
13281   return 0;
13282 }
13283 _ACEOF
13284 rm -f conftest.$ac_objext conftest$ac_exeext
13285 if { (eval echo "$as_me:13285: \"$ac_link\"") >&5
13286   (eval $ac_link) 2>&5
13287   ac_status=$?
13288   echo "$as_me:13288: \$? = $ac_status" >&5
13289   (exit $ac_status); } &&
13290          { ac_try='test -s conftest$ac_exeext'
13291   { (eval echo "$as_me:13291: \"$ac_try\"") >&5
13292   (eval $ac_try) 2>&5
13293   ac_status=$?
13294   echo "$as_me:13294: \$? = $ac_status" >&5
13295   (exit $ac_status); }; }; then
13296
13297                         cf_cv_regex_hdrs=$cf_regex_hdr
13298                         break
13299
13300 else
13301   echo "$as_me: failed program was:" >&5
13302 cat conftest.$ac_ext >&5
13303 fi
13304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13305         done
13306         ;;
13307 *)
13308         for cf_regex_hdr in regex.h
13309         do
13310                 cat >conftest.$ac_ext <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313 #include <sys/types.h>
13314 #include <$cf_regex_hdr>
13315 int
13316 main ()
13317 {
13318
13319                         regex_t *p;
13320                         int x = regcomp(p, "", 0);
13321                         int y = regexec(p, "", 0, 0, 0);
13322                         regfree(p);
13323
13324   ;
13325   return 0;
13326 }
13327 _ACEOF
13328 rm -f conftest.$ac_objext conftest$ac_exeext
13329 if { (eval echo "$as_me:13329: \"$ac_link\"") >&5
13330   (eval $ac_link) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit $ac_status); } &&
13334          { ac_try='test -s conftest$ac_exeext'
13335   { (eval echo "$as_me:13335: \"$ac_try\"") >&5
13336   (eval $ac_try) 2>&5
13337   ac_status=$?
13338   echo "$as_me:13338: \$? = $ac_status" >&5
13339   (exit $ac_status); }; }; then
13340
13341                         cf_cv_regex_hdrs=$cf_regex_hdr
13342                         break
13343
13344 else
13345   echo "$as_me: failed program was:" >&5
13346 cat conftest.$ac_ext >&5
13347 fi
13348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13349         done
13350         ;;
13351 esac
13352
13353 fi
13354 echo "$as_me:13354: result: $cf_cv_regex_hdrs" >&5
13355 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13356
13357 case $cf_cv_regex_hdrs in #(vi
13358     no)        { echo "$as_me:13358: WARNING: no regular expression header found" >&5
13359 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13360     regex.h)   cat >>confdefs.h <<\EOF
13361 #define HAVE_REGEX_H_FUNCS 1
13362 EOF
13363  ;; #(vi
13364     regexp.h)  cat >>confdefs.h <<\EOF
13365 #define HAVE_REGEXP_H_FUNCS 1
13366 EOF
13367  ;; #(vi
13368     regexpr.h) cat >>confdefs.h <<\EOF
13369 #define HAVE_REGEXPR_H_FUNCS 1
13370 EOF
13371  ;;
13372 esac
13373
13374 for ac_header in \
13375 fcntl.h \
13376 getopt.h \
13377 limits.h \
13378 locale.h \
13379 poll.h \
13380 sys/bsdtypes.h \
13381 sys/ioctl.h \
13382 sys/param.h \
13383 sys/poll.h \
13384 sys/select.h \
13385 sys/time.h \
13386 sys/times.h \
13387 ttyent.h \
13388 unistd.h \
13389 wctype.h \
13390
13391 do
13392 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13393 echo "$as_me:13393: checking for $ac_header" >&5
13394 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13395 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13396   echo $ECHO_N "(cached) $ECHO_C" >&6
13397 else
13398   cat >conftest.$ac_ext <<_ACEOF
13399 #line 13399 "configure"
13400 #include "confdefs.h"
13401 #include <$ac_header>
13402 _ACEOF
13403 if { (eval echo "$as_me:13403: \"$ac_cpp conftest.$ac_ext\"") >&5
13404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13405   ac_status=$?
13406   egrep -v '^ *\+' conftest.er1 >conftest.err
13407   rm -f conftest.er1
13408   cat conftest.err >&5
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } >/dev/null; then
13411   if test -s conftest.err; then
13412     ac_cpp_err=$ac_c_preproc_warn_flag
13413   else
13414     ac_cpp_err=
13415   fi
13416 else
13417   ac_cpp_err=yes
13418 fi
13419 if test -z "$ac_cpp_err"; then
13420   eval "$as_ac_Header=yes"
13421 else
13422   echo "$as_me: failed program was:" >&5
13423   cat conftest.$ac_ext >&5
13424   eval "$as_ac_Header=no"
13425 fi
13426 rm -f conftest.err conftest.$ac_ext
13427 fi
13428 echo "$as_me:13428: result: `eval echo '${'$as_ac_Header'}'`" >&5
13429 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13430 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13431   cat >>confdefs.h <<EOF
13432 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13433 EOF
13434
13435 fi
13436 done
13437
13438 # check for ISC (this may also define _POSIX_SOURCE)
13439 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13440 if test "$ISC" = yes ; then
13441
13442 echo "$as_me:13442: checking for main in -lcposix" >&5
13443 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13444 if test "${ac_cv_lib_cposix_main+set}" = set; then
13445   echo $ECHO_N "(cached) $ECHO_C" >&6
13446 else
13447   ac_check_lib_save_LIBS=$LIBS
13448 LIBS="-lcposix  $LIBS"
13449 cat >conftest.$ac_ext <<_ACEOF
13450 #line 13450 "configure"
13451 #include "confdefs.h"
13452
13453 int
13454 main ()
13455 {
13456 main ();
13457   ;
13458   return 0;
13459 }
13460 _ACEOF
13461 rm -f conftest.$ac_objext conftest$ac_exeext
13462 if { (eval echo "$as_me:13462: \"$ac_link\"") >&5
13463   (eval $ac_link) 2>&5
13464   ac_status=$?
13465   echo "$as_me:13465: \$? = $ac_status" >&5
13466   (exit $ac_status); } &&
13467          { ac_try='test -s conftest$ac_exeext'
13468   { (eval echo "$as_me:13468: \"$ac_try\"") >&5
13469   (eval $ac_try) 2>&5
13470   ac_status=$?
13471   echo "$as_me:13471: \$? = $ac_status" >&5
13472   (exit $ac_status); }; }; then
13473   ac_cv_lib_cposix_main=yes
13474 else
13475   echo "$as_me: failed program was:" >&5
13476 cat conftest.$ac_ext >&5
13477 ac_cv_lib_cposix_main=no
13478 fi
13479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13480 LIBS=$ac_check_lib_save_LIBS
13481 fi
13482 echo "$as_me:13482: result: $ac_cv_lib_cposix_main" >&5
13483 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13484 if test $ac_cv_lib_cposix_main = yes; then
13485   cat >>confdefs.h <<EOF
13486 #define HAVE_LIBCPOSIX 1
13487 EOF
13488
13489   LIBS="-lcposix $LIBS"
13490
13491 fi
13492
13493         echo "$as_me:13493: checking for bzero in -linet" >&5
13494 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13495 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13496   echo $ECHO_N "(cached) $ECHO_C" >&6
13497 else
13498   ac_check_lib_save_LIBS=$LIBS
13499 LIBS="-linet  $LIBS"
13500 cat >conftest.$ac_ext <<_ACEOF
13501 #line 13501 "configure"
13502 #include "confdefs.h"
13503
13504 /* Override any gcc2 internal prototype to avoid an error.  */
13505 #ifdef __cplusplus
13506 extern "C"
13507 #endif
13508 /* We use char because int might match the return type of a gcc2
13509    builtin and then its argument prototype would still apply.  */
13510 char bzero ();
13511 int
13512 main ()
13513 {
13514 bzero ();
13515   ;
13516   return 0;
13517 }
13518 _ACEOF
13519 rm -f conftest.$ac_objext conftest$ac_exeext
13520 if { (eval echo "$as_me:13520: \"$ac_link\"") >&5
13521   (eval $ac_link) 2>&5
13522   ac_status=$?
13523   echo "$as_me:13523: \$? = $ac_status" >&5
13524   (exit $ac_status); } &&
13525          { ac_try='test -s conftest$ac_exeext'
13526   { (eval echo "$as_me:13526: \"$ac_try\"") >&5
13527   (eval $ac_try) 2>&5
13528   ac_status=$?
13529   echo "$as_me:13529: \$? = $ac_status" >&5
13530   (exit $ac_status); }; }; then
13531   ac_cv_lib_inet_bzero=yes
13532 else
13533   echo "$as_me: failed program was:" >&5
13534 cat conftest.$ac_ext >&5
13535 ac_cv_lib_inet_bzero=no
13536 fi
13537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13538 LIBS=$ac_check_lib_save_LIBS
13539 fi
13540 echo "$as_me:13540: result: $ac_cv_lib_inet_bzero" >&5
13541 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13542 if test $ac_cv_lib_inet_bzero = yes; then
13543   LIBS="-linet $LIBS"
13544 fi
13545 fi
13546
13547 echo "$as_me:13547: checking if sys/time.h works with sys/select.h" >&5
13548 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13549 if test "${cf_cv_sys_time_select+set}" = set; then
13550   echo $ECHO_N "(cached) $ECHO_C" >&6
13551 else
13552
13553 cat >conftest.$ac_ext <<_ACEOF
13554 #line 13554 "configure"
13555 #include "confdefs.h"
13556
13557 #include <sys/types.h>
13558 #ifdef HAVE_SYS_TIME_H
13559 #include <sys/time.h>
13560 #endif
13561 #ifdef HAVE_SYS_SELECT_H
13562 #include <sys/select.h>
13563 #endif
13564
13565 int
13566 main ()
13567 {
13568
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f conftest.$ac_objext
13574 if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5
13575   (eval $ac_compile) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); } &&
13579          { ac_try='test -s conftest.$ac_objext'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); }; }; then
13585   cf_cv_sys_time_select=yes
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat conftest.$ac_ext >&5
13589 cf_cv_sys_time_select=no
13590 fi
13591 rm -f conftest.$ac_objext conftest.$ac_ext
13592
13593 fi
13594
13595 echo "$as_me:13595: result: $cf_cv_sys_time_select" >&5
13596 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13597 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13598 #define HAVE_SYS_TIME_SELECT 1
13599 EOF
13600
13601 ###     checks for compiler characteristics
13602 ac_ext=c
13603 ac_cpp='$CPP $CPPFLAGS'
13604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13607 ac_main_return=return
13608
13609 echo "$as_me:13609: checking for $CC option to accept ANSI C" >&5
13610 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13611 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13612   echo $ECHO_N "(cached) $ECHO_C" >&6
13613 else
13614   ac_cv_prog_cc_stdc=no
13615 ac_save_CC=$CC
13616 cat >conftest.$ac_ext <<_ACEOF
13617 #line 13617 "configure"
13618 #include "confdefs.h"
13619 #include <stdarg.h>
13620 #include <stdio.h>
13621 #include <sys/types.h>
13622 #include <sys/stat.h>
13623 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13624 struct buf { int x; };
13625 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13626 static char *e (p, i)
13627      char **p;
13628      int i;
13629 {
13630   return p[i];
13631 }
13632 static char *f (char * (*g) (char **, int), char **p, ...)
13633 {
13634   char *s;
13635   va_list v;
13636   va_start (v,p);
13637   s = g (p, va_arg (v,int));
13638   va_end (v);
13639   return s;
13640 }
13641 int test (int i, double x);
13642 struct s1 {int (*f) (int a);};
13643 struct s2 {int (*f) (double a);};
13644 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13645 int argc;
13646 char **argv;
13647 int
13648 main ()
13649 {
13650 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13651   ;
13652   return 0;
13653 }
13654 _ACEOF
13655 # Don't try gcc -ansi; that turns off useful extensions and
13656 # breaks some systems' header files.
13657 # AIX                   -qlanglvl=ansi
13658 # Ultrix and OSF/1      -std1
13659 # HP-UX 10.20 and later -Ae
13660 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13661 # SVR4                  -Xc -D__EXTENSIONS__
13662 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13663 do
13664   CC="$ac_save_CC $ac_arg"
13665   rm -f conftest.$ac_objext
13666 if { (eval echo "$as_me:13666: \"$ac_compile\"") >&5
13667   (eval $ac_compile) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); } &&
13671          { ac_try='test -s conftest.$ac_objext'
13672   { (eval echo "$as_me:13672: \"$ac_try\"") >&5
13673   (eval $ac_try) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); }; }; then
13677   ac_cv_prog_cc_stdc=$ac_arg
13678 break
13679 else
13680   echo "$as_me: failed program was:" >&5
13681 cat conftest.$ac_ext >&5
13682 fi
13683 rm -f conftest.$ac_objext
13684 done
13685 rm -f conftest.$ac_ext conftest.$ac_objext
13686 CC=$ac_save_CC
13687
13688 fi
13689
13690 case "x$ac_cv_prog_cc_stdc" in
13691   x|xno)
13692     echo "$as_me:13692: result: none needed" >&5
13693 echo "${ECHO_T}none needed" >&6 ;;
13694   *)
13695     echo "$as_me:13695: result: $ac_cv_prog_cc_stdc" >&5
13696 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13697     CC="$CC $ac_cv_prog_cc_stdc" ;;
13698 esac
13699
13700 echo "$as_me:13700: checking for an ANSI C-conforming const" >&5
13701 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13702 if test "${ac_cv_c_const+set}" = set; then
13703   echo $ECHO_N "(cached) $ECHO_C" >&6
13704 else
13705   cat >conftest.$ac_ext <<_ACEOF
13706 #line 13706 "configure"
13707 #include "confdefs.h"
13708
13709 int
13710 main ()
13711 {
13712 /* FIXME: Include the comments suggested by Paul. */
13713 #ifndef __cplusplus
13714   /* Ultrix mips cc rejects this.  */
13715   typedef int charset[2];
13716   const charset x;
13717   /* SunOS 4.1.1 cc rejects this.  */
13718   char const *const *ccp;
13719   char **p;
13720   /* NEC SVR4.0.2 mips cc rejects this.  */
13721   struct point {int x, y;};
13722   static struct point const zero = {0,0};
13723   /* AIX XL C 1.02.0.0 rejects this.
13724      It does not let you subtract one const X* pointer from another in
13725      an arm of an if-expression whose if-part is not a constant
13726      expression */
13727   const char *g = "string";
13728   ccp = &g + (g ? g-g : 0);
13729   /* HPUX 7.0 cc rejects these. */
13730   ++ccp;
13731   p = (char**) ccp;
13732   ccp = (char const *const *) p;
13733   { /* SCO 3.2v4 cc rejects this.  */
13734     char *t;
13735     char const *s = 0 ? (char *) 0 : (char const *) 0;
13736
13737     *t++ = 0;
13738   }
13739   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13740     int x[] = {25, 17};
13741     const int *foo = &x[0];
13742     ++foo;
13743   }
13744   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13745     typedef const int *iptr;
13746     iptr p = 0;
13747     ++p;
13748   }
13749   { /* AIX XL C 1.02.0.0 rejects this saying
13750        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13751     struct s { int j; const int *ap[3]; };
13752     struct s *b; b->j = 5;
13753   }
13754   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13755     const int foo = 10;
13756   }
13757 #endif
13758
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext
13764 if { (eval echo "$as_me:13764: \"$ac_compile\"") >&5
13765   (eval $ac_compile) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } &&
13769          { ac_try='test -s conftest.$ac_objext'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit $ac_status); }; }; then
13775   ac_cv_c_const=yes
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779 ac_cv_c_const=no
13780 fi
13781 rm -f conftest.$ac_objext conftest.$ac_ext
13782 fi
13783 echo "$as_me:13783: result: $ac_cv_c_const" >&5
13784 echo "${ECHO_T}$ac_cv_c_const" >&6
13785 if test $ac_cv_c_const = no; then
13786
13787 cat >>confdefs.h <<\EOF
13788 #define const
13789 EOF
13790
13791 fi
13792
13793 echo "$as_me:13793: checking for inline" >&5
13794 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13795 if test "${ac_cv_c_inline+set}" = set; then
13796   echo $ECHO_N "(cached) $ECHO_C" >&6
13797 else
13798   ac_cv_c_inline=no
13799 for ac_kw in inline __inline__ __inline; do
13800   cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803 #ifndef __cplusplus
13804 static $ac_kw int static_foo () {return 0; }
13805 $ac_kw int foo () {return 0; }
13806 #endif
13807
13808 _ACEOF
13809 rm -f conftest.$ac_objext
13810 if { (eval echo "$as_me:13810: \"$ac_compile\"") >&5
13811   (eval $ac_compile) 2>&5
13812   ac_status=$?
13813   echo "$as_me:13813: \$? = $ac_status" >&5
13814   (exit $ac_status); } &&
13815          { ac_try='test -s conftest.$ac_objext'
13816   { (eval echo "$as_me:13816: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_c_inline=$ac_kw; break
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 cat conftest.$ac_ext >&5
13825 fi
13826 rm -f conftest.$ac_objext conftest.$ac_ext
13827 done
13828
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_c_inline" >&5
13831 echo "${ECHO_T}$ac_cv_c_inline" >&6
13832 case $ac_cv_c_inline in
13833   inline | yes) ;;
13834   no)
13835 cat >>confdefs.h <<\EOF
13836 #define inline
13837 EOF
13838  ;;
13839   *)  cat >>confdefs.h <<EOF
13840 #define inline $ac_cv_c_inline
13841 EOF
13842  ;;
13843 esac
13844
13845 NCURSES_INLINE=
13846 if test "$ac_cv_c_inline" != no ; then
13847   NCURSES_INLINE=inline
13848   if test "$INTEL_COMPILER" = yes
13849   then
13850     :
13851   elif test "$GCC" = yes
13852   then
13853     echo "$as_me:13853: checking if $CC supports options to tune inlining" >&5
13854 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13855 if test "${cf_cv_gcc_inline+set}" = set; then
13856   echo $ECHO_N "(cached) $ECHO_C" >&6
13857 else
13858
13859       cf_save_CFLAGS=$CFLAGS
13860       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13861       cat >conftest.$ac_ext <<_ACEOF
13862 #line 13862 "configure"
13863 #include "confdefs.h"
13864 inline int foo(void) { return 1; }
13865 int
13866 main ()
13867 {
13868 ${cf_cv_main_return:-return} foo()
13869   ;
13870   return 0;
13871 }
13872 _ACEOF
13873 rm -f conftest.$ac_objext
13874 if { (eval echo "$as_me:13874: \"$ac_compile\"") >&5
13875   (eval $ac_compile) 2>&5
13876   ac_status=$?
13877   echo "$as_me:13877: \$? = $ac_status" >&5
13878   (exit $ac_status); } &&
13879          { ac_try='test -s conftest.$ac_objext'
13880   { (eval echo "$as_me:13880: \"$ac_try\"") >&5
13881   (eval $ac_try) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); }; }; then
13885   cf_cv_gcc_inline=yes
13886 else
13887   echo "$as_me: failed program was:" >&5
13888 cat conftest.$ac_ext >&5
13889 cf_cv_gcc_inline=no
13890 fi
13891 rm -f conftest.$ac_objext conftest.$ac_ext
13892       CFLAGS=$cf_save_CFLAGS
13893
13894 fi
13895 echo "$as_me:13895: result: $cf_cv_gcc_inline" >&5
13896 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13897     if test "$cf_cv_gcc_inline" = yes ; then
13898
13899 cf_fix_cppflags=no
13900 cf_new_cflags=
13901 cf_new_cppflags=
13902 cf_new_extra_cppflags=
13903
13904 for cf_add_cflags in --param max-inline-insns-single=1200
13905 do
13906 case $cf_fix_cppflags in
13907 no)
13908         case $cf_add_cflags in #(vi
13909         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13910                 case $cf_add_cflags in
13911                 -D*)
13912                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13913
13914                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13915                                 && test -z "${cf_tst_cflags}" \
13916                                 && cf_fix_cppflags=yes
13917
13918                         if test $cf_fix_cppflags = yes ; then
13919                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13920                                 continue
13921                         elif test "${cf_tst_cflags}" = "\"'" ; then
13922                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13923                                 continue
13924                         fi
13925                         ;;
13926                 esac
13927                 case "$CPPFLAGS" in
13928                 *$cf_add_cflags) #(vi
13929                         ;;
13930                 *) #(vi
13931                         case $cf_add_cflags in #(vi
13932                         -D*)
13933                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13934
13935 CPPFLAGS=`echo "$CPPFLAGS" | \
13936         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13937                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13938
13939                                 ;;
13940                         esac
13941                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13942                         ;;
13943                 esac
13944                 ;;
13945         *)
13946                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13947                 ;;
13948         esac
13949         ;;
13950 yes)
13951         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13952
13953         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13954
13955         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13956                 && test -z "${cf_tst_cflags}" \
13957                 && cf_fix_cppflags=no
13958         ;;
13959 esac
13960 done
13961
13962 if test -n "$cf_new_cflags" ; then
13963
13964         CFLAGS="$CFLAGS $cf_new_cflags"
13965 fi
13966
13967 if test -n "$cf_new_cppflags" ; then
13968
13969         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13970 fi
13971
13972 if test -n "$cf_new_extra_cppflags" ; then
13973
13974         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13975 fi
13976
13977     fi
13978   fi
13979 fi
13980
13981 echo "$as_me:13981: checking for signal global datatype" >&5
13982 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13983 if test "${cf_cv_sig_atomic_t+set}" = set; then
13984   echo $ECHO_N "(cached) $ECHO_C" >&6
13985 else
13986
13987         for cf_type in \
13988                 "volatile sig_atomic_t" \
13989                 "sig_atomic_t" \
13990                 "int"
13991         do
13992         cat >conftest.$ac_ext <<_ACEOF
13993 #line 13993 "configure"
13994 #include "confdefs.h"
13995
13996 #include <sys/types.h>
13997 #include <signal.h>
13998 #include <stdio.h>
13999
14000 extern $cf_type x;
14001 $cf_type x;
14002 static void handler(int sig)
14003 {
14004         x = 5;
14005 }
14006 int
14007 main ()
14008 {
14009 signal(SIGINT, handler);
14010                  x = 1
14011   ;
14012   return 0;
14013 }
14014 _ACEOF
14015 rm -f conftest.$ac_objext
14016 if { (eval echo "$as_me:14016: \"$ac_compile\"") >&5
14017   (eval $ac_compile) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit $ac_status); } &&
14021          { ac_try='test -s conftest.$ac_objext'
14022   { (eval echo "$as_me:14022: \"$ac_try\"") >&5
14023   (eval $ac_try) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); }; }; then
14027   cf_cv_sig_atomic_t=$cf_type
14028 else
14029   echo "$as_me: failed program was:" >&5
14030 cat conftest.$ac_ext >&5
14031 cf_cv_sig_atomic_t=no
14032 fi
14033 rm -f conftest.$ac_objext conftest.$ac_ext
14034                 test "$cf_cv_sig_atomic_t" != no && break
14035         done
14036
14037 fi
14038
14039 echo "$as_me:14039: result: $cf_cv_sig_atomic_t" >&5
14040 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14041 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14042 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14043 EOF
14044
14045 if test $NCURSES_CHTYPE = auto ; then
14046
14047 echo "$as_me:14047: checking for type of chtype" >&5
14048 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14049 if test "${cf_cv_typeof_chtype+set}" = set; then
14050   echo $ECHO_N "(cached) $ECHO_C" >&6
14051 else
14052
14053                 if test "$cross_compiling" = yes; then
14054   cf_cv_typeof_chtype=long
14055 else
14056   cat >conftest.$ac_ext <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059
14060 #define WANT_BITS 31
14061 #include <stdio.h>
14062 int main()
14063 {
14064         FILE *fp = fopen("cf_test.out", "w");
14065         if (fp != 0) {
14066                 char *result = "long";
14067                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14068                         int n;
14069                         unsigned int x, y;
14070                         for (n = 0; n < WANT_BITS; n++) {
14071                                 x = (1 << n);
14072                                 y = (x >> n);
14073                                 if (y != 1 || x == 0) {
14074                                         x = 0;
14075                                         break;
14076                                 }
14077                         }
14078                         /*
14079                          * If x is nonzero, an int is big enough for the bits
14080                          * that we want.
14081                          */
14082                         result = (x != 0) ? "int" : "long";
14083                 }
14084                 fputs(result, fp);
14085                 fclose(fp);
14086         }
14087         ${cf_cv_main_return:-return}(0);
14088 }
14089
14090 _ACEOF
14091 rm -f conftest$ac_exeext
14092 if { (eval echo "$as_me:14092: \"$ac_link\"") >&5
14093   (eval $ac_link) 2>&5
14094   ac_status=$?
14095   echo "$as_me:14095: \$? = $ac_status" >&5
14096   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14097   { (eval echo "$as_me:14097: \"$ac_try\"") >&5
14098   (eval $ac_try) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); }; }; then
14102   cf_cv_typeof_chtype=`cat cf_test.out`
14103 else
14104   echo "$as_me: program exited with status $ac_status" >&5
14105 echo "$as_me: failed program was:" >&5
14106 cat conftest.$ac_ext >&5
14107 cf_cv_typeof_chtype=long
14108 fi
14109 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14110 fi
14111                 rm -f cf_test.out
14112
14113 fi
14114
14115 echo "$as_me:14115: result: $cf_cv_typeof_chtype" >&5
14116 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14117
14118 cat >>confdefs.h <<EOF
14119 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14120 EOF
14121
14122 else
14123         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14124 fi
14125 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14126
14127 echo "$as_me:14127: checking if unsigned literals are legal" >&5
14128 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14129 if test "${cf_cv_unsigned_literals+set}" = set; then
14130   echo $ECHO_N "(cached) $ECHO_C" >&6
14131 else
14132
14133         cat >conftest.$ac_ext <<_ACEOF
14134 #line 14134 "configure"
14135 #include "confdefs.h"
14136
14137 int
14138 main ()
14139 {
14140 long x = 1L + 1UL + 1U + 1
14141   ;
14142   return 0;
14143 }
14144 _ACEOF
14145 rm -f conftest.$ac_objext
14146 if { (eval echo "$as_me:14146: \"$ac_compile\"") >&5
14147   (eval $ac_compile) 2>&5
14148   ac_status=$?
14149   echo "$as_me:14149: \$? = $ac_status" >&5
14150   (exit $ac_status); } &&
14151          { ac_try='test -s conftest.$ac_objext'
14152   { (eval echo "$as_me:14152: \"$ac_try\"") >&5
14153   (eval $ac_try) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit $ac_status); }; }; then
14157   cf_cv_unsigned_literals=yes
14158 else
14159   echo "$as_me: failed program was:" >&5
14160 cat conftest.$ac_ext >&5
14161 cf_cv_unsigned_literals=no
14162 fi
14163 rm -f conftest.$ac_objext conftest.$ac_ext
14164
14165 fi
14166
14167 echo "$as_me:14167: result: $cf_cv_unsigned_literals" >&5
14168 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14169
14170 cf_cv_1UL="1"
14171 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14172 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14173
14174 if test $NCURSES_MMASK_T = auto ; then
14175         cf_cv_typeof_mmask_t=long
14176 else
14177         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14178 fi
14179 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14180
14181 ###     Checks for external-data
14182
14183 echo "$as_me:14183: checking if external errno is declared" >&5
14184 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14185 if test "${cf_cv_dcl_errno+set}" = set; then
14186   echo $ECHO_N "(cached) $ECHO_C" >&6
14187 else
14188
14189     cat >conftest.$ac_ext <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192
14193 #ifdef HAVE_STDLIB_H
14194 #include <stdlib.h>
14195 #endif
14196 #include <stdio.h>
14197 #include <sys/types.h>
14198 #include <errno.h>
14199 int
14200 main ()
14201 {
14202 int x = (int) errno
14203   ;
14204   return 0;
14205 }
14206 _ACEOF
14207 rm -f conftest.$ac_objext
14208 if { (eval echo "$as_me:14208: \"$ac_compile\"") >&5
14209   (eval $ac_compile) 2>&5
14210   ac_status=$?
14211   echo "$as_me:14211: \$? = $ac_status" >&5
14212   (exit $ac_status); } &&
14213          { ac_try='test -s conftest.$ac_objext'
14214   { (eval echo "$as_me:14214: \"$ac_try\"") >&5
14215   (eval $ac_try) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); }; }; then
14219   cf_cv_dcl_errno=yes
14220 else
14221   echo "$as_me: failed program was:" >&5
14222 cat conftest.$ac_ext >&5
14223 cf_cv_dcl_errno=no
14224 fi
14225 rm -f conftest.$ac_objext conftest.$ac_ext
14226
14227 fi
14228 echo "$as_me:14228: result: $cf_cv_dcl_errno" >&5
14229 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14230
14231 if test "$cf_cv_dcl_errno" = no ; then
14232
14233 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14234
14235     cat >>confdefs.h <<EOF
14236 #define $cf_result 1
14237 EOF
14238
14239 fi
14240
14241 # It's possible (for near-UNIX clones) that the data doesn't exist
14242
14243 echo "$as_me:14243: checking if external errno exists" >&5
14244 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14245 if test "${cf_cv_have_errno+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248
14249     cat >conftest.$ac_ext <<_ACEOF
14250 #line 14250 "configure"
14251 #include "confdefs.h"
14252
14253 #undef errno
14254 extern int errno;
14255
14256 int
14257 main ()
14258 {
14259 errno = 2
14260   ;
14261   return 0;
14262 }
14263 _ACEOF
14264 rm -f conftest.$ac_objext conftest$ac_exeext
14265 if { (eval echo "$as_me:14265: \"$ac_link\"") >&5
14266   (eval $ac_link) 2>&5
14267   ac_status=$?
14268   echo "$as_me:14268: \$? = $ac_status" >&5
14269   (exit $ac_status); } &&
14270          { ac_try='test -s conftest$ac_exeext'
14271   { (eval echo "$as_me:14271: \"$ac_try\"") >&5
14272   (eval $ac_try) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); }; }; then
14276   cf_cv_have_errno=yes
14277 else
14278   echo "$as_me: failed program was:" >&5
14279 cat conftest.$ac_ext >&5
14280 cf_cv_have_errno=no
14281 fi
14282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14283
14284 fi
14285 echo "$as_me:14285: result: $cf_cv_have_errno" >&5
14286 echo "${ECHO_T}$cf_cv_have_errno" >&6
14287
14288 if test "$cf_cv_have_errno" = yes ; then
14289
14290 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14291
14292     cat >>confdefs.h <<EOF
14293 #define $cf_result 1
14294 EOF
14295
14296 fi
14297
14298 echo "$as_me:14298: checking if data-only library module links" >&5
14299 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14300 if test "${cf_cv_link_dataonly+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303
14304         rm -f conftest.a
14305         cat >conftest.$ac_ext <<EOF
14306 #line 14306 "configure"
14307 int     testdata[3] = { 123, 456, 789 };
14308 EOF
14309         if { (eval echo "$as_me:14309: \"$ac_compile\"") >&5
14310   (eval $ac_compile) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); } ; then
14314                 mv conftest.o data.o && \
14315                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14316         fi
14317         rm -f conftest.$ac_ext data.o
14318         cat >conftest.$ac_ext <<EOF
14319 #line 14319 "configure"
14320 int     testfunc()
14321 {
14322 #if defined(NeXT)
14323         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14324 #else
14325         extern int testdata[3];
14326         return testdata[0] == 123
14327            &&  testdata[1] == 456
14328            &&  testdata[2] == 789;
14329 #endif
14330 }
14331 EOF
14332         if { (eval echo "$as_me:14332: \"$ac_compile\"") >&5
14333   (eval $ac_compile) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit $ac_status); }; then
14337                 mv conftest.o func.o && \
14338                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14339         fi
14340         rm -f conftest.$ac_ext func.o
14341         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14342         cf_saveLIBS="$LIBS"
14343         LIBS="conftest.a $LIBS"
14344         if test "$cross_compiling" = yes; then
14345   cf_cv_link_dataonly=unknown
14346 else
14347   cat >conftest.$ac_ext <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14350
14351         int main()
14352         {
14353                 extern int testfunc();
14354                 ${cf_cv_main_return:-return} (!testfunc());
14355         }
14356
14357 _ACEOF
14358 rm -f conftest$ac_exeext
14359 if { (eval echo "$as_me:14359: \"$ac_link\"") >&5
14360   (eval $ac_link) 2>&5
14361   ac_status=$?
14362   echo "$as_me:14362: \$? = $ac_status" >&5
14363   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14364   { (eval echo "$as_me:14364: \"$ac_try\"") >&5
14365   (eval $ac_try) 2>&5
14366   ac_status=$?
14367   echo "$as_me:14367: \$? = $ac_status" >&5
14368   (exit $ac_status); }; }; then
14369   cf_cv_link_dataonly=yes
14370 else
14371   echo "$as_me: program exited with status $ac_status" >&5
14372 echo "$as_me: failed program was:" >&5
14373 cat conftest.$ac_ext >&5
14374 cf_cv_link_dataonly=no
14375 fi
14376 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14377 fi
14378         LIBS="$cf_saveLIBS"
14379
14380 fi
14381
14382 echo "$as_me:14382: result: $cf_cv_link_dataonly" >&5
14383 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14384
14385 if test "$cf_cv_link_dataonly" = no ; then
14386         cat >>confdefs.h <<\EOF
14387 #define BROKEN_LINKER 1
14388 EOF
14389
14390         BROKEN_LINKER=1
14391 fi
14392
14393 ###     Checks for library functions.
14394
14395 for ac_func in \
14396 getcwd \
14397 getegid \
14398 geteuid \
14399 getttynam \
14400 issetugid \
14401 poll \
14402 remove \
14403 select \
14404 setbuf \
14405 setbuffer \
14406 setvbuf \
14407 sigaction \
14408 sigvec \
14409 strdup \
14410 strstr \
14411 tcgetpgrp \
14412 times \
14413 vsnprintf \
14414
14415 do
14416 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14417 echo "$as_me:14417: checking for $ac_func" >&5
14418 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14419 if eval "test \"\${$as_ac_var+set}\" = set"; then
14420   echo $ECHO_N "(cached) $ECHO_C" >&6
14421 else
14422   cat >conftest.$ac_ext <<_ACEOF
14423 #line 14423 "configure"
14424 #include "confdefs.h"
14425 /* System header to define __stub macros and hopefully few prototypes,
14426     which can conflict with char $ac_func (); below.  */
14427 #include <assert.h>
14428 /* Override any gcc2 internal prototype to avoid an error.  */
14429 #ifdef __cplusplus
14430 extern "C"
14431 #endif
14432 /* We use char because int might match the return type of a gcc2
14433    builtin and then its argument prototype would still apply.  */
14434 char $ac_func ();
14435 char (*f) ();
14436
14437 int
14438 main ()
14439 {
14440 /* The GNU C library defines this for functions which it implements
14441     to always fail with ENOSYS.  Some functions are actually named
14442     something starting with __ and the normal name is an alias.  */
14443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14444 choke me
14445 #else
14446 f = $ac_func;
14447 #endif
14448
14449   ;
14450   return 0;
14451 }
14452 _ACEOF
14453 rm -f conftest.$ac_objext conftest$ac_exeext
14454 if { (eval echo "$as_me:14454: \"$ac_link\"") >&5
14455   (eval $ac_link) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); } &&
14459          { ac_try='test -s conftest$ac_exeext'
14460   { (eval echo "$as_me:14460: \"$ac_try\"") >&5
14461   (eval $ac_try) 2>&5
14462   ac_status=$?
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); }; }; then
14465   eval "$as_ac_var=yes"
14466 else
14467   echo "$as_me: failed program was:" >&5
14468 cat conftest.$ac_ext >&5
14469 eval "$as_ac_var=no"
14470 fi
14471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14472 fi
14473 echo "$as_me:14473: result: `eval echo '${'$as_ac_var'}'`" >&5
14474 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14475 if test `eval echo '${'$as_ac_var'}'` = yes; then
14476   cat >>confdefs.h <<EOF
14477 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14478 EOF
14479
14480 fi
14481 done
14482
14483 if test "$with_getcap" = "yes" ; then
14484
14485 echo "$as_me:14485: checking for terminal-capability database functions" >&5
14486 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14487 if test "${cf_cv_cgetent+set}" = set; then
14488   echo $ECHO_N "(cached) $ECHO_C" >&6
14489 else
14490
14491 cat >conftest.$ac_ext <<_ACEOF
14492 #line 14492 "configure"
14493 #include "confdefs.h"
14494
14495 #include <stdlib.h>
14496 int
14497 main ()
14498 {
14499
14500         char temp[128];
14501         char *buf = temp;
14502         char *db_array = temp;
14503         cgetent(&buf, /* int *, */ &db_array, "vt100");
14504         cgetcap(buf, "tc", '=');
14505         cgetmatch(buf, "tc");
14506
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 rm -f conftest.$ac_objext conftest$ac_exeext
14512 if { (eval echo "$as_me:14512: \"$ac_link\"") >&5
14513   (eval $ac_link) 2>&5
14514   ac_status=$?
14515   echo "$as_me:14515: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -s conftest$ac_exeext'
14518   { (eval echo "$as_me:14518: \"$ac_try\"") >&5
14519   (eval $ac_try) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); }; }; then
14523   cf_cv_cgetent=yes
14524 else
14525   echo "$as_me: failed program was:" >&5
14526 cat conftest.$ac_ext >&5
14527 cf_cv_cgetent=no
14528 fi
14529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14530
14531 fi
14532
14533 echo "$as_me:14533: result: $cf_cv_cgetent" >&5
14534 echo "${ECHO_T}$cf_cv_cgetent" >&6
14535 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14536 #define HAVE_BSD_CGETENT 1
14537 EOF
14538
14539 fi
14540
14541 echo "$as_me:14541: checking for isascii" >&5
14542 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14543 if test "${cf_cv_have_isascii+set}" = set; then
14544   echo $ECHO_N "(cached) $ECHO_C" >&6
14545 else
14546
14547         cat >conftest.$ac_ext <<_ACEOF
14548 #line 14548 "configure"
14549 #include "confdefs.h"
14550 #include <ctype.h>
14551 int
14552 main ()
14553 {
14554 int x = isascii(' ')
14555   ;
14556   return 0;
14557 }
14558 _ACEOF
14559 rm -f conftest.$ac_objext conftest$ac_exeext
14560 if { (eval echo "$as_me:14560: \"$ac_link\"") >&5
14561   (eval $ac_link) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit $ac_status); } &&
14565          { ac_try='test -s conftest$ac_exeext'
14566   { (eval echo "$as_me:14566: \"$ac_try\"") >&5
14567   (eval $ac_try) 2>&5
14568   ac_status=$?
14569   echo "$as_me:14569: \$? = $ac_status" >&5
14570   (exit $ac_status); }; }; then
14571   cf_cv_have_isascii=yes
14572 else
14573   echo "$as_me: failed program was:" >&5
14574 cat conftest.$ac_ext >&5
14575 cf_cv_have_isascii=no
14576 fi
14577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14578
14579 fi
14580 echo "$as_me:14580: result: $cf_cv_have_isascii" >&5
14581 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14582 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14583 #define HAVE_ISASCII 1
14584 EOF
14585
14586 if test "$ac_cv_func_sigaction" = yes; then
14587 echo "$as_me:14587: checking whether sigaction needs _POSIX_SOURCE" >&5
14588 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14589 cat >conftest.$ac_ext <<_ACEOF
14590 #line 14590 "configure"
14591 #include "confdefs.h"
14592
14593 #include <sys/types.h>
14594 #include <signal.h>
14595 int
14596 main ()
14597 {
14598 struct sigaction act
14599   ;
14600   return 0;
14601 }
14602 _ACEOF
14603 rm -f conftest.$ac_objext
14604 if { (eval echo "$as_me:14604: \"$ac_compile\"") >&5
14605   (eval $ac_compile) 2>&5
14606   ac_status=$?
14607   echo "$as_me:14607: \$? = $ac_status" >&5
14608   (exit $ac_status); } &&
14609          { ac_try='test -s conftest.$ac_objext'
14610   { (eval echo "$as_me:14610: \"$ac_try\"") >&5
14611   (eval $ac_try) 2>&5
14612   ac_status=$?
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit $ac_status); }; }; then
14615   sigact_bad=no
14616 else
14617   echo "$as_me: failed program was:" >&5
14618 cat conftest.$ac_ext >&5
14619
14620 cat >conftest.$ac_ext <<_ACEOF
14621 #line 14621 "configure"
14622 #include "confdefs.h"
14623
14624 #define _POSIX_SOURCE
14625 #include <sys/types.h>
14626 #include <signal.h>
14627 int
14628 main ()
14629 {
14630 struct sigaction act
14631   ;
14632   return 0;
14633 }
14634 _ACEOF
14635 rm -f conftest.$ac_objext
14636 if { (eval echo "$as_me:14636: \"$ac_compile\"") >&5
14637   (eval $ac_compile) 2>&5
14638   ac_status=$?
14639   echo "$as_me:14639: \$? = $ac_status" >&5
14640   (exit $ac_status); } &&
14641          { ac_try='test -s conftest.$ac_objext'
14642   { (eval echo "$as_me:14642: \"$ac_try\"") >&5
14643   (eval $ac_try) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); }; }; then
14647   sigact_bad=yes
14648          cat >>confdefs.h <<\EOF
14649 #define SVR4_ACTION 1
14650 EOF
14651
14652 else
14653   echo "$as_me: failed program was:" >&5
14654 cat conftest.$ac_ext >&5
14655 sigact_bad=unknown
14656 fi
14657 rm -f conftest.$ac_objext conftest.$ac_ext
14658 fi
14659 rm -f conftest.$ac_objext conftest.$ac_ext
14660 echo "$as_me:14660: result: $sigact_bad" >&5
14661 echo "${ECHO_T}$sigact_bad" >&6
14662 fi
14663
14664 echo "$as_me:14664: checking if nanosleep really works" >&5
14665 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14666 if test "${cf_cv_func_nanosleep+set}" = set; then
14667   echo $ECHO_N "(cached) $ECHO_C" >&6
14668 else
14669
14670 if test "$cross_compiling" = yes; then
14671   cf_cv_func_nanosleep=unknown
14672 else
14673   cat >conftest.$ac_ext <<_ACEOF
14674 #line 14674 "configure"
14675 #include "confdefs.h"
14676
14677 #include <stdio.h>
14678 #include <errno.h>
14679 #include <time.h>
14680
14681 #ifdef HAVE_SYS_TIME_H
14682 #include <sys/time.h>
14683 #endif
14684
14685 int main() {
14686         struct timespec ts1, ts2;
14687         int code;
14688         ts1.tv_sec  = 0;
14689         ts1.tv_nsec = 750000000;
14690         ts2.tv_sec  = 0;
14691         ts2.tv_nsec = 0;
14692         errno = 0;
14693         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14694         ${cf_cv_main_return:-return}(code != 0);
14695 }
14696
14697 _ACEOF
14698 rm -f conftest$ac_exeext
14699 if { (eval echo "$as_me:14699: \"$ac_link\"") >&5
14700   (eval $ac_link) 2>&5
14701   ac_status=$?
14702   echo "$as_me:14702: \$? = $ac_status" >&5
14703   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14704   { (eval echo "$as_me:14704: \"$ac_try\"") >&5
14705   (eval $ac_try) 2>&5
14706   ac_status=$?
14707   echo "$as_me:14707: \$? = $ac_status" >&5
14708   (exit $ac_status); }; }; then
14709   cf_cv_func_nanosleep=yes
14710 else
14711   echo "$as_me: program exited with status $ac_status" >&5
14712 echo "$as_me: failed program was:" >&5
14713 cat conftest.$ac_ext >&5
14714 cf_cv_func_nanosleep=no
14715 fi
14716 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14717 fi
14718 fi
14719 echo "$as_me:14719: result: $cf_cv_func_nanosleep" >&5
14720 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14721
14722 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14723 #define HAVE_NANOSLEEP 1
14724 EOF
14725
14726 for ac_header in \
14727 termio.h \
14728 termios.h \
14729 unistd.h \
14730
14731 do
14732 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14733 echo "$as_me:14733: checking for $ac_header" >&5
14734 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14735 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14736   echo $ECHO_N "(cached) $ECHO_C" >&6
14737 else
14738   cat >conftest.$ac_ext <<_ACEOF
14739 #line 14739 "configure"
14740 #include "confdefs.h"
14741 #include <$ac_header>
14742 _ACEOF
14743 if { (eval echo "$as_me:14743: \"$ac_cpp conftest.$ac_ext\"") >&5
14744   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14745   ac_status=$?
14746   egrep -v '^ *\+' conftest.er1 >conftest.err
14747   rm -f conftest.er1
14748   cat conftest.err >&5
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit $ac_status); } >/dev/null; then
14751   if test -s conftest.err; then
14752     ac_cpp_err=$ac_c_preproc_warn_flag
14753   else
14754     ac_cpp_err=
14755   fi
14756 else
14757   ac_cpp_err=yes
14758 fi
14759 if test -z "$ac_cpp_err"; then
14760   eval "$as_ac_Header=yes"
14761 else
14762   echo "$as_me: failed program was:" >&5
14763   cat conftest.$ac_ext >&5
14764   eval "$as_ac_Header=no"
14765 fi
14766 rm -f conftest.err conftest.$ac_ext
14767 fi
14768 echo "$as_me:14768: result: `eval echo '${'$as_ac_Header'}'`" >&5
14769 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14770 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14771   cat >>confdefs.h <<EOF
14772 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14773 EOF
14774
14775 fi
14776 done
14777
14778 if test "$ISC" = yes ; then
14779
14780 for ac_header in sys/termio.h
14781 do
14782 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14783 echo "$as_me:14783: checking for $ac_header" >&5
14784 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14785 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14786   echo $ECHO_N "(cached) $ECHO_C" >&6
14787 else
14788   cat >conftest.$ac_ext <<_ACEOF
14789 #line 14789 "configure"
14790 #include "confdefs.h"
14791 #include <$ac_header>
14792 _ACEOF
14793 if { (eval echo "$as_me:14793: \"$ac_cpp conftest.$ac_ext\"") >&5
14794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14795   ac_status=$?
14796   egrep -v '^ *\+' conftest.er1 >conftest.err
14797   rm -f conftest.er1
14798   cat conftest.err >&5
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); } >/dev/null; then
14801   if test -s conftest.err; then
14802     ac_cpp_err=$ac_c_preproc_warn_flag
14803   else
14804     ac_cpp_err=
14805   fi
14806 else
14807   ac_cpp_err=yes
14808 fi
14809 if test -z "$ac_cpp_err"; then
14810   eval "$as_ac_Header=yes"
14811 else
14812   echo "$as_me: failed program was:" >&5
14813   cat conftest.$ac_ext >&5
14814   eval "$as_ac_Header=no"
14815 fi
14816 rm -f conftest.err conftest.$ac_ext
14817 fi
14818 echo "$as_me:14818: result: `eval echo '${'$as_ac_Header'}'`" >&5
14819 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14820 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14821   cat >>confdefs.h <<EOF
14822 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14823 EOF
14824
14825 fi
14826 done
14827
14828 fi
14829 if test "$ac_cv_header_termios_h" = yes ; then
14830         case "$CFLAGS $CPPFLAGS" in
14831         *-D_POSIX_SOURCE*)
14832                 termios_bad=dunno ;;
14833         *)      termios_bad=maybe ;;
14834         esac
14835         if test "$termios_bad" = maybe ; then
14836         echo "$as_me:14836: checking whether termios.h needs _POSIX_SOURCE" >&5
14837 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14838         cat >conftest.$ac_ext <<_ACEOF
14839 #line 14839 "configure"
14840 #include "confdefs.h"
14841 #include <termios.h>
14842 int
14843 main ()
14844 {
14845 struct termios foo; int x = foo.c_iflag
14846   ;
14847   return 0;
14848 }
14849 _ACEOF
14850 rm -f conftest.$ac_objext
14851 if { (eval echo "$as_me:14851: \"$ac_compile\"") >&5
14852   (eval $ac_compile) 2>&5
14853   ac_status=$?
14854   echo "$as_me:14854: \$? = $ac_status" >&5
14855   (exit $ac_status); } &&
14856          { ac_try='test -s conftest.$ac_objext'
14857   { (eval echo "$as_me:14857: \"$ac_try\"") >&5
14858   (eval $ac_try) 2>&5
14859   ac_status=$?
14860   echo "$as_me:14860: \$? = $ac_status" >&5
14861   (exit $ac_status); }; }; then
14862   termios_bad=no
14863 else
14864   echo "$as_me: failed program was:" >&5
14865 cat conftest.$ac_ext >&5
14866
14867                 cat >conftest.$ac_ext <<_ACEOF
14868 #line 14868 "configure"
14869 #include "confdefs.h"
14870
14871 #define _POSIX_SOURCE
14872 #include <termios.h>
14873 int
14874 main ()
14875 {
14876 struct termios foo; int x = foo.c_iflag
14877   ;
14878   return 0;
14879 }
14880 _ACEOF
14881 rm -f conftest.$ac_objext
14882 if { (eval echo "$as_me:14882: \"$ac_compile\"") >&5
14883   (eval $ac_compile) 2>&5
14884   ac_status=$?
14885   echo "$as_me:14885: \$? = $ac_status" >&5
14886   (exit $ac_status); } &&
14887          { ac_try='test -s conftest.$ac_objext'
14888   { (eval echo "$as_me:14888: \"$ac_try\"") >&5
14889   (eval $ac_try) 2>&5
14890   ac_status=$?
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); }; }; then
14893   termios_bad=unknown
14894 else
14895   echo "$as_me: failed program was:" >&5
14896 cat conftest.$ac_ext >&5
14897 termios_bad=yes cat >>confdefs.h <<\EOF
14898 #define SVR4_TERMIO 1
14899 EOF
14900
14901 fi
14902 rm -f conftest.$ac_objext conftest.$ac_ext
14903
14904 fi
14905 rm -f conftest.$ac_objext conftest.$ac_ext
14906         echo "$as_me:14906: result: $termios_bad" >&5
14907 echo "${ECHO_T}$termios_bad" >&6
14908         fi
14909 fi
14910
14911 echo "$as_me:14911: checking for tcgetattr" >&5
14912 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14913 if test "${cf_cv_have_tcgetattr+set}" = set; then
14914   echo $ECHO_N "(cached) $ECHO_C" >&6
14915 else
14916
14917 cat >conftest.$ac_ext <<_ACEOF
14918 #line 14918 "configure"
14919 #include "confdefs.h"
14920
14921 #include <sys/types.h>
14922 #ifdef HAVE_UNISTD_H
14923 #include <unistd.h>
14924 #endif
14925 #ifdef HAVE_TERMIOS_H
14926 #include <termios.h>
14927 #define TTY struct termios
14928 #else
14929 #ifdef HAVE_TERMIO_H
14930 #include <termio.h>
14931 #define TTY struct termio
14932 #endif
14933 #endif
14934
14935 int
14936 main ()
14937 {
14938
14939 TTY foo;
14940 tcgetattr(1, &foo);
14941   ;
14942   return 0;
14943 }
14944 _ACEOF
14945 rm -f conftest.$ac_objext conftest$ac_exeext
14946 if { (eval echo "$as_me:14946: \"$ac_link\"") >&5
14947   (eval $ac_link) 2>&5
14948   ac_status=$?
14949   echo "$as_me:14949: \$? = $ac_status" >&5
14950   (exit $ac_status); } &&
14951          { ac_try='test -s conftest$ac_exeext'
14952   { (eval echo "$as_me:14952: \"$ac_try\"") >&5
14953   (eval $ac_try) 2>&5
14954   ac_status=$?
14955   echo "$as_me:14955: \$? = $ac_status" >&5
14956   (exit $ac_status); }; }; then
14957   cf_cv_have_tcgetattr=yes
14958 else
14959   echo "$as_me: failed program was:" >&5
14960 cat conftest.$ac_ext >&5
14961 cf_cv_have_tcgetattr=no
14962 fi
14963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14964 fi
14965 echo "$as_me:14965: result: $cf_cv_have_tcgetattr" >&5
14966 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14967 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14968 #define HAVE_TCGETATTR 1
14969 EOF
14970
14971 echo "$as_me:14971: checking for vsscanf function or workaround" >&5
14972 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14973 if test "${cf_cv_func_vsscanf+set}" = set; then
14974   echo $ECHO_N "(cached) $ECHO_C" >&6
14975 else
14976
14977 cat >conftest.$ac_ext <<_ACEOF
14978 #line 14978 "configure"
14979 #include "confdefs.h"
14980
14981 #include <stdarg.h>
14982 #include <stdio.h>
14983 int
14984 main ()
14985 {
14986
14987         va_list ap;
14988         vsscanf("from", "%d", ap)
14989   ;
14990   return 0;
14991 }
14992 _ACEOF
14993 rm -f conftest.$ac_objext conftest$ac_exeext
14994 if { (eval echo "$as_me:14994: \"$ac_link\"") >&5
14995   (eval $ac_link) 2>&5
14996   ac_status=$?
14997   echo "$as_me:14997: \$? = $ac_status" >&5
14998   (exit $ac_status); } &&
14999          { ac_try='test -s conftest$ac_exeext'
15000   { (eval echo "$as_me:15000: \"$ac_try\"") >&5
15001   (eval $ac_try) 2>&5
15002   ac_status=$?
15003   echo "$as_me:15003: \$? = $ac_status" >&5
15004   (exit $ac_status); }; }; then
15005   cf_cv_func_vsscanf=vsscanf
15006 else
15007   echo "$as_me: failed program was:" >&5
15008 cat conftest.$ac_ext >&5
15009
15010 cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013
15014 #include <stdarg.h>
15015 #include <stdio.h>
15016 int
15017 main ()
15018 {
15019
15020     FILE strbuf;
15021     char *str = "from";
15022
15023     strbuf._flag = _IOREAD;
15024     strbuf._ptr = strbuf._base = (unsigned char *) str;
15025     strbuf._cnt = strlen(str);
15026     strbuf._file = _NFILE;
15027     return (vfscanf(&strbuf, "%d", ap))
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 rm -f conftest.$ac_objext conftest$ac_exeext
15033 if { (eval echo "$as_me:15033: \"$ac_link\"") >&5
15034   (eval $ac_link) 2>&5
15035   ac_status=$?
15036   echo "$as_me:15036: \$? = $ac_status" >&5
15037   (exit $ac_status); } &&
15038          { ac_try='test -s conftest$ac_exeext'
15039   { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040   (eval $ac_try) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit $ac_status); }; }; then
15044   cf_cv_func_vsscanf=vfscanf
15045 else
15046   echo "$as_me: failed program was:" >&5
15047 cat conftest.$ac_ext >&5
15048
15049 cat >conftest.$ac_ext <<_ACEOF
15050 #line 15050 "configure"
15051 #include "confdefs.h"
15052
15053 #include <stdarg.h>
15054 #include <stdio.h>
15055 int
15056 main ()
15057 {
15058
15059     FILE strbuf;
15060     char *str = "from";
15061
15062     strbuf._flag = _IOREAD;
15063     strbuf._ptr = strbuf._base = (unsigned char *) str;
15064     strbuf._cnt = strlen(str);
15065     strbuf._file = _NFILE;
15066     return (_doscan(&strbuf, "%d", ap))
15067   ;
15068   return 0;
15069 }
15070 _ACEOF
15071 rm -f conftest.$ac_objext conftest$ac_exeext
15072 if { (eval echo "$as_me:15072: \"$ac_link\"") >&5
15073   (eval $ac_link) 2>&5
15074   ac_status=$?
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit $ac_status); } &&
15077          { ac_try='test -s conftest$ac_exeext'
15078   { (eval echo "$as_me:15078: \"$ac_try\"") >&5
15079   (eval $ac_try) 2>&5
15080   ac_status=$?
15081   echo "$as_me:15081: \$? = $ac_status" >&5
15082   (exit $ac_status); }; }; then
15083   cf_cv_func_vsscanf=_doscan
15084 else
15085   echo "$as_me: failed program was:" >&5
15086 cat conftest.$ac_ext >&5
15087
15088 cf_cv_func_vsscanf=no
15089 fi
15090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15091 fi
15092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15093 fi
15094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15095 fi
15096 echo "$as_me:15096: result: $cf_cv_func_vsscanf" >&5
15097 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15098
15099 case $cf_cv_func_vsscanf in #(vi
15100 vsscanf) cat >>confdefs.h <<\EOF
15101 #define HAVE_VSSCANF 1
15102 EOF
15103 ;; #(vi
15104 vfscanf) cat >>confdefs.h <<\EOF
15105 #define HAVE_VFSCANF 1
15106 EOF
15107 ;; #(vi
15108 _doscan) cat >>confdefs.h <<\EOF
15109 #define HAVE__DOSCAN 1
15110 EOF
15111 ;;
15112 esac
15113
15114 echo "$as_me:15114: checking for working mkstemp" >&5
15115 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15116 if test "${cf_cv_func_mkstemp+set}" = set; then
15117   echo $ECHO_N "(cached) $ECHO_C" >&6
15118 else
15119
15120 rm -rf conftest*
15121 if test "$cross_compiling" = yes; then
15122   echo "$as_me:15122: checking for mkstemp" >&5
15123 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15124 if test "${ac_cv_func_mkstemp+set}" = set; then
15125   echo $ECHO_N "(cached) $ECHO_C" >&6
15126 else
15127   cat >conftest.$ac_ext <<_ACEOF
15128 #line 15128 "configure"
15129 #include "confdefs.h"
15130 /* System header to define __stub macros and hopefully few prototypes,
15131     which can conflict with char mkstemp (); below.  */
15132 #include <assert.h>
15133 /* Override any gcc2 internal prototype to avoid an error.  */
15134 #ifdef __cplusplus
15135 extern "C"
15136 #endif
15137 /* We use char because int might match the return type of a gcc2
15138    builtin and then its argument prototype would still apply.  */
15139 char mkstemp ();
15140 char (*f) ();
15141
15142 int
15143 main ()
15144 {
15145 /* The GNU C library defines this for functions which it implements
15146     to always fail with ENOSYS.  Some functions are actually named
15147     something starting with __ and the normal name is an alias.  */
15148 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15149 choke me
15150 #else
15151 f = mkstemp;
15152 #endif
15153
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 rm -f conftest.$ac_objext conftest$ac_exeext
15159 if { (eval echo "$as_me:15159: \"$ac_link\"") >&5
15160   (eval $ac_link) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); } &&
15164          { ac_try='test -s 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   ac_cv_func_mkstemp=yes
15171 else
15172   echo "$as_me: failed program was:" >&5
15173 cat conftest.$ac_ext >&5
15174 ac_cv_func_mkstemp=no
15175 fi
15176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15177 fi
15178 echo "$as_me:15178: result: $ac_cv_func_mkstemp" >&5
15179 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15180
15181 else
15182   cat >conftest.$ac_ext <<_ACEOF
15183 #line 15183 "configure"
15184 #include "confdefs.h"
15185
15186 #include <sys/types.h>
15187 #include <stdlib.h>
15188 #include <stdio.h>
15189 #include <string.h>
15190 #include <sys/stat.h>
15191 int main()
15192 {
15193         char *tmpl = "conftestXXXXXX";
15194         char name[2][80];
15195         int n;
15196         int result = 0;
15197         int fd;
15198         struct stat sb;
15199
15200         umask(077);
15201         for (n = 0; n < 2; ++n) {
15202                 strcpy(name[n], tmpl);
15203                 if ((fd = mkstemp(name[n])) >= 0) {
15204                         if (!strcmp(name[n], tmpl)
15205                          || stat(name[n], &sb) != 0
15206                          || (sb.st_mode & S_IFMT) != S_IFREG
15207                          || (sb.st_mode & 077) != 0) {
15208                                 result = 1;
15209                         }
15210                         close(fd);
15211                 }
15212         }
15213         if (result == 0
15214          && !strcmp(name[0], name[1]))
15215                 result = 1;
15216         ${cf_cv_main_return:-return}(result);
15217 }
15218
15219 _ACEOF
15220 rm -f conftest$ac_exeext
15221 if { (eval echo "$as_me:15221: \"$ac_link\"") >&5
15222   (eval $ac_link) 2>&5
15223   ac_status=$?
15224   echo "$as_me:15224: \$? = $ac_status" >&5
15225   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231   cf_cv_func_mkstemp=yes
15232
15233 else
15234   echo "$as_me: program exited with status $ac_status" >&5
15235 echo "$as_me: failed program was:" >&5
15236 cat conftest.$ac_ext >&5
15237 cf_cv_func_mkstemp=no
15238
15239 fi
15240 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15241 fi
15242
15243 fi
15244 echo "$as_me:15244: result: $cf_cv_func_mkstemp" >&5
15245 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15246 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15247         cat >>confdefs.h <<\EOF
15248 #define HAVE_MKSTEMP 1
15249 EOF
15250
15251 fi
15252
15253 # setup for prototype of fallback for vsscanf()
15254
15255 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15256         HAVE_VSSCANF=1
15257 else
15258         HAVE_VSSCANF=0
15259 fi
15260
15261 if test "$cross_compiling" = yes ; then
15262         { echo "$as_me:15262: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15263 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15264 else
15265         echo "$as_me:15265: checking whether setvbuf arguments are reversed" >&5
15266 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15267 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15268   echo $ECHO_N "(cached) $ECHO_C" >&6
15269 else
15270   if test "$cross_compiling" = yes; then
15271   { { echo "$as_me:15271: error: cannot run test program while cross compiling" >&5
15272 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15273    { (exit 1); exit 1; }; }
15274 else
15275   cat >conftest.$ac_ext <<_ACEOF
15276 #line 15276 "configure"
15277 #include "confdefs.h"
15278 #include <stdio.h>
15279 /* If setvbuf has the reversed format, exit 0. */
15280 int
15281 main ()
15282 {
15283   /* This call has the arguments reversed.
15284      A reversed system may check and see that the address of main
15285      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15286   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15287     $ac_main_return(1);
15288   putc('\r', stdout);
15289   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15290 }
15291 _ACEOF
15292 rm -f conftest$ac_exeext
15293 if { (eval echo "$as_me:15293: \"$ac_link\"") >&5
15294   (eval $ac_link) 2>&5
15295   ac_status=$?
15296   echo "$as_me:15296: \$? = $ac_status" >&5
15297   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15298   { (eval echo "$as_me:15298: \"$ac_try\"") >&5
15299   (eval $ac_try) 2>&5
15300   ac_status=$?
15301   echo "$as_me:15301: \$? = $ac_status" >&5
15302   (exit $ac_status); }; }; then
15303   ac_cv_func_setvbuf_reversed=yes
15304 else
15305   echo "$as_me: program exited with status $ac_status" >&5
15306 echo "$as_me: failed program was:" >&5
15307 cat conftest.$ac_ext >&5
15308 ac_cv_func_setvbuf_reversed=no
15309 fi
15310 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15311 fi
15312 rm -f core core.* *.core
15313 fi
15314 echo "$as_me:15314: result: $ac_cv_func_setvbuf_reversed" >&5
15315 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15316 if test $ac_cv_func_setvbuf_reversed = yes; then
15317
15318 cat >>confdefs.h <<\EOF
15319 #define SETVBUF_REVERSED 1
15320 EOF
15321
15322 fi
15323
15324 fi
15325 echo "$as_me:15325: checking return type of signal handlers" >&5
15326 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15327 if test "${ac_cv_type_signal+set}" = set; then
15328   echo $ECHO_N "(cached) $ECHO_C" >&6
15329 else
15330   cat >conftest.$ac_ext <<_ACEOF
15331 #line 15331 "configure"
15332 #include "confdefs.h"
15333 #include <sys/types.h>
15334 #include <signal.h>
15335 #ifdef signal
15336 # undef signal
15337 #endif
15338 #ifdef __cplusplus
15339 extern "C" void (*signal (int, void (*)(int)))(int);
15340 #else
15341 void (*signal ()) ();
15342 #endif
15343
15344 int
15345 main ()
15346 {
15347 int i;
15348   ;
15349   return 0;
15350 }
15351 _ACEOF
15352 rm -f conftest.$ac_objext
15353 if { (eval echo "$as_me:15353: \"$ac_compile\"") >&5
15354   (eval $ac_compile) 2>&5
15355   ac_status=$?
15356   echo "$as_me:15356: \$? = $ac_status" >&5
15357   (exit $ac_status); } &&
15358          { ac_try='test -s conftest.$ac_objext'
15359   { (eval echo "$as_me:15359: \"$ac_try\"") >&5
15360   (eval $ac_try) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); }; }; then
15364   ac_cv_type_signal=void
15365 else
15366   echo "$as_me: failed program was:" >&5
15367 cat conftest.$ac_ext >&5
15368 ac_cv_type_signal=int
15369 fi
15370 rm -f conftest.$ac_objext conftest.$ac_ext
15371 fi
15372 echo "$as_me:15372: result: $ac_cv_type_signal" >&5
15373 echo "${ECHO_T}$ac_cv_type_signal" >&6
15374
15375 cat >>confdefs.h <<EOF
15376 #define RETSIGTYPE $ac_cv_type_signal
15377 EOF
15378
15379 echo "$as_me:15379: checking for type sigaction_t" >&5
15380 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15381 if test "${cf_cv_type_sigaction+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384
15385         cat >conftest.$ac_ext <<_ACEOF
15386 #line 15386 "configure"
15387 #include "confdefs.h"
15388
15389 #include <signal.h>
15390 int
15391 main ()
15392 {
15393 sigaction_t x
15394   ;
15395   return 0;
15396 }
15397 _ACEOF
15398 rm -f conftest.$ac_objext
15399 if { (eval echo "$as_me:15399: \"$ac_compile\"") >&5
15400   (eval $ac_compile) 2>&5
15401   ac_status=$?
15402   echo "$as_me:15402: \$? = $ac_status" >&5
15403   (exit $ac_status); } &&
15404          { ac_try='test -s conftest.$ac_objext'
15405   { (eval echo "$as_me:15405: \"$ac_try\"") >&5
15406   (eval $ac_try) 2>&5
15407   ac_status=$?
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit $ac_status); }; }; then
15410   cf_cv_type_sigaction=yes
15411 else
15412   echo "$as_me: failed program was:" >&5
15413 cat conftest.$ac_ext >&5
15414 cf_cv_type_sigaction=no
15415 fi
15416 rm -f conftest.$ac_objext conftest.$ac_ext
15417 fi
15418
15419 echo "$as_me:15419: result: $cf_cv_type_sigaction" >&5
15420 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15421 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15422 #define HAVE_TYPE_SIGACTION 1
15423 EOF
15424
15425 echo "$as_me:15425: checking declaration of size-change" >&5
15426 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15427 if test "${cf_cv_sizechange+set}" = set; then
15428   echo $ECHO_N "(cached) $ECHO_C" >&6
15429 else
15430
15431     cf_cv_sizechange=unknown
15432     cf_save_CPPFLAGS="$CPPFLAGS"
15433
15434 for cf_opts in "" "NEED_PTEM_H"
15435 do
15436
15437     CPPFLAGS="$cf_save_CPPFLAGS"
15438     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15439     cat >conftest.$ac_ext <<_ACEOF
15440 #line 15440 "configure"
15441 #include "confdefs.h"
15442 #include <sys/types.h>
15443 #ifdef HAVE_TERMIOS_H
15444 #include <termios.h>
15445 #else
15446 #ifdef HAVE_TERMIO_H
15447 #include <termio.h>
15448 #endif
15449 #endif
15450 #ifdef NEED_PTEM_H
15451 /* This is a workaround for SCO:  they neglected to define struct winsize in
15452  * termios.h -- it's only in termio.h and ptem.h
15453  */
15454 #include        <sys/stream.h>
15455 #include        <sys/ptem.h>
15456 #endif
15457 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15458 #include <sys/ioctl.h>
15459 #endif
15460
15461 int
15462 main ()
15463 {
15464
15465 #ifdef TIOCGSIZE
15466         struct ttysize win;     /* FIXME: what system is this? */
15467         int y = win.ts_lines;
15468         int x = win.ts_cols;
15469 #else
15470 #ifdef TIOCGWINSZ
15471         struct winsize win;
15472         int y = win.ws_row;
15473         int x = win.ws_col;
15474 #else
15475         no TIOCGSIZE or TIOCGWINSZ
15476 #endif /* TIOCGWINSZ */
15477 #endif /* TIOCGSIZE */
15478
15479   ;
15480   return 0;
15481 }
15482 _ACEOF
15483 rm -f conftest.$ac_objext
15484 if { (eval echo "$as_me:15484: \"$ac_compile\"") >&5
15485   (eval $ac_compile) 2>&5
15486   ac_status=$?
15487   echo "$as_me:15487: \$? = $ac_status" >&5
15488   (exit $ac_status); } &&
15489          { ac_try='test -s conftest.$ac_objext'
15490   { (eval echo "$as_me:15490: \"$ac_try\"") >&5
15491   (eval $ac_try) 2>&5
15492   ac_status=$?
15493   echo "$as_me:15493: \$? = $ac_status" >&5
15494   (exit $ac_status); }; }; then
15495   cf_cv_sizechange=yes
15496 else
15497   echo "$as_me: failed program was:" >&5
15498 cat conftest.$ac_ext >&5
15499 cf_cv_sizechange=no
15500 fi
15501 rm -f conftest.$ac_objext conftest.$ac_ext
15502
15503         CPPFLAGS="$cf_save_CPPFLAGS"
15504         if test "$cf_cv_sizechange" = yes ; then
15505                 echo "size-change succeeded ($cf_opts)" >&5
15506                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15507                 break
15508         fi
15509 done
15510
15511 fi
15512 echo "$as_me:15512: result: $cf_cv_sizechange" >&5
15513 echo "${ECHO_T}$cf_cv_sizechange" >&6
15514 if test "$cf_cv_sizechange" != no ; then
15515         cat >>confdefs.h <<\EOF
15516 #define HAVE_SIZECHANGE 1
15517 EOF
15518
15519         case $cf_cv_sizechange in #(vi
15520         NEED*)
15521                 cat >>confdefs.h <<EOF
15522 #define $cf_cv_sizechange  1
15523 EOF
15524
15525                 ;;
15526         esac
15527 fi
15528
15529 echo "$as_me:15529: checking for memmove" >&5
15530 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15531 if test "${ac_cv_func_memmove+set}" = set; then
15532   echo $ECHO_N "(cached) $ECHO_C" >&6
15533 else
15534   cat >conftest.$ac_ext <<_ACEOF
15535 #line 15535 "configure"
15536 #include "confdefs.h"
15537 /* System header to define __stub macros and hopefully few prototypes,
15538     which can conflict with char memmove (); below.  */
15539 #include <assert.h>
15540 /* Override any gcc2 internal prototype to avoid an error.  */
15541 #ifdef __cplusplus
15542 extern "C"
15543 #endif
15544 /* We use char because int might match the return type of a gcc2
15545    builtin and then its argument prototype would still apply.  */
15546 char memmove ();
15547 char (*f) ();
15548
15549 int
15550 main ()
15551 {
15552 /* The GNU C library defines this for functions which it implements
15553     to always fail with ENOSYS.  Some functions are actually named
15554     something starting with __ and the normal name is an alias.  */
15555 #if defined (__stub_memmove) || defined (__stub___memmove)
15556 choke me
15557 #else
15558 f = memmove;
15559 #endif
15560
15561   ;
15562   return 0;
15563 }
15564 _ACEOF
15565 rm -f conftest.$ac_objext conftest$ac_exeext
15566 if { (eval echo "$as_me:15566: \"$ac_link\"") >&5
15567   (eval $ac_link) 2>&5
15568   ac_status=$?
15569   echo "$as_me:15569: \$? = $ac_status" >&5
15570   (exit $ac_status); } &&
15571          { ac_try='test -s conftest$ac_exeext'
15572   { (eval echo "$as_me:15572: \"$ac_try\"") >&5
15573   (eval $ac_try) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); }; }; then
15577   ac_cv_func_memmove=yes
15578 else
15579   echo "$as_me: failed program was:" >&5
15580 cat conftest.$ac_ext >&5
15581 ac_cv_func_memmove=no
15582 fi
15583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15584 fi
15585 echo "$as_me:15585: result: $ac_cv_func_memmove" >&5
15586 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15587 if test $ac_cv_func_memmove = yes; then
15588   :
15589 else
15590
15591 echo "$as_me:15591: checking for bcopy" >&5
15592 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15593 if test "${ac_cv_func_bcopy+set}" = set; then
15594   echo $ECHO_N "(cached) $ECHO_C" >&6
15595 else
15596   cat >conftest.$ac_ext <<_ACEOF
15597 #line 15597 "configure"
15598 #include "confdefs.h"
15599 /* System header to define __stub macros and hopefully few prototypes,
15600     which can conflict with char bcopy (); below.  */
15601 #include <assert.h>
15602 /* Override any gcc2 internal prototype to avoid an error.  */
15603 #ifdef __cplusplus
15604 extern "C"
15605 #endif
15606 /* We use char because int might match the return type of a gcc2
15607    builtin and then its argument prototype would still apply.  */
15608 char bcopy ();
15609 char (*f) ();
15610
15611 int
15612 main ()
15613 {
15614 /* The GNU C library defines this for functions which it implements
15615     to always fail with ENOSYS.  Some functions are actually named
15616     something starting with __ and the normal name is an alias.  */
15617 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15618 choke me
15619 #else
15620 f = bcopy;
15621 #endif
15622
15623   ;
15624   return 0;
15625 }
15626 _ACEOF
15627 rm -f conftest.$ac_objext conftest$ac_exeext
15628 if { (eval echo "$as_me:15628: \"$ac_link\"") >&5
15629   (eval $ac_link) 2>&5
15630   ac_status=$?
15631   echo "$as_me:15631: \$? = $ac_status" >&5
15632   (exit $ac_status); } &&
15633          { ac_try='test -s conftest$ac_exeext'
15634   { (eval echo "$as_me:15634: \"$ac_try\"") >&5
15635   (eval $ac_try) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); }; }; then
15639   ac_cv_func_bcopy=yes
15640 else
15641   echo "$as_me: failed program was:" >&5
15642 cat conftest.$ac_ext >&5
15643 ac_cv_func_bcopy=no
15644 fi
15645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15646 fi
15647 echo "$as_me:15647: result: $ac_cv_func_bcopy" >&5
15648 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15649 if test $ac_cv_func_bcopy = yes; then
15650
15651         echo "$as_me:15651: checking if bcopy does overlapping moves" >&5
15652 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15653 if test "${cf_cv_good_bcopy+set}" = set; then
15654   echo $ECHO_N "(cached) $ECHO_C" >&6
15655 else
15656
15657                 if test "$cross_compiling" = yes; then
15658   cf_cv_good_bcopy=unknown
15659 else
15660   cat >conftest.$ac_ext <<_ACEOF
15661 #line 15661 "configure"
15662 #include "confdefs.h"
15663
15664 int main() {
15665         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15666         char temp[40];
15667         bcopy(data, temp, sizeof(data));
15668         bcopy(temp+10, temp, 15);
15669         bcopy(temp+5, temp+15, 10);
15670         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15671 }
15672
15673 _ACEOF
15674 rm -f conftest$ac_exeext
15675 if { (eval echo "$as_me:15675: \"$ac_link\"") >&5
15676   (eval $ac_link) 2>&5
15677   ac_status=$?
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15680   { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681   (eval $ac_try) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); }; }; then
15685   cf_cv_good_bcopy=yes
15686 else
15687   echo "$as_me: program exited with status $ac_status" >&5
15688 echo "$as_me: failed program was:" >&5
15689 cat conftest.$ac_ext >&5
15690 cf_cv_good_bcopy=no
15691 fi
15692 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15693 fi
15694
15695 fi
15696 echo "$as_me:15696: result: $cf_cv_good_bcopy" >&5
15697 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15698
15699 else
15700   cf_cv_good_bcopy=no
15701 fi
15702
15703         if test "$cf_cv_good_bcopy" = yes ; then
15704                 cat >>confdefs.h <<\EOF
15705 #define USE_OK_BCOPY 1
15706 EOF
15707
15708         else
15709                 cat >>confdefs.h <<\EOF
15710 #define USE_MY_MEMMOVE 1
15711 EOF
15712
15713         fi
15714
15715 fi
15716
15717 echo "$as_me:15717: checking if poll really works" >&5
15718 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15719 if test "${cf_cv_working_poll+set}" = set; then
15720   echo $ECHO_N "(cached) $ECHO_C" >&6
15721 else
15722
15723 if test "$cross_compiling" = yes; then
15724   cf_cv_working_poll=unknown
15725 else
15726   cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15729
15730 #include <stdio.h>
15731 #ifdef HAVE_POLL_H
15732 #include <poll.h>
15733 #else
15734 #include <sys/poll.h>
15735 #endif
15736 int main() {
15737         struct pollfd myfds;
15738         int ret;
15739
15740         myfds.fd = 0;
15741         myfds.events = POLLIN;
15742
15743         ret = poll(&myfds, 1, 100);
15744         ${cf_cv_main_return:-return}(ret != 0);
15745 }
15746 _ACEOF
15747 rm -f conftest$ac_exeext
15748 if { (eval echo "$as_me:15748: \"$ac_link\"") >&5
15749   (eval $ac_link) 2>&5
15750   ac_status=$?
15751   echo "$as_me:15751: \$? = $ac_status" >&5
15752   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15753   { (eval echo "$as_me:15753: \"$ac_try\"") >&5
15754   (eval $ac_try) 2>&5
15755   ac_status=$?
15756   echo "$as_me:15756: \$? = $ac_status" >&5
15757   (exit $ac_status); }; }; then
15758   cf_cv_working_poll=yes
15759 else
15760   echo "$as_me: program exited with status $ac_status" >&5
15761 echo "$as_me: failed program was:" >&5
15762 cat conftest.$ac_ext >&5
15763 cf_cv_working_poll=no
15764 fi
15765 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15766 fi
15767 fi
15768 echo "$as_me:15768: result: $cf_cv_working_poll" >&5
15769 echo "${ECHO_T}$cf_cv_working_poll" >&6
15770 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15771 #define HAVE_WORKING_POLL 1
15772 EOF
15773
15774 echo "$as_me:15774: checking for va_copy" >&5
15775 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15776 if test "${cf_cv_have_va_copy+set}" = set; then
15777   echo $ECHO_N "(cached) $ECHO_C" >&6
15778 else
15779
15780 cat >conftest.$ac_ext <<_ACEOF
15781 #line 15781 "configure"
15782 #include "confdefs.h"
15783
15784 #include <stdarg.h>
15785
15786 int
15787 main ()
15788 {
15789
15790         static va_list dst;
15791         static va_list src;
15792         va_copy(dst, src)
15793   ;
15794   return 0;
15795 }
15796 _ACEOF
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:15798: \"$ac_link\"") >&5
15799   (eval $ac_link) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); } &&
15803          { ac_try='test -s conftest$ac_exeext'
15804   { (eval echo "$as_me:15804: \"$ac_try\"") >&5
15805   (eval $ac_try) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); }; }; then
15809   cf_cv_have_va_copy=yes
15810 else
15811   echo "$as_me: failed program was:" >&5
15812 cat conftest.$ac_ext >&5
15813 cf_cv_have_va_copy=no
15814 fi
15815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15816 fi
15817 echo "$as_me:15817: result: $cf_cv_have_va_copy" >&5
15818 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15819
15820 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15821 #define HAVE_VA_COPY 1
15822 EOF
15823
15824 echo "$as_me:15824: checking for __va_copy" >&5
15825 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15826 if test "${cf_cv_have___va_copy+set}" = set; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829
15830 cat >conftest.$ac_ext <<_ACEOF
15831 #line 15831 "configure"
15832 #include "confdefs.h"
15833
15834 #include <stdarg.h>
15835
15836 int
15837 main ()
15838 {
15839
15840         static va_list dst;
15841         static va_list src;
15842         __va_copy(dst, src)
15843   ;
15844   return 0;
15845 }
15846 _ACEOF
15847 rm -f conftest.$ac_objext conftest$ac_exeext
15848 if { (eval echo "$as_me:15848: \"$ac_link\"") >&5
15849   (eval $ac_link) 2>&5
15850   ac_status=$?
15851   echo "$as_me:15851: \$? = $ac_status" >&5
15852   (exit $ac_status); } &&
15853          { ac_try='test -s conftest$ac_exeext'
15854   { (eval echo "$as_me:15854: \"$ac_try\"") >&5
15855   (eval $ac_try) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); }; }; then
15859   cf_cv_have___va_copy=yes
15860 else
15861   echo "$as_me: failed program was:" >&5
15862 cat conftest.$ac_ext >&5
15863 cf_cv_have___va_copy=no
15864 fi
15865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15866 fi
15867 echo "$as_me:15867: result: $cf_cv_have___va_copy" >&5
15868 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15869
15870 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15871 #define HAVE___VA_COPY 1
15872 EOF
15873
15874 echo "$as_me:15874: checking for pid_t" >&5
15875 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15876 if test "${ac_cv_type_pid_t+set}" = set; then
15877   echo $ECHO_N "(cached) $ECHO_C" >&6
15878 else
15879   cat >conftest.$ac_ext <<_ACEOF
15880 #line 15880 "configure"
15881 #include "confdefs.h"
15882 $ac_includes_default
15883 int
15884 main ()
15885 {
15886 if ((pid_t *) 0)
15887   return 0;
15888 if (sizeof (pid_t))
15889   return 0;
15890   ;
15891   return 0;
15892 }
15893 _ACEOF
15894 rm -f conftest.$ac_objext
15895 if { (eval echo "$as_me:15895: \"$ac_compile\"") >&5
15896   (eval $ac_compile) 2>&5
15897   ac_status=$?
15898   echo "$as_me:15898: \$? = $ac_status" >&5
15899   (exit $ac_status); } &&
15900          { ac_try='test -s conftest.$ac_objext'
15901   { (eval echo "$as_me:15901: \"$ac_try\"") >&5
15902   (eval $ac_try) 2>&5
15903   ac_status=$?
15904   echo "$as_me:15904: \$? = $ac_status" >&5
15905   (exit $ac_status); }; }; then
15906   ac_cv_type_pid_t=yes
15907 else
15908   echo "$as_me: failed program was:" >&5
15909 cat conftest.$ac_ext >&5
15910 ac_cv_type_pid_t=no
15911 fi
15912 rm -f conftest.$ac_objext conftest.$ac_ext
15913 fi
15914 echo "$as_me:15914: result: $ac_cv_type_pid_t" >&5
15915 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15916 if test $ac_cv_type_pid_t = yes; then
15917   :
15918 else
15919
15920 cat >>confdefs.h <<EOF
15921 #define pid_t int
15922 EOF
15923
15924 fi
15925
15926 for ac_header in unistd.h vfork.h
15927 do
15928 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15929 echo "$as_me:15929: checking for $ac_header" >&5
15930 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15931 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15932   echo $ECHO_N "(cached) $ECHO_C" >&6
15933 else
15934   cat >conftest.$ac_ext <<_ACEOF
15935 #line 15935 "configure"
15936 #include "confdefs.h"
15937 #include <$ac_header>
15938 _ACEOF
15939 if { (eval echo "$as_me:15939: \"$ac_cpp conftest.$ac_ext\"") >&5
15940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15941   ac_status=$?
15942   egrep -v '^ *\+' conftest.er1 >conftest.err
15943   rm -f conftest.er1
15944   cat conftest.err >&5
15945   echo "$as_me:15945: \$? = $ac_status" >&5
15946   (exit $ac_status); } >/dev/null; then
15947   if test -s conftest.err; then
15948     ac_cpp_err=$ac_c_preproc_warn_flag
15949   else
15950     ac_cpp_err=
15951   fi
15952 else
15953   ac_cpp_err=yes
15954 fi
15955 if test -z "$ac_cpp_err"; then
15956   eval "$as_ac_Header=yes"
15957 else
15958   echo "$as_me: failed program was:" >&5
15959   cat conftest.$ac_ext >&5
15960   eval "$as_ac_Header=no"
15961 fi
15962 rm -f conftest.err conftest.$ac_ext
15963 fi
15964 echo "$as_me:15964: result: `eval echo '${'$as_ac_Header'}'`" >&5
15965 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15966 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15967   cat >>confdefs.h <<EOF
15968 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15969 EOF
15970
15971 fi
15972 done
15973
15974 for ac_func in fork vfork
15975 do
15976 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15977 echo "$as_me:15977: checking for $ac_func" >&5
15978 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15979 if eval "test \"\${$as_ac_var+set}\" = set"; then
15980   echo $ECHO_N "(cached) $ECHO_C" >&6
15981 else
15982   cat >conftest.$ac_ext <<_ACEOF
15983 #line 15983 "configure"
15984 #include "confdefs.h"
15985 /* System header to define __stub macros and hopefully few prototypes,
15986     which can conflict with char $ac_func (); below.  */
15987 #include <assert.h>
15988 /* Override any gcc2 internal prototype to avoid an error.  */
15989 #ifdef __cplusplus
15990 extern "C"
15991 #endif
15992 /* We use char because int might match the return type of a gcc2
15993    builtin and then its argument prototype would still apply.  */
15994 char $ac_func ();
15995 char (*f) ();
15996
15997 int
15998 main ()
15999 {
16000 /* The GNU C library defines this for functions which it implements
16001     to always fail with ENOSYS.  Some functions are actually named
16002     something starting with __ and the normal name is an alias.  */
16003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16004 choke me
16005 #else
16006 f = $ac_func;
16007 #endif
16008
16009   ;
16010   return 0;
16011 }
16012 _ACEOF
16013 rm -f conftest.$ac_objext conftest$ac_exeext
16014 if { (eval echo "$as_me:16014: \"$ac_link\"") >&5
16015   (eval $ac_link) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); } &&
16019          { ac_try='test -s conftest$ac_exeext'
16020   { (eval echo "$as_me:16020: \"$ac_try\"") >&5
16021   (eval $ac_try) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit $ac_status); }; }; then
16025   eval "$as_ac_var=yes"
16026 else
16027   echo "$as_me: failed program was:" >&5
16028 cat conftest.$ac_ext >&5
16029 eval "$as_ac_var=no"
16030 fi
16031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16032 fi
16033 echo "$as_me:16033: result: `eval echo '${'$as_ac_var'}'`" >&5
16034 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16035 if test `eval echo '${'$as_ac_var'}'` = yes; then
16036   cat >>confdefs.h <<EOF
16037 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16038 EOF
16039
16040 fi
16041 done
16042
16043 ac_cv_func_fork_works=$ac_cv_func_fork
16044 if test "x$ac_cv_func_fork" = xyes; then
16045   echo "$as_me:16045: checking for working fork" >&5
16046 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16047 if test "${ac_cv_func_fork_works+set}" = set; then
16048   echo $ECHO_N "(cached) $ECHO_C" >&6
16049 else
16050   if test "$cross_compiling" = yes; then
16051   ac_cv_func_fork_works=cross
16052 else
16053   cat >conftest.$ac_ext <<_ACEOF
16054 /* By Rüdiger Kuhlmann. */
16055       #include <sys/types.h>
16056       #if HAVE_UNISTD_H
16057       # include <unistd.h>
16058       #endif
16059       /* Some systems only have a dummy stub for fork() */
16060       int main ()
16061       {
16062         if (fork() < 0)
16063           $ac_main_return (1);
16064         $ac_main_return (0);
16065       }
16066 _ACEOF
16067 rm -f conftest$ac_exeext
16068 if { (eval echo "$as_me:16068: \"$ac_link\"") >&5
16069   (eval $ac_link) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16073   { (eval echo "$as_me:16073: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   ac_cv_func_fork_works=yes
16079 else
16080   echo "$as_me: program exited with status $ac_status" >&5
16081 echo "$as_me: failed program was:" >&5
16082 cat conftest.$ac_ext >&5
16083 ac_cv_func_fork_works=no
16084 fi
16085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16086 fi
16087 fi
16088 echo "$as_me:16088: result: $ac_cv_func_fork_works" >&5
16089 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16090
16091 fi
16092 if test "x$ac_cv_func_fork_works" = xcross; then
16093   case $host in
16094     *-*-amigaos* | *-*-msdosdjgpp*)
16095       # Override, as these systems have only a dummy fork() stub
16096       ac_cv_func_fork_works=no
16097       ;;
16098     *)
16099       ac_cv_func_fork_works=yes
16100       ;;
16101   esac
16102   { echo "$as_me:16102: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16103 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16104 fi
16105 ac_cv_func_vfork_works=$ac_cv_func_vfork
16106 if test "x$ac_cv_func_vfork" = xyes; then
16107   echo "$as_me:16107: checking for working vfork" >&5
16108 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16109 if test "${ac_cv_func_vfork_works+set}" = set; then
16110   echo $ECHO_N "(cached) $ECHO_C" >&6
16111 else
16112   if test "$cross_compiling" = yes; then
16113   ac_cv_func_vfork_works=cross
16114 else
16115   cat >conftest.$ac_ext <<_ACEOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16118 /* Thanks to Paul Eggert for this test.  */
16119 #include <stdio.h>
16120 #include <sys/types.h>
16121 #include <sys/stat.h>
16122 #if HAVE_UNISTD_H
16123 # include <unistd.h>
16124 #endif
16125 #if HAVE_VFORK_H
16126 # include <vfork.h>
16127 #endif
16128 /* On some sparc systems, changes by the child to local and incoming
16129    argument registers are propagated back to the parent.  The compiler
16130    is told about this with #include <vfork.h>, but some compilers
16131    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16132    static variable whose address is put into a register that is
16133    clobbered by the vfork.  */
16134 static
16135 #ifdef __cplusplus
16136 sparc_address_test (int arg)
16137 # else
16138 sparc_address_test (arg) int arg;
16139 #endif
16140 {
16141   static pid_t child;
16142   if (!child) {
16143     child = vfork ();
16144     if (child < 0) {
16145       perror ("vfork");
16146       _exit(2);
16147     }
16148     if (!child) {
16149       arg = getpid();
16150       write(-1, "", 0);
16151       _exit (arg);
16152     }
16153   }
16154 }
16155
16156 int
16157 main ()
16158 {
16159   pid_t parent = getpid ();
16160   pid_t child;
16161
16162   sparc_address_test ();
16163
16164   child = vfork ();
16165
16166   if (child == 0) {
16167     /* Here is another test for sparc vfork register problems.  This
16168        test uses lots of local variables, at least as many local
16169        variables as main has allocated so far including compiler
16170        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16171        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16172        reuse the register of parent for one of the local variables,
16173        since it will think that parent can't possibly be used any more
16174        in this routine.  Assigning to the local variable will thus
16175        munge parent in the parent process.  */
16176     pid_t
16177       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16178       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16179     /* Convince the compiler that p..p7 are live; otherwise, it might
16180        use the same hardware register for all 8 local variables.  */
16181     if (p != p1 || p != p2 || p != p3 || p != p4
16182         || p != p5 || p != p6 || p != p7)
16183       _exit(1);
16184
16185     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16186        from child file descriptors.  If the child closes a descriptor
16187        before it execs or exits, this munges the parent's descriptor
16188        as well.  Test for this by closing stdout in the child.  */
16189     _exit(close(fileno(stdout)) != 0);
16190   } else {
16191     int status;
16192     struct stat st;
16193
16194     while (wait(&status) != child)
16195       ;
16196     $ac_main_return(
16197          /* Was there some problem with vforking?  */
16198          child < 0
16199
16200          /* Did the child fail?  (This shouldn't happen.)  */
16201          || status
16202
16203          /* Did the vfork/compiler bug occur?  */
16204          || parent != getpid()
16205
16206          /* Did the file descriptor bug occur?  */
16207          || fstat(fileno(stdout), &st) != 0
16208          );
16209   }
16210 }
16211 _ACEOF
16212 rm -f conftest$ac_exeext
16213 if { (eval echo "$as_me:16213: \"$ac_link\"") >&5
16214   (eval $ac_link) 2>&5
16215   ac_status=$?
16216   echo "$as_me:16216: \$? = $ac_status" >&5
16217   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16218   { (eval echo "$as_me:16218: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:16221: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   ac_cv_func_vfork_works=yes
16224 else
16225   echo "$as_me: program exited with status $ac_status" >&5
16226 echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 ac_cv_func_vfork_works=no
16229 fi
16230 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16231 fi
16232 fi
16233 echo "$as_me:16233: result: $ac_cv_func_vfork_works" >&5
16234 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16235
16236 fi;
16237 if test "x$ac_cv_func_fork_works" = xcross; then
16238   ac_cv_func_vfork_works=ac_cv_func_vfork
16239   { echo "$as_me:16239: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16240 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16241 fi
16242
16243 if test "x$ac_cv_func_vfork_works" = xyes; then
16244
16245 cat >>confdefs.h <<\EOF
16246 #define HAVE_WORKING_VFORK 1
16247 EOF
16248
16249 else
16250
16251 cat >>confdefs.h <<\EOF
16252 #define vfork fork
16253 EOF
16254
16255 fi
16256 if test "x$ac_cv_func_fork_works" = xyes; then
16257
16258 cat >>confdefs.h <<\EOF
16259 #define HAVE_WORKING_FORK 1
16260 EOF
16261
16262 fi
16263
16264 # special check for test/ditto.c
16265
16266 echo "$as_me:16266: checking for openpty in -lutil" >&5
16267 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16268 if test "${ac_cv_lib_util_openpty+set}" = set; then
16269   echo $ECHO_N "(cached) $ECHO_C" >&6
16270 else
16271   ac_check_lib_save_LIBS=$LIBS
16272 LIBS="-lutil  $LIBS"
16273 cat >conftest.$ac_ext <<_ACEOF
16274 #line 16274 "configure"
16275 #include "confdefs.h"
16276
16277 /* Override any gcc2 internal prototype to avoid an error.  */
16278 #ifdef __cplusplus
16279 extern "C"
16280 #endif
16281 /* We use char because int might match the return type of a gcc2
16282    builtin and then its argument prototype would still apply.  */
16283 char openpty ();
16284 int
16285 main ()
16286 {
16287 openpty ();
16288   ;
16289   return 0;
16290 }
16291 _ACEOF
16292 rm -f conftest.$ac_objext conftest$ac_exeext
16293 if { (eval echo "$as_me:16293: \"$ac_link\"") >&5
16294   (eval $ac_link) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); } &&
16298          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_util_openpty=yes
16305 else
16306   echo "$as_me: failed program was:" >&5
16307 cat conftest.$ac_ext >&5
16308 ac_cv_lib_util_openpty=no
16309 fi
16310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16311 LIBS=$ac_check_lib_save_LIBS
16312 fi
16313 echo "$as_me:16313: result: $ac_cv_lib_util_openpty" >&5
16314 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16315 if test $ac_cv_lib_util_openpty = yes; then
16316   cf_cv_lib_util=yes
16317 else
16318   cf_cv_lib_util=no
16319 fi
16320
16321 echo "$as_me:16321: checking for openpty header" >&5
16322 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16323 if test "${cf_cv_func_openpty+set}" = set; then
16324   echo $ECHO_N "(cached) $ECHO_C" >&6
16325 else
16326
16327     cf_save_LIBS="$LIBS"
16328     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16329     for cf_header in pty.h libutil.h util.h
16330     do
16331     cat >conftest.$ac_ext <<_ACEOF
16332 #line 16332 "configure"
16333 #include "confdefs.h"
16334
16335 #include <$cf_header>
16336
16337 int
16338 main ()
16339 {
16340
16341     int x = openpty((int *)0, (int *)0, (char *)0,
16342                    (struct termios *)0, (struct winsize *)0);
16343
16344   ;
16345   return 0;
16346 }
16347 _ACEOF
16348 rm -f conftest.$ac_objext conftest$ac_exeext
16349 if { (eval echo "$as_me:16349: \"$ac_link\"") >&5
16350   (eval $ac_link) 2>&5
16351   ac_status=$?
16352   echo "$as_me:16352: \$? = $ac_status" >&5
16353   (exit $ac_status); } &&
16354          { ac_try='test -s conftest$ac_exeext'
16355   { (eval echo "$as_me:16355: \"$ac_try\"") >&5
16356   (eval $ac_try) 2>&5
16357   ac_status=$?
16358   echo "$as_me:16358: \$? = $ac_status" >&5
16359   (exit $ac_status); }; }; then
16360
16361         cf_cv_func_openpty=$cf_header
16362         break
16363
16364 else
16365   echo "$as_me: failed program was:" >&5
16366 cat conftest.$ac_ext >&5
16367
16368         cf_cv_func_openpty=no
16369
16370 fi
16371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16372     done
16373     LIBS="$cf_save_LIBS"
16374
16375 fi
16376 echo "$as_me:16376: result: $cf_cv_func_openpty" >&5
16377 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16378
16379 if test "$cf_cv_func_openpty" != no ; then
16380     cat >>confdefs.h <<EOF
16381 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16382 EOF
16383
16384     cat >>confdefs.h <<\EOF
16385 #define USE_XTERM_PTY 1
16386 EOF
16387
16388     if test "$cf_cv_lib_util" = yes ; then
16389         TEST_LIBS="-lutil $TEST_LIBS"
16390     fi
16391 fi
16392
16393 if test "$with_hashed_db" != no ; then
16394         cat >>confdefs.h <<\EOF
16395 #define USE_HASHED_DB 1
16396 EOF
16397
16398 case $with_hashed_db in #(vi
16399 yes|*able*) #(vi
16400     ;;
16401 *)
16402     if test -d "$with_hashed_db" ; then
16403
16404 if test -n "$with_hashed_db/include" ; then
16405   for cf_add_incdir in $with_hashed_db/include
16406   do
16407         while test $cf_add_incdir != /usr/include
16408         do
16409           if test -d $cf_add_incdir
16410           then
16411                 cf_have_incdir=no
16412                 if test -n "$CFLAGS$CPPFLAGS" ; then
16413                   # a loop is needed to ensure we can add subdirs of existing dirs
16414                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16415                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16416                           cf_have_incdir=yes; break
16417                         fi
16418                   done
16419                 fi
16420
16421                 if test "$cf_have_incdir" = no ; then
16422                   if test "$cf_add_incdir" = /usr/local/include ; then
16423                         if test "$GCC" = yes
16424                         then
16425                           cf_save_CPPFLAGS=$CPPFLAGS
16426                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16427                           cat >conftest.$ac_ext <<_ACEOF
16428 #line 16428 "configure"
16429 #include "confdefs.h"
16430 #include <stdio.h>
16431 int
16432 main ()
16433 {
16434 printf("Hello")
16435   ;
16436   return 0;
16437 }
16438 _ACEOF
16439 rm -f conftest.$ac_objext
16440 if { (eval echo "$as_me:16440: \"$ac_compile\"") >&5
16441   (eval $ac_compile) 2>&5
16442   ac_status=$?
16443   echo "$as_me:16443: \$? = $ac_status" >&5
16444   (exit $ac_status); } &&
16445          { ac_try='test -s conftest.$ac_objext'
16446   { (eval echo "$as_me:16446: \"$ac_try\"") >&5
16447   (eval $ac_try) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); }; }; then
16451   :
16452 else
16453   echo "$as_me: failed program was:" >&5
16454 cat conftest.$ac_ext >&5
16455 cf_have_incdir=yes
16456 fi
16457 rm -f conftest.$ac_objext conftest.$ac_ext
16458                           CPPFLAGS=$cf_save_CPPFLAGS
16459                         fi
16460                   fi
16461                 fi
16462
16463                 if test "$cf_have_incdir" = no ; then
16464                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16465
16466 echo "${as_me:-configure}:16466: testing adding $cf_add_incdir to include-path ..." 1>&5
16467
16468                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16469
16470                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16471                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16472                   cf_add_incdir="$cf_top_incdir"
16473                 else
16474                   break
16475                 fi
16476           fi
16477         done
16478   done
16479 fi
16480
16481 if test -n "$with_hashed_db/lib" ; then
16482   for cf_add_libdir in $with_hashed_db/lib
16483   do
16484     if test $cf_add_libdir = /usr/lib ; then
16485       :
16486     elif test -d $cf_add_libdir
16487     then
16488       cf_have_libdir=no
16489       if test -n "$LDFLAGS$LIBS" ; then
16490         # a loop is needed to ensure we can add subdirs of existing dirs
16491         for cf_test_libdir in $LDFLAGS $LIBS ; do
16492           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16493             cf_have_libdir=yes; break
16494           fi
16495         done
16496       fi
16497       if test "$cf_have_libdir" = no ; then
16498         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16499
16500 echo "${as_me:-configure}:16500: testing adding $cf_add_libdir to library-path ..." 1>&5
16501
16502         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16503       fi
16504     fi
16505   done
16506 fi
16507
16508     fi
16509 esac
16510
16511 echo "$as_me:16511: checking for db.h" >&5
16512 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16513 if test "${ac_cv_header_db_h+set}" = set; then
16514   echo $ECHO_N "(cached) $ECHO_C" >&6
16515 else
16516   cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519 #include <db.h>
16520 _ACEOF
16521 if { (eval echo "$as_me:16521: \"$ac_cpp conftest.$ac_ext\"") >&5
16522   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16523   ac_status=$?
16524   egrep -v '^ *\+' conftest.er1 >conftest.err
16525   rm -f conftest.er1
16526   cat conftest.err >&5
16527   echo "$as_me:16527: \$? = $ac_status" >&5
16528   (exit $ac_status); } >/dev/null; then
16529   if test -s conftest.err; then
16530     ac_cpp_err=$ac_c_preproc_warn_flag
16531   else
16532     ac_cpp_err=
16533   fi
16534 else
16535   ac_cpp_err=yes
16536 fi
16537 if test -z "$ac_cpp_err"; then
16538   ac_cv_header_db_h=yes
16539 else
16540   echo "$as_me: failed program was:" >&5
16541   cat conftest.$ac_ext >&5
16542   ac_cv_header_db_h=no
16543 fi
16544 rm -f conftest.err conftest.$ac_ext
16545 fi
16546 echo "$as_me:16546: result: $ac_cv_header_db_h" >&5
16547 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16548 if test $ac_cv_header_db_h = yes; then
16549
16550 echo "$as_me:16550: checking for version of db" >&5
16551 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16552 if test "${cf_cv_hashed_db_version+set}" = set; then
16553   echo $ECHO_N "(cached) $ECHO_C" >&6
16554 else
16555
16556 cf_cv_hashed_db_version=unknown
16557
16558 for cf_db_version in 1 2 3 4 5
16559 do
16560
16561 echo "${as_me:-configure}:16561: testing checking for db version $cf_db_version ..." 1>&5
16562
16563         cat >conftest.$ac_ext <<_ACEOF
16564 #line 16564 "configure"
16565 #include "confdefs.h"
16566
16567 $ac_includes_default
16568 #include <db.h>
16569
16570 #ifdef DB_VERSION_MAJOR
16571         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16572 #if $cf_db_version == DB_VERSION_MAJOR
16573         /* ok */
16574 #else
16575         make an error
16576 #endif
16577 #else
16578 #if $cf_db_version == 1
16579         /* ok: assuming this is DB 1.8.5 */
16580 #else
16581         make an error
16582 #endif
16583 #endif
16584
16585 int
16586 main ()
16587 {
16588 DBT *foo = 0
16589   ;
16590   return 0;
16591 }
16592 _ACEOF
16593 rm -f conftest.$ac_objext
16594 if { (eval echo "$as_me:16594: \"$ac_compile\"") >&5
16595   (eval $ac_compile) 2>&5
16596   ac_status=$?
16597   echo "$as_me:16597: \$? = $ac_status" >&5
16598   (exit $ac_status); } &&
16599          { ac_try='test -s conftest.$ac_objext'
16600   { (eval echo "$as_me:16600: \"$ac_try\"") >&5
16601   (eval $ac_try) 2>&5
16602   ac_status=$?
16603   echo "$as_me:16603: \$? = $ac_status" >&5
16604   (exit $ac_status); }; }; then
16605
16606         cf_cv_hashed_db_version=$cf_db_version
16607         break
16608
16609 else
16610   echo "$as_me: failed program was:" >&5
16611 cat conftest.$ac_ext >&5
16612 fi
16613 rm -f conftest.$ac_objext conftest.$ac_ext
16614 done
16615
16616 fi
16617 echo "$as_me:16617: result: $cf_cv_hashed_db_version" >&5
16618 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16619
16620 if test "$cf_cv_hashed_db_version" = unknown ; then
16621         { { echo "$as_me:16621: error: Cannot determine version of db" >&5
16622 echo "$as_me: error: Cannot determine version of db" >&2;}
16623    { (exit 1); exit 1; }; }
16624 else
16625
16626 echo "$as_me:16626: checking for db libraries" >&5
16627 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16628 if test "${cf_cv_hashed_db_libs+set}" = set; then
16629   echo $ECHO_N "(cached) $ECHO_C" >&6
16630 else
16631
16632 cf_cv_hashed_db_libs=unknown
16633 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16634 do
16635         cf_save_libs="$LIBS"
16636         if test -n "$cf_db_libs"; then
16637                 LIBS="-l$cf_db_libs $LIBS"
16638         fi
16639
16640 echo "${as_me:-configure}:16640: testing checking for library "$cf_db_libs" ..." 1>&5
16641
16642         cat >conftest.$ac_ext <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645
16646 $ac_includes_default
16647 #include <db.h>
16648
16649 int
16650 main ()
16651 {
16652
16653         char *path = "/tmp/foo";
16654 #ifdef DB_VERSION_MAJOR
16655 #if DB_VERSION_MAJOR >= 4
16656         DB *result = 0;
16657         db_create(&result, NULL, 0);
16658         result->open(result,
16659                 NULL,
16660                 path,
16661                 path,
16662                 DB_HASH,
16663                 DB_CREATE,
16664                 0644);
16665 #elif DB_VERSION_MAJOR >= 3
16666         DB *result = 0;
16667         db_create(&result, NULL, 0);
16668         result->open(result,
16669                 path,
16670                 path,
16671                 DB_HASH,
16672                 DB_CREATE,
16673                 0644);
16674 #elif DB_VERSION_MAJOR >= 2
16675         DB *result = 0;
16676         db_open(path,
16677                 DB_HASH,
16678                 DB_CREATE,
16679                 0644,
16680                 (DB_ENV *) 0,
16681                 (DB_INFO *) 0,
16682                 &result);
16683 #endif /* DB_VERSION_MAJOR */
16684 #else
16685         DB *result = dbopen(path,
16686                      2,
16687                      0644,
16688                      DB_HASH,
16689                      0);
16690 #endif
16691         ${cf_cv_main_return:-return}(result != 0)
16692
16693   ;
16694   return 0;
16695 }
16696 _ACEOF
16697 rm -f conftest.$ac_objext conftest$ac_exeext
16698 if { (eval echo "$as_me:16698: \"$ac_link\"") >&5
16699   (eval $ac_link) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); } &&
16703          { ac_try='test -s conftest$ac_exeext'
16704   { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); }; }; then
16709
16710         if test -n "$cf_db_libs" ; then
16711                 cf_cv_hashed_db_libs=$cf_db_libs
16712         else
16713                 cf_cv_hashed_db_libs=default
16714         fi
16715         LIBS="$cf_save_libs"
16716         break
16717
16718 else
16719   echo "$as_me: failed program was:" >&5
16720 cat conftest.$ac_ext >&5
16721 fi
16722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16723         LIBS="$cf_save_libs"
16724 done
16725
16726 fi
16727 echo "$as_me:16727: result: $cf_cv_hashed_db_libs" >&5
16728 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16729
16730         if test "$cf_cv_hashed_db_libs" = unknown ; then
16731                 { { echo "$as_me:16731: error: Cannot determine library for db" >&5
16732 echo "$as_me: error: Cannot determine library for db" >&2;}
16733    { (exit 1); exit 1; }; }
16734         elif test "$cf_cv_hashed_db_libs" != default ; then
16735                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16736         fi
16737 fi
16738
16739 else
16740
16741         { { echo "$as_me:16741: error: Cannot find db.h" >&5
16742 echo "$as_me: error: Cannot find db.h" >&2;}
16743    { (exit 1); exit 1; }; }
16744
16745 fi
16746
16747 fi
16748
16749 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16750         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16751         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16752 fi
16753
16754 # Just in case, check if the C compiler has a bool type.
16755
16756 echo "$as_me:16756: checking if we should include stdbool.h" >&5
16757 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16758
16759 if test "${cf_cv_header_stdbool_h+set}" = set; then
16760   echo $ECHO_N "(cached) $ECHO_C" >&6
16761 else
16762
16763         cat >conftest.$ac_ext <<_ACEOF
16764 #line 16764 "configure"
16765 #include "confdefs.h"
16766
16767 int
16768 main ()
16769 {
16770 bool foo = false
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext
16776 if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
16777   (eval $ac_compile) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); } &&
16781          { ac_try='test -s conftest.$ac_objext'
16782   { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783   (eval $ac_try) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); }; }; then
16787   cf_cv_header_stdbool_h=0
16788 else
16789   echo "$as_me: failed program was:" >&5
16790 cat conftest.$ac_ext >&5
16791 cat >conftest.$ac_ext <<_ACEOF
16792 #line 16792 "configure"
16793 #include "confdefs.h"
16794
16795 #ifndef __BEOS__
16796 #include <stdbool.h>
16797 #endif
16798
16799 int
16800 main ()
16801 {
16802 bool foo = false
16803   ;
16804   return 0;
16805 }
16806 _ACEOF
16807 rm -f conftest.$ac_objext
16808 if { (eval echo "$as_me:16808: \"$ac_compile\"") >&5
16809   (eval $ac_compile) 2>&5
16810   ac_status=$?
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); } &&
16813          { ac_try='test -s conftest.$ac_objext'
16814   { (eval echo "$as_me:16814: \"$ac_try\"") >&5
16815   (eval $ac_try) 2>&5
16816   ac_status=$?
16817   echo "$as_me:16817: \$? = $ac_status" >&5
16818   (exit $ac_status); }; }; then
16819   cf_cv_header_stdbool_h=1
16820 else
16821   echo "$as_me: failed program was:" >&5
16822 cat conftest.$ac_ext >&5
16823 cf_cv_header_stdbool_h=0
16824 fi
16825 rm -f conftest.$ac_objext conftest.$ac_ext
16826 fi
16827 rm -f conftest.$ac_objext conftest.$ac_ext
16828 fi
16829
16830 if test "$cf_cv_header_stdbool_h" = 1
16831 then    echo "$as_me:16831: result: yes" >&5
16832 echo "${ECHO_T}yes" >&6
16833 else    echo "$as_me:16833: result: no" >&5
16834 echo "${ECHO_T}no" >&6
16835 fi
16836
16837 echo "$as_me:16837: checking for builtin bool type" >&5
16838 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16839
16840 if test "${cf_cv_cc_bool_type+set}" = set; then
16841   echo $ECHO_N "(cached) $ECHO_C" >&6
16842 else
16843
16844         cat >conftest.$ac_ext <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847
16848 #include <stdio.h>
16849 #include <sys/types.h>
16850
16851 int
16852 main ()
16853 {
16854 bool x = false
16855   ;
16856   return 0;
16857 }
16858 _ACEOF
16859 rm -f conftest.$ac_objext
16860 if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5
16861   (eval $ac_compile) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit $ac_status); } &&
16865          { ac_try='test -s conftest.$ac_objext'
16866   { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867   (eval $ac_try) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); }; }; then
16871   cf_cv_cc_bool_type=1
16872 else
16873   echo "$as_me: failed program was:" >&5
16874 cat conftest.$ac_ext >&5
16875 cf_cv_cc_bool_type=0
16876 fi
16877 rm -f conftest.$ac_objext conftest.$ac_ext
16878
16879 fi
16880
16881 if test "$cf_cv_cc_bool_type" = 1
16882 then    echo "$as_me:16882: result: yes" >&5
16883 echo "${ECHO_T}yes" >&6
16884 else    echo "$as_me:16884: result: no" >&5
16885 echo "${ECHO_T}no" >&6
16886 fi
16887
16888 # Check for C++ compiler characteristics (and ensure that it's there!)
16889 if test -n "$CXX" ; then
16890         ac_ext=cc
16891 ac_cpp='$CXXCPP $CPPFLAGS'
16892 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16893 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16894 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16895 ac_main_return=return
16896
16897 if test -n "$GXX" ; then
16898 case $cf_cv_system_name in #(vi
16899 os2*) #(vi
16900         cf_stdcpp_libname=stdcpp
16901         ;;
16902 *)
16903         cf_stdcpp_libname=stdc++
16904         ;;
16905 esac
16906 echo "$as_me:16906: checking for library $cf_stdcpp_libname" >&5
16907 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16908 if test "${cf_cv_libstdcpp+set}" = set; then
16909   echo $ECHO_N "(cached) $ECHO_C" >&6
16910 else
16911
16912         cf_save="$LIBS"
16913         LIBS="-l$cf_stdcpp_libname $LIBS"
16914 cat >conftest.$ac_ext <<_ACEOF
16915 #line 16915 "configure"
16916 #include "confdefs.h"
16917
16918 #include <strstream.h>
16919 int
16920 main ()
16921 {
16922
16923 char buf[80];
16924 strstreambuf foo(buf, sizeof(buf))
16925
16926   ;
16927   return 0;
16928 }
16929 _ACEOF
16930 rm -f conftest.$ac_objext conftest$ac_exeext
16931 if { (eval echo "$as_me:16931: \"$ac_link\"") >&5
16932   (eval $ac_link) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit $ac_status); } &&
16936          { ac_try='test -s conftest$ac_exeext'
16937   { (eval echo "$as_me:16937: \"$ac_try\"") >&5
16938   (eval $ac_try) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); }; }; then
16942   cf_cv_libstdcpp=yes
16943 else
16944   echo "$as_me: failed program was:" >&5
16945 cat conftest.$ac_ext >&5
16946 cf_cv_libstdcpp=no
16947 fi
16948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16949         LIBS="$cf_save"
16950
16951 fi
16952 echo "$as_me:16952: result: $cf_cv_libstdcpp" >&5
16953 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16954 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16955 fi
16956
16957         echo "$as_me:16957: checking whether $CXX understands -c and -o together" >&5
16958 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16959 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16960   echo $ECHO_N "(cached) $ECHO_C" >&6
16961 else
16962
16963 cat > conftest.$ac_ext <<CF_EOF
16964 #include <stdio.h>
16965 int main()
16966 {
16967         ${cf_cv_main_return:-return}(0);
16968 }
16969 CF_EOF
16970 # We do the test twice because some compilers refuse to overwrite an
16971 # existing .o file with -o, though they will create one.
16972 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16973 if { (eval echo "$as_me:16973: \"$ac_try\"") >&5
16974   (eval $ac_try) 2>&5
16975   ac_status=$?
16976   echo "$as_me:16976: \$? = $ac_status" >&5
16977   (exit $ac_status); } &&
16978   test -f conftest2.$ac_objext && { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979   (eval $ac_try) 2>&5
16980   ac_status=$?
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit $ac_status); };
16983 then
16984   eval cf_cv_prog_CXX_c_o=yes
16985 else
16986   eval cf_cv_prog_CXX_c_o=no
16987 fi
16988 rm -rf conftest*
16989
16990 fi
16991 if test $cf_cv_prog_CXX_c_o = yes; then
16992   echo "$as_me:16992: result: yes" >&5
16993 echo "${ECHO_T}yes" >&6
16994 else
16995   echo "$as_me:16995: result: no" >&5
16996 echo "${ECHO_T}no" >&6
16997 fi
16998
16999         case $GXX_VERSION in
17000         1*|2.0-6*)
17001                 cf_cxx_library=yes
17002                 ;;
17003         *-2.7*|2.7*)
17004
17005 cf_cxx_library=unknown
17006 case $cf_cv_system_name in #(vi
17007 os2*) #(vi
17008         cf_gpp_libname=gpp
17009         ;;
17010 *)
17011         cf_gpp_libname=g++
17012         ;;
17013 esac
17014 if test "$GXX" = yes; then
17015         echo "$as_me:17015: checking for lib$cf_gpp_libname" >&5
17016 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17017         cf_save="$LIBS"
17018         LIBS="-l$cf_gpp_libname $LIBS"
17019         cat >conftest.$ac_ext <<_ACEOF
17020 #line 17020 "configure"
17021 #include "confdefs.h"
17022
17023 #include <$cf_gpp_libname/builtin.h>
17024
17025 int
17026 main ()
17027 {
17028 two_arg_error_handler_t foo2 = lib_error_handler
17029   ;
17030   return 0;
17031 }
17032 _ACEOF
17033 rm -f conftest.$ac_objext conftest$ac_exeext
17034 if { (eval echo "$as_me:17034: \"$ac_link\"") >&5
17035   (eval $ac_link) 2>&5
17036   ac_status=$?
17037   echo "$as_me:17037: \$? = $ac_status" >&5
17038   (exit $ac_status); } &&
17039          { ac_try='test -s conftest$ac_exeext'
17040   { (eval echo "$as_me:17040: \"$ac_try\"") >&5
17041   (eval $ac_try) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); }; }; then
17045   cf_cxx_library=yes
17046          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17047          if test "$cf_gpp_libname" = cpp ; then
17048             cat >>confdefs.h <<\EOF
17049 #define HAVE_GPP_BUILTIN_H 1
17050 EOF
17051
17052          else
17053             cat >>confdefs.h <<\EOF
17054 #define HAVE_GXX_BUILTIN_H 1
17055 EOF
17056
17057          fi
17058 else
17059   echo "$as_me: failed program was:" >&5
17060 cat conftest.$ac_ext >&5
17061 cat >conftest.$ac_ext <<_ACEOF
17062 #line 17062 "configure"
17063 #include "confdefs.h"
17064
17065 #include <builtin.h>
17066
17067 int
17068 main ()
17069 {
17070 two_arg_error_handler_t foo2 = lib_error_handler
17071   ;
17072   return 0;
17073 }
17074 _ACEOF
17075 rm -f conftest.$ac_objext conftest$ac_exeext
17076 if { (eval echo "$as_me:17076: \"$ac_link\"") >&5
17077   (eval $ac_link) 2>&5
17078   ac_status=$?
17079   echo "$as_me:17079: \$? = $ac_status" >&5
17080   (exit $ac_status); } &&
17081          { ac_try='test -s 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_cxx_library=yes
17088          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17089          cat >>confdefs.h <<\EOF
17090 #define HAVE_BUILTIN_H 1
17091 EOF
17092
17093 else
17094   echo "$as_me: failed program was:" >&5
17095 cat conftest.$ac_ext >&5
17096 cf_cxx_library=no
17097 fi
17098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17099 fi
17100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17101         LIBS="$cf_save"
17102         echo "$as_me:17102: result: $cf_cxx_library" >&5
17103 echo "${ECHO_T}$cf_cxx_library" >&6
17104 fi
17105
17106                 ;;
17107         *)
17108                 cf_cxx_library=no
17109                 ;;
17110         esac
17111
17112         ac_ext=cc
17113 ac_cpp='$CXXCPP $CPPFLAGS'
17114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17117 ac_main_return=return
17118 echo "$as_me:17118: checking how to run the C++ preprocessor" >&5
17119 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17120 if test -z "$CXXCPP"; then
17121   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17122   echo $ECHO_N "(cached) $ECHO_C" >&6
17123 else
17124       # Double quotes because CXXCPP needs to be expanded
17125     for CXXCPP in "$CXX -E" "/lib/cpp"
17126     do
17127       ac_preproc_ok=false
17128 for ac_cxx_preproc_warn_flag in '' yes
17129 do
17130   # Use a header file that comes with gcc, so configuring glibc
17131   # with a fresh cross-compiler works.
17132   # On the NeXT, cc -E runs the code through the compiler's parser,
17133   # not just through cpp. "Syntax error" is here to catch this case.
17134   cat >conftest.$ac_ext <<_ACEOF
17135 #line 17135 "configure"
17136 #include "confdefs.h"
17137 #include <assert.h>
17138                      Syntax error
17139 _ACEOF
17140 if { (eval echo "$as_me:17140: \"$ac_cpp conftest.$ac_ext\"") >&5
17141   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17142   ac_status=$?
17143   egrep -v '^ *\+' conftest.er1 >conftest.err
17144   rm -f conftest.er1
17145   cat conftest.err >&5
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); } >/dev/null; then
17148   if test -s conftest.err; then
17149     ac_cpp_err=$ac_cxx_preproc_warn_flag
17150   else
17151     ac_cpp_err=
17152   fi
17153 else
17154   ac_cpp_err=yes
17155 fi
17156 if test -z "$ac_cpp_err"; then
17157   :
17158 else
17159   echo "$as_me: failed program was:" >&5
17160   cat conftest.$ac_ext >&5
17161   # Broken: fails on valid input.
17162 continue
17163 fi
17164 rm -f conftest.err conftest.$ac_ext
17165
17166   # OK, works on sane cases.  Now check whether non-existent headers
17167   # can be detected and how.
17168   cat >conftest.$ac_ext <<_ACEOF
17169 #line 17169 "configure"
17170 #include "confdefs.h"
17171 #include <ac_nonexistent.h>
17172 _ACEOF
17173 if { (eval echo "$as_me:17173: \"$ac_cpp conftest.$ac_ext\"") >&5
17174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17175   ac_status=$?
17176   egrep -v '^ *\+' conftest.er1 >conftest.err
17177   rm -f conftest.er1
17178   cat conftest.err >&5
17179   echo "$as_me:17179: \$? = $ac_status" >&5
17180   (exit $ac_status); } >/dev/null; then
17181   if test -s conftest.err; then
17182     ac_cpp_err=$ac_cxx_preproc_warn_flag
17183   else
17184     ac_cpp_err=
17185   fi
17186 else
17187   ac_cpp_err=yes
17188 fi
17189 if test -z "$ac_cpp_err"; then
17190   # Broken: success on invalid input.
17191 continue
17192 else
17193   echo "$as_me: failed program was:" >&5
17194   cat conftest.$ac_ext >&5
17195   # Passes both tests.
17196 ac_preproc_ok=:
17197 break
17198 fi
17199 rm -f conftest.err conftest.$ac_ext
17200
17201 done
17202 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17203 rm -f conftest.err conftest.$ac_ext
17204 if $ac_preproc_ok; then
17205   break
17206 fi
17207
17208     done
17209     ac_cv_prog_CXXCPP=$CXXCPP
17210
17211 fi
17212   CXXCPP=$ac_cv_prog_CXXCPP
17213 else
17214   ac_cv_prog_CXXCPP=$CXXCPP
17215 fi
17216 echo "$as_me:17216: result: $CXXCPP" >&5
17217 echo "${ECHO_T}$CXXCPP" >&6
17218 ac_preproc_ok=false
17219 for ac_cxx_preproc_warn_flag in '' yes
17220 do
17221   # Use a header file that comes with gcc, so configuring glibc
17222   # with a fresh cross-compiler works.
17223   # On the NeXT, cc -E runs the code through the compiler's parser,
17224   # not just through cpp. "Syntax error" is here to catch this case.
17225   cat >conftest.$ac_ext <<_ACEOF
17226 #line 17226 "configure"
17227 #include "confdefs.h"
17228 #include <assert.h>
17229                      Syntax error
17230 _ACEOF
17231 if { (eval echo "$as_me:17231: \"$ac_cpp conftest.$ac_ext\"") >&5
17232   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17233   ac_status=$?
17234   egrep -v '^ *\+' conftest.er1 >conftest.err
17235   rm -f conftest.er1
17236   cat conftest.err >&5
17237   echo "$as_me:17237: \$? = $ac_status" >&5
17238   (exit $ac_status); } >/dev/null; then
17239   if test -s conftest.err; then
17240     ac_cpp_err=$ac_cxx_preproc_warn_flag
17241   else
17242     ac_cpp_err=
17243   fi
17244 else
17245   ac_cpp_err=yes
17246 fi
17247 if test -z "$ac_cpp_err"; then
17248   :
17249 else
17250   echo "$as_me: failed program was:" >&5
17251   cat conftest.$ac_ext >&5
17252   # Broken: fails on valid input.
17253 continue
17254 fi
17255 rm -f conftest.err conftest.$ac_ext
17256
17257   # OK, works on sane cases.  Now check whether non-existent headers
17258   # can be detected and how.
17259   cat >conftest.$ac_ext <<_ACEOF
17260 #line 17260 "configure"
17261 #include "confdefs.h"
17262 #include <ac_nonexistent.h>
17263 _ACEOF
17264 if { (eval echo "$as_me:17264: \"$ac_cpp conftest.$ac_ext\"") >&5
17265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17266   ac_status=$?
17267   egrep -v '^ *\+' conftest.er1 >conftest.err
17268   rm -f conftest.er1
17269   cat conftest.err >&5
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); } >/dev/null; then
17272   if test -s conftest.err; then
17273     ac_cpp_err=$ac_cxx_preproc_warn_flag
17274   else
17275     ac_cpp_err=
17276   fi
17277 else
17278   ac_cpp_err=yes
17279 fi
17280 if test -z "$ac_cpp_err"; then
17281   # Broken: success on invalid input.
17282 continue
17283 else
17284   echo "$as_me: failed program was:" >&5
17285   cat conftest.$ac_ext >&5
17286   # Passes both tests.
17287 ac_preproc_ok=:
17288 break
17289 fi
17290 rm -f conftest.err conftest.$ac_ext
17291
17292 done
17293 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17294 rm -f conftest.err conftest.$ac_ext
17295 if $ac_preproc_ok; then
17296   :
17297 else
17298   { { echo "$as_me:17298: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17299 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17300    { (exit 1); exit 1; }; }
17301 fi
17302
17303 ac_ext=cc
17304 ac_cpp='$CXXCPP $CPPFLAGS'
17305 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17306 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17307 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17308 ac_main_return=return
17309
17310 for ac_header in iostream typeinfo
17311 do
17312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17313 echo "$as_me:17313: checking for $ac_header" >&5
17314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17316   echo $ECHO_N "(cached) $ECHO_C" >&6
17317 else
17318   cat >conftest.$ac_ext <<_ACEOF
17319 #line 17319 "configure"
17320 #include "confdefs.h"
17321 #include <$ac_header>
17322 _ACEOF
17323 if { (eval echo "$as_me:17323: \"$ac_cpp conftest.$ac_ext\"") >&5
17324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17325   ac_status=$?
17326   egrep -v '^ *\+' conftest.er1 >conftest.err
17327   rm -f conftest.er1
17328   cat conftest.err >&5
17329   echo "$as_me:17329: \$? = $ac_status" >&5
17330   (exit $ac_status); } >/dev/null; then
17331   if test -s conftest.err; then
17332     ac_cpp_err=$ac_cxx_preproc_warn_flag
17333   else
17334     ac_cpp_err=
17335   fi
17336 else
17337   ac_cpp_err=yes
17338 fi
17339 if test -z "$ac_cpp_err"; then
17340   eval "$as_ac_Header=yes"
17341 else
17342   echo "$as_me: failed program was:" >&5
17343   cat conftest.$ac_ext >&5
17344   eval "$as_ac_Header=no"
17345 fi
17346 rm -f conftest.err conftest.$ac_ext
17347 fi
17348 echo "$as_me:17348: result: `eval echo '${'$as_ac_Header'}'`" >&5
17349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17350 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17351   cat >>confdefs.h <<EOF
17352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17353 EOF
17354
17355 fi
17356 done
17357
17358     if test x"$ac_cv_header_iostream" = xyes ; then
17359         echo "$as_me:17359: checking if iostream uses std-namespace" >&5
17360 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17361         cat >conftest.$ac_ext <<_ACEOF
17362 #line 17362 "configure"
17363 #include "confdefs.h"
17364
17365 #include <iostream>
17366 using std::endl;
17367 using std::cerr;
17368 int
17369 main ()
17370 {
17371
17372 cerr << "testing" << endl;
17373
17374   ;
17375   return 0;
17376 }
17377 _ACEOF
17378 rm -f conftest.$ac_objext
17379 if { (eval echo "$as_me:17379: \"$ac_compile\"") >&5
17380   (eval $ac_compile) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); } &&
17384          { ac_try='test -s conftest.$ac_objext'
17385   { (eval echo "$as_me:17385: \"$ac_try\"") >&5
17386   (eval $ac_try) 2>&5
17387   ac_status=$?
17388   echo "$as_me:17388: \$? = $ac_status" >&5
17389   (exit $ac_status); }; }; then
17390   cf_iostream_namespace=yes
17391 else
17392   echo "$as_me: failed program was:" >&5
17393 cat conftest.$ac_ext >&5
17394 cf_iostream_namespace=no
17395 fi
17396 rm -f conftest.$ac_objext conftest.$ac_ext
17397         echo "$as_me:17397: result: $cf_iostream_namespace" >&5
17398 echo "${ECHO_T}$cf_iostream_namespace" >&6
17399         if test "$cf_iostream_namespace" = yes ; then
17400             cat >>confdefs.h <<\EOF
17401 #define IOSTREAM_NAMESPACE 1
17402 EOF
17403
17404         fi
17405     fi
17406
17407 echo "$as_me:17407: checking if we should include stdbool.h" >&5
17408 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17409
17410 if test "${cf_cv_header_stdbool_h+set}" = set; then
17411   echo $ECHO_N "(cached) $ECHO_C" >&6
17412 else
17413
17414         cat >conftest.$ac_ext <<_ACEOF
17415 #line 17415 "configure"
17416 #include "confdefs.h"
17417
17418 int
17419 main ()
17420 {
17421 bool foo = false
17422   ;
17423   return 0;
17424 }
17425 _ACEOF
17426 rm -f conftest.$ac_objext
17427 if { (eval echo "$as_me:17427: \"$ac_compile\"") >&5
17428   (eval $ac_compile) 2>&5
17429   ac_status=$?
17430   echo "$as_me:17430: \$? = $ac_status" >&5
17431   (exit $ac_status); } &&
17432          { ac_try='test -s conftest.$ac_objext'
17433   { (eval echo "$as_me:17433: \"$ac_try\"") >&5
17434   (eval $ac_try) 2>&5
17435   ac_status=$?
17436   echo "$as_me:17436: \$? = $ac_status" >&5
17437   (exit $ac_status); }; }; then
17438   cf_cv_header_stdbool_h=0
17439 else
17440   echo "$as_me: failed program was:" >&5
17441 cat conftest.$ac_ext >&5
17442 cat >conftest.$ac_ext <<_ACEOF
17443 #line 17443 "configure"
17444 #include "confdefs.h"
17445
17446 #ifndef __BEOS__
17447 #include <stdbool.h>
17448 #endif
17449
17450 int
17451 main ()
17452 {
17453 bool foo = false
17454   ;
17455   return 0;
17456 }
17457 _ACEOF
17458 rm -f conftest.$ac_objext
17459 if { (eval echo "$as_me:17459: \"$ac_compile\"") >&5
17460   (eval $ac_compile) 2>&5
17461   ac_status=$?
17462   echo "$as_me:17462: \$? = $ac_status" >&5
17463   (exit $ac_status); } &&
17464          { ac_try='test -s conftest.$ac_objext'
17465   { (eval echo "$as_me:17465: \"$ac_try\"") >&5
17466   (eval $ac_try) 2>&5
17467   ac_status=$?
17468   echo "$as_me:17468: \$? = $ac_status" >&5
17469   (exit $ac_status); }; }; then
17470   cf_cv_header_stdbool_h=1
17471 else
17472   echo "$as_me: failed program was:" >&5
17473 cat conftest.$ac_ext >&5
17474 cf_cv_header_stdbool_h=0
17475 fi
17476 rm -f conftest.$ac_objext conftest.$ac_ext
17477 fi
17478 rm -f conftest.$ac_objext conftest.$ac_ext
17479 fi
17480
17481 if test "$cf_cv_header_stdbool_h" = 1
17482 then    echo "$as_me:17482: result: yes" >&5
17483 echo "${ECHO_T}yes" >&6
17484 else    echo "$as_me:17484: result: no" >&5
17485 echo "${ECHO_T}no" >&6
17486 fi
17487
17488 echo "$as_me:17488: checking for builtin bool type" >&5
17489 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17490
17491 if test "${cf_cv_builtin_bool+set}" = set; then
17492   echo $ECHO_N "(cached) $ECHO_C" >&6
17493 else
17494
17495         cat >conftest.$ac_ext <<_ACEOF
17496 #line 17496 "configure"
17497 #include "confdefs.h"
17498
17499 #include <stdio.h>
17500 #include <sys/types.h>
17501
17502 int
17503 main ()
17504 {
17505 bool x = false
17506   ;
17507   return 0;
17508 }
17509 _ACEOF
17510 rm -f conftest.$ac_objext
17511 if { (eval echo "$as_me:17511: \"$ac_compile\"") >&5
17512   (eval $ac_compile) 2>&5
17513   ac_status=$?
17514   echo "$as_me:17514: \$? = $ac_status" >&5
17515   (exit $ac_status); } &&
17516          { ac_try='test -s conftest.$ac_objext'
17517   { (eval echo "$as_me:17517: \"$ac_try\"") >&5
17518   (eval $ac_try) 2>&5
17519   ac_status=$?
17520   echo "$as_me:17520: \$? = $ac_status" >&5
17521   (exit $ac_status); }; }; then
17522   cf_cv_builtin_bool=1
17523 else
17524   echo "$as_me: failed program was:" >&5
17525 cat conftest.$ac_ext >&5
17526 cf_cv_builtin_bool=0
17527 fi
17528 rm -f conftest.$ac_objext conftest.$ac_ext
17529
17530 fi
17531
17532 if test "$cf_cv_builtin_bool" = 1
17533 then    echo "$as_me:17533: result: yes" >&5
17534 echo "${ECHO_T}yes" >&6
17535 else    echo "$as_me:17535: result: no" >&5
17536 echo "${ECHO_T}no" >&6
17537 fi
17538
17539 echo "$as_me:17539: checking for size of bool" >&5
17540 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17541 if test "${cf_cv_type_of_bool+set}" = set; then
17542   echo $ECHO_N "(cached) $ECHO_C" >&6
17543 else
17544
17545         rm -f cf_test.out
17546         if test "$cross_compiling" = yes; then
17547   cf_cv_type_of_bool=unknown
17548 else
17549   cat >conftest.$ac_ext <<_ACEOF
17550 #line 17550 "configure"
17551 #include "confdefs.h"
17552
17553 #include <stdlib.h>
17554 #include <stdio.h>
17555
17556 #if defined(__cplusplus)
17557
17558 #ifdef HAVE_GXX_BUILTIN_H
17559 #include <g++/builtin.h>
17560 #elif HAVE_GPP_BUILTIN_H
17561 #include <gpp/builtin.h>
17562 #elif HAVE_BUILTIN_H
17563 #include <builtin.h>
17564 #endif
17565
17566 #else
17567
17568 #if $cf_cv_header_stdbool_h
17569 #include <stdbool.h>
17570 #endif
17571
17572 #endif
17573
17574 main()
17575 {
17576         FILE *fp = fopen("cf_test.out", "w");
17577         if (fp != 0) {
17578                 bool x = true;
17579                 if ((bool)(-x) >= 0)
17580                         fputs("unsigned ", fp);
17581                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17582                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17583                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17584                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17585                 fclose(fp);
17586         }
17587         ${cf_cv_main_return:-return}(0);
17588 }
17589
17590 _ACEOF
17591 rm -f conftest$ac_exeext
17592 if { (eval echo "$as_me:17592: \"$ac_link\"") >&5
17593   (eval $ac_link) 2>&5
17594   ac_status=$?
17595   echo "$as_me:17595: \$? = $ac_status" >&5
17596   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17597   { (eval echo "$as_me:17597: \"$ac_try\"") >&5
17598   (eval $ac_try) 2>&5
17599   ac_status=$?
17600   echo "$as_me:17600: \$? = $ac_status" >&5
17601   (exit $ac_status); }; }; then
17602   cf_cv_type_of_bool=`cat cf_test.out`
17603                  if test -z "$cf_cv_type_of_bool"; then
17604                    cf_cv_type_of_bool=unknown
17605                  fi
17606 else
17607   echo "$as_me: program exited with status $ac_status" >&5
17608 echo "$as_me: failed program was:" >&5
17609 cat conftest.$ac_ext >&5
17610 cf_cv_type_of_bool=unknown
17611 fi
17612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17613 fi
17614
17615 fi
17616
17617         rm -f cf_test.out
17618 echo "$as_me:17618: result: $cf_cv_type_of_bool" >&5
17619 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17620 if test "$cf_cv_type_of_bool" = unknown ; then
17621         case .$NCURSES_BOOL in #(vi
17622         .auto|.) NCURSES_BOOL=unsigned;;
17623         esac
17624         { echo "$as_me:17624: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17625 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17626         cf_cv_type_of_bool=$NCURSES_BOOL
17627 fi
17628
17629 echo "$as_me:17629: checking for special defines needed for etip.h" >&5
17630 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17631 cf_save_CXXFLAGS="$CXXFLAGS"
17632 cf_result="none"
17633 for cf_math in "" MATH_H
17634 do
17635 for cf_excp in "" MATH_EXCEPTION
17636 do
17637         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17638         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17639         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17640 cat >conftest.$ac_ext <<_ACEOF
17641 #line 17641 "configure"
17642 #include "confdefs.h"
17643
17644 #include <etip.h.in>
17645
17646 int
17647 main ()
17648 {
17649
17650   ;
17651   return 0;
17652 }
17653 _ACEOF
17654 rm -f conftest.$ac_objext
17655 if { (eval echo "$as_me:17655: \"$ac_compile\"") >&5
17656   (eval $ac_compile) 2>&5
17657   ac_status=$?
17658   echo "$as_me:17658: \$? = $ac_status" >&5
17659   (exit $ac_status); } &&
17660          { ac_try='test -s conftest.$ac_objext'
17661   { (eval echo "$as_me:17661: \"$ac_try\"") >&5
17662   (eval $ac_try) 2>&5
17663   ac_status=$?
17664   echo "$as_me:17664: \$? = $ac_status" >&5
17665   (exit $ac_status); }; }; then
17666
17667         test -n "$cf_math" && cat >>confdefs.h <<EOF
17668 #define ETIP_NEEDS_${cf_math} 1
17669 EOF
17670
17671         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17672 #define ETIP_NEEDS_${cf_excp} 1
17673 EOF
17674
17675         cf_result="$cf_math $cf_excp"
17676         break
17677
17678 else
17679   echo "$as_me: failed program was:" >&5
17680 cat conftest.$ac_ext >&5
17681 fi
17682 rm -f conftest.$ac_objext conftest.$ac_ext
17683 done
17684 done
17685 echo "$as_me:17685: result: $cf_result" >&5
17686 echo "${ECHO_T}$cf_result" >&6
17687 CXXFLAGS="$cf_save_CXXFLAGS"
17688
17689 if test -n "$CXX"; then
17690 echo "$as_me:17690: checking if $CXX accepts parameter initialization" >&5
17691 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17692 if test "${cf_cv_cpp_param_init+set}" = set; then
17693   echo $ECHO_N "(cached) $ECHO_C" >&6
17694 else
17695
17696         ac_ext=cc
17697 ac_cpp='$CXXCPP $CPPFLAGS'
17698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17701 ac_main_return=return
17702
17703         if test "$cross_compiling" = yes; then
17704   cf_cv_cpp_param_init=unknown
17705 else
17706   cat >conftest.$ac_ext <<_ACEOF
17707 #line 17707 "configure"
17708 #include "confdefs.h"
17709
17710 class TEST {
17711 private:
17712         int value;
17713 public:
17714         TEST(int x = 1);
17715         ~TEST();
17716 };
17717
17718 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17719 {
17720         value = x;
17721 }
17722 void main() { }
17723
17724 _ACEOF
17725 rm -f conftest$ac_exeext
17726 if { (eval echo "$as_me:17726: \"$ac_link\"") >&5
17727   (eval $ac_link) 2>&5
17728   ac_status=$?
17729   echo "$as_me:17729: \$? = $ac_status" >&5
17730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17731   { (eval echo "$as_me:17731: \"$ac_try\"") >&5
17732   (eval $ac_try) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); }; }; then
17736   cf_cv_cpp_param_init=yes
17737 else
17738   echo "$as_me: program exited with status $ac_status" >&5
17739 echo "$as_me: failed program was:" >&5
17740 cat conftest.$ac_ext >&5
17741 cf_cv_cpp_param_init=no
17742 fi
17743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17744 fi
17745         ac_ext=cc
17746 ac_cpp='$CXXCPP $CPPFLAGS'
17747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17750 ac_main_return=return
17751
17752 fi
17753 echo "$as_me:17753: result: $cf_cv_cpp_param_init" >&5
17754 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17755 fi
17756 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17757 #define CPP_HAS_PARAM_INIT 1
17758 EOF
17759
17760 if test -n "$CXX"; then
17761
17762 echo "$as_me:17762: checking if $CXX accepts static_cast" >&5
17763 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17764 if test "${cf_cv_cpp_static_cast+set}" = set; then
17765   echo $ECHO_N "(cached) $ECHO_C" >&6
17766 else
17767
17768         ac_ext=cc
17769 ac_cpp='$CXXCPP $CPPFLAGS'
17770 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17771 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17772 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17773 ac_main_return=return
17774
17775         cat >conftest.$ac_ext <<_ACEOF
17776 #line 17776 "configure"
17777 #include "confdefs.h"
17778
17779 class NCursesPanel
17780 {
17781 public:
17782   NCursesPanel(int nlines,
17783                int ncols,
17784                int begin_y = 0,
17785                int begin_x = 0)
17786   {
17787   }
17788
17789   ~NCursesPanel();
17790 };
17791
17792 template<class T> class NCursesUserPanel : public NCursesPanel
17793 {
17794 public:
17795   NCursesUserPanel (int nlines,
17796                     int ncols,
17797                     int begin_y = 0,
17798                     int begin_x = 0,
17799                     const T* p_UserData = static_cast<T*>(0))
17800     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17801   {
17802   };
17803   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17804   {
17805   };
17806
17807   virtual ~NCursesUserPanel() {};
17808 };
17809
17810 int
17811 main ()
17812 {
17813
17814         const char* p_UserData = static_cast<char*>(0)
17815   ;
17816   return 0;
17817 }
17818 _ACEOF
17819 rm -f conftest.$ac_objext
17820 if { (eval echo "$as_me:17820: \"$ac_compile\"") >&5
17821   (eval $ac_compile) 2>&5
17822   ac_status=$?
17823   echo "$as_me:17823: \$? = $ac_status" >&5
17824   (exit $ac_status); } &&
17825          { ac_try='test -s conftest.$ac_objext'
17826   { (eval echo "$as_me:17826: \"$ac_try\"") >&5
17827   (eval $ac_try) 2>&5
17828   ac_status=$?
17829   echo "$as_me:17829: \$? = $ac_status" >&5
17830   (exit $ac_status); }; }; then
17831   cf_cv_cpp_static_cast=yes
17832 else
17833   echo "$as_me: failed program was:" >&5
17834 cat conftest.$ac_ext >&5
17835 cf_cv_cpp_static_cast=no
17836 fi
17837 rm -f conftest.$ac_objext conftest.$ac_ext
17838
17839         ac_ext=cc
17840 ac_cpp='$CXXCPP $CPPFLAGS'
17841 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17842 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17843 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17844 ac_main_return=return
17845
17846 fi
17847 echo "$as_me:17847: result: $cf_cv_cpp_static_cast" >&5
17848 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17849
17850 fi
17851
17852 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17853 #define CPP_HAS_STATIC_CAST 1
17854 EOF
17855
17856         CXX_AR='$(AR)'
17857         CXX_ARFLAGS='$(ARFLAGS)'
17858         case $cf_cv_system_name in #(vi
17859         irix*) #(vi
17860             if test "$GXX" != yes ; then
17861                 CXX_AR='$(CXX)'
17862                 CXX_ARFLAGS='-ar -o'
17863             fi
17864             ;;
17865         sco3.2v5*) #(vi
17866             CXXLDFLAGS="-u main"
17867             ;;
17868         solaris2*)
17869             if test "$GXX" != yes ; then
17870                 CXX_AR='$(CXX)'
17871                 CXX_ARFLAGS='-xar -o'
17872             fi
17873             ;;
17874         esac
17875
17876 else
17877         cf_cxx_library=no
17878         cf_cv_builtin_bool=1
17879
17880         # Just because we are not configuring against C++ right now does not
17881         # mean that a user will not want to use C++.  Some distributors disable
17882         # the C++ portion of this configuration as a shortcut (or just to avoid
17883         # compiling the demo in the c++ directory).  So we need a reasonable
17884         # default for the 'bool' type.
17885         #
17886         # Caveat: since the storage of the bool type is not standardized, it
17887         # may change.
17888
17889         if test "$NCURSES_BOOL" != auto ; then
17890                 cf_cv_type_of_bool=$NCURSES_BOOL
17891                 cf_cv_header_stdbool_h=0
17892         else
17893                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17894
17895 echo "$as_me:17895: checking for size of bool" >&5
17896 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17897 if test "${cf_cv_type_of_bool+set}" = set; then
17898   echo $ECHO_N "(cached) $ECHO_C" >&6
17899 else
17900
17901         rm -f cf_test.out
17902         if test "$cross_compiling" = yes; then
17903   cf_cv_type_of_bool=unknown
17904 else
17905   cat >conftest.$ac_ext <<_ACEOF
17906 #line 17906 "configure"
17907 #include "confdefs.h"
17908
17909 #include <stdlib.h>
17910 #include <stdio.h>
17911
17912 #if defined(__cplusplus)
17913
17914 #ifdef HAVE_GXX_BUILTIN_H
17915 #include <g++/builtin.h>
17916 #elif HAVE_GPP_BUILTIN_H
17917 #include <gpp/builtin.h>
17918 #elif HAVE_BUILTIN_H
17919 #include <builtin.h>
17920 #endif
17921
17922 #else
17923
17924 #if $cf_cv_header_stdbool_h
17925 #include <stdbool.h>
17926 #endif
17927
17928 #endif
17929
17930 main()
17931 {
17932         FILE *fp = fopen("cf_test.out", "w");
17933         if (fp != 0) {
17934                 bool x = true;
17935                 if ((bool)(-x) >= 0)
17936                         fputs("unsigned ", fp);
17937                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17938                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17939                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17940                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17941                 fclose(fp);
17942         }
17943         ${cf_cv_main_return:-return}(0);
17944 }
17945
17946 _ACEOF
17947 rm -f conftest$ac_exeext
17948 if { (eval echo "$as_me:17948: \"$ac_link\"") >&5
17949   (eval $ac_link) 2>&5
17950   ac_status=$?
17951   echo "$as_me:17951: \$? = $ac_status" >&5
17952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17953   { (eval echo "$as_me:17953: \"$ac_try\"") >&5
17954   (eval $ac_try) 2>&5
17955   ac_status=$?
17956   echo "$as_me:17956: \$? = $ac_status" >&5
17957   (exit $ac_status); }; }; then
17958   cf_cv_type_of_bool=`cat cf_test.out`
17959                  if test -z "$cf_cv_type_of_bool"; then
17960                    cf_cv_type_of_bool=unknown
17961                  fi
17962 else
17963   echo "$as_me: program exited with status $ac_status" >&5
17964 echo "$as_me: failed program was:" >&5
17965 cat conftest.$ac_ext >&5
17966 cf_cv_type_of_bool=unknown
17967 fi
17968 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17969 fi
17970
17971 fi
17972
17973         rm -f cf_test.out
17974 echo "$as_me:17974: result: $cf_cv_type_of_bool" >&5
17975 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17976 if test "$cf_cv_type_of_bool" = unknown ; then
17977         case .$NCURSES_BOOL in #(vi
17978         .auto|.) NCURSES_BOOL=unsigned;;
17979         esac
17980         { echo "$as_me:17980: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17981 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17982         cf_cv_type_of_bool=$NCURSES_BOOL
17983 fi
17984
17985                 else
17986                         echo "$as_me:17986: checking for fallback type of bool" >&5
17987 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17988                         case "$host_cpu" in #(vi
17989                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17990                         *)      cf_cv_type_of_bool=int  ;;
17991                         esac
17992                         echo "$as_me:17992: result: $cf_cv_type_of_bool" >&5
17993 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17994                 fi
17995         fi
17996 fi
17997
17998 # If the C compiler did not declare bool, and we did not determine that the C++
17999 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18000 # ncurses library use the same type as C++ bool.  Note that this allows one to
18001 # specify the type of bool in a configure-script option and postpone
18002 # integration with the C++ compiler provided that the types are compatible.
18003 USE_CXX_BOOL=1
18004 if test $cf_cv_cc_bool_type = 1
18005 then
18006         # oops: C has a bool.  Unlikely, but C++ could differ.
18007         USE_CXX_BOOL=0
18008 elif test $cf_cv_builtin_bool = 0
18009 then
18010         # C++ has no bool
18011         USE_CXX_BOOL=0
18012 else
18013         # this is the normal case
18014         USE_CXX_BOOL='defined(__cplusplus)'
18015 fi
18016
18017 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18018
18019         if test "$cf_with_ada" != "no" ; then
18020                 if test "$with_libtool" != "no"; then
18021                         { echo "$as_me:18021: WARNING: libtool does not support Ada - disabling feature" >&5
18022 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18023                         cf_with_ada=no
18024                 fi
18025         fi
18026
18027         if test "$cf_with_ada" != "no" ; then
18028
18029 cf_ada_make=gnatmake
18030 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18031 set dummy $cf_ada_make; ac_word=$2
18032 echo "$as_me:18032: checking for $ac_word" >&5
18033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18034 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18035   echo $ECHO_N "(cached) $ECHO_C" >&6
18036 else
18037   if test -n "$gnat_exists"; then
18038   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18039 else
18040   ac_save_IFS=$IFS; IFS=$ac_path_separator
18041 ac_dummy="$PATH"
18042 for ac_dir in $ac_dummy; do
18043   IFS=$ac_save_IFS
18044   test -z "$ac_dir" && ac_dir=.
18045   $as_executable_p "$ac_dir/$ac_word" || continue
18046 ac_cv_prog_gnat_exists="yes"
18047 echo "$as_me:18047: found $ac_dir/$ac_word" >&5
18048 break
18049 done
18050
18051   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18052 fi
18053 fi
18054 gnat_exists=$ac_cv_prog_gnat_exists
18055 if test -n "$gnat_exists"; then
18056   echo "$as_me:18056: result: $gnat_exists" >&5
18057 echo "${ECHO_T}$gnat_exists" >&6
18058 else
18059   echo "$as_me:18059: result: no" >&5
18060 echo "${ECHO_T}no" >&6
18061 fi
18062
18063 if test "$ac_cv_prog_gnat_exists" = no; then
18064    cf_ada_make=
18065 else
18066
18067 echo "$as_me:18067: checking for gnat version" >&5
18068 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18069 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18070         grep '[0-9].[0-9][0-9]*' |\
18071     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18072 echo "$as_me:18072: result: $cf_gnat_version" >&5
18073 echo "${ECHO_T}$cf_gnat_version" >&6
18074
18075 case $cf_gnat_version in #(vi
18076 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18077         cf_cv_prog_gnat_correct=yes
18078         ;;
18079 *)
18080         { echo "$as_me:18080: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18081 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18082         cf_cv_prog_gnat_correct=no
18083         ;;
18084 esac
18085
18086 echo "$as_me:18086: checking if GNAT supports generics" >&5
18087 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18088 case $cf_gnat_version in #(vi
18089 3.[1-9]*|[4-9].*) #(vi
18090         cf_gnat_generics=yes
18091         ;;
18092 *)
18093         cf_gnat_generics=no
18094         ;;
18095 esac
18096 echo "$as_me:18096: result: $cf_gnat_generics" >&5
18097 echo "${ECHO_T}$cf_gnat_generics" >&6
18098
18099 if test "$cf_gnat_generics" = yes
18100 then
18101         cf_compile_generics=generics
18102         cf_generic_objects="\${GENOBJS}"
18103 else
18104         cf_compile_generics=
18105         cf_generic_objects=
18106 fi
18107
18108 echo "$as_me:18108: checking if GNAT supports project files" >&5
18109 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18110 case $cf_gnat_version in #(vi
18111 3.[0-9]*) #(vi
18112         cf_gnat_projects=no
18113         ;;
18114 *)
18115         case $cf_cv_system_name in #(vi
18116         cygwin*) #(vi
18117                 cf_gnat_projects=no
18118                 ;;
18119         *)
18120                 cf_gnat_projects=yes
18121                 ;;
18122         esac
18123         ;;
18124 esac
18125 echo "$as_me:18125: result: $cf_gnat_projects" >&5
18126 echo "${ECHO_T}$cf_gnat_projects" >&6
18127
18128 if test "$cf_gnat_projects" = yes
18129 then
18130         USE_OLD_MAKERULES="#"
18131         USE_GNAT_PROJECTS=""
18132 else
18133         USE_OLD_MAKERULES=""
18134         USE_GNAT_PROJECTS="#"
18135 fi
18136
18137    # Extract the first word of "m4", so it can be a program name with args.
18138 set dummy m4; ac_word=$2
18139 echo "$as_me:18139: checking for $ac_word" >&5
18140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18141 if test "${ac_cv_prog_M4_exists+set}" = set; then
18142   echo $ECHO_N "(cached) $ECHO_C" >&6
18143 else
18144   if test -n "$M4_exists"; then
18145   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18146 else
18147   ac_save_IFS=$IFS; IFS=$ac_path_separator
18148 ac_dummy="$PATH"
18149 for ac_dir in $ac_dummy; do
18150   IFS=$ac_save_IFS
18151   test -z "$ac_dir" && ac_dir=.
18152   $as_executable_p "$ac_dir/$ac_word" || continue
18153 ac_cv_prog_M4_exists="yes"
18154 echo "$as_me:18154: found $ac_dir/$ac_word" >&5
18155 break
18156 done
18157
18158   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18159 fi
18160 fi
18161 M4_exists=$ac_cv_prog_M4_exists
18162 if test -n "$M4_exists"; then
18163   echo "$as_me:18163: result: $M4_exists" >&5
18164 echo "${ECHO_T}$M4_exists" >&6
18165 else
18166   echo "$as_me:18166: result: no" >&5
18167 echo "${ECHO_T}no" >&6
18168 fi
18169
18170    if test "$ac_cv_prog_M4_exists" = no; then
18171       cf_cv_prog_gnat_correct=no
18172       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18173    fi
18174    if test "$cf_cv_prog_gnat_correct" = yes; then
18175       echo "$as_me:18175: checking if GNAT works" >&5
18176 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18177
18178 rm -rf conftest*
18179 cat >>conftest.ads <<CF_EOF
18180 procedure conftest;
18181 CF_EOF
18182 cat >>conftest.adb <<CF_EOF
18183 with Text_IO;
18184 with GNAT.OS_Lib;
18185 procedure conftest is
18186 begin
18187    Text_IO.Put ("Hello World");
18188    Text_IO.New_Line;
18189    GNAT.OS_Lib.OS_Exit (0);
18190 end conftest;
18191 CF_EOF
18192 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18193    if ( ./conftest 1>&5 2>&1 ) ; then
18194       cf_cv_prog_gnat_correct=yes
18195    else
18196       cf_cv_prog_gnat_correct=no
18197    fi
18198 else
18199    cf_cv_prog_gnat_correct=no
18200 fi
18201 rm -rf conftest*
18202
18203       echo "$as_me:18203: result: $cf_cv_prog_gnat_correct" >&5
18204 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18205    fi
18206 fi
18207
18208                 if test "$cf_cv_prog_gnat_correct" = yes; then
18209
18210         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
18211
18212 echo "$as_me:18212: checking if GNAT pragma Unreferenced works" >&5
18213 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18214 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18215   echo $ECHO_N "(cached) $ECHO_C" >&6
18216 else
18217
18218 rm -rf conftest*
18219 cat >>conftest.ads <<CF_EOF
18220 procedure conftest;
18221 CF_EOF
18222 cat >>conftest.adb <<CF_EOF
18223 with Text_IO;
18224 with GNAT.OS_Lib;
18225 procedure conftest is
18226    test : Integer;
18227    pragma Unreferenced (test);
18228 begin
18229    test := 1;
18230    Text_IO.Put ("Hello World");
18231    Text_IO.New_Line;
18232    GNAT.OS_Lib.OS_Exit (0);
18233 end conftest;
18234 CF_EOF
18235 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18236       cf_cv_pragma_unreferenced=yes
18237 else
18238    cf_cv_pragma_unreferenced=no
18239 fi
18240 rm -rf conftest*
18241
18242 fi
18243 echo "$as_me:18243: result: $cf_cv_pragma_unreferenced" >&5
18244 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18245
18246 # if the pragma is supported, use it (needed in the Trace code).
18247 if test $cf_cv_pragma_unreferenced = yes ; then
18248         PRAGMA_UNREF=TRUE
18249 else
18250         PRAGMA_UNREF=FALSE
18251 fi
18252
18253 echo "$as_me:18253: checking for ada-compiler" >&5
18254 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18255
18256 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18257 if test "${with_ada_compiler+set}" = set; then
18258   withval="$with_ada_compiler"
18259   cf_ada_compiler=$withval
18260 else
18261   cf_ada_compiler=gnatmake
18262 fi;
18263
18264 echo "$as_me:18264: result: $cf_ada_compiler" >&5
18265 echo "${ECHO_T}$cf_ada_compiler" >&6
18266
18267                         cf_ada_package=terminal_interface
18268
18269 echo "$as_me:18269: checking for ada-include" >&5
18270 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18271
18272 # Check whether --with-ada-include or --without-ada-include was given.
18273 if test "${with_ada_include+set}" = set; then
18274   withval="$with_ada_include"
18275
18276 else
18277   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18278 fi; if test -n "$prefix/share/ada/adainclude" ; then
18279
18280 if test "x$prefix" != xNONE; then
18281   cf_path_syntax="$prefix"
18282 else
18283   cf_path_syntax="$ac_default_prefix"
18284 fi
18285
18286 case ".$withval" in #(vi
18287 .\$\(*\)*|.\'*\'*) #(vi
18288   ;;
18289 ..|./*|.\\*) #(vi
18290   ;;
18291 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18292   ;;
18293 .\${*prefix}*) #(vi
18294   eval withval="$withval"
18295   case ".$withval" in #(vi
18296   .NONE/*)
18297     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18298     ;;
18299   esac
18300   ;; #(vi
18301 .no|.NONE/*)
18302   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18303   ;;
18304 *)
18305   { { echo "$as_me:18305: error: expected a pathname, not \"$withval\"" >&5
18306 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18307    { (exit 1); exit 1; }; }
18308   ;;
18309 esac
18310
18311 fi
18312 ADA_INCLUDE="$withval"
18313
18314 echo "$as_me:18314: result: $ADA_INCLUDE" >&5
18315 echo "${ECHO_T}$ADA_INCLUDE" >&6
18316
18317 echo "$as_me:18317: checking for ada-objects" >&5
18318 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18319
18320 # Check whether --with-ada-objects or --without-ada-objects was given.
18321 if test "${with_ada_objects+set}" = set; then
18322   withval="$with_ada_objects"
18323
18324 else
18325   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18326 fi; if test -n "$prefix/lib/ada/adalib" ; then
18327
18328 if test "x$prefix" != xNONE; then
18329   cf_path_syntax="$prefix"
18330 else
18331   cf_path_syntax="$ac_default_prefix"
18332 fi
18333
18334 case ".$withval" in #(vi
18335 .\$\(*\)*|.\'*\'*) #(vi
18336   ;;
18337 ..|./*|.\\*) #(vi
18338   ;;
18339 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18340   ;;
18341 .\${*prefix}*) #(vi
18342   eval withval="$withval"
18343   case ".$withval" in #(vi
18344   .NONE/*)
18345     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18346     ;;
18347   esac
18348   ;; #(vi
18349 .no|.NONE/*)
18350   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18351   ;;
18352 *)
18353   { { echo "$as_me:18353: error: expected a pathname, not \"$withval\"" >&5
18354 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18355    { (exit 1); exit 1; }; }
18356   ;;
18357 esac
18358
18359 fi
18360 ADA_OBJECTS="$withval"
18361
18362 echo "$as_me:18362: result: $ADA_OBJECTS" >&5
18363 echo "${ECHO_T}$ADA_OBJECTS" >&6
18364
18365 echo "$as_me:18365: checking if an Ada95 shared-library should be built" >&5
18366 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18367
18368 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18369 if test "${with_ada_sharedlib+set}" = set; then
18370   withval="$with_ada_sharedlib"
18371   with_ada_sharedlib=$withval
18372 else
18373   with_ada_sharedlib=no
18374 fi;
18375 echo "$as_me:18375: result: $with_ada_sharedlib" >&5
18376 echo "${ECHO_T}$with_ada_sharedlib" >&6
18377
18378 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18379 MAKE_ADA_SHAREDLIB="#"
18380
18381 if test "x$with_ada_sharedlib" != xno
18382 then
18383         MAKE_ADA_SHAREDLIB=
18384         if test "x$with_ada_sharedlib" != xyes
18385         then
18386                 ADA_SHAREDLIB="$with_ada_sharedlib"
18387         fi
18388 fi
18389
18390                 fi
18391         fi
18392 else
18393         cf_with_ada=no
18394 fi
18395
18396 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18397 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18398 ###
18399 ### ticlib modules may be a separate library, otherwise contained in termlib.
18400 ### termlib modules may be a separate library, otherwise contained in ncurses.
18401 ###
18402 ### The of "+" or " " between the tokens controls the way the script
18403 ### chooses to split module lists into libraries.
18404 ###
18405 ### (see CF_LIB_RULES).
18406 echo "$as_me:18406: checking for library subsets" >&5
18407 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18408 LIB_SUBSETS=
18409
18410 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18411         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18412         if test "$with_ticlib" != no ; then
18413                 LIB_SUBSETS="${LIB_SUBSETS} "
18414         else
18415                 LIB_SUBSETS="${LIB_SUBSETS}+"
18416         fi
18417 fi
18418
18419 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18420 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18421
18422 if test "$with_termlib" != no ; then
18423         LIB_SUBSETS="${LIB_SUBSETS} "
18424 else
18425         LIB_SUBSETS="${LIB_SUBSETS}+"
18426 fi
18427
18428 LIB_SUBSETS="${LIB_SUBSETS}base"
18429
18430 # Most term-driver calls are to tinfo, but some like init_pair are to the
18431 # base library (so it resides in base).
18432 if test "$with_term_driver" != no ; then
18433         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18434         case $cf_cv_system_name in #(vi
18435         *mingw32*) #(vi
18436                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18437                 ;;
18438         *) #(vi
18439                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18440                 ;;
18441         esac
18442 fi
18443
18444 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18445 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18446
18447 echo "$as_me:18447: result: $LIB_SUBSETS" >&5
18448 echo "${ECHO_T}$LIB_SUBSETS" >&6
18449
18450 ### Construct the list of include-directories to be generated
18451
18452 CPPFLAGS="$CPPFLAGS -I. -I../include"
18453 if test "$srcdir" != "."; then
18454         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18455 fi
18456 if test "$GCC" != yes; then
18457         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18458 elif test "$includedir" != "/usr/include"; then
18459         if test "$includedir" = '${prefix}/include' ; then
18460                 if test $prefix != /usr ; then
18461                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18462                 fi
18463         else
18464                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18465         fi
18466 fi
18467
18468 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18469 if test "$srcdir" != "."; then
18470         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18471 fi
18472 if test "$GCC" != yes; then
18473         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18474 elif test "$includedir" != "/usr/include"; then
18475         if test "$includedir" = '${prefix}/include' ; then
18476                 if test $prefix != /usr ; then
18477                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18478                 fi
18479         else
18480                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18481         fi
18482 fi
18483
18484 ### Build up pieces for makefile rules
18485 echo "$as_me:18485: checking default library suffix" >&5
18486 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18487
18488         case $DFT_LWR_MODEL in
18489         libtool) DFT_ARG_SUFFIX=''   ;;
18490         normal)  DFT_ARG_SUFFIX=''   ;;
18491         debug)   DFT_ARG_SUFFIX='_g' ;;
18492         profile) DFT_ARG_SUFFIX='_p' ;;
18493         shared)  DFT_ARG_SUFFIX=''   ;;
18494         esac
18495         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18496 echo "$as_me:18496: result: $DFT_ARG_SUFFIX" >&5
18497 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18498
18499 echo "$as_me:18499: checking default library-dependency suffix" >&5
18500 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18501
18502         case $DFT_LWR_MODEL in #(vi
18503         libtool) #(vi
18504                 DFT_LIB_SUFFIX='.la'
18505                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18506                 ;;
18507         normal) #(vi
18508                 DFT_LIB_SUFFIX='.a'
18509                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18510                 ;;
18511         debug) #(vi
18512                 DFT_LIB_SUFFIX='_g.a'
18513                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18514                 ;;
18515         profile) #(vi
18516                 DFT_LIB_SUFFIX='_p.a'
18517                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18518                 ;;
18519         shared) #(vi
18520                 case $cf_cv_system_name in
18521                 aix[56]*) #(vi
18522                         DFT_LIB_SUFFIX='.a'
18523                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18524                         ;;
18525                 cygwin*) #(vi
18526                         DFT_LIB_SUFFIX='.dll'
18527                         DFT_DEP_SUFFIX='.dll.a'
18528                         ;;
18529                 darwin*) #(vi
18530                         DFT_LIB_SUFFIX='.dylib'
18531                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18532                         ;;
18533                 hpux*) #(vi
18534                         case $target in
18535                         ia64*) #(vi
18536                                 DFT_LIB_SUFFIX='.so'
18537                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18538                                 ;;
18539                         *) #(vi
18540                                 DFT_LIB_SUFFIX='.sl'
18541                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18542                                 ;;
18543                         esac
18544                         ;;
18545                 *)      DFT_LIB_SUFFIX='.so'
18546                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18547                         ;;
18548                 esac
18549         esac
18550         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18551         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18552 echo "$as_me:18552: result: $DFT_DEP_SUFFIX" >&5
18553 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18554
18555 echo "$as_me:18555: checking default object directory" >&5
18556 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18557
18558         case $DFT_LWR_MODEL in
18559         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18560         normal)  DFT_OBJ_SUBDIR='objects' ;;
18561         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18562         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18563         shared)
18564                 case $cf_cv_system_name in #(vi
18565                 cygwin) #(vi
18566                         DFT_OBJ_SUBDIR='objects' ;;
18567                 *)
18568                         DFT_OBJ_SUBDIR='obj_s' ;;
18569                 esac
18570         esac
18571 echo "$as_me:18571: result: $DFT_OBJ_SUBDIR" >&5
18572 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18573
18574 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18575 if test "$cf_with_cxx" = yes ; then
18576 echo "$as_me:18576: checking c++ library-dependency suffix" >&5
18577 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18578 if test "$with_libtool" != "no"; then
18579         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18580 else
18581
18582         case normal in #(vi
18583         libtool) #(vi
18584                 CXX_LIB_SUFFIX='.la'
18585                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18586                 ;;
18587         normal) #(vi
18588                 CXX_LIB_SUFFIX='.a'
18589                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18590                 ;;
18591         debug) #(vi
18592                 CXX_LIB_SUFFIX='_g.a'
18593                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18594                 ;;
18595         profile) #(vi
18596                 CXX_LIB_SUFFIX='_p.a'
18597                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18598                 ;;
18599         shared) #(vi
18600                 case $cf_cv_system_name in
18601                 aix[56]*) #(vi
18602                         CXX_LIB_SUFFIX='.a'
18603                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18604                         ;;
18605                 cygwin*) #(vi
18606                         CXX_LIB_SUFFIX='.dll'
18607                         CXX_DEP_SUFFIX='.dll.a'
18608                         ;;
18609                 darwin*) #(vi
18610                         CXX_LIB_SUFFIX='.dylib'
18611                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18612                         ;;
18613                 hpux*) #(vi
18614                         case $target in
18615                         ia64*) #(vi
18616                                 CXX_LIB_SUFFIX='.so'
18617                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18618                                 ;;
18619                         *) #(vi
18620                                 CXX_LIB_SUFFIX='.sl'
18621                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18622                                 ;;
18623                         esac
18624                         ;;
18625                 *)      CXX_LIB_SUFFIX='.so'
18626                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18627                         ;;
18628                 esac
18629         esac
18630         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18631         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18632 fi
18633 echo "$as_me:18633: result: $CXX_LIB_SUFFIX" >&5
18634 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18635
18636 fi
18637
18638 # do not want -ldl in build except as needed for -lncurses dependency
18639 if test "$with_dlsym" = yes ; then
18640 if test $DFT_LWR_MODEL = shared || \
18641    test $DFT_LWR_MODEL = libtool ; then
18642
18643 # remove dl library from $LIBS
18644 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18645
18646 fi
18647 fi
18648 ### Set up low-level terminfo dependencies for makefiles.
18649
18650 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18651 # do not need libdl
18652 TICS_LIST=
18653 if test "$with_dlsym" = yes ; then
18654
18655 # remove dl library from $SHLIB_LIST
18656 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18657
18658 fi
18659
18660 if test "$with_ticlib" != no ; then
18661
18662         if test "$with_ticlib" != yes ; then
18663                 TICS_NAME=$with_ticlib
18664                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18665                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18666                 TICS_LIB_SUFFIX="${with_ticlib}"
18667         else
18668                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18669                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18670                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18671         fi
18672         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18673 else
18674         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18675 fi
18676
18677 if test "$with_termlib" != no ; then
18678
18679         if test "$with_termlib" != yes ; then
18680                 TINFO_NAME=$with_termlib
18681                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18682                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18683                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18684                 TINFO_LIB_SUFFIX="${with_termlib}"
18685         else
18686                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18687                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18688                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18689                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18690         fi
18691
18692         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18693         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18694         if test "$DFT_LWR_MODEL" = "libtool"; then
18695                 TEST_ARGS="${TEST_DEPS}"
18696                 TEST_ARG2="${TEST_DEP2}"
18697                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18698                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18699                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18700         else
18701                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18702                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18703                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18704                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18705                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18706         fi
18707 else
18708         # the next lines are needed for linking libtic over libncurses
18709         TINFO_NAME=${LIB_NAME}
18710         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18711         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18712         if test "$with_tic_depends" = yes ; then
18713                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18714         else
18715                 TICS_LIST="$SHLIB_LIST"
18716         fi
18717
18718         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18719 fi
18720
18721 if test "$DFT_LWR_MODEL" = shared ; then
18722         case $cf_cv_system_name in #(vi
18723         cygwin*)
18724                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18725                 TINFO_SUFFIX=.dll
18726                 ;;
18727         esac
18728 fi
18729
18730 if test "$with_dlsym" = yes ; then
18731
18732 # remove dl library from $TICS_LIST
18733 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18734
18735 fi
18736
18737 if test "$DFT_LWR_MODEL" = "libtool"; then
18738     OBJEXT=lo
18739 fi
18740
18741 # needed for Ada95
18742 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18743
18744 case $DFT_LWR_MODEL in
18745 normal|debug|profile)
18746
18747 if test "$GCC" = yes ; then
18748         case $cf_cv_system_name in #(
18749         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18750                 LDFLAGS_STATIC=
18751                 LDFLAGS_SHARED=
18752                 ;;
18753     *)  #( normally, except when broken
18754         LDFLAGS_STATIC=-static
18755         LDFLAGS_SHARED=-dynamic
18756         ;;
18757     esac
18758 else
18759         case $cf_cv_system_name in #(
18760         aix[456]*)      #( from ld manpage
18761                 LDFLAGS_STATIC=-bstatic
18762                 LDFLAGS_SHARED=-bdynamic
18763                 ;;
18764         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18765                 # We could also use just "archive" and "shared".
18766                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18767                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18768                 ;;
18769         irix*)          #( from ld manpage IRIX64
18770                 LDFLAGS_STATIC=-Bstatic
18771                 LDFLAGS_SHARED=-Bdynamic
18772                 ;;
18773         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18774                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18775                 LDFLAGS_STATIC=-noso
18776                 LDFLAGS_SHARED=-so_archive
18777                 ;;
18778         solaris2*)
18779                 LDFLAGS_STATIC=-Bstatic
18780                 LDFLAGS_SHARED=-Bdynamic
18781                 ;;
18782         esac
18783 fi
18784
18785 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
18786 then
18787         echo "$as_me:18787: checking if linker supports switching between static/dynamic" >&5
18788 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
18789
18790         rm -f libconftest.a
18791         cat >conftest.$ac_ext <<EOF
18792 #line 18792 "configure"
18793 #include <stdio.h>
18794 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
18795 EOF
18796         if { (eval echo "$as_me:18796: \"$ac_compile\"") >&5
18797   (eval $ac_compile) 2>&5
18798   ac_status=$?
18799   echo "$as_me:18799: \$? = $ac_status" >&5
18800   (exit $ac_status); } ; then
18801                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
18802                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
18803         fi
18804         rm -f conftest.*
18805
18806         cf_save_LIBS="$LIBS"
18807
18808         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
18809         cat >conftest.$ac_ext <<_ACEOF
18810 #line 18810 "configure"
18811 #include "confdefs.h"
18812
18813 #line 18813 "configure"
18814 #include <stdio.h>
18815 int cf_ldflags_static(FILE *fp);
18816
18817 int
18818 main ()
18819 {
18820
18821         return cf_ldflags_static(stdin);
18822
18823   ;
18824   return 0;
18825 }
18826 _ACEOF
18827 rm -f conftest.$ac_objext conftest$ac_exeext
18828 if { (eval echo "$as_me:18828: \"$ac_link\"") >&5
18829   (eval $ac_link) 2>&5
18830   ac_status=$?
18831   echo "$as_me:18831: \$? = $ac_status" >&5
18832   (exit $ac_status); } &&
18833          { ac_try='test -s conftest$ac_exeext'
18834   { (eval echo "$as_me:18834: \"$ac_try\"") >&5
18835   (eval $ac_try) 2>&5
18836   ac_status=$?
18837   echo "$as_me:18837: \$? = $ac_status" >&5
18838   (exit $ac_status); }; }; then
18839   cf_ldflags_static=yes
18840 else
18841   echo "$as_me: failed program was:" >&5
18842 cat conftest.$ac_ext >&5
18843 cf_ldflags_static=no
18844 fi
18845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18846
18847         rm -f libconftest.*
18848         LIBS="$cf_save_LIBS"
18849
18850         echo "$as_me:18850: result: $cf_ldflags_static" >&5
18851 echo "${ECHO_T}$cf_ldflags_static" >&6
18852
18853         if test $cf_ldflags_static != yes
18854         then
18855                 LDFLAGS_STATIC=
18856                 LDFLAGS_SHARED=
18857         fi
18858 else
18859         LDFLAGS_STATIC=
18860         LDFLAGS_SHARED=
18861 fi
18862
18863         ;;
18864 esac
18865
18866 echo "$as_me:18866: checking where we will install curses.h" >&5
18867 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18868 test "$with_overwrite" = no && \
18869 test "x$includedir" = 'x${prefix}/include' && \
18870         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18871 echo "$as_me:18871: result: $includedir" >&5
18872 echo "${ECHO_T}$includedir" >&6
18873
18874 ### Resolve a conflict between normal and wide-curses by forcing applications
18875 ### that will need libutf8 to add it to their configure script.
18876 if test "$with_overwrite" != no ; then
18877 if test "$NCURSES_LIBUTF8" = 1 ; then
18878         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18879         { echo "$as_me:18879: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18880 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18881 fi
18882 fi
18883 WITH_OVERWRITE=$with_overwrite
18884
18885 # used to separate tack out of the tree
18886 NCURSES_TREE=
18887
18888 ### predefined stuff for the test programs
18889 cat >>confdefs.h <<\EOF
18890 #define HAVE_SLK_COLOR 1
18891 EOF
18892
18893 ### Construct the list of subdirectories for which we'll customize makefiles
18894 ### with the appropriate compile-rules.
18895
18896 echo "$as_me:18896: checking for src modules" >&5
18897 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18898
18899 # dependencies and linker-arguments for test-programs
18900 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18901 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18902 if test "$DFT_LWR_MODEL" = "libtool"; then
18903         TEST_ARGS="${TEST_DEPS}"
18904         TEST_ARG2="${TEST_DEP2}"
18905 else
18906         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18907         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18908 fi
18909
18910 cf_cv_src_modules=
18911 for cf_dir in $modules_to_build
18912 do
18913         if test -f $srcdir/$cf_dir/modules; then
18914
18915                 # We may/may not have tack in the distribution, though the
18916                 # makefile is.
18917                 if test $cf_dir = tack ; then
18918                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18919                                 continue
18920                         fi
18921                 fi
18922
18923                 if test -z "$cf_cv_src_modules"; then
18924                         cf_cv_src_modules=$cf_dir
18925                 else
18926                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18927                 fi
18928
18929                 # Make the ncurses_cfg.h file record the library interface files as
18930                 # well.  These are header files that are the same name as their
18931                 # directory.  Ncurses is the only library that does not follow
18932                 # that pattern.
18933                 if test $cf_dir = tack ; then
18934                         continue
18935                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18936
18937 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18938
18939                         cat >>confdefs.h <<EOF
18940 #define HAVE_${cf_have_include}_H 1
18941 EOF
18942
18943                         cat >>confdefs.h <<EOF
18944 #define HAVE_LIB${cf_have_include} 1
18945 EOF
18946
18947                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18948                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18949                         if test "$DFT_LWR_MODEL" = "libtool"; then
18950                                 TEST_ARGS="${TEST_DEPS}"
18951                                 TEST_ARG2="${TEST_DEP2}"
18952                         else
18953                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18954                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18955                         fi
18956                 fi
18957         fi
18958 done
18959 echo "$as_me:18959: result: $cf_cv_src_modules" >&5
18960 echo "${ECHO_T}$cf_cv_src_modules" >&6
18961
18962 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18963 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18964
18965 SRC_SUBDIRS=
18966 if test "x$cf_with_manpages" != xno ; then
18967         SRC_SUBDIRS="$SRC_SUBDIRS man"
18968 fi
18969 SRC_SUBDIRS="$SRC_SUBDIRS include"
18970 for cf_dir in $cf_cv_src_modules
18971 do
18972         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18973 done
18974 if test "x$cf_with_tests" != "xno" ; then
18975         SRC_SUBDIRS="$SRC_SUBDIRS test"
18976 fi
18977 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18978 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18979
18980 ADA_SUBDIRS=
18981 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18982         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18983         ADA_SUBDIRS="gen src"
18984         if test "x$cf_with_tests" != "xno" ; then
18985                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18986         fi
18987 fi
18988
18989 SUB_MAKEFILES=
18990 for cf_dir in $SRC_SUBDIRS
18991 do
18992         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18993 done
18994
18995 if test -n "$ADA_SUBDIRS"; then
18996         for cf_dir in $ADA_SUBDIRS
18997         do
18998                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18999         done
19000
19001 fi
19002
19003 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19004    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19005    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19006 fi
19007
19008 DIRS_TO_MAKE="lib"
19009 for cf_item in $cf_list_models
19010 do
19011
19012         case $cf_item in
19013         libtool) cf_subdir='obj_lo'  ;;
19014         normal)  cf_subdir='objects' ;;
19015         debug)   cf_subdir='obj_g' ;;
19016         profile) cf_subdir='obj_p' ;;
19017         shared)
19018                 case $cf_cv_system_name in #(vi
19019                 cygwin) #(vi
19020                         cf_subdir='objects' ;;
19021                 *)
19022                         cf_subdir='obj_s' ;;
19023                 esac
19024         esac
19025
19026         for cf_item2 in $DIRS_TO_MAKE
19027         do
19028                 test $cf_item2 = $cf_subdir && break
19029         done
19030         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19031 done
19032 for cf_dir in $DIRS_TO_MAKE
19033 do
19034         test ! -d $cf_dir && mkdir $cf_dir
19035 done
19036
19037 # symbols that differ when compiling Ada95 by itself.
19038 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19039
19040 # values to use as strings
19041 cat >>confdefs.h <<EOF
19042 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19043 EOF
19044
19045 cat >>confdefs.h <<EOF
19046 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19047 EOF
19048
19049 ### Now that we're done running tests, add the compiler-warnings, if any
19050
19051 cf_fix_cppflags=no
19052 cf_new_cflags=
19053 cf_new_cppflags=
19054 cf_new_extra_cppflags=
19055
19056 for cf_add_cflags in $EXTRA_CFLAGS
19057 do
19058 case $cf_fix_cppflags in
19059 no)
19060         case $cf_add_cflags in #(vi
19061         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19062                 case $cf_add_cflags in
19063                 -D*)
19064                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19065
19066                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19067                                 && test -z "${cf_tst_cflags}" \
19068                                 && cf_fix_cppflags=yes
19069
19070                         if test $cf_fix_cppflags = yes ; then
19071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19072                                 continue
19073                         elif test "${cf_tst_cflags}" = "\"'" ; then
19074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19075                                 continue
19076                         fi
19077                         ;;
19078                 esac
19079                 case "$CPPFLAGS" in
19080                 *$cf_add_cflags) #(vi
19081                         ;;
19082                 *) #(vi
19083                         case $cf_add_cflags in #(vi
19084                         -D*)
19085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19086
19087 CPPFLAGS=`echo "$CPPFLAGS" | \
19088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19090
19091                                 ;;
19092                         esac
19093                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19094                         ;;
19095                 esac
19096                 ;;
19097         *)
19098                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19099                 ;;
19100         esac
19101         ;;
19102 yes)
19103         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19104
19105         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19106
19107         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19108                 && test -z "${cf_tst_cflags}" \
19109                 && cf_fix_cppflags=no
19110         ;;
19111 esac
19112 done
19113
19114 if test -n "$cf_new_cflags" ; then
19115
19116         CFLAGS="$CFLAGS $cf_new_cflags"
19117 fi
19118
19119 if test -n "$cf_new_cppflags" ; then
19120
19121         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19122 fi
19123
19124 if test -n "$cf_new_extra_cppflags" ; then
19125
19126         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19127 fi
19128
19129 ### Define substitutions for header files to avoid name-pollution
19130
19131 if test "$cf_cv_have_tcgetattr" = yes ; then
19132         HAVE_TCGETATTR=1
19133 else
19134         HAVE_TCGETATTR=0
19135 fi
19136
19137 if test "$ac_cv_header_termio_h" = yes ; then
19138         HAVE_TERMIO_H=1
19139 else
19140         HAVE_TERMIO_H=0
19141 fi
19142
19143 if test "$ac_cv_header_termios_h" = yes ; then
19144         HAVE_TERMIOS_H=1
19145 else
19146         HAVE_TERMIOS_H=0
19147 fi
19148
19149 ################################################################################
19150 test "$use_database" = yes && \
19151 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19152
19153 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19154 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19155
19156 if test x"$enable_pc_files" = xyes ; then \
19157 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19158 MAKE_PC_FILES=
19159 else
19160 MAKE_PC_FILES="#"
19161 fi
19162
19163 # Extract the first word of "tic", so it can be a program name with args.
19164 set dummy tic; ac_word=$2
19165 echo "$as_me:19165: checking for $ac_word" >&5
19166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19167 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19168   echo $ECHO_N "(cached) $ECHO_C" >&6
19169 else
19170   case $TIC_PATH in
19171   [\\/]* | ?:[\\/]*)
19172   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19173   ;;
19174   *)
19175   ac_save_IFS=$IFS; IFS=$ac_path_separator
19176 ac_dummy="$PATH:/usr/local/ncurses/bin"
19177 for ac_dir in $ac_dummy; do
19178   IFS=$ac_save_IFS
19179   test -z "$ac_dir" && ac_dir=.
19180   if $as_executable_p "$ac_dir/$ac_word"; then
19181    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19182    echo "$as_me:19182: found $ac_dir/$ac_word" >&5
19183    break
19184 fi
19185 done
19186
19187   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19188   ;;
19189 esac
19190 fi
19191 TIC_PATH=$ac_cv_path_TIC_PATH
19192
19193 if test -n "$TIC_PATH"; then
19194   echo "$as_me:19194: result: $TIC_PATH" >&5
19195 echo "${ECHO_T}$TIC_PATH" >&6
19196 else
19197   echo "$as_me:19197: result: no" >&5
19198 echo "${ECHO_T}no" >&6
19199 fi
19200
19201 if test -n "$FALLBACK_LIST"
19202 then
19203         if test "$TIC_PATH" = unknown
19204         then
19205                 { echo "$as_me:19205: WARNING: no tic program found for fallbacks" >&5
19206 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19207         fi
19208 fi
19209
19210 if test "x$cf_with_tests" != xno ; then
19211         MAKE_TESTS=
19212 else
19213         MAKE_TESTS="#"
19214 fi
19215
19216 SUB_SCRIPTS=
19217 case $cf_cv_system_name in #(vi
19218 *mingw32*) #(vi
19219         SUB_SCRIPTS="mk-dlls.sh"
19220         ;;
19221 esac
19222
19223 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
19224 ac_config_commands="$ac_config_commands default"
19225 cat >confcache <<\_ACEOF
19226 # This file is a shell script that caches the results of configure
19227 # tests run on this system so they can be shared between configure
19228 # scripts and configure runs, see configure's option --config-cache.
19229 # It is not useful on other systems.  If it contains results you don't
19230 # want to keep, you may remove or edit it.
19231 #
19232 # config.status only pays attention to the cache file if you give it
19233 # the --recheck option to rerun configure.
19234 #
19235 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19236 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19237 # following values.
19238
19239 _ACEOF
19240
19241 # The following way of writing the cache mishandles newlines in values,
19242 # but we know of no workaround that is simple, portable, and efficient.
19243 # So, don't put newlines in cache variables' values.
19244 # Ultrix sh set writes to stderr and can't be redirected directly,
19245 # and sets the high bit in the cache file unless we assign to the vars.
19246 {
19247   (set) 2>&1 |
19248     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19249     *ac_space=\ *)
19250       # `set' does not quote correctly, so add quotes (double-quote
19251       # substitution turns \\\\ into \\, and sed turns \\ into \).
19252       sed -n \
19253         "s/'/'\\\\''/g;
19254           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19255       ;;
19256     *)
19257       # `set' quotes correctly as required by POSIX, so do not add quotes.
19258       sed -n \
19259         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19260       ;;
19261     esac;
19262 } |
19263   sed '
19264      t clear
19265      : clear
19266      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19267      t end
19268      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19269      : end' >>confcache
19270 if cmp -s $cache_file confcache; then :; else
19271   if test -w $cache_file; then
19272     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19273     cat confcache >$cache_file
19274   else
19275     echo "not updating unwritable cache $cache_file"
19276   fi
19277 fi
19278 rm -f confcache
19279
19280 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19281 # Let make expand exec_prefix.
19282 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19283
19284 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19285 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19286 # trailing colons and then remove the whole line if VPATH becomes empty
19287 # (actually we leave an empty line to preserve line numbers).
19288 if test "x$srcdir" = x.; then
19289   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19290 s/:*\$(srcdir):*/:/;
19291 s/:*\${srcdir}:*/:/;
19292 s/:*@srcdir@:*/:/;
19293 s/^\([^=]*=[    ]*\):*/\1/;
19294 s/:*$//;
19295 s/^[^=]*=[      ]*$//;
19296 }'
19297 fi
19298
19299 DEFS=-DHAVE_CONFIG_H
19300
19301 : ${CONFIG_STATUS=./config.status}
19302 ac_clean_files_save=$ac_clean_files
19303 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19304 { echo "$as_me:19304: creating $CONFIG_STATUS" >&5
19305 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19306 cat >$CONFIG_STATUS <<_ACEOF
19307 #! $SHELL
19308 # Generated automatically by configure.
19309 # Run this file to recreate the current configuration.
19310 # Compiler output produced by configure, useful for debugging
19311 # configure, is in config.log if it exists.
19312
19313 debug=false
19314 SHELL=\${CONFIG_SHELL-$SHELL}
19315 ac_cs_invocation="\$0 \$@"
19316
19317 _ACEOF
19318
19319 cat >>$CONFIG_STATUS <<\_ACEOF
19320 # Be Bourne compatible
19321 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19322   emulate sh
19323   NULLCMD=:
19324 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19325   set -o posix
19326 fi
19327
19328 # Name of the executable.
19329 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19330
19331 if expr a : '\(a\)' >/dev/null 2>&1; then
19332   as_expr=expr
19333 else
19334   as_expr=false
19335 fi
19336
19337 rm -f conf$$ conf$$.exe conf$$.file
19338 echo >conf$$.file
19339 if ln -s conf$$.file conf$$ 2>/dev/null; then
19340   # We could just check for DJGPP; but this test a) works b) is more generic
19341   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19342   if test -f conf$$.exe; then
19343     # Don't use ln at all; we don't have any links
19344     as_ln_s='cp -p'
19345   else
19346     as_ln_s='ln -s'
19347   fi
19348 elif ln conf$$.file conf$$ 2>/dev/null; then
19349   as_ln_s=ln
19350 else
19351   as_ln_s='cp -p'
19352 fi
19353 rm -f conf$$ conf$$.exe conf$$.file
19354
19355 as_executable_p="test -f"
19356
19357 # Support unset when possible.
19358 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19359   as_unset=unset
19360 else
19361   as_unset=false
19362 fi
19363
19364 # NLS nuisances.
19365 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19366 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19367 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19368 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19369 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19370 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19371 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19372 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19373
19374 # IFS
19375 # We need space, tab and new line, in precisely that order.
19376 as_nl='
19377 '
19378 IFS="   $as_nl"
19379
19380 # CDPATH.
19381 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19382
19383 exec 6>&1
19384
19385 _ACEOF
19386
19387 # Files that config.status was made for.
19388 if test -n "$ac_config_files"; then
19389   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19390 fi
19391
19392 if test -n "$ac_config_headers"; then
19393   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19394 fi
19395
19396 if test -n "$ac_config_links"; then
19397   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19398 fi
19399
19400 if test -n "$ac_config_commands"; then
19401   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19402 fi
19403
19404 cat >>$CONFIG_STATUS <<\EOF
19405
19406 ac_cs_usage="\
19407 \`$as_me' instantiates files from templates according to the
19408 current configuration.
19409
19410 Usage: $0 [OPTIONS] [FILE]...
19411
19412   -h, --help       print this help, then exit
19413   -V, --version    print version number, then exit
19414   -d, --debug      don't remove temporary files
19415       --recheck    update $as_me by reconfiguring in the same conditions
19416   --file=FILE[:TEMPLATE]
19417                    instantiate the configuration file FILE
19418   --header=FILE[:TEMPLATE]
19419                    instantiate the configuration header FILE
19420
19421 Configuration files:
19422 $config_files
19423
19424 Configuration headers:
19425 $config_headers
19426
19427 Configuration commands:
19428 $config_commands
19429
19430 Report bugs to <dickey@invisible-island.net>."
19431 EOF
19432
19433 cat >>$CONFIG_STATUS <<EOF
19434 ac_cs_version="\\
19435 config.status
19436 configured by $0, generated by GNU Autoconf 2.52.20101002,
19437   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19438
19439 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19440 Free Software Foundation, Inc.
19441 This config.status script is free software; the Free Software Foundation
19442 gives unlimited permission to copy, distribute and modify it."
19443 srcdir=$srcdir
19444 INSTALL="$INSTALL"
19445 EOF
19446
19447 cat >>$CONFIG_STATUS <<\EOF
19448 # If no file are specified by the user, then we need to provide default
19449 # value.  By we need to know if files were specified by the user.
19450 ac_need_defaults=:
19451 while test $# != 0
19452 do
19453   case $1 in
19454   --*=*)
19455     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19456     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19457     shift
19458     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19459     shift
19460     ;;
19461   -*);;
19462   *) # This is not an option, so the user has probably given explicit
19463      # arguments.
19464      ac_need_defaults=false;;
19465   esac
19466
19467   case $1 in
19468   # Handling of the options.
19469 EOF
19470 cat >>$CONFIG_STATUS <<EOF
19471   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19472     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19473     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19474 EOF
19475 cat >>$CONFIG_STATUS <<\EOF
19476   --version | --vers* | -V )
19477     echo "$ac_cs_version"; exit 0 ;;
19478   --he | --h)
19479     # Conflict between --help and --header
19480     { { echo "$as_me:19480: error: ambiguous option: $1
19481 Try \`$0 --help' for more information." >&5
19482 echo "$as_me: error: ambiguous option: $1
19483 Try \`$0 --help' for more information." >&2;}
19484    { (exit 1); exit 1; }; };;
19485   --help | --hel | -h )
19486     echo "$ac_cs_usage"; exit 0 ;;
19487   --debug | --d* | -d )
19488     debug=: ;;
19489   --file | --fil | --fi | --f )
19490     shift
19491     CONFIG_FILES="$CONFIG_FILES $1"
19492     ac_need_defaults=false;;
19493   --header | --heade | --head | --hea )
19494     shift
19495     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19496     ac_need_defaults=false;;
19497
19498   # This is an error.
19499   -*) { { echo "$as_me:19499: error: unrecognized option: $1
19500 Try \`$0 --help' for more information." >&5
19501 echo "$as_me: error: unrecognized option: $1
19502 Try \`$0 --help' for more information." >&2;}
19503    { (exit 1); exit 1; }; } ;;
19504
19505   *) ac_config_targets="$ac_config_targets $1" ;;
19506
19507   esac
19508   shift
19509 done
19510
19511 exec 5>>config.log
19512 cat >&5 << _ACEOF
19513
19514 ## ----------------------- ##
19515 ## Running config.status.  ##
19516 ## ----------------------- ##
19517
19518 This file was extended by $as_me 2.52.20101002, executed with
19519   CONFIG_FILES    = $CONFIG_FILES
19520   CONFIG_HEADERS  = $CONFIG_HEADERS
19521   CONFIG_LINKS    = $CONFIG_LINKS
19522   CONFIG_COMMANDS = $CONFIG_COMMANDS
19523   > $ac_cs_invocation
19524 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19525
19526 _ACEOF
19527 EOF
19528
19529 cat >>$CONFIG_STATUS <<EOF
19530 #
19531 # INIT-COMMANDS section.
19532 #
19533
19534 ### Special initialization commands, used to pass information from the
19535 ### configuration-run into config.status
19536
19537 AWK="$AWK"
19538 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19539 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19540 ECHO_LINK="$ECHO_LINK"
19541 LDCONFIG="$LDCONFIG"
19542 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19543 LIB_NAME="$LIB_NAME"
19544 LIB_SUBSETS="$LIB_SUBSETS"
19545 LIB_SUFFIX="$LIB_SUFFIX"
19546 LIB_TRACING="$LIB_TRACING"
19547 LN_S="$LN_S"
19548 MAKE_TERMINFO="$MAKE_TERMINFO"
19549 NCURSES_MAJOR="$NCURSES_MAJOR"
19550 NCURSES_MINOR="$NCURSES_MINOR"
19551 NCURSES_OSPEED="$NCURSES_OSPEED"
19552 NCURSES_PATCH="$NCURSES_PATCH"
19553 SRC_SUBDIRS="$SRC_SUBDIRS"
19554 TERMINFO="$TERMINFO"
19555 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19556 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19557 TICS_NAME="$TICS_NAME"
19558 TIC_PATH="$TIC_PATH"
19559 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19560 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19561 TINFO_NAME="$TINFO_NAME"
19562 TINFO_SUFFIX="$TINFO_SUFFIX"
19563 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19564 WITH_CURSES_H="$with_curses_h"
19565 WITH_ECHO="$with_echo"
19566 WITH_OVERWRITE="$with_overwrite"
19567 cf_LIST_MODELS="$cf_list_models"
19568 cf_cv_abi_version="$cf_cv_abi_version"
19569 cf_cv_do_relink="$cf_cv_do_relink"
19570 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19571 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19572 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19573 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19574 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19575 cf_cv_rel_version="$cf_cv_rel_version"
19576 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19577 cf_cv_shared_soname='$cf_cv_shared_soname'
19578 cf_cv_shlib_version="$cf_cv_shlib_version"
19579 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19580 cf_cv_system_name="$cf_cv_system_name"
19581 cf_with_ada="$cf_with_ada"
19582 cf_with_cxx_binding="$cf_with_cxx_binding"
19583 cf_with_manpages="$cf_with_manpages"
19584 cf_with_tests="$cf_with_tests"
19585 host="$host"
19586 target="$target"
19587
19588 EOF
19589
19590 cat >>$CONFIG_STATUS <<\EOF
19591 for ac_config_target in $ac_config_targets
19592 do
19593   case "$ac_config_target" in
19594   # Handling of arguments.
19595   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19596   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19597   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19598   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19599   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19600   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19601   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19602   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19603   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19604   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19605   *) { { echo "$as_me:19605: error: invalid argument: $ac_config_target" >&5
19606 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19607    { (exit 1); exit 1; }; };;
19608   esac
19609 done
19610
19611 # If the user did not use the arguments to specify the items to instantiate,
19612 # then the envvar interface is used.  Set only those that are not.
19613 # We use the long form for the default assignment because of an extremely
19614 # bizarre bug on SunOS 4.1.3.
19615 if $ac_need_defaults; then
19616   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19617   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19618   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19619 fi
19620
19621 # Create a temporary directory, and hook for its removal unless debugging.
19622 $debug ||
19623 {
19624   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19625   trap '{ (exit 1); exit 1; }' 1 2 13 15
19626 }
19627
19628 # Create a (secure) tmp directory for tmp files.
19629 : ${TMPDIR=/tmp}
19630 {
19631   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19632   test -n "$tmp" && test -d "$tmp"
19633 }  ||
19634 {
19635   tmp=$TMPDIR/cs$$-$RANDOM
19636   (umask 077 && mkdir $tmp)
19637 } ||
19638 {
19639    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19640    { (exit 1); exit 1; }
19641 }
19642
19643 EOF
19644
19645 cat >>$CONFIG_STATUS <<EOF
19646
19647 #
19648 # CONFIG_FILES section.
19649 #
19650
19651 # No need to generate the scripts if there are no CONFIG_FILES.
19652 # This happens for instance when ./config.status config.h
19653 if test -n "\$CONFIG_FILES"; then
19654   # Protect against being on the right side of a sed subst in config.status.
19655   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19656    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19657 s,@SHELL@,$SHELL,;t t
19658 s,@exec_prefix@,$exec_prefix,;t t
19659 s,@prefix@,$prefix,;t t
19660 s,@program_transform_name@,$program_transform_name,;t t
19661 s,@bindir@,$bindir,;t t
19662 s,@sbindir@,$sbindir,;t t
19663 s,@libexecdir@,$libexecdir,;t t
19664 s,@datadir@,$datadir,;t t
19665 s,@sysconfdir@,$sysconfdir,;t t
19666 s,@sharedstatedir@,$sharedstatedir,;t t
19667 s,@localstatedir@,$localstatedir,;t t
19668 s,@libdir@,$libdir,;t t
19669 s,@includedir@,$includedir,;t t
19670 s,@oldincludedir@,$oldincludedir,;t t
19671 s,@infodir@,$infodir,;t t
19672 s,@mandir@,$mandir,;t t
19673 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19674 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19675 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19676 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19677 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19678 s,@build_alias@,$build_alias,;t t
19679 s,@host_alias@,$host_alias,;t t
19680 s,@target_alias@,$target_alias,;t t
19681 s,@ECHO_C@,$ECHO_C,;t t
19682 s,@ECHO_N@,$ECHO_N,;t t
19683 s,@ECHO_T@,$ECHO_T,;t t
19684 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19685 s,@DEFS@,$DEFS,;t t
19686 s,@LIBS@,$LIBS,;t t
19687 s,@top_builddir@,$top_builddir,;t t
19688 s,@EGREP@,$EGREP,;t t
19689 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19690 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19691 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19692 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19693 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19694 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19695 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19696 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19697 s,@build@,$build,;t t
19698 s,@build_cpu@,$build_cpu,;t t
19699 s,@build_vendor@,$build_vendor,;t t
19700 s,@build_os@,$build_os,;t t
19701 s,@host@,$host,;t t
19702 s,@host_cpu@,$host_cpu,;t t
19703 s,@host_vendor@,$host_vendor,;t t
19704 s,@host_os@,$host_os,;t t
19705 s,@target@,$target,;t t
19706 s,@target_cpu@,$target_cpu,;t t
19707 s,@target_vendor@,$target_vendor,;t t
19708 s,@target_os@,$target_os,;t t
19709 s,@CC@,$CC,;t t
19710 s,@CFLAGS@,$CFLAGS,;t t
19711 s,@LDFLAGS@,$LDFLAGS,;t t
19712 s,@CPPFLAGS@,$CPPFLAGS,;t t
19713 s,@ac_ct_CC@,$ac_ct_CC,;t t
19714 s,@EXEEXT@,$EXEEXT,;t t
19715 s,@OBJEXT@,$OBJEXT,;t t
19716 s,@CPP@,$CPP,;t t
19717 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19718 s,@PROG_EXT@,$PROG_EXT,;t t
19719 s,@LDCONFIG@,$LDCONFIG,;t t
19720 s,@CXX@,$CXX,;t t
19721 s,@CXXFLAGS@,$CXXFLAGS,;t t
19722 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19723 s,@AWK@,$AWK,;t t
19724 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19725 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19726 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19727 s,@LINT@,$LINT,;t t
19728 s,@LINT_OPTS@,$LINT_OPTS,;t t
19729 s,@LN_S@,$LN_S,;t t
19730 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19731 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19732 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19733 s,@SET_MAKE@,$SET_MAKE,;t t
19734 s,@CTAGS@,$CTAGS,;t t
19735 s,@ETAGS@,$ETAGS,;t t
19736 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19737 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19738 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19739 s,@RANLIB@,$RANLIB,;t t
19740 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19741 s,@LD@,$LD,;t t
19742 s,@ac_ct_LD@,$ac_ct_LD,;t t
19743 s,@AR@,$AR,;t t
19744 s,@ac_ct_AR@,$ac_ct_AR,;t t
19745 s,@ARFLAGS@,$ARFLAGS,;t t
19746 s,@DESTDIR@,$DESTDIR,;t t
19747 s,@BUILD_CC@,$BUILD_CC,;t t
19748 s,@BUILD_CPP@,$BUILD_CPP,;t t
19749 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19750 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19751 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19752 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19753 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19754 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19755 s,@cf_list_models@,$cf_list_models,;t t
19756 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19757 s,@LIBTOOL@,$LIBTOOL,;t t
19758 s,@LT_UNDEF@,$LT_UNDEF,;t t
19759 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19760 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19761 s,@LIB_CREATE@,$LIB_CREATE,;t t
19762 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19763 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19764 s,@LIB_PREP@,$LIB_PREP,;t t
19765 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19766 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19767 s,@LIB_LINK@,$LIB_LINK,;t t
19768 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19769 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19770 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19771 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19772 s,@TICS_NAME@,$TICS_NAME,;t t
19773 s,@TINFO_NAME@,$TINFO_NAME,;t t
19774 s,@LIB_NAME@,$LIB_NAME,;t t
19775 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19776 s,@CC_G_OPT@,$CC_G_OPT,;t t
19777 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19778 s,@LD_MODEL@,$LD_MODEL,;t t
19779 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19780 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19781 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19782 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19783 s,@LINK_PROGS@,$LINK_PROGS,;t t
19784 s,@LINK_TESTS@,$LINK_TESTS,;t t
19785 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19786 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19787 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19788 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19789 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19790 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19791 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19792 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19793 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19794 s,@TERMINFO@,$TERMINFO,;t t
19795 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19796 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19797 s,@TERMPATH@,$TERMPATH,;t t
19798 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19799 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19800 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19801 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19802 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19803 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19804 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19805 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19806 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19807 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19808 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19809 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19810 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19811 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19812 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19813 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19814 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19815 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19816 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19817 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19818 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19819 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19820 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19821 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19822 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19823 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19824 s,@PTHREAD@,$PTHREAD,;t t
19825 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19826 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19827 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19828 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19829 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19830 s,@ECHO_LINK@,$ECHO_LINK,;t t
19831 s,@ADAFLAGS@,$ADAFLAGS,;t t
19832 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19833 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19834 s,@ADA_TRACE@,$ADA_TRACE,;t t
19835 s,@MATH_LIB@,$MATH_LIB,;t t
19836 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19837 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19838 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19839 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19840 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19841 s,@TEST_LIBS@,$TEST_LIBS,;t t
19842 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19843 s,@CXXCPP@,$CXXCPP,;t t
19844 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19845 s,@CXX_AR@,$CXX_AR,;t t
19846 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19847 s,@CXXLIBS@,$CXXLIBS,;t t
19848 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19849 s,@gnat_exists@,$gnat_exists,;t t
19850 s,@cf_compile_generics@,$cf_compile_generics,;t t
19851 s,@cf_generic_objects@,$cf_generic_objects,;t t
19852 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19853 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19854 s,@M4_exists@,$M4_exists,;t t
19855 s,@cf_ada_make@,$cf_ada_make,;t t
19856 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19857 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19858 s,@cf_ada_package@,$cf_ada_package,;t t
19859 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19860 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19861 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19862 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19863 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19864 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19865 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19866 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19867 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19868 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19869 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19870 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19871 s,@TICS_ARGS@,$TICS_ARGS,;t t
19872 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19873 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19874 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19875 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19876 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19877 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19878 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19879 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19880 s,@TICS_LIST@,$TICS_LIST,;t t
19881 s,@TINFO_LIST@,$TINFO_LIST,;t t
19882 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19883 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19884 s,@TEST_ARGS@,$TEST_ARGS,;t t
19885 s,@TEST_DEPS@,$TEST_DEPS,;t t
19886 s,@TEST_ARG2@,$TEST_ARG2,;t t
19887 s,@TEST_DEP2@,$TEST_DEP2,;t t
19888 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19889 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19890 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19891 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19892 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19893 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19894 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19895 s,@cross_compiling@,$cross_compiling,;t t
19896 s,@TIC_PATH@,$TIC_PATH,;t t
19897 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
19898 CEOF
19899
19900 EOF
19901
19902   cat >>$CONFIG_STATUS <<\EOF
19903   # Split the substitutions into bite-sized pieces for seds with
19904   # small command number limits, like on Digital OSF/1 and HP-UX.
19905   ac_max_sed_lines=48
19906   ac_sed_frag=1 # Number of current file.
19907   ac_beg=1 # First line for current file.
19908   ac_end=$ac_max_sed_lines # Line after last line for current file.
19909   ac_more_lines=:
19910   ac_sed_cmds=
19911   while $ac_more_lines; do
19912     if test $ac_beg -gt 1; then
19913       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19914     else
19915       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19916     fi
19917     if test ! -s $tmp/subs.frag; then
19918       ac_more_lines=false
19919     else
19920       # The purpose of the label and of the branching condition is to
19921       # speed up the sed processing (if there are no `@' at all, there
19922       # is no need to browse any of the substitutions).
19923       # These are the two extra sed commands mentioned above.
19924       (echo ':t
19925   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19926       if test -z "$ac_sed_cmds"; then
19927         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19928       else
19929         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19930       fi
19931       ac_sed_frag=`expr $ac_sed_frag + 1`
19932       ac_beg=$ac_end
19933       ac_end=`expr $ac_end + $ac_max_sed_lines`
19934     fi
19935   done
19936   if test -z "$ac_sed_cmds"; then
19937     ac_sed_cmds=cat
19938   fi
19939 fi # test -n "$CONFIG_FILES"
19940
19941 EOF
19942 cat >>$CONFIG_STATUS <<\EOF
19943 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19944   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19945   case $ac_file in
19946   - | *:- | *:-:* ) # input from stdin
19947         cat >$tmp/stdin
19948         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19949         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19950   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19951         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19952   * )   ac_file_in=$ac_file.in ;;
19953   esac
19954
19955   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19956   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19957          X"$ac_file" : 'X\(//\)[^/]' \| \
19958          X"$ac_file" : 'X\(//\)$' \| \
19959          X"$ac_file" : 'X\(/\)' \| \
19960          .     : '\(.\)' 2>/dev/null ||
19961 echo X"$ac_file" |
19962     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19963           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19964           /^X\(\/\/\)$/{ s//\1/; q; }
19965           /^X\(\/\).*/{ s//\1/; q; }
19966           s/.*/./; q'`
19967   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19968     { case "$ac_dir" in
19969   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19970   *)                      as_incr_dir=.;;
19971 esac
19972 as_dummy="$ac_dir"
19973 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19974   case $as_mkdir_dir in
19975     # Skip DOS drivespec
19976     ?:) as_incr_dir=$as_mkdir_dir ;;
19977     *)
19978       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19979       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19980     ;;
19981   esac
19982 done; }
19983
19984     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19985     # A "../" for each directory in $ac_dir_suffix.
19986     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19987   else
19988     ac_dir_suffix= ac_dots=
19989   fi
19990
19991   case $srcdir in
19992   .)  ac_srcdir=.
19993       if test -z "$ac_dots"; then
19994          ac_top_srcdir=.
19995       else
19996          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19997       fi ;;
19998   [\\/]* | ?:[\\/]* )
19999       ac_srcdir=$srcdir$ac_dir_suffix;
20000       ac_top_srcdir=$srcdir ;;
20001   *) # Relative path.
20002     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20003     ac_top_srcdir=$ac_dots$srcdir ;;
20004   esac
20005
20006   case $INSTALL in
20007   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20008   *) ac_INSTALL=$ac_dots$INSTALL ;;
20009   esac
20010
20011   if test x"$ac_file" != x-; then
20012     { echo "$as_me:20012: creating $ac_file" >&5
20013 echo "$as_me: creating $ac_file" >&6;}
20014     rm -f "$ac_file"
20015   fi
20016   # Let's still pretend it is `configure' which instantiates (i.e., don't
20017   # use $as_me), people would be surprised to read:
20018   #    /* config.h.  Generated automatically by config.status.  */
20019   configure_input="Generated automatically from `echo $ac_file_in |
20020                                                  sed 's,.*/,,'` by configure."
20021
20022   # First look for the input files in the build tree, otherwise in the
20023   # src tree.
20024   ac_file_inputs=`IFS=:
20025     for f in $ac_file_in; do
20026       case $f in
20027       -) echo $tmp/stdin ;;
20028       [\\/$]*)
20029          # Absolute (can't be DOS-style, as IFS=:)
20030          test -f "$f" || { { echo "$as_me:20030: error: cannot find input file: $f" >&5
20031 echo "$as_me: error: cannot find input file: $f" >&2;}
20032    { (exit 1); exit 1; }; }
20033          echo $f;;
20034       *) # Relative
20035          if test -f "$f"; then
20036            # Build tree
20037            echo $f
20038          elif test -f "$srcdir/$f"; then
20039            # Source tree
20040            echo $srcdir/$f
20041          else
20042            # /dev/null tree
20043            { { echo "$as_me:20043: error: cannot find input file: $f" >&5
20044 echo "$as_me: error: cannot find input file: $f" >&2;}
20045    { (exit 1); exit 1; }; }
20046          fi;;
20047       esac
20048     done` || { (exit 1); exit 1; }
20049 EOF
20050 cat >>$CONFIG_STATUS <<EOF
20051   sed "$ac_vpsub
20052 $extrasub
20053 EOF
20054 cat >>$CONFIG_STATUS <<\EOF
20055 :t
20056 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20057 s,@configure_input@,$configure_input,;t t
20058 s,@srcdir@,$ac_srcdir,;t t
20059 s,@top_srcdir@,$ac_top_srcdir,;t t
20060 s,@INSTALL@,$ac_INSTALL,;t t
20061 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20062   rm -f $tmp/stdin
20063   if test x"$ac_file" != x-; then
20064     mv $tmp/out $ac_file
20065   else
20066     cat $tmp/out
20067     rm -f $tmp/out
20068   fi
20069
20070 done
20071 EOF
20072 cat >>$CONFIG_STATUS <<\EOF
20073
20074 #
20075 # CONFIG_HEADER section.
20076 #
20077
20078 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20079 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20080 #
20081 # ac_d sets the value in "#define NAME VALUE" lines.
20082 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20083 ac_dB='[        ].*$,\1#\2'
20084 ac_dC=' '
20085 ac_dD=',;t'
20086 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20087 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20088 ac_iB='\([      ]\),\1#\2define\3'
20089 ac_iC=' '
20090 ac_iD='\4,;t'
20091 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20092 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20093 ac_uB='$,\1#\2define\3'
20094 ac_uC=' '
20095 ac_uD=',;t'
20096
20097 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20098   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20099   case $ac_file in
20100   - | *:- | *:-:* ) # input from stdin
20101         cat >$tmp/stdin
20102         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20103         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20104   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20105         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20106   * )   ac_file_in=$ac_file.in ;;
20107   esac
20108
20109   test x"$ac_file" != x- && { echo "$as_me:20109: creating $ac_file" >&5
20110 echo "$as_me: creating $ac_file" >&6;}
20111
20112   # First look for the input files in the build tree, otherwise in the
20113   # src tree.
20114   ac_file_inputs=`IFS=:
20115     for f in $ac_file_in; do
20116       case $f in
20117       -) echo $tmp/stdin ;;
20118       [\\/$]*)
20119          # Absolute (can't be DOS-style, as IFS=:)
20120          test -f "$f" || { { echo "$as_me:20120: error: cannot find input file: $f" >&5
20121 echo "$as_me: error: cannot find input file: $f" >&2;}
20122    { (exit 1); exit 1; }; }
20123          echo $f;;
20124       *) # Relative
20125          if test -f "$f"; then
20126            # Build tree
20127            echo $f
20128          elif test -f "$srcdir/$f"; then
20129            # Source tree
20130            echo $srcdir/$f
20131          else
20132            # /dev/null tree
20133            { { echo "$as_me:20133: error: cannot find input file: $f" >&5
20134 echo "$as_me: error: cannot find input file: $f" >&2;}
20135    { (exit 1); exit 1; }; }
20136          fi;;
20137       esac
20138     done` || { (exit 1); exit 1; }
20139   # Remove the trailing spaces.
20140   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20141
20142 EOF
20143
20144 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20145 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20146 # be either 'cat' or 'sort'.
20147 cat confdefs.h | uniq >conftest.vals
20148
20149 # Break up conftest.vals because some shells have a limit on
20150 # the size of here documents, and old seds have small limits too.
20151
20152 rm -f conftest.tail
20153 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20154 while grep . conftest.vals >/dev/null
20155 do
20156   # Write chunks of a limited-size here document to conftest.frag.
20157   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20158   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20159   echo 'CEOF' >> $CONFIG_STATUS
20160   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20161   rm -f conftest.vals
20162   mv conftest.tail conftest.vals
20163 done
20164 rm -f conftest.vals
20165
20166 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20167 # marker @DEFS@.
20168 echo '  cat >> conftest.edit <<CEOF
20169 /@DEFS@/r conftest.frag
20170 /@DEFS@/d
20171 CEOF
20172 sed -f conftest.edit $tmp/in > $tmp/out
20173 rm -f $tmp/in
20174 mv $tmp/out $tmp/in
20175 rm -f conftest.edit conftest.frag
20176 ' >> $CONFIG_STATUS
20177
20178 cat >>$CONFIG_STATUS <<\EOF
20179   # Let's still pretend it is `configure' which instantiates (i.e., don't
20180   # use $as_me), people would be surprised to read:
20181   #    /* config.h.  Generated automatically by config.status.  */
20182   if test x"$ac_file" = x-; then
20183     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20184   else
20185     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20186   fi
20187   cat $tmp/in >>$tmp/config.h
20188   rm -f $tmp/in
20189   if test x"$ac_file" != x-; then
20190     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20191       { echo "$as_me:20191: $ac_file is unchanged" >&5
20192 echo "$as_me: $ac_file is unchanged" >&6;}
20193     else
20194       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20195          X"$ac_file" : 'X\(//\)[^/]' \| \
20196          X"$ac_file" : 'X\(//\)$' \| \
20197          X"$ac_file" : 'X\(/\)' \| \
20198          .     : '\(.\)' 2>/dev/null ||
20199 echo X"$ac_file" |
20200     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20201           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20202           /^X\(\/\/\)$/{ s//\1/; q; }
20203           /^X\(\/\).*/{ s//\1/; q; }
20204           s/.*/./; q'`
20205       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20206         { case "$ac_dir" in
20207   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20208   *)                      as_incr_dir=.;;
20209 esac
20210 as_dummy="$ac_dir"
20211 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20212   case $as_mkdir_dir in
20213     # Skip DOS drivespec
20214     ?:) as_incr_dir=$as_mkdir_dir ;;
20215     *)
20216       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20217       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20218     ;;
20219   esac
20220 done; }
20221
20222       fi
20223       rm -f $ac_file
20224       mv $tmp/config.h $ac_file
20225     fi
20226   else
20227     cat $tmp/config.h
20228     rm -f $tmp/config.h
20229   fi
20230 done
20231 EOF
20232 cat >>$CONFIG_STATUS <<\EOF
20233 #
20234 # CONFIG_COMMANDS section.
20235 #
20236 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20237   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20238   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20239
20240   case $ac_dest in
20241     default )
20242 if test "x$cf_with_tests" != xno ; then
20243
20244 for cf_dir in test
20245 do
20246         if test ! -d $srcdir/$cf_dir; then
20247                 continue
20248         elif test -f $srcdir/$cf_dir/programs; then
20249                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20250         fi
20251 done
20252
20253 fi
20254
20255         case $cf_cv_system_name in #(vi
20256         OS/2*|os2*) #(vi
20257         LIB_PREFIX=''
20258         ;;
20259         *)      LIB_PREFIX='lib'
20260         ;;
20261         esac
20262 cf_prefix=$LIB_PREFIX
20263
20264 if test $cf_cv_shlib_version = cygdll ; then
20265         TINFO_NAME=$TINFO_ARG_SUFFIX
20266         TINFO_SUFFIX=.dll
20267 fi
20268
20269 if test -n "$TINFO_SUFFIX" ; then
20270         case $TINFO_SUFFIX in
20271         tw*)
20272                 TINFO_NAME="${TINFO_NAME}tw"
20273                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20274                 ;;
20275         t*)
20276                 TINFO_NAME="${TINFO_NAME}t"
20277                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20278                 ;;
20279         w*)
20280                 TINFO_NAME="${TINFO_NAME}w"
20281                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20282                 ;;
20283         esac
20284 fi
20285
20286 for cf_dir in $SRC_SUBDIRS
20287 do
20288         if test ! -d $srcdir/$cf_dir ; then
20289                 continue
20290         elif test -f $srcdir/$cf_dir/modules; then
20291
20292                 SHARED_LIB=
20293                 LIBS_TO_MAKE=
20294                 for cf_item in $cf_LIST_MODELS
20295                 do
20296
20297         case $cf_item in #(vi
20298         libtool) #(vi
20299                 cf_suffix='.la'
20300                 cf_depsuf=$cf_suffix
20301                 ;;
20302         normal) #(vi
20303                 cf_suffix='.a'
20304                 cf_depsuf=$cf_suffix
20305                 ;;
20306         debug) #(vi
20307                 cf_suffix='_g.a'
20308                 cf_depsuf=$cf_suffix
20309                 ;;
20310         profile) #(vi
20311                 cf_suffix='_p.a'
20312                 cf_depsuf=$cf_suffix
20313                 ;;
20314         shared) #(vi
20315                 case $cf_cv_system_name in
20316                 aix[56]*) #(vi
20317                         cf_suffix='.a'
20318                         cf_depsuf=$cf_suffix
20319                         ;;
20320                 cygwin*) #(vi
20321                         cf_suffix='.dll'
20322                         cf_depsuf='.dll.a'
20323                         ;;
20324                 darwin*) #(vi
20325                         cf_suffix='.dylib'
20326                         cf_depsuf=$cf_suffix
20327                         ;;
20328                 hpux*) #(vi
20329                         case $target in
20330                         ia64*) #(vi
20331                                 cf_suffix='.so'
20332                                 cf_depsuf=$cf_suffix
20333                                 ;;
20334                         *) #(vi
20335                                 cf_suffix='.sl'
20336                                 cf_depsuf=$cf_suffix
20337                                 ;;
20338                         esac
20339                         ;;
20340                 *)      cf_suffix='.so'
20341                         cf_depsuf=$cf_suffix
20342                         ;;
20343                 esac
20344         esac
20345         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20346         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20347
20348                         if test $cf_item = shared ; then
20349                         if test "$cf_cv_do_symlinks" = yes ; then
20350                                 case "$cf_cv_shlib_version" in #(vi
20351                                 rel) #(vi
20352                                         case "$cf_cv_system_name" in #(vi
20353                                         darwin*)
20354                                         case .${LIB_SUFFIX} in
20355                                         .tw*)
20356                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20357                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20358                                                 ;;
20359                                         .t*)
20360                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20361                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20362                                                 ;;
20363                                         .w*)
20364                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20365                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20366                                                 ;;
20367                                         *)
20368                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20369                                                 ;;
20370                                         esac
20371                                         ;; #(vi
20372                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20373                                         esac
20374                                         ;;
20375                                 abi)
20376                                         case "$cf_cv_system_name" in #(vi
20377                                         darwin*)
20378                                         case .${LIB_SUFFIX} in
20379                                         .tw*)
20380                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20381                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20382                                                 ;;
20383                                         .t*)
20384                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20385                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20386                                                 ;;
20387                                         .w*)
20388                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20389                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20390                                                 ;;
20391                                         *)
20392                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20393                                                 ;;
20394                                         esac
20395                                         ;; #(vi
20396                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20397                                         esac
20398                                         ;;
20399                                 esac
20400                         fi
20401                         # cygwin needs import library, and has unique naming convention
20402                         # use autodetected ${cf_prefix} for import lib and static lib, but
20403                         # use 'cyg' prefix for shared lib.
20404                         if test $cf_cv_shlib_version = cygdll ; then
20405                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20406                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20407                                 continue
20408                         fi
20409                         fi
20410                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20411                 done
20412
20413                 if test $cf_dir = ncurses ; then
20414                         cf_subsets="$LIB_SUBSETS"
20415                         cf_r_parts="$cf_subsets"
20416                         cf_liblist="$LIBS_TO_MAKE"
20417
20418                         while test -n "$cf_r_parts"
20419                         do
20420                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20421                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20422                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20423                                         cf_item=
20424                                         case $cf_l_parts in #(vi
20425                                         *termlib*) #(vi
20426                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20427                                                 ;;
20428                                         *ticlib*)
20429                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20430                                                 ;;
20431                                         *)
20432                                                 break
20433                                                 ;;
20434                                         esac
20435                                         if test -n "$cf_item"; then
20436                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20437                                         fi
20438                                 else
20439                                         break
20440                                 fi
20441                         done
20442                 else
20443                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20444                 fi
20445
20446                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20447                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20448                         $cf_dir/Makefile >$cf_dir/Makefile.out
20449                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20450
20451                 $AWK -f $srcdir/mk-0th.awk \
20452                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20453                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20454
20455                 for cf_subset in $cf_subsets
20456                 do
20457                         cf_subdirs=
20458                         for cf_item in $cf_LIST_MODELS
20459                         do
20460                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20461
20462 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20463
20464         case $cf_item in #(vi
20465         libtool) #(vi
20466                 cf_suffix='.la'
20467                 cf_depsuf=$cf_suffix
20468                 ;;
20469         normal) #(vi
20470                 cf_suffix='.a'
20471                 cf_depsuf=$cf_suffix
20472                 ;;
20473         debug) #(vi
20474                 cf_suffix='_g.a'
20475                 cf_depsuf=$cf_suffix
20476                 ;;
20477         profile) #(vi
20478                 cf_suffix='_p.a'
20479                 cf_depsuf=$cf_suffix
20480                 ;;
20481         shared) #(vi
20482                 case $cf_cv_system_name in
20483                 aix[56]*) #(vi
20484                         cf_suffix='.a'
20485                         cf_depsuf=$cf_suffix
20486                         ;;
20487                 cygwin*) #(vi
20488                         cf_suffix='.dll'
20489                         cf_depsuf='.dll.a'
20490                         ;;
20491                 darwin*) #(vi
20492                         cf_suffix='.dylib'
20493                         cf_depsuf=$cf_suffix
20494                         ;;
20495                 hpux*) #(vi
20496                         case $target in
20497                         ia64*) #(vi
20498                                 cf_suffix='.so'
20499                                 cf_depsuf=$cf_suffix
20500                                 ;;
20501                         *) #(vi
20502                                 cf_suffix='.sl'
20503                                 cf_depsuf=$cf_suffix
20504                                 ;;
20505                         esac
20506                         ;;
20507                 *)      cf_suffix='.so'
20508                         cf_depsuf=$cf_suffix
20509                         ;;
20510                 esac
20511         esac
20512         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20513         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20514
20515         case $cf_item in
20516         libtool) cf_subdir='obj_lo'  ;;
20517         normal)  cf_subdir='objects' ;;
20518         debug)   cf_subdir='obj_g' ;;
20519         profile) cf_subdir='obj_p' ;;
20520         shared)
20521                 case $cf_cv_system_name in #(vi
20522                 cygwin) #(vi
20523                         cf_subdir='objects' ;;
20524                 *)
20525                         cf_subdir='obj_s' ;;
20526                 esac
20527         esac
20528
20529                         # Test for case where we build libtinfo with a different name.
20530                         cf_libname=$cf_dir
20531                         if test $cf_dir = ncurses ; then
20532                                 case $cf_subset in
20533                                 *base*)
20534                                         cf_libname=${cf_libname}$LIB_SUFFIX
20535                                         ;;
20536                                 *termlib*)
20537                                         cf_libname=$TINFO_LIB_SUFFIX
20538                                         ;;
20539                                 ticlib*)
20540                                         cf_libname=$TICS_LIB_SUFFIX
20541                                         ;;
20542                                 esac
20543                         else
20544                                 cf_libname=${cf_libname}$LIB_SUFFIX
20545                         fi
20546                         if test -n "${DFT_ARG_SUFFIX}" ; then
20547                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20548                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20549                         fi
20550
20551                         # These dependencies really are for development, not
20552                         # builds, but they are useful in porting, too.
20553                         cf_depend="../include/ncurses_cfg.h"
20554                         if test "$srcdir" = "."; then
20555                                 cf_reldir="."
20556                         else
20557                                 cf_reldir="\${srcdir}"
20558                         fi
20559
20560                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20561                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20562                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20563                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20564                         fi
20565
20566                         cf_dir_suffix=
20567                         old_cf_suffix="$cf_suffix"
20568                         if test "$cf_cv_shlib_version_infix" = yes ; then
20569                         if test -n "$LIB_SUFFIX" ; then
20570                                 case $LIB_SUFFIX in
20571                                 tw*)
20572                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20573                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20574                                         cf_dir_suffix=tw
20575                                         ;;
20576                                 t*)
20577                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20578                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20579                                         cf_dir_suffix=t
20580                                         ;;
20581                                 w*)
20582                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20583                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20584                                         cf_dir_suffix=w
20585                                         ;;
20586                                 esac
20587                         fi
20588                         fi
20589
20590                         $AWK -f $srcdir/mk-1st.awk \
20591                                 name=${cf_libname}${cf_dir_suffix} \
20592                                 traces=$LIB_TRACING \
20593                                 MODEL=$cf_ITEM \
20594                                 model=$cf_subdir \
20595                                 prefix=$cf_prefix \
20596                                 suffix=$cf_suffix \
20597                                 subset=$cf_subset \
20598                                 SymLink="$LN_S" \
20599                                 TermlibRoot=$TINFO_NAME \
20600                                 TermlibSuffix=$TINFO_SUFFIX \
20601                                 ShlibVer=$cf_cv_shlib_version \
20602                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20603                                 ReLink=${cf_cv_do_relink:-no} \
20604                                 DoLinks=$cf_cv_do_symlinks \
20605                                 rmSoLocs=$cf_cv_rm_so_locs \
20606                                 ldconfig="$LDCONFIG" \
20607                                 overwrite=$WITH_OVERWRITE \
20608                                 depend="$cf_depend" \
20609                                 host="$host" \
20610                                 libtool_version="$LIBTOOL_VERSION" \
20611                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20612
20613                         cf_suffix="$old_cf_suffix"
20614
20615                         for cf_subdir2 in $cf_subdirs lib
20616                         do
20617                                 test $cf_subdir = $cf_subdir2 && break
20618                         done
20619                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20620                         $AWK -f $srcdir/mk-2nd.awk \
20621                                 name=$cf_dir \
20622                                 traces=$LIB_TRACING \
20623                                 MODEL=$cf_ITEM \
20624                                 model=$cf_subdir \
20625                                 subset=$cf_subset \
20626                                 srcdir=$srcdir \
20627                                 echo=$WITH_ECHO \
20628                                 crenames=$cf_cv_prog_CC_c_o \
20629                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20630                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20631                         cf_subdirs="$cf_subdirs $cf_subdir"
20632                         done
20633                 done
20634         fi
20635
20636         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20637 done
20638
20639 for cf_dir in $SRC_SUBDIRS
20640 do
20641         if test ! -d $srcdir/$cf_dir ; then
20642                 continue
20643         fi
20644
20645         if test -f $cf_dir/Makefile ; then
20646                 case "$cf_dir" in
20647                 Ada95) #(vi
20648                         echo 'libs \' >> Makefile
20649                         echo 'install.libs \' >> Makefile
20650                         echo 'uninstall.libs ::' >> Makefile
20651                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20652                         ;;
20653                 esac
20654         fi
20655
20656         if test -f $srcdir/$cf_dir/modules; then
20657                 echo >> Makefile
20658                 if test -f $srcdir/$cf_dir/headers; then
20659 cat >> Makefile <<CF_EOF
20660 install.includes \\
20661 uninstall.includes \\
20662 CF_EOF
20663                 fi
20664 if test "$cf_dir" != "c++" ; then
20665 echo 'lint \' >> Makefile
20666 fi
20667 cat >> Makefile <<CF_EOF
20668 libs \\
20669 lintlib \\
20670 install.libs \\
20671 uninstall.libs \\
20672 install.$cf_dir \\
20673 uninstall.$cf_dir ::
20674         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20675 CF_EOF
20676         elif test -f $srcdir/$cf_dir/headers; then
20677 cat >> Makefile <<CF_EOF
20678
20679 libs \\
20680 install.libs \\
20681 uninstall.libs \\
20682 install.includes \\
20683 uninstall.includes ::
20684         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20685 CF_EOF
20686 fi
20687 done
20688
20689 cat >> Makefile <<CF_EOF
20690
20691 install.libs uninstall.libs \\
20692 install.data uninstall.data ::
20693 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20694 CF_EOF
20695
20696 if test "x$cf_with_manpages" = xyes; then
20697 cat >> Makefile <<CF_EOF
20698
20699 install.man \\
20700 uninstall.man ::
20701         cd man && \${MAKE} \${CF_MFLAGS} \$@
20702 CF_EOF
20703 fi
20704
20705 cat >> Makefile <<CF_EOF
20706
20707 distclean ::
20708         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20709         rm -f headers.sh headers.sed mk_shared_lib.sh
20710         rm -f edit_man.* man_alias.*
20711         rm -rf \${DIRS_TO_MAKE}
20712 CF_EOF
20713
20714 # Special case: tack's manpage lives in its own directory.
20715 if test "x$cf_with_manpages" = xyes; then
20716 if test -d tack ; then
20717 if test -f $srcdir/$tack.h; then
20718 cat >> Makefile <<CF_EOF
20719
20720 install.man \\
20721 uninstall.man ::
20722         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20723 CF_EOF
20724 fi
20725 fi
20726 fi
20727
20728 rm -f headers.sed headers.sh
20729
20730 echo creating headers.sh
20731 cat >headers.sh <<CF_EOF
20732 #! /bin/sh
20733 # This shell script is generated by the 'configure' script.  It is invoked in a
20734 # subdirectory of the build tree.  It generates a sed-script in the parent
20735 # directory that is used to adjust includes for header files that reside in a
20736 # subdirectory of /usr/include, etc.
20737 PRG=""
20738 while test \$# != 3
20739 do
20740 PRG="\$PRG \$1"; shift
20741 done
20742 DST=\$1
20743 REF=\$2
20744 SRC=\$3
20745 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
20746 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
20747 echo installing \$SRC in \$DST
20748 CF_EOF
20749
20750 if test $WITH_CURSES_H = yes; then
20751         cat >>headers.sh <<CF_EOF
20752 case \$DST in
20753 /*/include/*)
20754         END=\`basename \$DST\`
20755         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20756         do
20757                 NAME=\`basename \$i\`
20758                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20759         done
20760         ;;
20761 *)
20762         echo "" >> \$TMPSED
20763         ;;
20764 esac
20765 CF_EOF
20766
20767 else
20768         cat >>headers.sh <<CF_EOF
20769 case \$DST in
20770 /*/include/*)
20771         END=\`basename \$DST\`
20772         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20773         do
20774                 NAME=\`basename \$i\`
20775                 if test "\$NAME" = "curses.h"
20776                 then
20777                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20778                         NAME=ncurses.h
20779                 fi
20780                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20781         done
20782         ;;
20783 *)
20784         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20785         ;;
20786 esac
20787 CF_EOF
20788 fi
20789 cat >>headers.sh <<CF_EOF
20790 rm -f \$TMPSRC
20791 sed -f \$TMPSED \$SRC > \$TMPSRC
20792 NAME=\`basename \$SRC\`
20793 CF_EOF
20794 if test $WITH_CURSES_H != yes; then
20795         cat >>headers.sh <<CF_EOF
20796 test "\$NAME" = "curses.h" && NAME=ncurses.h
20797 CF_EOF
20798 fi
20799 cat >>headers.sh <<CF_EOF
20800 # Just in case someone gzip'd manpages, remove the conflicting copy.
20801 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20802
20803 eval \$PRG \$TMPSRC \$DST/\$NAME
20804 rm -f \$TMPSRC \$TMPSED
20805 CF_EOF
20806
20807 chmod 0755 headers.sh
20808
20809 for cf_dir in $SRC_SUBDIRS
20810 do
20811         if test ! -d $srcdir/$cf_dir ; then
20812                 continue
20813         fi
20814
20815         if test -f $srcdir/$cf_dir/headers; then
20816                 $AWK -f $srcdir/mk-hdr.awk \
20817                         subset="$LIB_SUBSETS" \
20818                         compat="$WITH_CURSES_H" \
20819                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20820         fi
20821
20822         if test -f $srcdir/$cf_dir/modules; then
20823                 if test "$cf_dir" != "c++" ; then
20824                         cat >>$cf_dir/Makefile <<"CF_EOF"
20825 depend : ${AUTO_SRC}
20826         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20827
20828 # DO NOT DELETE THIS LINE -- make depend depends on it.
20829 CF_EOF
20830                 fi
20831         fi
20832 done
20833
20834 if test "x$cf_with_ada" != xno ; then
20835 if test -z "$USE_OLD_MAKERULES" ; then
20836         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20837 fi
20838 fi
20839  ;;
20840   esac
20841 done
20842 EOF
20843
20844 cat >>$CONFIG_STATUS <<\EOF
20845
20846 { (exit 0); exit 0; }
20847 EOF
20848 chmod +x $CONFIG_STATUS
20849 ac_clean_files=$ac_clean_files_save
20850
20851 # configure is writing to config.log, and then calls config.status.
20852 # config.status does its own redirection, appending to config.log.
20853 # Unfortunately, on DOS this fails, as config.log is still kept open
20854 # by configure, so config.status won't be able to write to it; its
20855 # output is simply discarded.  So we exec the FD to /dev/null,
20856 # effectively closing config.log, so it can be properly (re)opened and
20857 # appended to by config.status.  When coming back to configure, we
20858 # need to make the FD available again.
20859 if test "$no_create" != yes; then
20860   ac_cs_success=:
20861   exec 5>/dev/null
20862   $SHELL $CONFIG_STATUS || ac_cs_success=false
20863   exec 5>>config.log
20864   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20865   # would make configure fail if this is the last instruction.
20866   $ac_cs_success || { (exit 1); exit 1; }
20867 fi
20868 ${MAKE:-make} preinstall